UNPKG

webpack-config-jaid

Version:

Takes tiny input and returns a Webpack config in the way I personally like.

7 lines 79.5 kB
/*! *** webpack-config-jaid 14.2.2 *** Copyright © 2021, Jaid <jaid.jsx@gmail.com> (https://github.com/Jaid) *** @license MIT *** See https://github.com/Jaid/webpack-config-jaid !*/ var e,t;e=global,t=function(){return(()=>{var e={1566:(e,t,n)=>{n.d(t,{Z:()=>o});const r=n(3682)("webpack-config-jaid"),i=!(!process.env.TRAVIS_TAG&&!process.env.GITHUB_WORKFLOW);r("Is CI: %s",i);const o=i},7006:(e,t,n)=>{n.d(t,{Z:()=>o});const r=require("webpack-merge");var i=n.n(r);const o=(...e)=>i()(...e)},8939:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(797),i=n.n(r),o=n(1566);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class c{constructor(){s(this,"pkg",null),s(this,"options",null)}getDefaultOptions(){return{}}processOptions(){}getWebpackConfig(){return{}}getDefines(){return{}}getLibraryNameFromPkg(e){return i()(e.name)}createTerserOptions(e){return{compress:{passes:o.Z?10:1,unsafe_comps:!0,unsafe_math:!0,unsafe_regexp:!0,unsafe_undefined:!0},output:{ecma:2019,comments:(e,t)=>3>t.line},...e}}getTitle(){return this.options.title||this.pkg.title||this.pkg.name||"Page"}getDescription(){return this.options.appDescription||this.pkg.description||null}}},2759:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(797),i=n.n(r);const o=require("cep-webpack-plugin");var s=n.n(o),c=n(7006),a=n(5293);const l=class extends a.Z{getIdentifier(){var e;let t="";return null!==(e=this.pkg.author)&&void 0!==e&&e.name&&(t+=i()(this.pkg.author.name),t+="."),t+=i()(this.pkg.name),t}getWebpackConfig(e){const t=super.getWebpackConfig(e),n=this.getIdentifier(),r={plugins:[new(s())({identifier:n,title:this.title,version:this.pkg.version,...this.options.cepOptions||{}})]};return(0,c.Z)(t,r)}}},3944:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(7006),i=n(1168);const o=class extends i.Z{getDefaultOptions(){return{terserOptions:this.createTerserOptions({toplevel:!0}),hashbang:"/usr/bin/env node",publishimo:!0}}getWebpackConfig(){const e=super.getWebpackConfig();return(0,r.Z)(e,{output:{filename:"cli.js"}})}}},8362:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(7006),i=n(1168);const o=class extends i.Z{getDefaultOptions(){return{terserOptions:this.createTerserOptions({toplevel:!0}),hashbang:"/usr/bin/env node",publishimo:!0}}getWebpackConfig(){const e=super.getWebpackConfig();return(0,r.Z)(e,{output:{filename:"cli.js"}})}}},9651:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(3804),i=n(7006),o=n(1168);const s="generator-core-version",c=class extends o.Z{getDefaultOptions(){return{terserOptions:this.createTerserOptions({toplevel:!0,output:{ecma:5}})}}processOptions(e){const t=e.publishimo;return(0,r.isObject)(t)?void(t["generator-core-version"]||(Array.isArray(t.includeFields)?t.includeFields.push(s):t.includeFields=[s],void 0===t.productionOnly&&(t.productionOnly=!1),t["generator-core-version"]="^3.12")):void(e.publishimo={includeFields:[s],"generator-core-version":"^3.12",productionOnly:!1})}getWebpackConfig({pkg:e}){const t=super.getWebpackConfig(),n={output:{libraryTarget:"commonjs2"}};return null!=e&&e.name&&(n.output.library={root:(0,r.camelCase)(e.name),amd:e.name,commonjs:e.name}),(0,i.Z)(t,n)}}},4819:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(7006),i=n(1168);const o=class extends i.Z{getDefaultOptions(){return{terserOptions:this.createTerserOptions({toplevel:!0}),include:!1,nodeExternals:!1,outDir:"build",licenseFileName:!1}}getWebpackConfig(){const e=super.getWebpackConfig();return(0,r.Z)(e,{resolve:{mainFields:["main","module"]}})}}},5293:(e,t,n)=>{n.d(t,{Z:()=>M});const r=require("browser-sync-webpack-plugin");var i=n.n(r),o=n(797),s=n.n(o),c=n(6723);const a=require("html-inline-css-webpack-plugin");var l=n.n(a);const u=require("html-webpack-plugin");var p=n.n(u);const f=require("inject-body-webpack-plugin");var d=n.n(f);const h=require("inject-browser-sync-webpack-plugin");var m=n.n(h),g=n(3804);const y=require("mini-css-extract-plugin");var b=n.n(y),v=n(4078),w=n.n(v);const S=require("postcss-center");var k=n.n(S);const O=require("postcss-easings");var x=n.n(O);const E=require("postcss-import");var C=n.n(E);const P=require("postcss-nested");var j=n.n(P);const N=require("postcss-ordered-values");var F=n.n(N);const T=require("postcss-sorting");var D=n.n(T);const I={nested:j(),easings:x(),import:C(),center:k(),sorting:D(),orderedValues:F()},L=e=>{const t=[],n=(e,n)=>{const r=I[e](n);t.push(r)};return n("nested"),n("easings"),n("import"),n("center"),e.development||(n("sorting",{order:["custom-properties","dollar-variables","declarations","rules","at-rules"],"properties-order":["content","display","flex","width","height","margin","padding"],"unspecified-properties-position":"bottomAlphabetical"}),n("orderedValues")),{postcssOptions:{plugins:t}}};var A=n(1566),_=n(8939);function q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const $=n(3682)("webpack-config-jaid"),M=class extends _.Z{constructor(...e){super(...e),q(this,"port",null),q(this,"hot",!1),q(this,"srcDirectory",null),q(this,"publicPath",null),q(this,"title",null),q(this,"description",null),q(this,"meta",null),q(this,"useMiniCssExtractPlugin",null),q(this,"base64UrlLimit",null)}getDefaultOptions(){return{terserOptions:this.createTerserOptions({toplevel:!0}),nodeExternals:!1,inlineSource:!0,createCssFile:!1,optimizeCss:!0,banner:!1,include:!1}}getBinaryFileRegex(){return/\.(svg|woff|woff2|ttf|eot|otf|mp4|flv|webm|mp3|flac|ogg|m4a|aac)$/}getImageFileRegex(){return/\.(png|jpg|jpeg|webp|gif)$/}getBase64UrlLimit(){return 1e3}processOptions(e){this.hot=!!e.port}isHot(){return this.hot}getPublicPath(){return this.options.publicPath||"."}getLibraryName(e){return s()(e)}getMeta(){return{viewport:"width=device-width,initial-scale=1,user-scalable=no"}}getHtmlPluginOptions(){const e={title:this.title,meta:this.meta,debug:this.options.development,minify:!this.options.development&&{removeAttributeQuotes:!0,collapseWhitespace:!0,collapseBooleanAttributes:!0,decodeEntities:!0,minifyCSS:!0,minifyJS:!0,removeComments:!0,removeRedundantAttributes:!0,sortAttributes:!0,sortClassName:!0,useShortDoctype:!0}};return!this.options.development&&this.options.domain&&A.Z,e}getStyleLoader(){return this.isHot()?"style-loader":this.options.createCssFile?{loader:b().loader}:{loader:"style-loader",options:{injectType:this.options.development?"styleTag":"singletonStyleTag"}}}getInternalCssLoader(){let e;return e=this.options.development?{sourceMap:!0,modules:{localIdentName:"[folder]_[local]_[hash:base62:4]"}}:{modules:{localIdentName:"[hash:base64:6]"}},{loader:"css-loader",options:e}}getExternalCssLoader(){return{loader:"css-loader",options:{sourceMap:this.options.development,modules:!1}}}getPostcssLoader(){return{loader:"postcss-loader",options:L(this.options)}}getMiniCssExtractPluginOptions(){return(0,g.isObject)(this.options.createCssFile)?this.options.createCssFile:{filename:this.options.development?"[name].css":`${this.pkg.version||"[contenthash:6]"}.css`,chunkFilename:this.options.development?"[id].css":"[contenthash:6].css"}}getBrowserSyncOptions(){const e={codeSync:!1};return e.port=+this.options.browserSync>1?+this.options.browserSync:3e3,e}getBrowserSyncPluginOptions(){return{}}getGoogleAnalyticsTrackingId(){var e;return e=this.options.googleAnalyticsTrackingId,(0,c.isEmpty)(e)||this.options.googleAnalyticsOnlyInProduction&&this.options.development?null:this.options.googleAnalyticsTrackingId}shouldInlineJavascript(){return!0}getBodyContent(){return null}getImageLoader(){const e=this.getImageFileRegex();return this.options.development?{test:e,loader:"file-loader",options:{publicPath:this.publicPath,name:"[path][name]-untouched.[ext]"}}:{test:e,loader:"url-loader",options:{limit:this.base64UrlLimit,fallback:{loader:"file-loader",options:{publicPath:this.publicPath,name:"[hash:base64:6].[ext]"}}}}}getWebpackConfig({options:e,entryFolder:t}){e.devPort&&(this.port=e.devPort),process.env.webpackPort&&(this.port=+process.env.webpackPort),this.hot=!!this.port,this.srcDirectory=t,this.publicPath=this.getPublicPath(),$('Public path: "%s"',this.publicPath),this.title=this.getTitle(),this.meta=this.getMeta();const n=this.getHtmlPluginOptions(),r=this.getStyleLoader(),o=this.getInternalCssLoader(),s=this.getExternalCssLoader(),c=this.getPostcssLoader();this.useMiniCssExtractPlugin=r.loader===b().loader;const a=[{test:/\.css$/,include:this.srcDirectory,use:[r,o,c]},{test:/\.css$/,exclude:this.srcDirectory,use:[r,s,c]},{test:/(\.scss|\.sass)$/,use:[r,o,c,"resolve-url-loader","sass-loader"]}],u=this.getBinaryFileRegex();this.base64UrlLimit=this.getBase64UrlLimit();const f={target:"web",resolve:{fallback:{fs:!1}},output:{publicPath:this.publicPath,filename:e.development?"index.js":`${this.pkg.version||"[chunkhash:6]"}.js`},module:{rules:[{test:u,use:{loader:"url-loader",options:{limit:this.base64UrlLimit,fallback:{loader:"file-loader",options:{publicPath:this.publicPath,name:e.development?"[path][name].[ext]":"[hash:base64:6].[ext]"}}}}},this.getImageLoader(),{test:/\.md$/,use:["html-loader","markdown-loader"]},...a]},plugins:[new(p())(n)]},h=this.getBodyContent();if(h&&f.plugins.push(new(d())({content:h})),this.shouldInlineJavascript()&&$("Requested to inline javascript, but inlining is ignored right now"),this.useMiniCssExtractPlugin){const e=this.getMiniCssExtractPluginOptions();f.plugins.push(new(b())(e)),f.plugins.push(new(l()))}if(this.options.development&&this.options.browserSync){const e=this.getBrowserSyncOptions(),t=this.getBrowserSyncPluginOptions();f.plugins.push(new(i())(e,t)),f.plugins.push(new(m())({port:e.port}))}const g=this.getGoogleAnalyticsTrackingId();return f.plugins.push(new(w().DefinePlugin)({GOOGLE_ANALYTICS_TRACKING_ID:JSON.stringify(g)})),f}getDefines(){return{"process.browser":"true"}}}},1168:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(4078),i=n(7006),o=n(8939);const s=class extends o.Z{getDefaultOptions(){return{terserOptions:this.createTerserOptions({toplevel:!0})}}getWebpackConfig(e){const t=super.getWebpackConfig(e),n={target:"node",optimization:{nodeEnv:!1},node:{__dirname:!1,__filename:!1},module:{rules:[{test:/\.(png|jpg|jpeg|webp|gif|svg|woff|woff2|ttf|eot|otf|mp4|flv|webm|mp3|flac|ogg|m4a|aac)$/,use:"buffer-loader"}]},plugins:[new r.DefinePlugin({"process.browser":!1})]};return(0,i.Z)(n,t)}}},24:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(8514),i=n(8986);const o=class extends i.Z{getLibraryNameFromPkg(e){return(0,r.pascalCase)(e.name)}}},8986:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(7006),i=n(1168);const o=class extends i.Z{getDefaultOptions(){return{terserOptions:this.createTerserOptions({toplevel:!0,module:!0}),publishimo:!0}}getWebpackConfig({pkg:e}){const t=super.getWebpackConfig(),n={output:{libraryTarget:"umd2"}};return null!=e&&e.name&&(n.output.library={root:this.getLibraryNameFromPkg(e),amd:e.name,commonjs:e.name}),(0,r.Z)(t,n)}}},544:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(1168);const i=class extends r.Z{}},6198:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(7006),i=n(6154);const o=class extends i.Z{getWebpackConfig(e){const t=super.getWebpackConfig(e);return(0,r.Z)(t,{target:"web"})}}},6154:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(8514),i=n(917);const o=class extends i.Z{getLibraryNameFromPkg(e){return(0,r.pascalCase)(e.name)}}},917:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(797),i=n.n(r),o=n(8939);const s=class extends o.Z{getDefaultOptions(){return{terserOptions:this.createTerserOptions({toplevel:!0,module:!0}),publishimo:!0}}getLibraryName(e){return i()(e)}getWebpackConfig({pkg:e}){const t={output:{libraryTarget:"umd2",globalObject:"this"}};return null!=e&&e.name&&(t.output.library=this.getLibraryNameFromPkg(e)),t}}},7872:(e,t,n)=>{n.d(t,{Z:()=>T});var r=n(8905),i=n.n(r);const o=require("@lcdp/offline-plugin");var s=n.n(o);const c=require("@pmmmwh/react-refresh-webpack-plugin");var a=n.n(c);const l=require("cname-webpack-plugin");var u=n.n(l);const p=require("css-minimizer-webpack-plugin");var f=n.n(p),d=n(6891),h=n.n(d);const m=require("html-favicon-webpack-plugin");var g=n.n(m),y=n(3804);const b=require("log-watcher-webpack-plugin");var v=n.n(b);const w=require("sitemap-xml-webpack-plugin");var S=n.n(w);const k=require("url-join");var O=n.n(k);const x=require("webpack-dev-server"),E=require("webpack-pwa-manifest");var C=n.n(E),P=n(7006),j=n(5293);function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const F=n(3682)("webpack-config-jaid"),T=class extends j.Z{constructor(...e){super(...e),N(this,"themeColor",null),N(this,"backgroundColor",null)}getDefaultOptions(){return{...super.getDefaultOptions(),inlineSource:!1,sitemap:!0,offline:!0,pwa:!0,banner:!0,createCssFile:!0}}getPublicPath(){return this.isHot()?`http://localhost:${this.port}/`:super.getPublicPath()}getMeta(){const e={...super.getMeta(),HandheldFriendly:!0};var t,n;if(!this.options.development&&(e.description=this.description,e["format-detection"]="telephone=no",e["og:type"]="website",e["twitter:card"]="summary",e["og:updated_time"]=Date.now(),e["og:determiner"]="",e["og:description"]=this.description,e["twitter:description"]=this.description,e["og:title"]=this.title,e["twitter:title"]=this.title,null!==(t=this.pkg.author)&&void 0!==t&&t.name&&(e.author=null===(n=this.pkg.author)||void 0===n?void 0:n.name),this.options.locale&&(e["og:locale"]=this.options.locale.replace("-","_")),(this.options.twitterSiteHandle||this.options.twitterAuthorHandle)&&(e["twitter:site"]=h()(this.options.twitterSiteHandle||this.options.twitterAuthorHandle,"@")),this.options.twitterAuthorHandle&&(e["twitter:creator"]=h()(this.options.twitterAuthorHandle,"@")),this.options.domain&&this.options.pwa)){const t=`https://${this.options.domain}`,n=384,r=O()(t,`icon_${n}x${n}.png`);e["og:url"]=t,e["og:image:width"]=n,e["og:image:height"]=n,e["og:image:type"]="image/png",e["og:image"]=r,e["twitter:image"]=r}return e}shouldInlineJavascript(){return!1}getImageLoader(){return this.options.development?super.getImageLoader():{test:this.getImageFileRegex(),oneOf:[{resourceQuery:/\?raw/,use:(0,y.omit)(super.getImageLoader(),"test")},{loader:"modern-image-loader"}]}}getBodyContent(){var e;const t=this.title||(null===(e=this.pkg)||void 0===e?void 0:e.name)||this.domain||"Loading";return`<div><style>body{background:black;margin:0}i:after{content:"";display:block;width:.7em;height:.7em;margin:.5em;border-radius:50%;border:4px solid;border-color:#888 transparent #888 transparent;animation:a 1s linear infinite;animation-timing-function:ease;box-sizing:initial}@keyframes a{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}main{position:fixed;width:100vw;height:100vh;color:#888;display:flex;justify-content:center;align-items:center;font-size:2em;font-family:Ubuntu,sans-serif;flex-direction:column-reverse}</style><main><i></i>${(0,y.escape)(t)}</main></div>`}getCnamePluginOptions(){return{domain:this.domain}}getRobotsTxtPluginOptions(){return(0,y.isObject)(this.options.robots)?this.options.robots:{host:`https://${this.domain}`,sitemap:`https://${this.domain}/sitemap.xml`}}getSitemapXmlPluginOptions(){const e={domain:this.domain};return(0,y.isObject)(this.options.sitemap)&&Object.assign(e,this.options.sitemap),e}getCssMinimizerPluginOptions(){return(0,y.isObject)(this.options.optimizeCss)?this.options.optimizeCss:!0===this.options.optimizeCss?{minimizerOptions:{preset:["advanced",{discardComments:{removeAll:!0}}]}}:null}getThemeColor(){return this.options.themeColor?h()(this.options.themeColor,"#"):"#00CC00"}getBackgroundColor(){return this.options.backgroundColor?h()(this.options.backgroundColor,"#"):"#000000"}getPwaManifestPluginOptions(){if((0,y.isObject)(this.options.pwa))return this.options.pwa;const e={description:this.description,orientation:"portrait",display:"standalone",name:this.title,inject:!0,fingerprints:!1,theme_color:this.themeColor,background_color:this.backgroundColor,ios:{"apple-mobile-web-app-title":this.title,"apple-mobile-web-app-status-bar-style":"black-translucent"},start_url:`https://${this.options.domain}`,publicPath:`https://${this.options.domain}`,icons:[{src:this.iconFile,sizes:[16,24,32,64,80,92,128,192,256,384,512]}]};return this.options.development?e.start_url=".":(e.start_url=`https://${this.options.domain}`,e.publicPath=`https://${this.options.domain}`),e}getHtmlFaviconPluginOptions(){return{href:O()(this.publicPath,"icon_128x128.png")}}getOfflinePluginOptions(){return{safeToUseOptionalCaches:!0,appShell:"index.html",caches:{main:["*.js","*.css","*.html","manifest.json"],additional:["*.woff","*.woff2","*.jpg","*.jpeg","*.png","*.webp"],optional:[":rest:"]},ServiceWorker:{events:!0},AppCache:{events:!0},excludes:["**/*.txt","CNAME"],version:this.pkg.version||Date.now()+""}}getWebpackConfig(e){const{fromRoot:t,initialWebpackConfig:n}=e;if(this.iconFile=t("icon.png"),F("Using icon %s",this.iconFile),this.description=this.getDescription(),this.themeColor=this.getThemeColor(),this.backgroundColor=this.getBackgroundColor(),!i().pathExists(this.iconFile))throw new Error(`File ${this.iconFile} not found`);const r=super.getWebpackConfig(e);this.domain=this.options.domain;let o={plugins:[]};if(this.hot){const e=[t("dist"),t("dist").replaceAll("\\","/"),t(".git"),t(".git").replaceAll("\\","/")],n={port:this.port,hot:!0,overlay:!0,historyApiFallback:!0};o=(0,P.Z)(o,{devServer:n}),(0,x.addDevServerEntrypoints)(o,n),o=(0,P.Z)(o,{watchOptions:{ignored:(0,y.uniq)(e)}}),o.plugins.push(new(a())),o.plugins.push(new(v()))}if(o.plugins.push(new(g())(this.getHtmlFaviconPluginOptions())),!this.options.development){o.plugins.push(new(C())(this.getPwaManifestPluginOptions())),o.plugins.push(new(u())(this.getCnamePluginOptions())),o.plugins.push(new(S())(this.getSitemapXmlPluginOptions()));const e=this.getCssMinimizerPluginOptions();null!==e&&o.plugins.push(new(f())(e)),o.plugins.push(new(s())(this.getOfflinePluginOptions()))}return(0,P.Z)(r,o)}}},3079:e=>{e.exports=function(e,t,n){if(0===arguments.length)return[];if(1===arguments.length){if(null==e)return[];if(Array.isArray(e))return e}return Array.prototype.slice.call(arguments)}},5302:(e,t,n)=>{const r=n(77),i=n(5622),o=n(1381).mkdirsSync,s=n(318).utimesMillisSync,c=n(2733);function a(e,t,n,o){const s=(o.dereference?r.statSync:r.lstatSync)(t);if(s.isDirectory())return function(e,t,n,i,o){return t?p(n,i,o):function(e,t,n,i){return r.mkdirSync(n),p(t,n,i),u(n,e)}(e.mode,n,i,o)}(s,e,t,n,o);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return function(e,t,n,i,o){return t?function(e,t,n,i){if(i.overwrite)return r.unlinkSync(n),l(e,t,n,i);if(i.errorOnExist)throw new Error(`'${n}' already exists`)}(e,n,i,o):l(e,n,i,o)}(s,e,t,n,o);if(s.isSymbolicLink())return function(e,t,n,o){let s=r.readlinkSync(t);if(o.dereference&&(s=i.resolve(process.cwd(),s)),e){let e;try{e=r.readlinkSync(n)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return r.symlinkSync(s,n);throw e}if(o.dereference&&(e=i.resolve(process.cwd(),e)),c.isSrcSubdir(s,e))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${e}'.`);if(r.statSync(n).isDirectory()&&c.isSrcSubdir(e,s))throw new Error(`Cannot overwrite '${e}' with '${s}'.`);return function(e,t){return r.unlinkSync(t),r.symlinkSync(e,t)}(s,n)}return r.symlinkSync(s,n)}(e,t,n,o);if(s.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(s.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}function l(e,t,n,i){return r.copyFileSync(t,n),i.preserveTimestamps&&function(e,t,n){(function(e){return 0==(128&e)})(e)&&function(e,t){u(e,128|t)}(n,e),function(e,t){const n=r.statSync(e);s(t,n.atime,n.mtime)}(t,n)}(e.mode,t,n),u(n,e.mode)}function u(e,t){return r.chmodSync(e,t)}function p(e,t,n){r.readdirSync(e).forEach((r=>function(e,t,n,r){const o=i.join(t,e),s=i.join(n,e),{destStat:l}=c.checkPathsSync(o,s,"copy",r);return function(e,t,n,r){if(!r.filter||r.filter(t,n))return a(e,t,n,r)}(l,o,s,r)}(r,e,t,n)))}e.exports=function(e,t,n){"function"==typeof n&&(n={filter:n}),(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269");const{srcStat:s,destStat:l}=c.checkPathsSync(e,t,"copy",n);return c.checkParentPathsSync(e,s,t,"copy"),function(e,t,n,s){if(s.filter&&!s.filter(t,n))return;const c=i.dirname(n);return r.existsSync(c)||o(c),a(e,t,n,s)}(l,e,t,n)}},8690:(e,t,n)=>{e.exports={copySync:n(5302)}},7189:(e,t,n)=>{const r=n(77),i=n(5622),o=n(1381).mkdirs,s=n(9257).pathExists,c=n(318).utimesMillis,a=n(2733);function l(e,t,n,r,c){const a=i.dirname(n);s(a,((i,s)=>i?c(i):s?p(e,t,n,r,c):void o(a,(i=>i?c(i):p(e,t,n,r,c)))))}function u(e,t,n,r,i,o){Promise.resolve(i.filter(n,r)).then((s=>s?e(t,n,r,i,o):o()),(e=>o(e)))}function p(e,t,n,o,s){(o.dereference?r.stat:r.lstat)(t,((c,l)=>c?s(c):l.isDirectory()?function(e,t,n,i,o,s){return t?m(n,i,o,s):function(e,t,n,i,o){r.mkdir(n,(r=>{if(r)return o(r);m(t,n,i,(t=>t?o(t):h(n,e,o)))}))}(e.mode,n,i,o,s)}(l,e,t,n,o,s):l.isFile()||l.isCharacterDevice()||l.isBlockDevice()?function(e,t,n,i,o,s){return t?function(e,t,n,i,o){if(!i.overwrite)return i.errorOnExist?o(new Error(`'${n}' already exists`)):o();r.unlink(n,(r=>r?o(r):f(e,t,n,i,o)))}(e,n,i,o,s):f(e,n,i,o,s)}(l,e,t,n,o,s):l.isSymbolicLink()?function(e,t,n,o,s){r.readlink(t,((t,c)=>t?s(t):(o.dereference&&(c=i.resolve(process.cwd(),c)),e?void r.readlink(n,((t,l)=>t?"EINVAL"===t.code||"UNKNOWN"===t.code?r.symlink(c,n,s):s(t):(o.dereference&&(l=i.resolve(process.cwd(),l)),a.isSrcSubdir(c,l)?s(new Error(`Cannot copy '${c}' to a subdirectory of itself, '${l}'.`)):e.isDirectory()&&a.isSrcSubdir(l,c)?s(new Error(`Cannot overwrite '${l}' with '${c}'.`)):function(e,t,n){r.unlink(t,(i=>i?n(i):r.symlink(e,t,n)))}(c,n,s)))):r.symlink(c,n,s))))}(e,t,n,o,s):l.isSocket()?s(new Error(`Cannot copy a socket file: ${t}`)):l.isFIFO()?s(new Error(`Cannot copy a FIFO pipe: ${t}`)):s(new Error(`Unknown file: ${t}`))))}function f(e,t,n,i,o){r.copyFile(t,n,(r=>r?o(r):i.preserveTimestamps?function(e,t,n,r){return function(e){return 0==(128&e)}(e)?function(e,t,n){return h(e,128|t,n)}(n,e,(i=>i?r(i):d(e,t,n,r))):d(e,t,n,r)}(e.mode,t,n,o):h(n,e.mode,o)))}function d(e,t,n,i){!function(e,t,n){r.stat(e,((e,r)=>e?n(e):c(t,r.atime,r.mtime,n)))}(t,n,(t=>t?i(t):h(n,e,i)))}function h(e,t,n){return r.chmod(e,t,n)}function m(e,t,n,i){r.readdir(e,((r,o)=>r?i(r):g(o,e,t,n,i)))}function g(e,t,n,r,o){const s=e.pop();return s?function(e,t,n,r,o,s){const c=i.join(n,t),l=i.join(r,t);a.checkPaths(c,l,"copy",o,((t,i)=>{if(t)return s(t);const{destStat:a}=i;!function(e,t,n,r,i){r.filter?u(p,e,t,n,r,i):p(e,t,n,r,i)}(a,c,l,o,(t=>t?s(t):g(e,n,r,o,s)))}))}(e,s,t,n,r,o):o()}e.exports=function(e,t,n,r){"function"!=typeof n||r?"function"==typeof n&&(n={filter:n}):(r=n,n={}),r=r||function(){},(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269"),a.checkPaths(e,t,"copy",n,((i,o)=>{if(i)return r(i);const{srcStat:s,destStat:c}=o;a.checkParentPaths(e,s,t,"copy",(i=>i?r(i):n.filter?u(l,c,e,t,n,r):l(c,e,t,n,r)))}))}},6464:(e,t,n)=>{const r=n(8981).fromCallback;e.exports={copy:r(n(7189))}},5590:(e,t,n)=>{const r=n(8981).fromPromise,i=n(7749),o=n(5622),s=n(1381),c=n(4542),a=r((async function(e){let t;try{t=await i.readdir(e)}catch{return s.mkdirs(e)}return Promise.all(t.map((t=>c.remove(o.join(e,t)))))}));function l(e){let t;try{t=i.readdirSync(e)}catch{return s.mkdirsSync(e)}t.forEach((t=>{t=o.join(e,t),c.removeSync(t)}))}e.exports={emptyDirSync:l,emptydirSync:l,emptyDir:a,emptydir:a}},6530:(e,t,n)=>{const r=n(8981).fromCallback,i=n(5622),o=n(77),s=n(1381);e.exports={createFile:r((function(e,t){function n(){o.writeFile(e,"",(e=>{if(e)return t(e);t()}))}o.stat(e,((r,c)=>{if(!r&&c.isFile())return t();const a=i.dirname(e);o.stat(a,((e,r)=>{if(e)return"ENOENT"===e.code?s.mkdirs(a,(e=>{if(e)return t(e);n()})):t(e);r.isDirectory()?n():o.readdir(a,(e=>{if(e)return t(e)}))}))}))})),createFileSync:function(e){let t;try{t=o.statSync(e)}catch{}if(t&&t.isFile())return;const n=i.dirname(e);try{o.statSync(n).isDirectory()||o.readdirSync(n)}catch(e){if(!e||"ENOENT"!==e.code)throw e;s.mkdirsSync(n)}o.writeFileSync(e,"")}}},1720:(e,t,n)=>{const r=n(6530),i=n(4147),o=n(3635);e.exports={createFile:r.createFile,createFileSync:r.createFileSync,ensureFile:r.createFile,ensureFileSync:r.createFileSync,createLink:i.createLink,createLinkSync:i.createLinkSync,ensureLink:i.createLink,ensureLinkSync:i.createLinkSync,createSymlink:o.createSymlink,createSymlinkSync:o.createSymlinkSync,ensureSymlink:o.createSymlink,ensureSymlinkSync:o.createSymlinkSync}},4147:(e,t,n)=>{const r=n(8981).fromCallback,i=n(5622),o=n(77),s=n(1381),c=n(9257).pathExists,{areIdentical:a}=n(2733);e.exports={createLink:r((function(e,t,n){function r(e,t){o.link(e,t,(e=>{if(e)return n(e);n(null)}))}o.lstat(t,((l,u)=>{o.lstat(e,((o,l)=>{if(o)return o.message=o.message.replace("lstat","ensureLink"),n(o);if(u&&a(l,u))return n(null);const p=i.dirname(t);c(p,((i,o)=>i?n(i):o?r(e,t):void s.mkdirs(p,(i=>{if(i)return n(i);r(e,t)}))))}))}))})),createLinkSync:function(e,t){let n;try{n=o.lstatSync(t)}catch{}try{const t=o.lstatSync(e);if(n&&a(t,n))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const r=i.dirname(t);return o.existsSync(r)||s.mkdirsSync(r),o.linkSync(e,t)}}},6072:(e,t,n)=>{const r=n(5622),i=n(77),o=n(9257).pathExists;e.exports={symlinkPaths:function(e,t,n){if(r.isAbsolute(e))return i.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:e})));{const s=r.dirname(t),c=r.join(s,e);return o(c,((t,o)=>t?n(t):o?n(null,{toCwd:c,toDst:e}):i.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:r.relative(s,e)})))))}},symlinkPathsSync:function(e,t){let n;if(r.isAbsolute(e)){if(n=i.existsSync(e),!n)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}{const o=r.dirname(t),s=r.join(o,e);if(n=i.existsSync(s),n)return{toCwd:s,toDst:e};if(n=i.existsSync(e),!n)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:r.relative(o,e)}}}}},9259:(e,t,n)=>{const r=n(77);e.exports={symlinkType:function(e,t,n){if(n="function"==typeof t?t:n,t="function"!=typeof t&&t)return n(null,t);r.lstat(e,((e,r)=>{if(e)return n(null,"file");t=r&&r.isDirectory()?"dir":"file",n(null,t)}))},symlinkTypeSync:function(e,t){let n;if(t)return t;try{n=r.lstatSync(e)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}}},3635:(e,t,n)=>{const r=n(8981).fromCallback,i=n(5622),o=n(7749),s=n(1381),c=s.mkdirs,a=s.mkdirsSync,l=n(6072),u=l.symlinkPaths,p=l.symlinkPathsSync,f=n(9259),d=f.symlinkType,h=f.symlinkTypeSync,m=n(9257).pathExists,{areIdentical:g}=n(2733);function y(e,t,n,r){u(e,t,((s,a)=>{if(s)return r(s);e=a.toDst,d(a.toCwd,n,((n,s)=>{if(n)return r(n);const a=i.dirname(t);m(a,((n,i)=>n?r(n):i?o.symlink(e,t,s,r):void c(a,(n=>{if(n)return r(n);o.symlink(e,t,s,r)}))))}))}))}e.exports={createSymlink:r((function(e,t,n,r){r="function"==typeof n?n:r,n="function"!=typeof n&&n,o.lstat(t,((i,s)=>{!i&&s.isSymbolicLink()?Promise.all([o.stat(e),o.stat(t)]).then((([i,o])=>{if(g(i,o))return r(null);y(e,t,n,r)})):y(e,t,n,r)}))})),createSymlinkSync:function(e,t,n){let r;try{r=o.lstatSync(t)}catch{}if(r&&r.isSymbolicLink()){const n=o.statSync(e),r=o.statSync(t);if(g(n,r))return}const s=p(e,t);e=s.toDst,n=h(s.toCwd,n);const c=i.dirname(t);return o.existsSync(c)||a(c),o.symlinkSync(e,t,n)}}},7749:(e,t,n)=>{const r=n(8981).fromCallback,i=n(77),o=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof i[e]));Object.assign(t,i),o.forEach((e=>{t[e]=r(i[e])})),t.realpath.native=r(i.realpath.native),t.exists=function(e,t){return"function"==typeof t?i.exists(e,t):new Promise((t=>i.exists(e,t)))},t.read=function(e,t,n,r,o,s){return"function"==typeof s?i.read(e,t,n,r,o,s):new Promise(((s,c)=>{i.read(e,t,n,r,o,((e,t,n)=>{if(e)return c(e);s({bytesRead:t,buffer:n})}))}))},t.write=function(e,t,...n){return"function"==typeof n[n.length-1]?i.write(e,t,...n):new Promise(((r,o)=>{i.write(e,t,...n,((e,t,n)=>{if(e)return o(e);r({bytesWritten:t,buffer:n})}))}))},"function"==typeof i.writev&&(t.writev=function(e,t,...n){return"function"==typeof n[n.length-1]?i.writev(e,t,...n):new Promise(((r,o)=>{i.writev(e,t,...n,((e,t,n)=>{if(e)return o(e);r({bytesWritten:t,buffers:n})}))}))})},5674:(e,t,n)=>{e.exports={...n(7749),...n(8690),...n(6464),...n(5590),...n(1720),...n(6573),...n(1381),...n(4026),...n(530),...n(1315),...n(9257),...n(4542)}},6573:(e,t,n)=>{const r=n(8981).fromPromise,i=n(7183);i.outputJson=r(n(3508)),i.outputJsonSync=n(9578),i.outputJSON=i.outputJson,i.outputJSONSync=i.outputJsonSync,i.writeJSON=i.writeJson,i.writeJSONSync=i.writeJsonSync,i.readJSON=i.readJson,i.readJSONSync=i.readJsonSync,e.exports=i},7183:(e,t,n)=>{const r=n(6813);e.exports={readJson:r.readFile,readJsonSync:r.readFileSync,writeJson:r.writeFile,writeJsonSync:r.writeFileSync}},9578:(e,t,n)=>{const{stringify:r}=n(6780),{outputFileSync:i}=n(1315);e.exports=function(e,t,n){const o=r(t,n);i(e,o,n)}},3508:(e,t,n)=>{const{stringify:r}=n(6780),{outputFile:i}=n(1315);e.exports=async function(e,t,n={}){const o=r(t,n);await i(e,o,n)}},1381:(e,t,n)=>{const r=n(8981).fromPromise,{makeDir:i,makeDirSync:o}=n(8233),s=r(i);e.exports={mkdirs:s,mkdirsSync:o,mkdirp:s,mkdirpSync:o,ensureDir:s,ensureDirSync:o}},8233:(e,t,n)=>{const r=n(7749),{checkPath:i}=n(3468),o=e=>"number"==typeof e?e:{mode:511,...e}.mode;e.exports.makeDir=async(e,t)=>(i(e),r.mkdir(e,{mode:o(t),recursive:!0})),e.exports.makeDirSync=(e,t)=>(i(e),r.mkdirSync(e,{mode:o(t),recursive:!0}))},3468:(e,t,n)=>{const r=n(5622);e.exports.checkPath=function(e){if("win32"===process.platform&&/[<>:"|?*]/.test(e.replace(r.parse(e).root,""))){const t=new Error(`Path contains invalid characters: ${e}`);throw t.code="EINVAL",t}}},4026:(e,t,n)=>{e.exports={moveSync:n(6006)}},6006:(e,t,n)=>{const r=n(77),i=n(5622),o=n(8690).copySync,s=n(4542).removeSync,c=n(1381).mkdirpSync,a=n(2733);function l(e,t,n){try{r.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)throw r;return function(e,t,n){return o(e,t,{overwrite:n,errorOnExist:!0}),s(e)}(e,t,n)}}e.exports=function(e,t,n){const o=(n=n||{}).overwrite||n.clobber||!1,{srcStat:u,isChangingCase:p=!1}=a.checkPathsSync(e,t,"move",n);return a.checkParentPathsSync(e,u,t,"move"),function(e){const t=i.dirname(e);return i.parse(t).root===t}(t)||c(i.dirname(t)),function(e,t,n,i){if(i)return l(e,t,n);if(n)return s(t),l(e,t,n);if(r.existsSync(t))throw new Error("dest already exists.");return l(e,t,n)}(e,t,o,p)}},530:(e,t,n)=>{const r=n(8981).fromCallback;e.exports={move:r(n(436))}},436:(e,t,n)=>{const r=n(77),i=n(5622),o=n(6464).copy,s=n(4542).remove,c=n(1381).mkdirp,a=n(9257).pathExists,l=n(2733);function u(e,t,n,r,i){return r?p(e,t,n,i):n?s(t,(r=>r?i(r):p(e,t,n,i))):void a(t,((r,o)=>r?i(r):o?i(new Error("dest already exists.")):p(e,t,n,i)))}function p(e,t,n,i){r.rename(e,t,(r=>r?"EXDEV"!==r.code?i(r):function(e,t,n,r){o(e,t,{overwrite:n,errorOnExist:!0},(t=>t?r(t):s(e,r)))}(e,t,n,i):i()))}e.exports=function(e,t,n,r){"function"==typeof n&&(r=n,n={});const o=n.overwrite||n.clobber||!1;l.checkPaths(e,t,"move",n,((n,s)=>{if(n)return r(n);const{srcStat:a,isChangingCase:p=!1}=s;l.checkParentPaths(e,a,t,"move",(n=>n?r(n):function(e){const t=i.dirname(e);return i.parse(t).root===t}(t)?u(e,t,o,p,r):void c(i.dirname(t),(n=>n?r(n):u(e,t,o,p,r)))))}))}},1315:(e,t,n)=>{const r=n(8981).fromCallback,i=n(77),o=n(5622),s=n(1381),c=n(9257).pathExists;e.exports={outputFile:r((function(e,t,n,r){"function"==typeof n&&(r=n,n="utf8");const a=o.dirname(e);c(a,((o,c)=>o?r(o):c?i.writeFile(e,t,n,r):void s.mkdirs(a,(o=>{if(o)return r(o);i.writeFile(e,t,n,r)}))))})),outputFileSync:function(e,...t){const n=o.dirname(e);if(i.existsSync(n))return i.writeFileSync(e,...t);s.mkdirsSync(n),i.writeFileSync(e,...t)}}},9257:(e,t,n)=>{const r=n(8981).fromPromise,i=n(7749);e.exports={pathExists:r((function(e){return i.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:i.existsSync}},4542:(e,t,n)=>{const r=n(77),i=n(8981).fromCallback,o=n(3456);e.exports={remove:i((function(e,t){if(r.rm)return r.rm(e,{recursive:!0,force:!0},t);o(e,t)})),removeSync:function(e){if(r.rmSync)return r.rmSync(e,{recursive:!0,force:!0});o.sync(e)}}},3456:(e,t,n)=>{const r=n(77),i=n(5622),o=n(2357),s="win32"===process.platform;function c(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((t=>{e[t]=e[t]||r[t],e[t+="Sync"]=e[t]||r[t]})),e.maxBusyTries=e.maxBusyTries||3}function a(e,t,n){let r=0;"function"==typeof t&&(n=t,t={}),o(e,"rimraf: missing path"),o.strictEqual(typeof e,"string","rimraf: path should be a string"),o.strictEqual(typeof n,"function","rimraf: callback function required"),o(t,"rimraf: invalid options argument provided"),o.strictEqual(typeof t,"object","rimraf: options should be object"),c(t),l(e,t,(function i(o){if(o){if(("EBUSY"===o.code||"ENOTEMPTY"===o.code||"EPERM"===o.code)&&r<t.maxBusyTries)return r++,setTimeout((()=>l(e,t,i)),100*r);"ENOENT"===o.code&&(o=null)}n(o)}))}function l(e,t,n){o(e),o(t),o("function"==typeof n),t.lstat(e,((r,i)=>r&&"ENOENT"===r.code?n(null):r&&"EPERM"===r.code&&s?u(e,t,r,n):i&&i.isDirectory()?f(e,t,r,n):void t.unlink(e,(r=>{if(r){if("ENOENT"===r.code)return n(null);if("EPERM"===r.code)return s?u(e,t,r,n):f(e,t,r,n);if("EISDIR"===r.code)return f(e,t,r,n)}return n(r)}))))}function u(e,t,n,r){o(e),o(t),o("function"==typeof r),t.chmod(e,438,(i=>{i?r("ENOENT"===i.code?null:n):t.stat(e,((i,o)=>{i?r("ENOENT"===i.code?null:n):o.isDirectory()?f(e,t,n,r):t.unlink(e,r)}))}))}function p(e,t,n){let r;o(e),o(t);try{t.chmodSync(e,438)}catch(e){if("ENOENT"===e.code)return;throw n}try{r=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw n}r.isDirectory()?h(e,t,n):t.unlinkSync(e)}function f(e,t,n,r){o(e),o(t),o("function"==typeof r),t.rmdir(e,(s=>{!s||"ENOTEMPTY"!==s.code&&"EEXIST"!==s.code&&"EPERM"!==s.code?s&&"ENOTDIR"===s.code?r(n):r(s):function(e,t,n){o(e),o(t),o("function"==typeof n),t.readdir(e,((r,o)=>{if(r)return n(r);let s,c=o.length;if(0===c)return t.rmdir(e,n);o.forEach((r=>{a(i.join(e,r),t,(r=>{if(!s)return r?n(s=r):void(0==--c&&t.rmdir(e,n))}))}))}))}(e,t,r)}))}function d(e,t){let n;c(t=t||{}),o(e,"rimraf: missing path"),o.strictEqual(typeof e,"string","rimraf: path should be a string"),o(t,"rimraf: missing options"),o.strictEqual(typeof t,"object","rimraf: options should be object");try{n=t.lstatSync(e)}catch(n){if("ENOENT"===n.code)return;"EPERM"===n.code&&s&&p(e,t,n)}try{n&&n.isDirectory()?h(e,t,null):t.unlinkSync(e)}catch(n){if("ENOENT"===n.code)return;if("EPERM"===n.code)return s?p(e,t,n):h(e,t,n);if("EISDIR"!==n.code)throw n;h(e,t,n)}}function h(e,t,n){o(e),o(t);try{t.rmdirSync(e)}catch(r){if("ENOTDIR"===r.code)throw n;if("ENOTEMPTY"===r.code||"EEXIST"===r.code||"EPERM"===r.code)!function(e,t){if(o(e),o(t),t.readdirSync(e).forEach((n=>d(i.join(e,n),t))),!s)return t.rmdirSync(e,t);{const n=Date.now();do{try{return t.rmdirSync(e,t)}catch{}}while(500>Date.now()-n)}}(e,t);else if("ENOENT"!==r.code)throw r}}e.exports=a,a.sync=d},2733:(e,t,n)=>{const r=n(7749),i=n(5622),o=n(1669);function s(e,t,n){const i=n.dereference?e=>r.stat(e,{bigint:!0}):e=>r.lstat(e,{bigint:!0});return Promise.all([i(e),i(t).catch((e=>{if("ENOENT"===e.code)return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}function c(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function a(e,t){const n=i.resolve(e).split(i.sep).filter((e=>e)),r=i.resolve(t).split(i.sep).filter((e=>e));return n.reduce(((e,t,n)=>e&&r[n]===t),!0)}function l(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}e.exports={checkPaths:function(e,t,n,r,u){o.callbackify(s)(e,t,r,((r,o)=>{if(r)return u(r);const{srcStat:s,destStat:p}=o;if(p){if(c(s,p)){const r=i.basename(e),o=i.basename(t);return"move"===n&&r!==o&&r.toLowerCase()===o.toLowerCase()?u(null,{srcStat:s,destStat:p,isChangingCase:!0}):u(new Error("Source and destination must not be the same."))}if(s.isDirectory()&&!p.isDirectory())return u(new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`));if(!s.isDirectory()&&p.isDirectory())return u(new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`))}return s.isDirectory()&&a(e,t)?u(new Error(l(e,t,n))):u(null,{srcStat:s,destStat:p})}))},checkPathsSync:function(e,t,n,o){const{srcStat:s,destStat:u}=function(e,t,n){let i;const o=n.dereference?e=>r.statSync(e,{bigint:!0}):e=>r.lstatSync(e,{bigint:!0}),s=o(e);try{i=o(t)}catch(e){if("ENOENT"===e.code)return{srcStat:s,destStat:null};throw e}return{srcStat:s,destStat:i}}(e,t,o);if(u){if(c(s,u)){const r=i.basename(e),o=i.basename(t);if("move"===n&&r!==o&&r.toLowerCase()===o.toLowerCase())return{srcStat:s,destStat:u,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(s.isDirectory()&&!u.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!s.isDirectory()&&u.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(s.isDirectory()&&a(e,t))throw new Error(l(e,t,n));return{srcStat:s,destStat:u}},checkParentPaths:function e(t,n,o,s,a){const u=i.resolve(i.dirname(t)),p=i.resolve(i.dirname(o));if(p===u||p===i.parse(p).root)return a();r.stat(p,{bigint:!0},((r,i)=>r?"ENOENT"===r.code?a():a(r):c(n,i)?a(new Error(l(t,o,s))):e(t,n,p,s,a)))},checkParentPathsSync:function e(t,n,o,s){const a=i.resolve(i.dirname(t)),u=i.resolve(i.dirname(o));if(u===a||u===i.parse(u).root)return;let p;try{p=r.statSync(u,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(c(n,p))throw new Error(l(t,o,s));return e(t,n,u,s)},isSrcSubdir:a,areIdentical:c}},318:(e,t,n)=>{const r=n(77);e.exports={utimesMillis:function(e,t,n,i){r.open(e,"r+",((e,o)=>{if(e)return i(e);r.futimes(o,t,n,(e=>{r.close(o,(t=>{i&&i(e||t)}))}))}))},utimesMillisSync:function(e,t,n){const i=r.openSync(e,"r+");return r.futimesSync(i,t,n),r.closeSync(i)}}},6458:e=>{e.exports=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var n={__proto__:t(e)};else n=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))})),n};var t=Object.getPrototypeOf||function(e){return e.__proto__}},77:(e,t,n)=>{var r,i,o=n(5747),s=n(2161),c=n(8520),a=n(6458),l=n(1669);function u(e,t){Object.defineProperty(e,r,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(r=Symbol.for("graceful-fs.queue"),i=Symbol.for("graceful-fs.previous")):(r="___graceful-fs.queue",i="___graceful-fs.previous");var p=function(){};if(l.debuglog?p=l.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(p=function(){var e=l.format.apply(l,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!o[r]){var f=global[r]||[];u(o,f),o.close=function(e){function t(t,n){return e.call(o,t,(function(e){e||m(),"function"==typeof n&&n.apply(this,arguments)}))}return Object.defineProperty(t,i,{value:e}),t}(o.close),o.closeSync=function(e){function t(t){e.apply(o,arguments),m()}return Object.defineProperty(t,i,{value:e}),t}(o.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){p(o[r]),n(2357).equal(o[r].length,0)}))}function d(e){s(e),e.gracefulify=d,e.createReadStream=function(t,n){return new e.ReadStream(t,n)},e.createWriteStream=function(t,n){return new e.WriteStream(t,n)};var t=e.readFile;e.readFile=function(e,n,r){return"function"==typeof n&&(r=n,n=null),function e(n,r,i){return t(n,r,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?("function"==typeof i&&i.apply(this,arguments),m()):h([e,[n,r,i]])}))}(e,n,r)};var n=e.writeFile;e.writeFile=function(e,t,r,i){return"function"==typeof r&&(i=r,r=null),function e(t,r,i,o){return n(t,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?("function"==typeof o&&o.apply(this,arguments),m()):h([e,[t,r,i,o]])}))}(e,t,r,i)};var r=e.appendFile;r&&(e.appendFile=function(e,t,n,i){return"function"==typeof n&&(i=n,n=null),function e(t,n,i,o){return r(t,n,i,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?("function"==typeof o&&o.apply(this,arguments),m()):h([e,[t,n,i,o]])}))}(e,t,n,i)});var i=e.copyFile;i&&(e.copyFile=function(e,t,n,r){return"function"==typeof n&&(r=n,n=0),i(e,t,n,(function(o){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?("function"==typeof r&&r.apply(this,arguments),m()):h([i,[e,t,n,r]])}))});var o=e.readdir;function a(t){return o.apply(e,t)}if(e.readdir=function(e,t,n){var r=[e];return"function"!=typeof t?r.push(t):n=t,r.push((function(e,t){t&&t.sort&&t.sort(),!e||"EMFILE"!==e.code&&"ENFILE"!==e.code?("function"==typeof n&&n.apply(this,arguments),m()):h([a,[r]])})),a(r)},"v0.8"===process.version.substr(0,4)){var l=c(e);y=l.ReadStream,b=l.WriteStream}var u=e.ReadStream;u&&(y.prototype=Object.create(u.prototype),y.prototype.open=function(){var e=this;w(e.path,e.flags,e.mode,(function(t,n){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n),e.read())}))});var p=e.WriteStream;p&&(b.prototype=Object.create(p.prototype),b.prototype.open=function(){var e=this;w(e.path,e.flags,e.mode,(function(t,n){t?(e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return y},set:function(e){y=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return b},set:function(e){b=e},enumerable:!0,configurable:!0});var f=y;Object.defineProperty(e,"FileReadStream",{get:function(){return f},set:function(e){f=e},enumerable:!0,configurable:!0});var g=b;function y(e,t){return this instanceof y?(u.apply(this,arguments),this):y.apply(Object.create(y.prototype),arguments)}function b(e,t){return this instanceof b?(p.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return g},set:function(e){g=e},enumerable:!0,configurable:!0});var v=e.open;function w(e,t,n,r){return"function"==typeof n&&(r=n,n=null),function e(t,n,r,i){return v(t,n,r,(function(o,s){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?("function"==typeof i&&i.apply(this,arguments),m()):h([e,[t,n,r,i]])}))}(e,t,n,r)}return e.open=w,e}function h(e){p("ENQUEUE",e[0].name,e[1]),o[r].push(e)}function m(){var e=o[r].shift();e&&(p("RETRY",e[0].name,e[1]),e[0].apply(null,e[1]))}global[r]||u(global,o[r]),e.exports=d(a(o)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!o.__patched&&(e.exports=d(o),o.__patched=!0)},8520:(e,t,n)=>{var r=n(2413).Stream;e.exports=function(e){return{ReadStream:function t(n,i){if(!(this instanceof t))return new t(n,i);r.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,i=i||{};for(var s=Object.keys(i),c=0,a=s.length;a>c;c++){var l=s[c];this[l]=i[l]}if(this.encoding&&this.setEncoding(this.encoding),void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}null===this.fd?e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return o.emit("error",e),void(o.readable=!1);o.fd=t,o.emit("open",t),o._read()})):process.nextTick((function(){o._read()}))},WriteStream:function t(n,i){if(!(this instanceof t))return new t(n,i);r.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),s=0,c=o.length;c>s;s++){var a=o[s];this[a]=i[a]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(0>this.start)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}},2161:(e,t,n)=>{var r=n(7619),i=process.cwd,o=null,s=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return o||(o=i.call(process)),o};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var c=process.chdir;process.chdir=function(e){o=null,c.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,c)}e.exports=function(e){var t,n;function i(t){return t?function(n,r,i){return t.call(e,n,r,(function(e){p(e)&&(e=null),i&&i.apply(this,arguments)}))}:t}function o(t){return t?function(n,r){try{return t.call(e,n,r)}catch(e){if(!p(e))throw e}}:t}function c(t){return t?function(n,r,i,o){return t.call(e,n,r,i,(function(e){p(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function a(t){return t?function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!p(e))throw e}}:t}function l(t){return t?function(n,r,i){function o(e,t){t&&(0>t.uid&&(t.uid+=4294967296),0>t.gid&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof r&&(i=r,r=null),r?t.call(e,n,r,o):t.call(e,n,o)}:t}function u(t){return t?function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return 0>i.uid&&(i.uid+=4294967296),0>i.gid&&(i.gid+=4294967296),i}:t}function p(e){return!e||"ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}r.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,n,i){e.open(t,r.O_WRONLY|r.O_SYMLINK,n,(function(t,r){t?i&&i(t):e.fchmod(r,n,(function(t){e.close(r,(function(e){i&&i(t||e)}))}))}))},e.lchmodSync=function(t,n){var i,o=e.openSync(t,r.O_WRONLY|r.O_SYMLINK,n),s=!0;try{i=e.fchmodSync(o,n),s=!1}finally{if(s)try{e.closeSync(o)}catch(e){}else e.closeSync(o)}return i}}(e),e.lutimes||function(e){r.hasOwnProperty("O_SYMLINK")?(e.lutimes=function(t,n,i,o){e.open(t,r.O_SYMLINK,(function(t,r){t?o&&o(t):e.futimes(r,n,i,(function(t){e.close(r,(function(e){o&&o(t||e)}))}))}))},e.lutimesSync=function(t,n,i){var o,s=e.openSync(t,r.O_SYMLINK),c=!0;try{o=e.futimesSync(s,n,i),c=!1}finally{if(c)try{e.closeSync(s)}catch(e){}else e.closeSync(s)}return o}):(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}(e),e.chown=c(e.chown),e.fchown=c(e.fchown),e.lchown=c(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=a(e.chownSync),e.fchownSync=a(e.fchownSync),e.lchownSync=a(e.lchownSync),e.chmodSync=o(e.chmodSync),e.fchmodSync=o(e.fchmodSync),e.lchmodSync=o(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.lchmod||(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.lchown||(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),"win32"===s&&(e.rename=(t=e.rename,function(n,r,i){var o=Date.now(),s=0;t(n,r,(function c(a){if(a&&("EACCES"===a.code||"EPERM"===a.code)&&6e4>Date.now()-o)return setTimeout((function(){e.stat(r,(function(e,o){e&&"ENOENT"===e.code?t(n,r,c):i(a)}))}),s),void(100>s&&(s+=10));i&&i(a)}))})),e.read=function(t){function n(n,r,i,o,s,c){var a;if(c&&"function"==typeof c){var l=0;a=function(u,p,f){if(u&&"EAGAIN"===u.code&&10>l)return l++,t.call(e,n,r,i,o,s,a);c.apply(this,arguments)}}return t.call(e,n,r,i,o,s,a)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n}(e.read),e.readSync=(n=e.readSync,function(t,r,i,o,s){for(var c=0;;)try{return n.call(e,t,r,i,o,s)}catch(e){if("EAGAIN"===e.code&&10>c){c++;continue}throw e}})}},6813:(e,t,n)=>{let r;try{r=n(77)}catch(e){r=n(5747)}const i=n(8981),{stringify:o,stripBom:s}=n(6780),c={readFile:i.fromPromise((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const n=t.fs||r,o=!("throws"in t)||t.throws;let c,a=await i.fromCallback(n.readFile)(e,t);a=s(a);try{c=JSON.parse(a,t?t.reviver:null)}catch(t){if(o)throw t.message=`${e}: ${t.message}`,t;return null}return c})),readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const n=t.fs||r,i=!("throws"in t)||t.throws;try{let r=n.readFileSync(e,t);return r=s(r),JSON.parse(r,t.reviver)}catch(t){if(i)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:i.fromPromise((async function(e,t,n={}){const s=n.fs||r,c=o(t,n);await i.fromCallback(s.writeFile)(e,c,n)})),writeFileSync:function(e,t,n={}){const i=n.fs||r,s=o(t,n);return i.writeFileSync(e,s,n)}};e.exports=c},6780:e=>{e.exports={stringify:function(e,{EOL:t="\n",finalEOL:n=!0,replacer:r=null,spaces:i}={}){const o=n?t:"";return JSON.stringify(e,r,i).replace(/\n/g,t)+o},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}}},8981:(e,t)=>{t.fromCallback=function(e){return Object.defineProperty((function(...t){if("function"!=typeof t[t.length-1])return new Promise(((n,r)=>{e.call(this,...t,((e,t)=>null!=e?r(e):n(t)))}));e.apply(this,t)}),"name",{value:e.name})},t.fromPromise=function(e){return Object.defineProperty((function(...t){const n=t[t.length-1];if("function"!=typeof n)return e.apply(this,t);e.apply(this,t.slice(0,-1)).then((e=>n(null,e)),n)}),"name",{value:e.name})}},8905:e=>{e.exports=require("@absolunet/fss")},2357:e=>{e.exports=require("assert")},797:e=>{e.exports=require("camelcase")},7619:e=>{e.exports=require("constants")},3682:e=>{e.exports=require("debug")},6891:e=>{e.exports=require("ensure-start")},5747:e=>{e.exports=require("fs")},6723:e=>{e.exports=require("has-content")},3804:e=>{e.ex