web-documentation 1.0.0 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/deploy.js CHANGED
@@ -68,4 +68,4 @@ var n=r(105),i=r(383),o=r(56),s=function(e){if(!(this instanceof s))return new s
68
68
  * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
69
69
  * @copyright (c) 2012-2014 Chris Talkington, contributors.
70
70
  */
71
- var n=r(10).inherits,i=r(123).Transform,o=r(326),s=r(56),a=function(e){if(!(this instanceof a))return new a(e);e=this.options=s.defaults(e,{}),i.call(this,e),this.supports={directory:!0,symlink:!0},this.files=[]};n(a,i),a.prototype._transform=function(e,t,r){r(null,e)},a.prototype._writeStringified=function(){var e=JSON.stringify(this.files);this.write(e)},a.prototype.append=function(e,t,r){var n=this;function i(e,i){e?r(e):(t.size=i.length||0,t.crc32=o.unsigned(i),n.files.push(t),r(null,t))}t.crc32=0,"buffer"===t.sourceType?i(null,e):"stream"===t.sourceType&&s.collectStream(e,i)},a.prototype.finalize=function(){this._writeStringified(),this.end()},e.exports=a},e=>{function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const r=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function n(e){if(Buffer.isBuffer(e))return e;if("number"==typeof e)return Buffer.alloc(e);if("string"==typeof e)return Buffer.from(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function i(e,t){e=n(e),Buffer.isBuffer(t)&&(t=t.readUInt32BE(0));let i=~t;for(var o=0;o<e.length;o++)i=r[255&(i^e[o])]^i>>>8;return~i}function o(){return function(e){const t=n(4);return t.writeInt32BE(e,0),t}(i.apply(null,arguments))}o.signed=function(){return i.apply(null,arguments)},o.unsigned=function(){return i.apply(null,arguments)>>>0};const s=t(o);e.exports=s},(e,t,r)=>{const n=r(16);function i(){if(!(this instanceof i))return new i;n.Transform.call(this)}r(10).inherits(i,n.Transform),i.prototype._transform=function(e,t,r){r()},e.exports=i},(e,t,r)=>{const n=r(16),i=r(107),o=r(184),s=r(109);e.exports=function(e,t){const r=n.PassThrough({objectMode:!0}),a=n.PassThrough(),l=n.Transform({objectMode:!0}),c=e instanceof RegExp?e:e&&new RegExp(e);let u;l._transform=function(e,t,r){if(u||c&&!c.exec(e.path))return e.autodrain(),r();u=!0,f.emit("entry",e),e.on("error",(function(e){a.emit("error",e)})),e.pipe(a).on("error",(function(e){r(e)})).on("finish",(function(e){r(null,e)}))},r.pipe(i(t)).on("error",(function(e){a.emit("error",e)})).pipe(l).on("error",Object).on("finish",(function(){u?a.end():a.emit("error",new Error("PATTERN_NOT_FOUND"))}));const f=o(r,a);return f.buffer=function(){return s(a)},f}},(e,t,r)=>{e.exports=function(e){e.path=o.resolve(o.normalize(e.path));const t=new n(e),r=new s.Writable({objectMode:!0});r._write=async function(t,r,n){const s=o.join(e.path,t.path.replace(/\\/g,"/"));if(0!=s.indexOf(e.path))return n();if("Directory"==t.type)return await i.ensureDir(s),n();await i.ensureDir(o.dirname(s));const a=e.getWriter?e.getWriter({path:s}):i.createWriteStream(s);t.pipe(a).on("error",n).on("close",n)};const l=a(t,r);return t.once("crx-header",(function(e){l.crxHeader=e})),t.pipe(r).on("finish",(function(){l.emit("close")})),l.promise=function(){return new Promise((function(e,t){l.on("close",e),l.on("error",t)}))},l};const n=r(107),i=r(185),o=r(3),s=r(16),a=r(184)},(e,t,r)=>{const n=r(11),i=r(3),{mkdirs:o}=r(23),{pathExists:s}=r(36),{utimesMillis:a}=r(186),l=r(44);async function c(e,t,r){return!r.filter||r.filter(e,t)}async function u(e,t,r,o){const s=o.dereference?n.stat:n.lstat,a=await s(t);if(a.isDirectory())return async function(e,t,r,o,s){t||await n.mkdir(o);const a=await n.readdir(r);await Promise.all(a.map((async e=>{const t=i.join(r,e),n=i.join(o,e);if(!await c(t,n,s))return;const{destStat:a}=await l.checkPaths(t,n,"copy",s);return u(a,t,n,s)}))),t||await n.chmod(o,e.mode)}(a,e,t,r,o);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return async function(e,t,r,i,o){if(!t)return f(e,r,i,o);if(o.overwrite)return await n.unlink(i),f(e,r,i,o);if(o.errorOnExist)throw new Error(`'${i}' already exists`)}(a,e,t,r,o);if(a.isSymbolicLink())return async function(e,t,r,o){let s=await n.readlink(t);o.dereference&&(s=i.resolve(process.cwd(),s));if(!e)return n.symlink(s,r);let a=null;try{a=await n.readlink(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlink(s,r);throw e}o.dereference&&(a=i.resolve(process.cwd(),a));if(l.isSrcSubdir(s,a))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${a}'.`);if(l.isSrcSubdir(a,s))throw new Error(`Cannot overwrite '${a}' with '${s}'.`);return await n.unlink(r),n.symlink(s,r)}(e,t,r,o);if(a.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(a.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}async function f(e,t,r,i){if(await n.copyFile(t,r),i.preserveTimestamps){128&e.mode||await function(e,t){return n.chmod(e,128|t)}(r,e.mode);const i=await n.stat(t);await a(r,i.atime,i.mtime)}return n.chmod(r,e.mode)}e.exports=async function(e,t,r={}){"function"==typeof r&&(r={filter:r}),r.clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001");const{srcStat:n,destStat:a}=await l.checkPaths(e,t,"copy",r);if(await l.checkParentPaths(e,n,t,"copy"),!await c(e,t,r))return;const f=i.dirname(t);await s(f)||await o(f),await u(a,e,t,r)}},(e,t,r)=>{const n=r(21),i=r(3),o=r(23).mkdirsSync,s=r(186).utimesMillisSync,a=r(44);function l(e,t,r,o){const s=(o.dereference?n.statSync:n.lstatSync)(t);if(s.isDirectory())return function(e,t,r,i,o){return t?f(r,i,o):function(e,t,r,i){return n.mkdirSync(r),f(t,r,i),u(r,e)}(e.mode,r,i,o)}(s,e,t,r,o);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return function(e,t,r,i,o){return t?function(e,t,r,i){if(i.overwrite)return n.unlinkSync(r),c(e,t,r,i);if(i.errorOnExist)throw new Error(`'${r}' already exists`)}(e,r,i,o):c(e,r,i,o)}(s,e,t,r,o);if(s.isSymbolicLink())return function(e,t,r,o){let s=n.readlinkSync(t);o.dereference&&(s=i.resolve(process.cwd(),s));if(e){let e;try{e=n.readlinkSync(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlinkSync(s,r);throw e}if(o.dereference&&(e=i.resolve(process.cwd(),e)),a.isSrcSubdir(s,e))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${e}'.`);if(a.isSrcSubdir(e,s))throw new Error(`Cannot overwrite '${e}' with '${s}'.`);return function(e,t){return n.unlinkSync(t),n.symlinkSync(e,t)}(s,r)}return n.symlinkSync(s,r)}(e,t,r,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 c(e,t,r,i){return n.copyFileSync(t,r),i.preserveTimestamps&&function(e,t,r){(function(e){return!(128&e)})(e)&&function(e,t){u(e,128|t)}(r,e);(function(e,t){const r=n.statSync(e);s(t,r.atime,r.mtime)})(t,r)}(e.mode,t,r),u(r,e.mode)}function u(e,t){return n.chmodSync(e,t)}function f(e,t,r){n.readdirSync(e).forEach((n=>function(e,t,r,n){const o=i.join(t,e),s=i.join(r,e);if(n.filter&&!n.filter(o,s))return;const{destStat:c}=a.checkPathsSync(o,s,"copy",n);return l(c,o,s,n)}(n,e,t,r)))}e.exports=function(e,t,r){"function"==typeof r&&(r={filter:r}),(r=r||{}).clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002");const{srcStat:s,destStat:c}=a.checkPathsSync(e,t,"copy",r);if(a.checkParentPathsSync(e,s,t,"copy"),r.filter&&!r.filter(e,t))return;const u=i.dirname(t);return n.existsSync(u)||o(u),l(c,e,t,r)}},(e,t,r)=>{const n=r(9).fromPromise,i=r(11),o=r(3),s=r(23),a=r(78),l=n((async function(e){let t;try{t=await i.readdir(e)}catch{return s.mkdirs(e)}return Promise.all(t.map((t=>a.remove(o.join(e,t)))))}));function c(e){let t;try{t=i.readdirSync(e)}catch{return s.mkdirsSync(e)}t.forEach((t=>{t=o.join(e,t),a.removeSync(t)}))}e.exports={emptyDirSync:c,emptydirSync:c,emptyDir:l,emptydir:l}},(e,t,r)=>{const{createFile:n,createFileSync:i}=r(334),{createLink:o,createLinkSync:s}=r(335),{createSymlink:a,createSymlinkSync:l}=r(336);e.exports={createFile:n,createFileSync:i,ensureFile:n,ensureFileSync:i,createLink:o,createLinkSync:s,ensureLink:o,ensureLinkSync:s,createSymlink:a,createSymlinkSync:l,ensureSymlink:a,ensureSymlinkSync:l}},(e,t,r)=>{const n=r(9).fromPromise,i=r(3),o=r(11),s=r(23);e.exports={createFile:n((async function(e){let t;try{t=await o.stat(e)}catch{}if(t&&t.isFile())return;const r=i.dirname(e);let n=null;try{n=await o.stat(r)}catch(t){if("ENOENT"===t.code)return await s.mkdirs(r),void await o.writeFile(e,"");throw t}n.isDirectory()?await o.writeFile(e,""):await o.readdir(r)})),createFileSync:function(e){let t;try{t=o.statSync(e)}catch{}if(t&&t.isFile())return;const r=i.dirname(e);try{o.statSync(r).isDirectory()||o.readdirSync(r)}catch(e){if(!e||"ENOENT"!==e.code)throw e;s.mkdirsSync(r)}o.writeFileSync(e,"")}}},(e,t,r)=>{const n=r(9).fromPromise,i=r(3),o=r(11),s=r(23),{pathExists:a}=r(36),{areIdentical:l}=r(44);e.exports={createLink:n((async function(e,t){let r,n;try{r=await o.lstat(t)}catch{}try{n=await o.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}if(r&&l(n,r))return;const c=i.dirname(t);await a(c)||await s.mkdirs(c),await o.link(e,t)})),createLinkSync:function(e,t){let r;try{r=o.lstatSync(t)}catch{}try{const t=o.lstatSync(e);if(r&&l(t,r))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const n=i.dirname(t);return o.existsSync(n)||s.mkdirsSync(n),o.linkSync(e,t)}}},(e,t,r)=>{const n=r(9).fromPromise,i=r(3),o=r(11),{mkdirs:s,mkdirsSync:a}=r(23),{symlinkPaths:l,symlinkPathsSync:c}=r(337),{symlinkType:u,symlinkTypeSync:f}=r(338),{pathExists:h}=r(36),{areIdentical:d}=r(44);e.exports={createSymlink:n((async function(e,t,r){let n;try{n=await o.lstat(t)}catch{}if(n&&n.isSymbolicLink()){const[r,n]=await Promise.all([o.stat(e),o.stat(t)]);if(d(r,n))return}const a=await l(e,t);e=a.toDst;const c=await u(a.toCwd,r),f=i.dirname(t);return await h(f)||await s(f),o.symlink(e,t,c)})),createSymlinkSync:function(e,t,r){let n;try{n=o.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){const r=o.statSync(e),n=o.statSync(t);if(d(r,n))return}const s=c(e,t);e=s.toDst,r=f(s.toCwd,r);const l=i.dirname(t);return o.existsSync(l)||a(l),o.symlinkSync(e,t,r)}}},(e,t,r)=>{const n=r(3),i=r(11),{pathExists:o}=r(36),s=r(9).fromPromise;e.exports={symlinkPaths:s((async function(e,t){if(n.isAbsolute(e)){try{await i.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:e}}const r=n.dirname(t),s=n.join(r,e);if(await o(s))return{toCwd:s,toDst:e};try{await i.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:n.relative(r,e)}})),symlinkPathsSync:function(e,t){if(n.isAbsolute(e)){if(!i.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}const r=n.dirname(t),o=n.join(r,e);if(i.existsSync(o))return{toCwd:o,toDst:e};if(!i.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:n.relative(r,e)}}}},(e,t,r)=>{const n=r(11),i=r(9).fromPromise;e.exports={symlinkType:i((async function(e,t){if(t)return t;let r;try{r=await n.lstat(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"})),symlinkTypeSync:function(e,t){if(t)return t;let r;try{r=n.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}}},(e,t,r)=>{const n=r(9).fromPromise,i=r(340);i.outputJson=n(r(342)),i.outputJsonSync=r(343),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},(e,t,r)=>{const n=r(341);e.exports={readJson:n.readFile,readJsonSync:n.readFileSync,writeJson:n.writeFile,writeJsonSync:n.writeFileSync}},(e,t,r)=>{let n;try{n=r(21)}catch(e){n=r(39)}const i=r(9),{stringify:o,stripBom:s}=r(113);const a={readFile:i.fromPromise((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,o=!("throws"in t)||t.throws;let a,l=await i.fromCallback(r.readFile)(e,t);l=s(l);try{a=JSON.parse(l,t?t.reviver:null)}catch(t){if(o)throw t.message=`${e}: ${t.message}`,t;return null}return a})),readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,i=!("throws"in t)||t.throws;try{let n=r.readFileSync(e,t);return n=s(n),JSON.parse(n,t.reviver)}catch(t){if(i)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:i.fromPromise((async function(e,t,r={}){const s=r.fs||n,a=o(t,r);await i.fromCallback(s.writeFile)(e,a,r)})),writeFileSync:function(e,t,r={}){const i=r.fs||n,s=o(t,r);return i.writeFileSync(e,s,r)}};e.exports=a},(e,t,r)=>{const{stringify:n}=r(113),{outputFile:i}=r(114);e.exports=async function(e,t,r={}){const o=n(t,r);await i(e,o,r)}},(e,t,r)=>{const{stringify:n}=r(113),{outputFileSync:i}=r(114);e.exports=function(e,t,r){const o=n(t,r);i(e,o,r)}},(e,t,r)=>{const n=r(9).fromPromise;e.exports={move:n(r(345)),moveSync:r(346)}},(e,t,r)=>{const n=r(11),i=r(3),{copy:o}=r(112),{remove:s}=r(78),{mkdirp:a}=r(23),{pathExists:l}=r(36),c=r(44);e.exports=async function(e,t,r={}){const u=r.overwrite||r.clobber||!1,{srcStat:f,isChangingCase:h=!1}=await c.checkPaths(e,t,"move",r);await c.checkParentPaths(e,f,t,"move");const d=i.dirname(t);return i.parse(d).root!==d&&await a(d),async function(e,t,r,i){if(!i)if(r)await s(t);else if(await l(t))throw new Error("dest already exists.");try{await n.rename(e,t)}catch(n){if("EXDEV"!==n.code)throw n;await async function(e,t,r){const n={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return await o(e,t,n),s(e)}(e,t,r)}}(e,t,u,h)}},(e,t,r)=>{const n=r(21),i=r(3),o=r(112).copySync,s=r(78).removeSync,a=r(23).mkdirpSync,l=r(44);function c(e,t,r){try{n.renameSync(e,t)}catch(n){if("EXDEV"!==n.code)throw n;return function(e,t,r){const n={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return o(e,t,n),s(e)}(e,t,r)}}e.exports=function(e,t,r){const o=(r=r||{}).overwrite||r.clobber||!1,{srcStat:u,isChangingCase:f=!1}=l.checkPathsSync(e,t,"move",r);return l.checkParentPathsSync(e,u,t,"move"),function(e){const t=i.dirname(e);return i.parse(t).root===t}(t)||a(i.dirname(t)),function(e,t,r,i){if(i)return c(e,t,r);if(r)return s(t),c(e,t,r);if(n.existsSync(t))throw new Error("dest already exists.");return c(e,t,r)}(e,t,o,f)}},(e,t,r)=>{const n=r(21),i=r(348),o=r(16);e.exports={buffer:function(e,t){return i({stream:function(t,r){const n=o.PassThrough(),i=r?t+r:void 0;return n.end(e.slice(t,i)),n},size:function(){return Promise.resolve(e.length)}},t)},file:function(e,t){return i({stream:function(t,r){const i=r?t+r:void 0;return n.createReadStream(e,{start:t,end:i})},size:function(){return new Promise((function(t,r){n.stat(e,(function(e,n){e?r(e):t(n.size)}))}))}},t)},url:function(e,t,r){if("string"==typeof t&&(t={url:t}),!t.url)throw"URL missing";t.headers=t.headers||{};const n={stream:function(r,n){const i=Object.create(t),o=n?r+n:"";return i.headers=Object.create(t.headers),i.headers.range="bytes="+r+"-"+o,e(i)},size:function(){return new Promise((function(r,n){const i=e(t);i.on("response",(function(e){i.abort(),e.headers["content-length"]?r(e.headers["content-length"]):n(new Error("Missing content length header"))})).on("error",n)}))}};return i(n,r)},s3:function(e,t,r){return i({size:function(){return new Promise((function(r,n){e.headObject(t,(function(e,t){e?n(e):r(t.ContentLength)}))}))},stream:function(r,n){const i={};for(const e in t)i[e]=t[e];const o=n?r+n:"";return i.Range="bytes="+r+"-"+o,e.getObject(i).createReadStream()}},r)},s3_v3:function(e,t,n){const{GetObjectCommand:s,HeadObjectCommand:a}=r(389);return i({size:async()=>{const r=await e.send(new a({Bucket:t.Bucket,Key:t.Key}));return r.ContentLength?r.ContentLength:0},stream:(r,n)=>{const i=o.PassThrough(),a=n?r+n:"";return e.send(new s({Bucket:t.Bucket,Key:t.Key,Range:`bytes=${r}-${a}`})).then((e=>{e.Body.pipe(i)})).catch((e=>{i.emit("error",e)})),i}},n)},custom:function(e,t){return i(e,t)}}},(e,t,r)=>{const n=r(108),i=r(349),o=r(109),s=r(110),a=r(3),l=r(185),c=r(111),u=r(77),f=r(352),h=Buffer.alloc(4);h.writeUInt32LE(101010256,0),e.exports=function(e,t){const r=n(),d=n(),p=t&&t.tailSize||80;let b,_,y,m;return t&&t.crx&&(_=function(e){const t=e.stream(0).pipe(n());return t.pull(4).then((function(e){if(875721283===e.readUInt32LE(0)){let e;return t.pull(12).then((function(t){e=u.parse(t,[["version",4],["pubKeyLength",4],["signatureLength",4]])})).then((function(){return t.pull(e.pubKeyLength+e.signatureLength)})).then((function(t){return e.publicKey=t.slice(0,e.pubKeyLength),e.signature=t.slice(e.pubKeyLength),e.size=16+e.pubKeyLength+e.signatureLength,e}))}}))}(e)),e.size().then((function(t){return b=t,e.stream(Math.max(0,t-p)).on("error",(function(e){r.emit("error",e)})).pipe(r),r.pull(h)})).then((function(){return f.props({directory:r.pull(22),crxHeader:_})})).then((function(t){const i=t.directory;if(y=t.crxHeader&&t.crxHeader.size||0,m=u.parse(i,[["signature",4],["diskNumber",2],["diskStart",2],["numberOfRecordsOnDisk",2],["numberOfRecords",2],["sizeOfCentralDirectory",4],["offsetToStartOfCentralDirectory",4],["commentLength",2]]),65535==m.diskNumber||65535==m.numberOfRecords||4294967295==m.offsetToStartOfCentralDirectory){const t=20,i=b-(p-r.match+t),o=n();return e.stream(i).pipe(o),o.pull(t).then((function(t){return function(e,t){const r=u.parse(t,[["signature",4],["diskNumber",4],["offsetToStartOfCentralDirectory",8],["numberOfDisks",4]]);if(117853008!=r.signature)throw new Error("invalid zip64 end of central dir locator signature (0x07064b50): 0x"+r.signature.toString(16));const i=n();return e.stream(r.offsetToStartOfCentralDirectory).pipe(i),i.pull(56)}(e,t)})).then((function(e){m=function(e){const t=u.parse(e,[["signature",4],["sizeOfCentralDirectory",8],["version",2],["versionsNeededToExtract",2],["diskNumber",4],["diskStart",4],["numberOfRecordsOnDisk",8],["numberOfRecords",8],["sizeOfCentralDirectory",8],["offsetToStartOfCentralDirectory",8]]);if(101075792!=t.signature)throw new Error("invalid zip64 end of central dir locator signature (0x06064b50): 0x0"+t.signature.toString(16));return t}(e)}))}m.offsetToStartOfCentralDirectory+=y})).then((function(){if(m.commentLength)return r.pull(m.commentLength).then((function(e){m.comment=e.toString("utf8")}))})).then((function(){return e.stream(m.offsetToStartOfCentralDirectory).pipe(d),m.extract=function(e){if(!e||!e.path)throw new Error("PATH_MISSING");return e.path=a.resolve(a.normalize(e.path)),m.files.then((function(t){return f.map(t,(async function(t){const r=a.join(e.path,t.path);if(0!=r.indexOf(e.path))return;if("Directory"==t.type)return void await l.ensureDir(r);await l.ensureDir(a.dirname(r));const n=e.getWriter?e.getWriter({path:r}):l.createWriteStream(r);return new Promise((function(r,i){t.stream(e.password).on("error",i).pipe(n).on("close",r).on("error",i)}))}),{concurrency:e.concurrency>1?e.concurrency:1})}))},m.files=f.mapSeries(Array(m.numberOfRecords),(function(){return d.pull(46).then((function(r){const n=u.parse(r,[["signature",4],["versionMadeBy",2],["versionsNeededToExtract",2],["flags",2],["compressionMethod",2],["lastModifiedTime",2],["lastModifiedDate",2],["crc32",4],["compressedSize",4],["uncompressedSize",4],["fileNameLength",2],["extraFieldLength",2],["fileCommentLength",2],["diskNumber",2],["internalFileAttributes",2],["externalFileAttributes",4],["offsetToLocalFileHeader",4]]);return n.offsetToLocalFileHeader+=y,n.lastModifiedDateTime=c(n.lastModifiedDate,n.lastModifiedTime),d.pull(n.fileNameLength).then((function(e){return n.pathBuffer=e,n.path=e.toString("utf8"),n.isUnicode=!!(2048&n.flags),d.pull(n.extraFieldLength)})).then((function(e){return n.extra=s(e,n),d.pull(n.fileCommentLength)})).then((function(r){n.comment=r,n.type=0===n.uncompressedSize&&/[/\\]$/.test(n.path)?"Directory":"File";const s=t&&t.padding||1e3;return n.stream=function(t){const r=30+s+(n.extraFieldLength||0)+(n.fileNameLength||0)+n.compressedSize;return i(e,n.offsetToLocalFileHeader,t,n,r)},n.buffer=function(e){return o(n.stream(e))},n}))}))})),f.props(m)}))}},(e,t,r)=>{const n=r(350),i=r(108),o=r(16),s=r(105),a=r(110),l=r(111),c=r(77);e.exports=function(e,t,r,u,f){const h=i(),d=o.PassThrough(),p=e.stream(t,f);return p.pipe(h).on("error",(function(e){d.emit("error",e)})),d.vars=h.pull(30).then((function(e){let t=c.parse(e,[["signature",4],["versionsNeededToExtract",2],["flags",2],["compressionMethod",2],["lastModifiedTime",2],["lastModifiedDate",2],["crc32",4],["compressedSize",4],["uncompressedSize",4],["fileNameLength",2],["extraFieldLength",2]]);return t.lastModifiedDateTime=l(t.lastModifiedDate,t.lastModifiedTime),h.pull(t.fileNameLength).then((function(e){return t.fileName=e.toString("utf8"),h.pull(t.extraFieldLength)})).then((function(e){let i;return t.extra=a(e,t),u&&u.compressedSize&&(t=u),1&t.flags&&(i=h.pull(12).then((function(e){if(!r)throw new Error("MISSING_PASSWORD");const i=n();String(r).split("").forEach((function(e){i.update(e)}));for(let t=0;t<e.length;t++)e[t]=i.decryptByte(e[t]);t.decrypt=i,t.compressedSize-=12;const o=8&t.flags?t.lastModifiedTime>>8&255:t.crc32>>24&255;if(e[11]!==o)throw new Error("BAD_PASSWORD");return t}))),Promise.resolve(i).then((function(){return d.emit("vars",t),t}))}))})),d.vars.then((function(e){const t=!(8&e.flags)||e.compressedSize>0;let r;const n=e.compressionMethod?s.createInflateRaw():o.PassThrough();t?(d.size=e.uncompressedSize,r=e.compressedSize):(r=Buffer.alloc(4),r.writeUInt32LE(134695760,0));let i=h.stream(r);e.decrypt&&(i=i.pipe(e.decrypt.stream())),i.pipe(n).on("error",(function(e){d.emit("error",e)})).pipe(d).on("finish",(function(){p.destroy?p.destroy():p.abort?p.abort():p.close?p.close():p.push?p.push():console.log("warning - unable to close stream")}))})).catch((function(e){d.emit("error",e)})),d}},(e,t,r)=>{const n=r(351);let i,o=r(16);function s(e,t){i||function(){let e,t,r;for(i=[],t=0;t<256;t++){for(e=t,r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>=1;i[t]=e>>>0}}(),e.charCodeAt&&(e=e.charCodeAt(0));return(t.readUInt32BE()>>8&16777215^i[255&(t.readUInt32BE()^e>>>0)])>>>0}function a(e,t){const r=65535&e,n=65535&t;return(((e>>16&65535)*n+r*(t>>16&65535)&65535)<<16>>>0)+r*n}function l(){if(!(this instanceof l))return new l;this.key0=Buffer.allocUnsafe(4),this.key1=Buffer.allocUnsafe(4),this.key2=Buffer.allocUnsafe(4),this.key0.writeUInt32BE(305419896,0),this.key1.writeUInt32BE(591751049,0),this.key2.writeUInt32BE(878082192,0)}o.Writable&&o.Writable.prototype.destroy||(o=r(80)),l.prototype.update=function(e){this.key0.writeUInt32BE(s(e,this.key0)),this.key1.writeUInt32BE((255&this.key0.readUInt32BE())+this.key1.readUInt32BE()>>>0);const t=new n(a(this.key1.readUInt32BE(),134775813)+1&4294967295),r=Buffer.alloc(8);t.copy(r,0),r.copy(this.key1,0,4,8),this.key2.writeUInt32BE(s((this.key1.readUInt32BE()>>24&255)>>>0,this.key2))},l.prototype.decryptByte=function(e){const t=(2|this.key2.readUInt32BE())>>>0;return e^=a(t,1^t)>>8&255,this.update(e),e},l.prototype.stream=function(){const e=o.Transform(),t=this;return e._transform=function(e,r,n){for(let r=0;r<e.length;r++)e[r]=t.decryptByte(e[r]);this.push(e),n()},e},e.exports=l},e=>{for(var t=4294967296,r=[],n=0;n<256;n++)r[n]=(n>15?"":"0")+n.toString(16);var i=e.exports=function(e,t){e instanceof Buffer?(this.buffer=e,this.offset=t||0):"[object Uint8Array]"==Object.prototype.toString.call(e)?(this.buffer=new Buffer(e),this.offset=t||0):(this.buffer=this.buffer||new Buffer(8),this.offset=0,this.setValue.apply(this,arguments))};i.MAX_INT=Math.pow(2,53),i.MIN_INT=-Math.pow(2,53),i.prototype={constructor:i,_2scomp:function(){for(var e=this.buffer,t=this.offset,r=1,n=t+7;n>=t;n--){var i=(255^e[n])+r;e[n]=255&i,r=i>>8}},setValue:function(e,r){var n=!1;if(1==arguments.length)if("number"==typeof e){if(n=e<0,r=(e=Math.abs(e))%t,(e/=t)>t)throw new RangeError(e+" is outside Int64 range");e|=0}else{if("string"!=typeof e)throw new Error(e+" must be a Number or String");r=(e=(e+"").replace(/^0x/,"")).substr(-8),e=e.length>8?e.substr(0,e.length-8):"",e=parseInt(e,16),r=parseInt(r,16)}for(var i=this.buffer,o=this.offset,s=7;s>=0;s--)i[o+s]=255&r,r=4==s?e:r>>>8;n&&this._2scomp()},toNumber:function(e){for(var t=this.buffer,r=this.offset,n=128&t[r],o=0,s=1,a=7,l=1;a>=0;a--,l*=256){var c=t[r+a];n&&(s=(c=(255^c)+s)>>8,c&=255),o+=c*l}return!e&&o>=i.MAX_INT?n?-1/0:1/0:n?-o:o},valueOf:function(){return this.toNumber(!1)},toString:function(e){return this.valueOf().toString(e||10)},toOctetString:function(e){for(var t=new Array(8),n=this.buffer,i=this.offset,o=0;o<8;o++)t[o]=r[n[i+o]];return t.join(e||"")},toBuffer:function(e){if(e&&0===this.offset)return this.buffer;var t=new Buffer(8);return this.buffer.copy(t,0,this.offset,this.offset+8),t},copy:function(e,t){this.buffer.copy(e,t||0,this.offset,this.offset+8)},compare:function(e){if((128&this.buffer[this.offset])!=(128&e.buffer[e.offset]))return e.buffer[e.offset]-this.buffer[this.offset];for(var t=0;t<8;t++)if(this.buffer[this.offset+t]!==e.buffer[e.offset+t])return this.buffer[this.offset+t]-e.buffer[e.offset+t];return 0},equals:function(e){return 0===this.compare(e)},inspect:function(){return"[Int64 value:"+this+" octets:"+this.toOctetString(" ")+"]"}}},(e,t,r)=>{e.exports=function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var l="function"==typeof _dereq_&&_dereq_;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[s]={exports:{}};t[s][0].call(u.exports,(function(e){var r=t[s][1][e];return i(r||e)}),u,u.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(e,t,r){t.exports=function(e){var t=e._SomePromiseArray;function r(e){var r=new t(e),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}e.any=function(e){return r(e)},e.prototype.any=function(){return r(this)}}},{}],2:[function(e,t,r){var n;try{throw new Error}catch(e){n=e}var i=e("./schedule"),o=e("./queue");function s(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new o(16),this._normalQueue=new o(16),this._haveDrainedQueues=!1;var e=this;this.drainQueues=function(){e._drainQueues()},this._schedule=i}function a(e,t,r){this._lateQueue.push(e,t,r),this._queueTick()}function l(e,t,r){this._normalQueue.push(e,t,r),this._queueTick()}function c(e){this._normalQueue._pushOne(e),this._queueTick()}function u(e){for(;e.length()>0;)f(e)}function f(e){var t=e.shift();if("function"!=typeof t)t._settlePromises();else{var r=e.shift(),n=e.shift();t.call(r,n)}}s.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t},s.prototype.hasCustomScheduler=function(){return this._customScheduler},s.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},s.prototype.fatalError=function(e,t){t?(process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),process.exit(2)):this.throwLater(e)},s.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!=typeof setTimeout)setTimeout((function(){e(t)}),0);else try{this._schedule((function(){e(t)}))}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},s.prototype.invokeLater=a,s.prototype.invoke=l,s.prototype.settlePromises=c,s.prototype._drainQueues=function(){u(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,u(this._lateQueue)},s.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},s.prototype._reset=function(){this._isTickUsed=!1},t.exports=s,t.exports.firstLineError=n},{"./queue":26,"./schedule":29}],3:[function(e,t,r){t.exports=function(e,t,r,n){var i=!1,o=function(e,t){this._reject(t)},s=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},a=function(e,t){50397184&this._bitField||this._resolveCallback(t.target)},l=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){i||(i=!0,e.prototype._propagateFrom=n.propagateFromFunction(),e.prototype._boundValue=n.boundValueFunction());var c=r(o),u=new e(t);u._propagateFrom(this,1);var f=this._target();if(u._setBoundTo(c),c instanceof e){var h={promiseRejectionQueued:!1,promise:u,target:f,bindingPromise:c};f._then(t,s,void 0,u,h),c._then(a,l,void 0,u,h),u._setOnCancel(c)}else u._resolveCallback(f);return u},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return!(2097152&~this._bitField)},e.bind=function(t,r){return e.resolve(r).bind(t)}}},{}],4:[function(e,t,r){var n;function i(){try{Promise===o&&(Promise=n)}catch(e){}return o}"undefined"!=typeof Promise&&(n=Promise);var o=e("./promise")();o.noConflict=i,t.exports=o},{"./promise":22}],5:[function(e,t,r){var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}t.exports=function(t){var r,n=e("./util"),i=n.canEvaluate;function o(e,r){var i;if(null!=e&&(i=e[r]),"function"!=typeof i){var o="Object "+n.classString(e)+" has no method '"+n.toString(r)+"'";throw new t.TypeError(o)}return i}function s(e){return o(e,this.pop()).apply(e,this)}function a(e){return e[this]}function l(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}n.isIdentifier,t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(s,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t;if("number"==typeof e)t=l;else if(i){var n=r(e);t=null!==n?n:a}else t=a;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,r){t.exports=function(t,r,n,i){var o=e("./util"),s=o.tryCatch,a=o.errorObj,l=t._async;t.prototype.break=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var r=e._cancellationParent;if(null==r||!r._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=r}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),l.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e))for(var r=0;r<e.length;++r)this._doInvokeOnCancel(e[r],t);else if(void 0!==e)if("function"==typeof e){if(!t){var n=s(e).call(this._boundValue());n===a&&(this._attachExtraTrace(n.e),l.throwLater(n.e))}}else e._resultCancelled(this)},t.prototype._invokeOnCancel=function(){var e=this._onCancel();this._unsetOnCancel(),l.invoke(this._doInvokeOnCancel,this,e)},t.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},t.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(e,t,r){t.exports=function(t){var r=e("./util"),n=e("./es5").keys,i=r.tryCatch,o=r.errorObj;function s(e,s,a){return function(l){var c=a._boundValue();e:for(var u=0;u<e.length;++u){var f=e[u];if(f===Error||null!=f&&f.prototype instanceof Error){if(l instanceof f)return i(s).call(c,l)}else if("function"==typeof f){var h=i(f).call(c,l);if(h===o)return h;if(h)return i(s).call(c,l)}else if(r.isObject(l)){for(var d=n(f),p=0;p<d.length;++p){var b=d[p];if(f[b]!=l[b])continue e}return i(s).call(c,l)}}return t}}return s}},{"./es5":13,"./util":36}],8:[function(e,t,r){t.exports=function(e){var t=!1,r=[];function n(){this._trace=new n.CapturedTrace(o())}function i(){if(t)return new n}function o(){var e=r.length-1;if(e>=0)return r[e]}return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var e=r.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},n.CapturedTrace=null,n.create=i,n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=e.prototype._pushContext,i=e.prototype._popContext,s=e._peekContext,a=e.prototype._peekContext,l=e.prototype._promiseCreated;n.deactivateLongStackTraces=function(){e.prototype._pushContext=r,e.prototype._popContext=i,e._peekContext=s,e.prototype._peekContext=a,e.prototype._promiseCreated=l,t=!1},t=!0,e.prototype._pushContext=n.prototype._pushContext,e.prototype._popContext=n.prototype._popContext,e._peekContext=e.prototype._peekContext=o,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},n}},{}],9:[function(e,t,r){t.exports=function(t,r,n,i){var o,s,a,l,c=t._async,u=e("./errors").Warning,f=e("./util"),h=e("./es5"),d=f.canAttachTrace,p=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,b=/\((?:timers\.js):\d+:\d+\)/,_=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,y=null,m=null,g=!1,w=!(0==f.env("BLUEBIRD_DEBUG")),v=!(0==f.env("BLUEBIRD_WARNINGS")||!w&&!f.env("BLUEBIRD_WARNINGS")),S=!(0==f.env("BLUEBIRD_LONG_STACK_TRACES")||!w&&!f.env("BLUEBIRD_LONG_STACK_TRACES")),E=0!=f.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(v||!!f.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){var e=[];function r(){for(var t=0;t<e.length;++t)e[t]._notifyUnhandledRejection();n()}function n(){e.length=0}l=function(t){e.push(t),setTimeout(r,1)},h.defineProperty(t,"_unhandledRejectionCheck",{value:r}),h.defineProperty(t,"_unhandledRejectionClear",{value:n})}(),t.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},t.prototype._ensurePossibleRejectionHandled=function(){524288&this._bitField||(this._setRejectionIsUnhandled(),l(this))},t.prototype._notifyUnhandledRejectionIsHandled=function(){ee("rejectionHandled",o,void 0,this)},t.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},t.prototype._returnedNonUndefined=function(){return!!(268435456&this._bitField)},t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),ee("unhandledRejection",s,e,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(e,t,r){return V(e,t,r||this)},t.onPossiblyUnhandledRejection=function(e){var r=t._getContext();s=f.contextBind(r,e)},t.onUnhandledRejectionHandled=function(e){var r=t._getContext();o=f.contextBind(r,e)};var x=function(){};t.longStackTraces=function(){if(c.haveItemsQueued()&&!ue.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ue.longStackTraces&&ne()){var e=t.prototype._captureStackTrace,n=t.prototype._attachExtraTrace,i=t.prototype._dereferenceTrace;ue.longStackTraces=!0,x=function(){if(c.haveItemsQueued()&&!ue.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");t.prototype._captureStackTrace=e,t.prototype._attachExtraTrace=n,t.prototype._dereferenceTrace=i,r.deactivateLongStackTraces(),ue.longStackTraces=!1},t.prototype._captureStackTrace=U,t.prototype._attachExtraTrace=$,t.prototype._dereferenceTrace=z,r.activateLongStackTraces()}},t.hasLongStackTraces=function(){return ue.longStackTraces&&ne()};var R={unhandledrejection:{before:function(){var e=f.global.onunhandledrejection;return f.global.onunhandledrejection=null,e},after:function(e){f.global.onunhandledrejection=e}},rejectionhandled:{before:function(){var e=f.global.onrejectionhandled;return f.global.onrejectionhandled=null,e},after:function(e){f.global.onrejectionhandled=e}}},A=function(){var e=function(e,t){if(!e)return!f.global.dispatchEvent(t);var r;try{return r=e.before(),!f.global.dispatchEvent(t)}finally{e.after(r)}};try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return f.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=new CustomEvent(t,{detail:r,cancelable:!0});return h.defineProperty(n,"promise",{value:r.promise}),h.defineProperty(n,"reason",{value:r.reason}),e(R[t],n)}}return"function"==typeof Event?(t=new Event("CustomEvent"),f.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=new Event(t,{cancelable:!0});return n.detail=r,h.defineProperty(n,"promise",{value:r.promise}),h.defineProperty(n,"reason",{value:r.reason}),e(R[t],n)}):((t=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),f.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!0,r),e(R[t],n)})}catch(e){}return function(){return!1}}(),O=f.isNode?function(){return process.emit.apply(process,arguments)}:f.global?function(e){var t="on"+e.toLowerCase(),r=f.global[t];return!!r&&(r.apply(f.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function k(e,t){return{promise:t}}var T={promiseCreated:k,promiseFulfilled:k,promiseRejected:k,promiseResolved:k,promiseCancelled:k,promiseChained:function(e,t,r){return{promise:t,child:r}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,r){return{reason:t,promise:r}},rejectionHandled:k},P=function(e){var t=!1;try{t=O.apply(null,arguments)}catch(e){c.throwLater(e),t=!0}var r=!1;try{r=A(e,T[e].apply(null,arguments))}catch(e){c.throwLater(e),r=!0}return r||t};function M(){return!1}function L(e,t,r){var n=this;try{e(t,r,(function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+f.toString(e));n._attachCancellationCallback(e)}))}catch(e){return e}}function C(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?f.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function I(){return this._onCancelField}function D(e){this._onCancelField=e}function N(){this._cancellationParent=void 0,this._onCancelField=void 0}function j(e,t){if(1&t){this._cancellationParent=e;var r=e._branchesRemainingToCancel;void 0===r&&(r=0),e._branchesRemainingToCancel=r+1}2&t&&e._isBound()&&this._setBoundTo(e._boundTo)}function F(e,t){2&t&&e._isBound()&&this._setBoundTo(e._boundTo)}t.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&x()),"warnings"in e){var r=e.warnings;ue.warnings=!!r,E=ue.warnings,f.isObject(r)&&"wForgottenReturn"in r&&(E=!!r.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!ue.cancellation){if(c.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=N,t.prototype._propagateFrom=j,t.prototype._onCancel=I,t.prototype._setOnCancel=D,t.prototype._attachCancellationCallback=C,t.prototype._execute=L,W=j,ue.cancellation=!0}if("monitoring"in e&&(e.monitoring&&!ue.monitoring?(ue.monitoring=!0,t.prototype._fireEvent=P):!e.monitoring&&ue.monitoring&&(ue.monitoring=!1,t.prototype._fireEvent=M)),"asyncHooks"in e&&f.nodeSupportsAsyncResource){var o=ue.asyncHooks,s=!!e.asyncHooks;o!==s&&(ue.asyncHooks=s,s?n():i())}return t},t.prototype._fireEvent=M,t.prototype._execute=function(e,t,r){try{e(t,r)}catch(e){return e}},t.prototype._onCancel=function(){},t.prototype._setOnCancel=function(e){},t.prototype._attachCancellationCallback=function(e){},t.prototype._captureStackTrace=function(){},t.prototype._attachExtraTrace=function(){},t.prototype._dereferenceTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(e,t){};var W=F;function B(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function U(){this._trace=new le(this._peekContext())}function $(e,t){if(d(e)){var r=this._trace;if(void 0!==r&&t&&(r=r._parent),void 0!==r)r.attachExtraTrace(e);else if(!e.__stackCleaned__){var n=X(e);f.notEnumerableProp(e,"stack",n.message+"\n"+n.stack.join("\n")),f.notEnumerableProp(e,"__stackCleaned__",!0)}}}function z(){this._trace=void 0}function G(e,t,r,n,i){if(void 0===e&&null!==t&&E){if(void 0!==i&&i._returnedNonUndefined())return;if(!(65535&n._bitField))return;r&&(r+=" ");var o="",s="";if(t._trace){for(var a=t._trace.stack.split("\n"),l=Z(a),c=l.length-1;c>=0;--c){var u=l[c];if(!b.test(u)){var f=u.match(_);f&&(o="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(l.length>0){var h=l[0];for(c=0;c<a.length;++c)if(a[c]===h){c>0&&(s="\n"+a[c-1]);break}}}var d="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;n._warn(d,!0,t)}}function H(e,t){var r=e+" is deprecated and will be removed in a future version.";return t&&(r+=" Use "+t+" instead."),V(r)}function V(e,r,n){if(ue.warnings){var i,o=new u(e);if(r)n._attachExtraTrace(o);else if(ue.longStackTraces&&(i=t._peekContext()))i.attachExtraTrace(o);else{var s=X(o);o.stack=s.message+"\n"+s.stack.join("\n")}P("warning",o)||J(o,"",!0)}}function q(e,t){for(var r=0;r<t.length-1;++r)t[r].push("From previous event:"),t[r]=t[r].join("\n");return r<t.length&&(t[r]=t[r].join("\n")),e+"\n"+t.join("\n")}function K(e){for(var t=0;t<e.length;++t)(0===e[t].length||t+1<e.length&&e[t][0]===e[t+1][0])&&(e.splice(t,1),t--)}function Y(e){for(var t=e[0],r=1;r<e.length;++r){for(var n=e[r],i=t.length-1,o=t[i],s=-1,a=n.length-1;a>=0;--a)if(n[a]===o){s=a;break}for(a=s;a>=0;--a){var l=n[a];if(t[i]!==l)break;t.pop(),i--}t=n}}function Z(e){for(var t=[],r=0;r<e.length;++r){var n=e[r],i=" (No stack trace)"===n||y.test(n),o=i&&ie(n);i&&!o&&(g&&" "!==n.charAt(0)&&(n=" "+n),t.push(n))}return t}function Q(e){for(var t=e.stack.replace(/\s+$/g,"").split("\n"),r=0;r<t.length;++r){var n=t[r];if(" (No stack trace)"===n||y.test(n))break}return r>0&&"SyntaxError"!=e.name&&(t=t.slice(r)),t}function X(e){var t=e.stack,r=e.toString();return t="string"==typeof t&&t.length>0?Q(e):[" (No stack trace)"],{message:r,stack:"SyntaxError"==e.name?t:Z(t)}}function J(e,t,r){if("undefined"!=typeof console){var n;if(f.isObject(e)){var i=e.stack;n=t+m(i,e)}else n=t+String(e);"function"==typeof a?a(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function ee(e,t,r,n){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(n):t(r,n))}catch(e){c.throwLater(e)}"unhandledRejection"===e?P(e,r,n)||i||J(r,"Unhandled rejection "):P(e,n)}function te(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{if(t=e&&"function"==typeof e.toString?e.toString():f.toString(e),/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+re(t)+">, no stack trace)"}function re(e){var t=41;return e.length<t?e:e.substr(0,t-3)+"..."}function ne(){return"function"==typeof ce}var ie=function(){return!1},oe=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function se(e){var t=e.match(oe);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function ae(e,t){if(ne()){for(var r,n,i=(e.stack||"").split("\n"),o=(t.stack||"").split("\n"),s=-1,a=-1,l=0;l<i.length;++l)if(c=se(i[l])){r=c.fileName,s=c.line;break}for(l=0;l<o.length;++l){var c;if(c=se(o[l])){n=c.fileName,a=c.line;break}}s<0||a<0||!r||!n||r!==n||s>=a||(ie=function(e){if(p.test(e))return!0;var t=se(e);return!!(t&&t.fileName===r&&s<=t.line&&t.line<=a)})}}function le(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);ce(this,le),t>32&&this.uncycle()}f.inherits(le,Error),r.CapturedTrace=le,le.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],r={},n=0,i=this;void 0!==i;++n)t.push(i),i=i._parent;for(n=(e=this._length=n)-1;n>=0;--n){var o=t[n].stack;void 0===r[o]&&(r[o]=n)}for(n=0;n<e;++n){var s=r[t[n].stack];if(void 0!==s&&s!==n){s>0&&(t[s-1]._parent=void 0,t[s-1]._length=1),t[n]._parent=void 0,t[n]._length=1;var a=n>0?t[n-1]:this;s<e-1?(a._parent=t[s+1],a._parent.uncycle(),a._length=a._parent._length+1):(a._parent=void 0,a._length=1);for(var l=a._length+1,c=n-2;c>=0;--c)t[c]._length=l,l++;return}}}},le.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=X(e),r=t.message,n=[t.stack],i=this;void 0!==i;)n.push(Z(i.stack.split("\n"))),i=i._parent;Y(n),K(n),f.notEnumerableProp(e,"stack",q(r,n)),f.notEnumerableProp(e,"__stackCleaned__",!0)}};var ce=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():te(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,y=e,m=t;var r=Error.captureStackTrace;return ie=function(e){return p.test(e)},function(e,t){Error.stackTraceLimit+=6,r(e,t),Error.stackTraceLimit-=6}}var n,i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return y=/@/,m=t,g=!0,function(e){e.stack=(new Error).stack};try{throw new Error}catch(e){n="stack"in e}return!("stack"in i)&&n&&"number"==typeof Error.stackTraceLimit?(y=e,m=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6}):(m=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?te(t):t.toString()},null)}();"undefined"!=typeof console&&void 0!==console.warn&&(a=function(e){console.warn(e)},f.isNode&&process.stderr.isTTY?a=function(e,t){var r=t?"":"";console.warn(r+e+"\n")}:f.isNode||"string"!=typeof(new Error).stack||(a=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var ue={warnings:v,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return S&&t.longStackTraces(),{asyncHooks:function(){return ue.asyncHooks},longStackTraces:function(){return ue.longStackTraces},warnings:function(){return ue.warnings},cancellation:function(){return ue.cancellation},monitoring:function(){return ue.monitoring},propagateFromFunction:function(){return W},boundValueFunction:function(){return B},checkForgottenReturns:G,setBounds:ae,warn:V,deprecated:H,CapturedTrace:le,fireDomEvent:A,fireGlobalEvent:O}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(e,t,r){t.exports=function(e){function t(){return this.value}function r(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(r){return r instanceof e&&r.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:r},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(r,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:e},void 0);var t=arguments[1],n=function(){throw t};return this.caught(e,n)},e.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof e&&r.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:r},void 0);var n=arguments[1];n instanceof e&&n.suppressUnhandledRejections();var i=function(){return n};return this.caught(r,i)}}},{}],11:[function(e,t,r){t.exports=function(e,t){var r=e.reduce,n=e.all;function i(){return n(this)}function o(e,n){return r(e,n,t,t)}e.prototype.each=function(e){return r(this,e,t,0)._then(i,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return r(this,e,t,t)},e.each=function(e,n){return r(e,n,t,0)._then(i,void 0,void 0,e,void 0)},e.mapSeries=o}},{}],12:[function(e,t,r){var n,i,o=e("./es5"),s=o.freeze,a=e("./util"),l=a.inherits,c=a.notEnumerableProp;function u(e,t){function r(n){if(!(this instanceof r))return new r(n);c(this,"message","string"==typeof n?n:t),c(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return l(r,Error),r}var f=u("Warning","warning"),h=u("CancellationError","cancellation error"),d=u("TimeoutError","timeout error"),p=u("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(e){n=u("TypeError","type error"),i=u("RangeError","range error")}for(var b="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),_=0;_<b.length;++_)"function"==typeof Array.prototype[b[_]]&&(p.prototype[b[_]]=Array.prototype[b[_]]);o.defineProperty(p.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),p.prototype.isOperational=!0;var y=0;function m(e){if(!(this instanceof m))return new m(e);c(this,"name","OperationalError"),c(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(c(this,"message",e.message),c(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}p.prototype.toString=function(){var e=Array(4*y+1).join(" "),t="\n"+e+"AggregateError of:\n";y++,e=Array(4*y+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split("\n"),o=0;o<i.length;++o)i[o]=e+i[o];t+=(n=i.join("\n"))+"\n"}return y--,t},l(m,Error);var g=Error.__BluebirdErrorTypes__;g||(g=s({CancellationError:h,TimeoutError:d,OperationalError:m,RejectionError:m,AggregateError:p}),o.defineProperty(Error,"__BluebirdErrorTypes__",{value:g,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error,TypeError:n,RangeError:i,CancellationError:g.CancellationError,OperationalError:g.OperationalError,TimeoutError:g.TimeoutError,AggregateError:g.AggregateError,Warning:f}},{"./es5":13,"./util":36}],13:[function(e,t,r){var n=function(){return void 0===this}();if(n)t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:n,propertyIsWritable:function(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!(r&&!r.writable&&!r.set)}};else{var i={}.hasOwnProperty,o={}.toString,s={}.constructor.prototype,a=function(e){var t=[];for(var r in e)i.call(e,r)&&t.push(r);return t},l=function(e,t){return{value:e[t]}},c=function(e,t,r){return e[t]=r.value,e},u=function(e){return e},f=function(e){try{return Object(e).constructor.prototype}catch(e){return s}},h=function(e){try{return"[object Array]"===o.call(e)}catch(e){return!1}};t.exports={isArray:h,keys:a,names:a,defineProperty:c,getDescriptor:l,freeze:u,getPrototypeOf:f,isES5:n,propertyIsWritable:function(){return!0}}}},{}],14:[function(e,t,r){t.exports=function(e,t){var r=e.map;e.prototype.filter=function(e,n){return r(this,e,n,t)},e.filter=function(e,n,i){return r(e,n,i,t)}}},{}],15:[function(e,t,r){t.exports=function(t,r,n){var i=e("./util"),o=t.CancellationError,s=i.errorObj,a=e("./catch_filter")(n);function l(e,t,r){this.promise=e,this.type=t,this.handler=r,this.called=!1,this.cancelPromise=null}function c(e){this.finallyHandler=e}function u(e,t){return null!=e.cancelPromise&&(arguments.length>1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function f(){return d.call(this,this.promise._target()._settledValue())}function h(e){if(!u(this,e))return s.e=e,s}function d(e){var i=this.promise,a=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?a.call(i._boundValue()):a.call(i._boundValue(),e);if(l===n)return l;if(void 0!==l){i._setReturnedNonUndefined();var d=r(l,i);if(d instanceof t){if(null!=this.cancelPromise){if(d._isCancelled()){var p=new o("late cancellation observer");return i._attachExtraTrace(p),s.e=p,s}d.isPending()&&d._attachCancellationCallback(new c(this))}return d._then(f,h,void 0,this,void 0)}}}return i.isRejected()?(u(this),s.e=e,s):(u(this),e)}return l.prototype.isFinallyHandler=function(){return 0===this.type},c.prototype._resultCancelled=function(){u(this.finallyHandler)},t.prototype._passThrough=function(e,t,r,n){return"function"!=typeof e?this.then():this._then(r,n,void 0,new l(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,d,d)},t.prototype.tap=function(e){return this._passThrough(e,1,d)},t.prototype.tapCatch=function(e){var r=arguments.length;if(1===r)return this._passThrough(e,1,void 0,d);var n,o=new Array(r-1),s=0;for(n=0;n<r-1;++n){var l=arguments[n];if(!i.isObject(l))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+i.classString(l)));o[s++]=l}o.length=s;var c=arguments[n];return this._passThrough(a(o,c,this),1,void 0,d)},l}},{"./catch_filter":7,"./util":36}],16:[function(e,t,r){t.exports=function(t,r,n,i,o,s){var a=e("./errors").TypeError,l=e("./util"),c=l.errorObj,u=l.tryCatch,f=[];function h(e,r,n){for(var o=0;o<r.length;++o){n._pushContext();var s=u(r[o])(e);if(n._popContext(),s===c){n._pushContext();var a=t.reject(c.e);return n._popContext(),a}var l=i(s,n);if(l instanceof t)return l}return null}function d(e,r,i,o){if(s.cancellation()){var a=new t(n),l=this._finallyPromise=new t(n);this._promise=a.lastly((function(){return l})),a._captureStackTrace(),a._setOnCancel(this)}else(this._promise=new t(n))._captureStackTrace();this._stack=o,this._generatorFunction=e,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(f):f,this._yieldedPromise=null,this._cancellationPhase=!1}l.inherits(d,o),d.prototype._isResolved=function(){return null===this._promise},d.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},d.prototype._promiseCancelled=function(){if(!this._isResolved()){var e;if(void 0!==this._generator.return)this._promise._pushContext(),e=u(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),e=u(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},d.prototype._promiseFulfilled=function(e){this._yieldedPromise=null,this._promise._pushContext();var t=u(this._generator.next).call(this._generator,e);this._promise._popContext(),this._continue(t)},d.prototype._promiseRejected=function(e){this._yieldedPromise=null,this._promise._attachExtraTrace(e),this._promise._pushContext();var t=u(this._generator.throw).call(this._generator,e);this._promise._popContext(),this._continue(t)},d.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},d.prototype.promise=function(){return this._promise},d.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},d.prototype._continue=function(e){var r=this._promise;if(e===c)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(e.e,!1);var n=e.value;if(!0===e.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var o=i(n,this._promise);if(o instanceof t||null!==(o=h(o,this._yieldHandlers,this._promise))){var s=(o=o._target())._bitField;50397184&s?33554432&s?t._async.invoke(this._promiseFulfilled,this,o._value()):16777216&s?t._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled():(this._yieldedPromise=o,o._proxy(this,null))}else this._promiseRejected(new a("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(n))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},t.coroutine=function(e,t){if("function"!=typeof e)throw new a("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(t).yieldHandler,n=d,i=(new Error).stack;return function(){var t=e.apply(this,arguments),o=new n(void 0,void 0,r,i),s=o.promise();return o._generator=t,o._promiseFulfilled(void 0),s}},t.coroutine.addYieldHandler=function(e){if("function"!=typeof e)throw new a("expecting a function but got "+l.classString(e));f.push(e)},t.spawn=function(e){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof e)return r("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new d(e,this),i=n.promise();return n._run(t.spawn),i}}},{"./errors":12,"./util":36}],17:[function(e,t,r){t.exports=function(t,r,n,i,o){var s=e("./util");s.canEvaluate,s.tryCatch,s.errorObj,t.join=function(){var e,t=arguments.length-1;t>0&&"function"==typeof arguments[t]&&(e=arguments[t]);var n=[].slice.call(arguments);e&&n.pop();var i=new r(n).promise();return void 0!==e?i.spread(e):i}}},{"./util":36}],18:[function(e,t,r){t.exports=function(t,r,n,i,o,s){var a=e("./util"),l=a.tryCatch,c=a.errorObj,u=t._async;function f(e,r,n,i){this.constructor$(e),this._promise._captureStackTrace();var s=t._getContext();if(this._callback=a.contextBind(s,r),this._preservedValues=i===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],u.invoke(this._asyncInit,this,void 0),a.isArray(e))for(var l=0;l<e.length;++l){var c=e[l];c instanceof t&&c.suppressUnhandledRejections()}}function h(e,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+a.classString(r));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return t.reject(new TypeError("options argument must be an object but it is "+a.classString(i)));if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+a.classString(i.concurrency)));s=i.concurrency}return new f(e,r,s="number"==typeof s&&isFinite(s)&&s>=1?s:0,o).promise()}a.inherits(f,r),f.prototype._asyncInit=function(){this._init$(void 0,-2)},f.prototype._init=function(){},f.prototype._promiseFulfilled=function(e,r){var n=this._values,o=this.length(),a=this._preservedValues,u=this._limit;if(r<0){if(n[r=-1*r-1]=e,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return n[r]=e,this._queue.push(r),!1;null!==a&&(a[r]=e);var f=this._promise,h=this._callback,d=f._boundValue();f._pushContext();var p=l(h).call(d,e,r,o),b=f._popContext();if(s.checkForgottenReturns(p,b,null!==a?"Promise.filter":"Promise.map",f),p===c)return this._reject(p.e),!0;var _=i(p,this._promise);if(_ instanceof t){var y=(_=_._target())._bitField;if(!(50397184&y))return u>=1&&this._inFlight++,n[r]=_,_._proxy(this,-1*(r+1)),!1;if(!(33554432&y))return 16777216&y?(this._reject(_._reason()),!0):(this._cancel(),!0);p=_._value()}n[r]=p}return++this._totalResolved>=o&&(null!==a?this._filter(n,a):this._resolve(n),!0)},f.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,r=this._values;e.length>0&&this._inFlight<t;){if(this._isResolved())return;var n=e.pop();this._promiseFulfilled(r[n],n)}},f.prototype._filter=function(e,t){for(var r=t.length,n=new Array(r),i=0,o=0;o<r;++o)e[o]&&(n[i++]=t[o]);n.length=i,this._resolve(n)},f.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(e,t){return h(this,e,t,null)},t.map=function(e,t,r,n){return h(e,t,r,n)}}},{"./util":36}],19:[function(e,t,r){t.exports=function(t,r,n,i,o){var s=e("./util"),a=s.tryCatch;t.method=function(e){if("function"!=typeof e)throw new t.TypeError("expecting a function but got "+s.classString(e));return function(){var n=new t(r);n._captureStackTrace(),n._pushContext();var i=a(e).apply(this,arguments),s=n._popContext();return o.checkForgottenReturns(i,s,"Promise.method",n),n._resolveFromSyncValue(i),n}},t.attempt=t.try=function(e){if("function"!=typeof e)return i("expecting a function but got "+s.classString(e));var n,l=new t(r);if(l._captureStackTrace(),l._pushContext(),arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],u=arguments[2];n=s.isArray(c)?a(e).apply(u,c):a(e).call(u,c)}else n=a(e)();var f=l._popContext();return o.checkForgottenReturns(n,f,"Promise.try",l),l._resolveFromSyncValue(n),l},t.prototype._resolveFromSyncValue=function(e){e===s.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,r){var n=e("./util"),i=n.maybeWrapAsError,o=e("./errors").OperationalError,s=e("./es5");function a(e){return e instanceof Error&&s.getPrototypeOf(e)===Error.prototype}var l=/^(?:name|message|stack|cause)$/;function c(e){var t;if(a(e)){(t=new o(e)).name=e.name,t.message=e.message,t.stack=e.stack;for(var r=s.keys(e),i=0;i<r.length;++i){var c=r[i];l.test(c)||(t[c]=e[c])}return t}return n.markAsOriginatingFromRejection(e),e}function u(e,t){return function(r,n){if(null!==e){if(r){var o=c(i(r));e._attachExtraTrace(o),e._reject(o)}else if(t){var s=[].slice.call(arguments,1);e._fulfill(s)}else e._fulfill(n);e=null}}}t.exports=u},{"./errors":12,"./es5":13,"./util":36}],21:[function(e,t,r){t.exports=function(t){var r=e("./util"),n=t._async,i=r.tryCatch,o=r.errorObj;function s(e,t){var s=this;if(!r.isArray(e))return a.call(s,e,t);var l=i(t).apply(s._boundValue(),[null].concat(e));l===o&&n.throwLater(l.e)}function a(e,t){var r=this._boundValue(),s=void 0===e?i(t).call(r,null):i(t).call(r,null,e);s===o&&n.throwLater(s.e)}function l(e,t){var r=this;if(!e){var s=new Error(e+"");s.cause=e,e=s}var a=i(t).call(r._boundValue(),e);a===o&&n.throwLater(a.e)}t.prototype.asCallback=t.prototype.nodeify=function(e,t){if("function"==typeof e){var r=a;void 0!==t&&Object(t).spread&&(r=s),this._then(r,l,void 0,this,e)}return this}}},{"./util":36}],22:[function(e,t,r){t.exports=function(){var r=function(){return new w("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},n=function(){return new N.PromiseInspection(this._target())},i=function(e){return N.reject(new w(e))};function o(){}var s={},a=e("./util");a.setReflectHandler(n);var l=function(){var e=process.domain;return void 0===e?null:e},c=function(){return null},u=function(){return{domain:l(),async:null}},f=a.isNode&&a.nodeSupportsAsyncResource?e("async_hooks").AsyncResource:null,h=function(){return{domain:l(),async:new f("Bluebird::Promise")}},d=a.isNode?u:c;a.notEnumerableProp(N,"_getContext",d);var p=function(){d=h,a.notEnumerableProp(N,"_getContext",h)},b=function(){d=u,a.notEnumerableProp(N,"_getContext",u)},_=e("./es5"),y=e("./async"),m=new y;_.defineProperty(N,"_async",{value:m});var g=e("./errors"),w=N.TypeError=g.TypeError;N.RangeError=g.RangeError;var v=N.CancellationError=g.CancellationError;N.TimeoutError=g.TimeoutError,N.OperationalError=g.OperationalError,N.RejectionError=g.OperationalError,N.AggregateError=g.AggregateError;var S=function(){},E={},x={},R=e("./thenables")(N,S),A=e("./promise_array")(N,S,R,i,o),O=e("./context")(N),k=O.create,T=e("./debuggability")(N,O,p,b),P=(T.CapturedTrace,e("./finally")(N,R,x)),M=e("./catch_filter")(x),L=e("./nodeback"),C=a.errorObj,I=a.tryCatch;function D(e,t){if(null==e||e.constructor!==N)throw new w("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof t)throw new w("expecting a function but got "+a.classString(t))}function N(e){e!==S&&D(this,e),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(e),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function j(e){this.promise._resolveCallback(e)}function F(e){this.promise._rejectCallback(e,!1)}function W(e){var t=new N(S);t._fulfillmentHandler0=e,t._rejectionHandler0=e,t._promise0=e,t._receiver0=e}return N.prototype.toString=function(){return"[object Promise]"},N.prototype.caught=N.prototype.catch=function(e){var t=arguments.length;if(t>1){var r,n=new Array(t-1),o=0;for(r=0;r<t-1;++r){var s=arguments[r];if(!a.isObject(s))return i("Catch statement predicate: expecting an object but got "+a.classString(s));n[o++]=s}if(n.length=o,"function"!=typeof(e=arguments[r]))throw new w("The last argument to .catch() must be a function, got "+a.toString(e));return this.then(void 0,M(n,e,this))}return this.then(void 0,e)},N.prototype.reflect=function(){return this._then(n,n,void 0,this,void 0)},N.prototype.then=function(e,t){if(T.warnings()&&arguments.length>0&&"function"!=typeof e&&"function"!=typeof t){var r=".then() only accepts functions but was passed: "+a.classString(e);arguments.length>1&&(r+=", "+a.classString(t)),this._warn(r)}return this._then(e,t,void 0,void 0,void 0)},N.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},N.prototype.spread=function(e){return"function"!=typeof e?i("expecting a function but got "+a.classString(e)):this.all()._then(e,void 0,void 0,E,void 0)},N.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},N.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new A(this).promise()},N.prototype.error=function(e){return this.caught(a.originatesFromRejection,e)},N.getNewLibraryCopy=t.exports,N.is=function(e){return e instanceof N},N.fromNode=N.fromCallback=function(e){var t=new N(S);t._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=I(e)(L(t,r));return n===C&&t._rejectCallback(n.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},N.all=function(e){return new A(e).promise()},N.cast=function(e){var t=R(e);return t instanceof N||((t=new N(S))._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},N.resolve=N.fulfilled=N.cast,N.reject=N.rejected=function(e){var t=new N(S);return t._captureStackTrace(),t._rejectCallback(e,!0),t},N.setScheduler=function(e){if("function"!=typeof e)throw new w("expecting a function but got "+a.classString(e));return m.setScheduler(e)},N.prototype._then=function(e,t,r,n,i){var o=void 0!==i,s=o?i:new N(S),l=this._target(),c=l._bitField;o||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===n&&2097152&this._bitField&&(n=50397184&c?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var u=d();if(50397184&c){var f,h,p=l._settlePromiseCtx;33554432&c?(h=l._rejectionHandler0,f=e):16777216&c?(h=l._fulfillmentHandler0,f=t,l._unsetRejectionIsUnhandled()):(p=l._settlePromiseLateCancellationObserver,h=new v("late cancellation observer"),l._attachExtraTrace(h),f=t),m.invoke(p,l,{handler:a.contextBind(u,f),promise:s,receiver:n,value:h})}else l._addCallbacks(e,t,s,n,u);return s},N.prototype._length=function(){return 65535&this._bitField},N.prototype._isFateSealed=function(){return!!(117506048&this._bitField)},N.prototype._isFollowing=function(){return!(67108864&~this._bitField)},N.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},N.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},N.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},N.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},N.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},N.prototype._isFinal=function(){return(4194304&this._bitField)>0},N.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},N.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},N.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},N.prototype._setAsyncGuaranteed=function(){if(!m.hasCustomScheduler()){var e=this._bitField;this._bitField=e|(536870912&e)>>2^134217728}},N.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&this._bitField|536870912},N.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==s)return void 0===t&&this._isBound()?this._boundValue():t},N.prototype._promiseAt=function(e){return this[4*e-4+2]},N.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},N.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},N.prototype._boundValue=function(){},N.prototype._migrateCallback0=function(e){e._bitField;var t=e._fulfillmentHandler0,r=e._rejectionHandler0,n=e._promise0,i=e._receiverAt(0);void 0===i&&(i=s),this._addCallbacks(t,r,n,i,null)},N.prototype._migrateCallbackAt=function(e,t){var r=e._fulfillmentHandlerAt(t),n=e._rejectionHandlerAt(t),i=e._promiseAt(t),o=e._receiverAt(t);void 0===o&&(o=s),this._addCallbacks(r,n,i,o,null)},N.prototype._addCallbacks=function(e,t,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,"function"==typeof e&&(this._fulfillmentHandler0=a.contextBind(i,e)),"function"==typeof t&&(this._rejectionHandler0=a.contextBind(i,t));else{var s=4*o-4;this[s+2]=r,this[s+3]=n,"function"==typeof e&&(this[s+0]=a.contextBind(i,e)),"function"==typeof t&&(this[s+1]=a.contextBind(i,t))}return this._setLength(o+1),o},N.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},N.prototype._resolveCallback=function(e,t){if(!(117506048&this._bitField)){if(e===this)return this._rejectCallback(r(),!1);var n=R(e,this);if(!(n instanceof N))return this._fulfill(e);t&&this._propagateFrom(n,2);var i=n._target();if(i!==this){var o=i._bitField;if(50397184&o)if(33554432&o)this._fulfill(i._value());else if(16777216&o)this._reject(i._reason());else{var s=new v("late cancellation observer");i._attachExtraTrace(s),this._reject(s)}else{var a=this._length();a>0&&i._migrateCallback0(this);for(var l=1;l<a;++l)i._migrateCallbackAt(this,l);this._setFollowing(),this._setLength(0),this._setFollowee(n)}}else this._reject(r())}},N.prototype._rejectCallback=function(e,t,r){var n=a.ensureErrorObject(e),i=n===e;if(!i&&!r&&T.warnings()){var o="a promise was rejected with a non-error: "+a.classString(e);this._warn(o,!0)}this._attachExtraTrace(n,!!t&&i),this._reject(e)},N.prototype._resolveFromExecutor=function(e){if(e!==S){var t=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(e,(function(e){t._resolveCallback(e)}),(function(e){t._rejectCallback(e,r)}));r=!1,this._popContext(),void 0!==n&&t._rejectCallback(n,!0)}},N.prototype._settlePromiseFromHandler=function(e,t,r,n){var i=n._bitField;if(!(65536&i)){var o;n._pushContext(),t===E?r&&"number"==typeof r.length?o=I(e).apply(this._boundValue(),r):(o=C).e=new w("cannot .spread() a non-array: "+a.classString(r)):o=I(e).call(t,r);var s=n._popContext();65536&(i=n._bitField)||(o===x?n._reject(r):o===C?n._rejectCallback(o.e,!1):(T.checkForgottenReturns(o,s,"",n,this),n._resolveCallback(o)))}},N.prototype._target=function(){for(var e=this;e._isFollowing();)e=e._followee();return e},N.prototype._followee=function(){return this._rejectionHandler0},N.prototype._setFollowee=function(e){this._rejectionHandler0=e},N.prototype._settlePromise=function(e,t,r,i){var s=e instanceof N,a=this._bitField,l=!!(134217728&a);65536&a?(s&&e._invokeInternalOnCancel(),r instanceof P&&r.isFinallyHandler()?(r.cancelPromise=e,I(t).call(r,i)===C&&e._reject(C.e)):t===n?e._fulfill(n.call(r)):r instanceof o?r._promiseCancelled(e):s||e instanceof A?e._cancel():r.cancel()):"function"==typeof t?s?(l&&e._setAsyncGuaranteed(),this._settlePromiseFromHandler(t,r,i,e)):t.call(r,i,e):r instanceof o?r._isResolved()||(33554432&a?r._promiseFulfilled(i,e):r._promiseRejected(i,e)):s&&(l&&e._setAsyncGuaranteed(),33554432&a?e._fulfill(i):e._reject(i))},N.prototype._settlePromiseLateCancellationObserver=function(e){var t=e.handler,r=e.promise,n=e.receiver,i=e.value;"function"==typeof t?r instanceof N?this._settlePromiseFromHandler(t,n,i,r):t.call(n,i,r):r instanceof N&&r._reject(i)},N.prototype._settlePromiseCtx=function(e){this._settlePromise(e.promise,e.handler,e.receiver,e.value)},N.prototype._settlePromise0=function(e,t,r){var n=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,e,i,t)},N.prototype._clearCallbackDataAtIndex=function(e){var t=4*e-4;this[t+2]=this[t+3]=this[t+0]=this[t+1]=void 0},N.prototype._fulfill=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(e===this){var n=r();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(134217728&t?this._settlePromises():m.settlePromises(this),this._dereferenceTrace())}},N.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return m.fatalError(e,a.isNode);(65535&t)>0?m.settlePromises(this):this._ensurePossibleRejectionHandled()}},N.prototype._fulfillPromises=function(e,t){for(var r=1;r<e;r++){var n=this._fulfillmentHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,t)}},N.prototype._rejectPromises=function(e,t){for(var r=1;r<e;r++){var n=this._rejectionHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,t)}},N.prototype._settlePromises=function(){var e=this._bitField,t=65535&e;if(t>0){if(16842752&e){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,e),this._rejectPromises(t,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,e),this._fulfillPromises(t,n)}this._setLength(0)}this._clearCancellationData()},N.prototype._settledValue=function(){var e=this._bitField;return 33554432&e?this._rejectionHandler0:16777216&e?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&_.defineProperty(N.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),N.defer=N.pending=function(){return T.deprecated("Promise.defer","new Promise"),{promise:new N(S),resolve:j,reject:F}},a.notEnumerableProp(N,"_makeSelfResolutionError",r),e("./method")(N,S,R,i,T),e("./bind")(N,S,R,T),e("./cancel")(N,A,i,T),e("./direct_resolve")(N),e("./synchronous_inspection")(N),e("./join")(N,A,R,S,m),N.Promise=N,N.version="3.7.2",e("./call_get.js")(N),e("./generators.js")(N,i,S,R,o,T),e("./map.js")(N,A,i,R,S,T),e("./nodeify.js")(N),e("./promisify.js")(N,S),e("./props.js")(N,A,R,i),e("./race.js")(N,S,R,i),e("./reduce.js")(N,A,i,R,S,T),e("./settle.js")(N,A,T),e("./some.js")(N,A,i),e("./timers.js")(N,S,T),e("./using.js")(N,i,R,k,S,T),e("./any.js")(N),e("./each.js")(N,S),e("./filter.js")(N,S),a.toFastProperties(N),a.toFastProperties(N.prototype),W({a:1}),W({b:2}),W({c:3}),W(1),W((function(){})),W(void 0),W(!1),W(new N(S)),T.setBounds(y.firstLineError,a.lastLineError),N}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36,async_hooks:void 0}],23:[function(e,t,r){t.exports=function(t,r,n,i,o){var s=e("./util");function a(e){switch(e){case-2:return[];case-3:return{};case-6:return new Map}}function l(e){var n=this._promise=new t(r);e instanceof t&&(n._propagateFrom(e,3),e.suppressUnhandledRejections()),n._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return s.isArray,s.inherits(l,o),l.prototype.length=function(){return this._length},l.prototype.promise=function(){return this._promise},l.prototype._init=function e(r,o){var l=n(this._values,this._promise);if(l instanceof t){var c=(l=l._target())._bitField;if(this._values=l,!(50397184&c))return this._promise._setAsyncGuaranteed(),l._then(e,this._reject,void 0,this,o);if(!(33554432&c))return 16777216&c?this._reject(l._reason()):this._cancel();l=l._value()}if(null!==(l=s.asArray(l)))0!==l.length?this._iterate(l):-5===o?this._resolveEmptyArray():this._resolve(a(o));else{var u=i("expecting an array or an iterable object but got "+s.classString(l)).reason();this._promise._rejectCallback(u,!1)}},l.prototype._iterate=function(e){var r=this.getActualLength(e.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,s=null,a=0;a<r;++a){var l=n(e[a],i);s=l instanceof t?(l=l._target())._bitField:null,o?null!==s&&l.suppressUnhandledRejections():null!==s?50397184&s?o=33554432&s?this._promiseFulfilled(l._value(),a):16777216&s?this._promiseRejected(l._reason(),a):this._promiseCancelled(a):(l._proxy(this,a),this._values[a]=l):o=this._promiseFulfilled(l,a)}o||i._setAsyncGuaranteed()},l.prototype._isResolved=function(){return null===this._values},l.prototype._resolve=function(e){this._values=null,this._promise._fulfill(e)},l.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},l.prototype._reject=function(e){this._values=null,this._promise._rejectCallback(e,!1)},l.prototype._promiseFulfilled=function(e,t){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},l.prototype._promiseCancelled=function(){return this._cancel(),!0},l.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},l.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var r=0;r<e.length;++r)e[r]instanceof t&&e[r].cancel()}},l.prototype.shouldCopyValues=function(){return!0},l.prototype.getActualLength=function(e){return e},l}},{"./util":36}],24:[function(e,t,r){t.exports=function(t,r){var n={},i=e("./util"),o=e("./nodeback"),s=i.withAppended,a=i.maybeWrapAsError,l=i.canEvaluate,c=e("./errors").TypeError,u="Async",f={__isPromisified__:!0},h=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),d=function(e){return i.isIdentifier(e)&&"_"!==e.charAt(0)&&"constructor"!==e};function p(e){return!h.test(e)}function b(e){try{return!0===e.__isPromisified__}catch(e){return!1}}function _(e,t,r){var n=i.getDataPropertyOrDefault(e,t+r,f);return!!n&&b(n)}function y(e,t,r){for(var n=0;n<e.length;n+=2){var i=e[n];if(r.test(i))for(var o=i.replace(r,""),s=0;s<e.length;s+=2)if(e[s]===o)throw new c("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",t))}}function m(e,t,r,n){for(var o=i.inheritedDataKeys(e),s=[],a=0;a<o.length;++a){var l=o[a],c=e[l],u=n===d||d(l,c,e);"function"!=typeof c||b(c)||_(e,l,t)||!n(l,c,e,u)||s.push(l,c)}return y(s,t,r),s}var g,w=function(e){return e.replace(/([$])/,"\\$")};function v(e,l,c,u,f,h){var d=function(){return this}(),p=e;function b(){var i=l;l===n&&(i=this);var c=new t(r);c._captureStackTrace();var u="string"==typeof p&&this!==d?this[p]:e,f=o(c,h);try{u.apply(i,s(arguments,f))}catch(e){c._rejectCallback(a(e),!0,!0)}return c._isFateSealed()||c._setAsyncGuaranteed(),c}return"string"==typeof p&&(e=u),i.notEnumerableProp(b,"__isPromisified__",!0),b}var S=l?g:v;function E(e,t,r,o,s){for(var a=new RegExp(w(t)+"$"),l=m(e,t,a,r),c=0,u=l.length;c<u;c+=2){var f=l[c],h=l[c+1],d=f+t;if(o===S)e[d]=S(f,n,f,h,t,s);else{var p=o(h,(function(){return S(f,n,f,h,t,s)}));i.notEnumerableProp(p,"__isPromisified__",!0),e[d]=p}}return i.toFastProperties(e),e}function x(e,t,r){return S(e,t,void 0,e,null,r)}t.promisify=function(e,t){if("function"!=typeof e)throw new c("expecting a function but got "+i.classString(e));if(b(e))return e;var r=x(e,void 0===(t=Object(t)).context?n:t.context,!!t.multiArgs);return i.copyDescriptors(e,r,p),r},t.promisifyAll=function(e,t){if("function"!=typeof e&&"object"!=typeof e)throw new c("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var r=!!(t=Object(t)).multiArgs,n=t.suffix;"string"!=typeof n&&(n=u);var o=t.filter;"function"!=typeof o&&(o=d);var s=t.promisifier;if("function"!=typeof s&&(s=S),!i.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=i.inheritedDataKeys(e),l=0;l<a.length;++l){var f=e[a[l]];"constructor"!==a[l]&&i.isClass(f)&&(E(f.prototype,n,o,s,r),E(f,n,o,s,r))}return E(e,n,o,s,r)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(e,t,r){t.exports=function(t,r,n,i){var o,s=e("./util"),a=s.isObject,l=e("./es5");"function"==typeof Map&&(o=Map);var c=function(){var e=0,t=0;function r(r,n){this[e]=r,this[e+t]=n,e++}return function(n){t=n.size,e=0;var i=new Array(2*n.size);return n.forEach(r,i),i}}(),u=function(e){for(var t=new o,r=e.length/2|0,n=0;n<r;++n){var i=e[r+n],s=e[n];t.set(i,s)}return t};function f(e){var t,r=!1;if(void 0!==o&&e instanceof o)t=c(e),r=!0;else{var n=l.keys(e),i=n.length;t=new Array(2*i);for(var s=0;s<i;++s){var a=n[s];t[s]=e[a],t[s+i]=a}}this.constructor$(t),this._isMap=r,this._init$(void 0,r?-6:-3)}function h(e){var r,o=n(e);return a(o)?(r=o instanceof t?o._then(t.props,void 0,void 0,void 0,void 0):new f(o).promise(),o instanceof t&&r._propagateFrom(o,2),r):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}s.inherits(f,r),f.prototype._init=function(){},f.prototype._promiseFulfilled=function(e,t){if(this._values[t]=e,++this._totalResolved>=this._length){var r;if(this._isMap)r=u(this._values);else{r={};for(var n=this.length(),i=0,o=this.length();i<o;++i)r[this._values[i+n]]=this._values[i]}return this._resolve(r),!0}return!1},f.prototype.shouldCopyValues=function(){return!1},f.prototype.getActualLength=function(e){return e>>1},t.prototype.props=function(){return h(this)},t.props=function(e){return h(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,r){function n(e,t,r,n,i){for(var o=0;o<i;++o)r[o+n]=e[o+t],e[o+t]=void 0}function i(e){this._capacity=e,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(e){return this._capacity<e},i.prototype._pushOne=function(e){var t=this.length();this._checkCapacity(t+1),this[this._front+t&this._capacity-1]=e,this._length=t+1},i.prototype.push=function(e,t,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(e),this._pushOne(t),void this._pushOne(r);var i=this._front+n-3;this._checkCapacity(n);var o=this._capacity-1;this[i+0&o]=e,this[i+1&o]=t,this[i+2&o]=r,this._length=n},i.prototype.shift=function(){var e=this._front,t=this[e];return this[e]=void 0,this._front=e+1&this._capacity-1,this._length--,t},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(e){this._capacity<e&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(e){var t=this._capacity;this._capacity=e,n(this,0,this,t,this._front+this._length&t-1)},t.exports=i},{}],27:[function(e,t,r){t.exports=function(t,r,n,i){var o=e("./util"),s=function(e){return e.then((function(t){return a(t,e)}))};function a(e,a){var l=n(e);if(l instanceof t)return s(l);if(null===(e=o.asArray(e)))return i("expecting an array or an iterable object but got "+o.classString(e));var c=new t(r);void 0!==a&&c._propagateFrom(a,3);for(var u=c._fulfill,f=c._reject,h=0,d=e.length;h<d;++h){var p=e[h];(void 0!==p||h in e)&&t.cast(p)._then(u,f,void 0,c,null)}return c}t.race=function(e){return a(e,void 0)},t.prototype.race=function(){return a(this,void 0)}}},{"./util":36}],28:[function(e,t,r){t.exports=function(t,r,n,i,o,s){var a=e("./util"),l=a.tryCatch;function c(e,r,n,i){this.constructor$(e);var s=t._getContext();this._fn=a.contextBind(s,r),void 0!==n&&(n=t.resolve(n))._attachCancellationCallback(this),this._initialValue=n,this._currentCancellable=null,this._eachValues=i===o?Array(this._length):0===i?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function u(e,t){this.isFulfilled()?t._resolve(e):t._reject(e)}function f(e,t,r,i){return"function"!=typeof t?n("expecting a function but got "+a.classString(t)):new c(e,t,r,i).promise()}function h(e){this.accum=e,this.array._gotAccum(e);var r=i(this.value,this.array._promise);return r instanceof t?(this.array._currentCancellable=r,r._then(d,void 0,void 0,this,void 0)):d.call(this,r)}function d(e){var r,n=this.array,i=n._promise,o=l(n._fn);i._pushContext(),(r=void 0!==n._eachValues?o.call(i._boundValue(),e,this.index,this.length):o.call(i._boundValue(),this.accum,e,this.index,this.length))instanceof t&&(n._currentCancellable=r);var a=i._popContext();return s.checkForgottenReturns(r,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",i),r}a.inherits(c,r),c.prototype._gotAccum=function(e){void 0!==this._eachValues&&null!==this._eachValues&&e!==o&&this._eachValues.push(e)},c.prototype._eachComplete=function(e){return null!==this._eachValues&&this._eachValues.push(e),this._eachValues},c.prototype._init=function(){},c.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},c.prototype.shouldCopyValues=function(){return!1},c.prototype._resolve=function(e){this._promise._resolveCallback(e),this._values=null},c.prototype._resultCancelled=function(e){if(e===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel())},c.prototype._iterate=function(e){var r,n;this._values=e;var i=e.length;void 0!==this._initialValue?(r=this._initialValue,n=0):(r=t.resolve(e[0]),n=1),this._currentCancellable=r;for(var o=n;o<i;++o){var s=e[o];s instanceof t&&s.suppressUnhandledRejections()}if(!r.isRejected())for(;n<i;++n){var a={accum:null,value:e[n],index:n,length:i,array:this};r=r._then(h,void 0,void 0,a,void 0),127&n||r._setNoAsyncGuarantee()}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(u,u,void 0,r,this)},t.prototype.reduce=function(e,t){return f(this,e,t,null)},t.reduce=function(e,t,r,n){return f(e,t,r,n)}}},{"./util":36}],29:[function(e,t,n){var i,o=e("./util"),s=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},a=o.getNativePromise();if(o.isNode&&"undefined"==typeof MutationObserver){var l=r.g.setImmediate,c=process.nextTick;i=o.isRecentNode?function(e){l.call(r.g,e)}:function(e){c.call(process,e)}}else if("function"==typeof a&&"function"==typeof a.resolve){var u=a.resolve();i=function(e){u.then(e)}}else i="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)||!("classList"in document.documentElement)?"undefined"!=typeof setImmediate?function(e){setImmediate(e)}:"undefined"!=typeof setTimeout?function(e){setTimeout(e,0)}:s:function(){var e=document.createElement("div"),t={attributes:!0},r=!1,n=document.createElement("div");new MutationObserver((function(){e.classList.toggle("foo"),r=!1})).observe(n,t);var i=function(){r||(r=!0,n.classList.toggle("foo"))};return function(r){var n=new MutationObserver((function(){n.disconnect(),r()}));n.observe(e,t),i()}}();t.exports=i},{"./util":36}],30:[function(e,t,r){t.exports=function(t,r,n){var i=t.PromiseInspection;function o(e){this.constructor$(e)}e("./util").inherits(o,r),o.prototype._promiseResolved=function(e,t){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(e,t){var r=new i;return r._bitField=33554432,r._settledValueField=e,this._promiseResolved(t,r)},o.prototype._promiseRejected=function(e,t){var r=new i;return r._bitField=16777216,r._settledValueField=e,this._promiseResolved(t,r)},t.settle=function(e){return n.deprecated(".settle()",".reflect()"),new o(e).promise()},t.allSettled=function(e){return new o(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,r){t.exports=function(t,r,n){var i=e("./util"),o=e("./errors").RangeError,s=e("./errors").AggregateError,a=i.isArray,l={};function c(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function u(e,t){if((0|t)!==t||t<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new c(e),i=r.promise();return r.setHowMany(t),r.init(),i}i.inherits(c,r),c.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var e=a(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},c.prototype.init=function(){this._initialized=!0,this._init()},c.prototype.setUnwrap=function(){this._unwrap=!0},c.prototype.howMany=function(){return this._howMany},c.prototype.setHowMany=function(e){this._howMany=e},c.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},c.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},c.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},c.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new s,t=this.length();t<this._values.length;++t)this._values[t]!==l&&e.push(this._values[t]);return e.length>0?this._reject(e):this._cancel(),!0}return!1},c.prototype._fulfilled=function(){return this._totalResolved},c.prototype._rejected=function(){return this._values.length-this.length()},c.prototype._addRejected=function(e){this._values.push(e)},c.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},c.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},c.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new o(t)},c.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return u(e,t)},t.prototype.some=function(e){return u(this,e)},t._SomePromiseArray=c}},{"./errors":12,"./util":36}],32:[function(e,t,r){t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var r=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=t.prototype.isFulfilled=function(){return!!(33554432&this._bitField)},o=t.prototype.isRejected=function(){return!!(16777216&this._bitField)},s=t.prototype.isPending=function(){return!(50397184&this._bitField)},a=t.prototype.isResolved=function(){return!!(50331648&this._bitField)};t.prototype.isCancelled=function(){return!!(8454144&this._bitField)},e.prototype.__isCancelled=function(){return!(65536&~this._bitField)},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return!!(8454144&this._target()._bitField)},e.prototype.isPending=function(){return s.call(this._target())},e.prototype.isRejected=function(){return o.call(this._target())},e.prototype.isFulfilled=function(){return i.call(this._target())},e.prototype.isResolved=function(){return a.call(this._target())},e.prototype.value=function(){return r.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),n.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,r){t.exports=function(t,r){var n=e("./util"),i=n.errorObj,o=n.isObject;function s(e,n){if(o(e)){if(e instanceof t)return e;var s=l(e);if(s===i){n&&n._pushContext();var a=t.reject(s.e);return n&&n._popContext(),a}if("function"==typeof s)return u(e)?(a=new t(r),e._then(a._fulfill,a._reject,void 0,a,null),a):f(e,s,n)}return e}function a(e){return e.then}function l(e){try{return a(e)}catch(e){return i.e=e,i}}var c={}.hasOwnProperty;function u(e){try{return c.call(e,"_promise0")}catch(e){return!1}}function f(e,o,s){var a=new t(r),l=a;s&&s._pushContext(),a._captureStackTrace(),s&&s._popContext();var c=!0,u=n.tryCatch(o).call(e,f,h);function f(e){a&&(a._resolveCallback(e),a=null)}function h(e){a&&(a._rejectCallback(e,c,!0),a=null)}return c=!1,a&&u===i&&(a._rejectCallback(u.e,!0,!0),a=null),l}return s}},{"./util":36}],34:[function(e,t,r){t.exports=function(t,r,n){var i=e("./util"),o=t.TimeoutError;function s(e){this.handle=e}s.prototype._resultCancelled=function(){clearTimeout(this.handle)};var a=function(e){return l(+this).thenReturn(e)},l=t.delay=function(e,i){var o,l;return void 0!==i?(o=t.resolve(i)._then(a,null,null,e,void 0),n.cancellation()&&i instanceof t&&o._setOnCancel(i)):(o=new t(r),l=setTimeout((function(){o._fulfill()}),+e),n.cancellation()&&o._setOnCancel(new s(l)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};t.prototype.delay=function(e){return l(e,this)};var c=function(e,t,r){var n;n="string"!=typeof t?t instanceof Error?t:new o("operation timed out"):new o(t),i.markAsOriginatingFromRejection(n),e._attachExtraTrace(n),e._reject(n),null!=r&&r.cancel()};function u(e){return clearTimeout(this.handle),e}function f(e){throw clearTimeout(this.handle),e}t.prototype.timeout=function(e,t){var r,i;e=+e;var o=new s(setTimeout((function(){r.isPending()&&c(r,t,i)}),e));return n.cancellation()?(i=this.then(),(r=i._then(u,f,void 0,o,void 0))._setOnCancel(o)):r=this._then(u,f,void 0,o,void 0),r}}},{"./util":36}],35:[function(e,t,r){t.exports=function(t,r,n,i,o,s){var a=e("./util"),l=e("./errors").TypeError,c=e("./util").inherits,u=a.errorObj,f=a.tryCatch,h={};function d(e){setTimeout((function(){throw e}),0)}function p(e){var t=n(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}function b(e,r){var i=0,s=e.length,a=new t(o);function l(){if(i>=s)return a._fulfill();var o=p(e[i++]);if(o instanceof t&&o._isDisposable()){try{o=n(o._getDisposer().tryDispose(r),e.promise)}catch(e){return d(e)}if(o instanceof t)return o._then(l,d,null,null,null)}l()}return l(),a}function _(e,t,r){this._data=e,this._promise=t,this._context=r}function y(e,t,r){this.constructor$(e,t,r)}function m(e){return _.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function g(e){this.length=e,this.promise=null,this[e-1]=null}_.prototype.data=function(){return this._data},_.prototype.promise=function(){return this._promise},_.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():h},_.prototype.tryDispose=function(e){var t=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=t!==h?this.doDispose(t,e):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},_.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},c(y,_),y.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},g.prototype._resultCancelled=function(){for(var e=this.length,r=0;r<e;++r){var n=this[r];n instanceof t&&n.cancel()}},t.using=function(){var e=arguments.length;if(e<2)return r("you must pass at least 2 arguments to Promise.using");var i,o=arguments[e-1];if("function"!=typeof o)return r("expecting a function but got "+a.classString(o));var l=!0;2===e&&Array.isArray(arguments[0])?(e=(i=arguments[0]).length,l=!1):(i=arguments,e--);for(var c=new g(e),h=0;h<e;++h){var d=i[h];if(_.isDisposer(d)){var p=d;(d=d.promise())._setDisposable(p)}else{var y=n(d);y instanceof t&&(d=y._then(m,null,null,{resources:c,index:h},void 0))}c[h]=d}var w=new Array(c.length);for(h=0;h<w.length;++h)w[h]=t.resolve(c[h]).reflect();var v=t.all(w).then((function(e){for(var t=0;t<e.length;++t){var r=e[t];if(r.isRejected())return u.e=r.error(),u;if(!r.isFulfilled())return void v.cancel();e[t]=r.value()}S._pushContext(),o=f(o);var n=l?o.apply(void 0,e):o(e),i=S._popContext();return s.checkForgottenReturns(n,i,"Promise.using",S),n})),S=v.lastly((function(){var e=new t.PromiseInspection(v);return b(c,e)}));return c.promise=S,S._setOnCancel(c),S},t.prototype._setDisposable=function(e){this._bitField=131072|this._bitField,this._disposer=e},t.prototype._isDisposable=function(){return(131072&this._bitField)>0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new y(e,this,i());throw new l}}},{"./errors":12,"./util":36}],36:[function(e,t,n){var i,o=e("./es5"),s="undefined"==typeof navigator,a={e:{}},l="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r.g?r.g:void 0!==this?this:null;function c(){try{var e=i;return i=null,e.apply(this,arguments)}catch(e){return a.e=e,a}}function u(e){return i=e,c}var f=function(e,t){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=e,this.constructor$=t,t.prototype)r.call(t.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=t.prototype[n])}return n.prototype=t.prototype,e.prototype=new n,e.prototype};function h(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function d(e){return"function"==typeof e||"object"==typeof e&&null!==e}function p(e){return h(e)?new Error(A(e)):e}function b(e,t){var r,n=e.length,i=new Array(n+1);for(r=0;r<n;++r)i[r]=e[r];return i[r]=t,i}function _(e,t,r){if(!o.isES5)return{}.hasOwnProperty.call(e,t)?e[t]:void 0;var n=Object.getOwnPropertyDescriptor(e,t);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function y(e,t,r){if(h(e))return e;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return o.defineProperty(e,t,n),e}function m(e){throw e}var g=function(){var e=[Array.prototype,Object.prototype,Function.prototype],t=function(t){for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1};if(o.isES5){var r=Object.getOwnPropertyNames;return function(e){for(var n=[],i=Object.create(null);null!=e&&!t(e);){var s;try{s=r(e)}catch(e){return n}for(var a=0;a<s.length;++a){var l=s[a];if(!i[l]){i[l]=!0;var c=Object.getOwnPropertyDescriptor(e,l);null!=c&&null==c.get&&null==c.set&&n.push(l)}}e=o.getPrototypeOf(e)}return n}}var n={}.hasOwnProperty;return function(r){if(t(r))return[];var i=[];e:for(var o in r)if(n.call(r,o))i.push(o);else{for(var s=0;s<e.length;++s)if(n.call(e[s],o))continue e;i.push(o)}return i}}(),w=/this\s*\.\s*\S+\s*=/;function v(e){try{if("function"==typeof e){var t=o.names(e.prototype),r=o.isES5&&t.length>1,n=t.length>0&&!(1===t.length&&"constructor"===t[0]),i=w.test(e+"")&&o.names(e).length>0;if(r||n||i)return!0}return!1}catch(e){return!1}}function S(e){function t(){}t.prototype=e;var r=new t;function n(){return typeof r.foo}return n(),n(),e}var E=/^[a-z$_][a-z$_0-9]*$/i;function x(e){return E.test(e)}function R(e,t,r){for(var n=new Array(e),i=0;i<e;++i)n[i]=t+i+r;return n}function A(e){try{return e+""}catch(e){return"[no string representation]"}}function O(e){return e instanceof Error||null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name}function k(e){try{y(e,"isOperational",!0)}catch(e){}}function T(e){return null!=e&&(e instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===e.isOperational)}function P(e){return O(e)&&o.propertyIsWritable(e,"stack")}var M="stack"in new Error?function(e){return P(e)?e:new Error(A(e))}:function(e){if(P(e))return e;try{throw new Error(A(e))}catch(e){return e}};function L(e){return{}.toString.call(e)}function C(e,t,r){for(var n=o.names(e),i=0;i<n.length;++i){var s=n[i];if(r(s))try{o.defineProperty(t,s,o.getDescriptor(e,s))}catch(e){}}}var I=function(e){return o.isArray(e)?e:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var D="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){for(var t,r=[],n=e[Symbol.iterator]();!(t=n.next()).done;)r.push(t.value);return r};I=function(e){return o.isArray(e)?e:null!=e&&"function"==typeof e[Symbol.iterator]?D(e):null}}var N,j="undefined"!=typeof process&&"[object process]"===L(process).toLowerCase(),F="undefined"!=typeof process&&void 0!==process.env;function W(e){return F?process.env[e]:void 0}function B(){if("function"==typeof Promise)try{if("[object Promise]"===L(new Promise((function(){}))))return Promise}catch(e){}}function U(e,t){if(null===e||"function"!=typeof t||t===N)return t;null!==e.domain&&(t=e.domain.bind(t));var r=e.async;if(null!==r){var n=t;t=function(){var e=new Array(2).concat([].slice.call(arguments));return e[0]=n,e[1]=this,r.runInAsyncScope.apply(r,e)}}return t}var $,z={setReflectHandler:function(e){N=e},isClass:v,isIdentifier:x,inheritedDataKeys:g,getDataPropertyOrDefault:_,thrower:m,isArray:o.isArray,asArray:I,notEnumerableProp:y,isPrimitive:h,isObject:d,isError:O,canEvaluate:s,errorObj:a,tryCatch:u,inherits:f,withAppended:b,maybeWrapAsError:p,toFastProperties:S,filledRange:R,toString:A,canAttachTrace:P,ensureErrorObject:M,originatesFromRejection:T,markAsOriginatingFromRejection:k,classString:L,copyDescriptors:C,isNode:j,hasEnvVariables:F,env:W,global:l,getNativePromise:B,contextBind:U};z.isRecentNode=z.isNode&&(process.versions&&process.versions.node?$=process.versions.node.split(".").map(Number):process.version&&($=process.version.split(".").map(Number)),0===$[0]&&$[1]>10||$[0]>0),z.nodeSupportsAsyncResource=z.isNode&&function(){var t=!1;try{t="function"==typeof e("async_hooks").AsyncResource.prototype.runInAsyncScope}catch(e){t=!1}return t}(),z.isNode&&z.toFastProperties(process);try{throw new Error}catch(e){z.lastLineError=e}t.exports=z},{"./es5":13,async_hooks:void 0}]},{},[4])(4),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)},(e,t,r)=>{var n=r(55).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=u,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=s(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=s(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AST=void 0;const n=r(370),i=r(203),o=new Set(["!","?","+","*","@"]),s=e=>o.has(e),a="(?!\\.)",l=new Set(["[","."]),c=new Set(["..","."]),u=new Set("().*{}+?[]^$\\!"),f="[^/]",h=f+"*?",d=f+"+?";class p{type;#oe;#se;#ae=!1;#le=[];#ce;#ue;#fe;#he=!1;#de;#pe;#be=!1;constructor(e,t,r={}){this.type=e,e&&(this.#se=!0),this.#ce=t,this.#oe=this.#ce?this.#ce.#oe:this,this.#de=this.#oe===this?r:this.#oe.#de,this.#fe=this.#oe===this?[]:this.#oe.#fe,"!"!==e||this.#oe.#he||this.#fe.push(this),this.#ue=this.#ce?this.#ce.#le.length:0}get hasMagic(){if(void 0!==this.#se)return this.#se;for(const e of this.#le)if("string"!=typeof e&&(e.type||e.hasMagic))return this.#se=!0;return this.#se}toString(){return void 0!==this.#pe?this.#pe:this.type?this.#pe=this.type+"("+this.#le.map((e=>String(e))).join("|")+")":this.#pe=this.#le.map((e=>String(e))).join("")}#_e(){if(this!==this.#oe)throw new Error("should only call on root");if(this.#he)return this;let e;for(this.toString(),this.#he=!0;e=this.#fe.pop();){if("!"!==e.type)continue;let t=e,r=t.#ce;for(;r;){for(let n=t.#ue+1;!r.type&&n<r.#le.length;n++)for(const t of e.#le){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(r.#le[n])}t=r,r=t.#ce}}return this}push(...e){for(const t of e)if(""!==t){if("string"!=typeof t&&!(t instanceof p&&t.#ce===this))throw new Error("invalid part: "+t);this.#le.push(t)}}toJSON(){const e=null===this.type?this.#le.slice().map((e=>"string"==typeof e?e:e.toJSON())):[this.type,...this.#le.map((e=>e.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#oe||this.#oe.#he&&"!"===this.#ce?.type)&&e.push({}),e}isStart(){if(this.#oe===this)return!0;if(!this.#ce?.isStart())return!1;if(0===this.#ue)return!0;const e=this.#ce;for(let t=0;t<this.#ue;t++){const r=e.#le[t];if(!(r instanceof p&&"!"===r.type))return!1}return!0}isEnd(){if(this.#oe===this)return!0;if("!"===this.#ce?.type)return!0;if(!this.#ce?.isEnd())return!1;if(!this.type)return this.#ce?.isEnd();const e=this.#ce?this.#ce.#le.length:0;return this.#ue===e-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(e){const t=new p(this.type,e);for(const e of this.#le)t.copyIn(e);return t}static#ye(e,t,r,n){let i=!1,o=!1,a=-1,l=!1;if(null===t.type){let c=r,u="";for(;c<e.length;){const r=e.charAt(c++);if(i||"\\"===r)i=!i,u+=r;else if(o)c===a+1?"^"!==r&&"!"!==r||(l=!0):"]"!==r||c===a+2&&l||(o=!1),u+=r;else if("["!==r)if(n.noext||!s(r)||"("!==e.charAt(c))u+=r;else{t.push(u),u="";const i=new p(r,t);c=p.#ye(e,i,c,n),t.push(i)}else o=!0,a=c,l=!1,u+=r}return t.push(u),c}let c=r+1,u=new p(null,t);const f=[];let h="";for(;c<e.length;){const r=e.charAt(c++);if(i||"\\"===r)i=!i,h+=r;else if(o)c===a+1?"^"!==r&&"!"!==r||(l=!0):"]"!==r||c===a+2&&l||(o=!1),h+=r;else if("["!==r)if(s(r)&&"("===e.charAt(c)){u.push(h),h="";const t=new p(r,u);u.push(t),c=p.#ye(e,t,c,n)}else if("|"!==r){if(")"===r)return""===h&&0===t.#le.length&&(t.#be=!0),u.push(h),h="",t.push(...f,u),c;h+=r}else u.push(h),h="",f.push(u),u=new p(null,t);else o=!0,a=c,l=!1,h+=r}return t.type=null,t.#se=void 0,t.#le=[e.substring(r-1)],c}static fromGlob(e,t={}){const r=new p(null,void 0,t);return p.#ye(e,r,0,t),r}toMMPattern(){if(this!==this.#oe)return this.#oe.toMMPattern();const e=this.toString(),[t,r,n,i]=this.toRegExpSource();if(!(n||this.#se||this.#de.nocase&&!this.#de.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;const o=(this.#de.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${t}$`,o),{_src:t,_glob:e})}toRegExpSource(e){const t=e??!!this.#de.dot;if(this.#oe===this&&this.#_e(),!this.type){const r=this.isStart()&&this.isEnd(),n=this.#le.map((t=>{const[n,i,o,s]="string"==typeof t?p.#me(t,this.#se,r):t.toRegExpSource(e);return this.#se=this.#se||o,this.#ae=this.#ae||s,n})).join("");let o="";if(this.isStart()&&"string"==typeof this.#le[0]){if(!(1===this.#le.length&&c.has(this.#le[0]))){const r=l,i=t&&r.has(n.charAt(0))||n.startsWith("\\.")&&r.has(n.charAt(2))||n.startsWith("\\.\\.")&&r.has(n.charAt(4)),s=!t&&!e&&r.has(n.charAt(0));o=i?"(?!(?:^|/)\\.\\.?(?:$|/))":s?a:""}}let s="";this.isEnd()&&this.#oe.#he&&"!"===this.#ce?.type&&(s="(?:$|\\/)");return[o+n+s,(0,i.unescape)(n),this.#se=!!this.#se,this.#ae]}const r="*"===this.type||"+"===this.type,n="!"===this.type?"(?:(?!(?:":"(?:";let o=this.#ge(t);if(this.isStart()&&this.isEnd()&&!o&&"!"!==this.type){const e=this.toString();return this.#le=[e],this.type=null,this.#se=void 0,[e,(0,i.unescape)(this.toString()),!1,!1]}let s=!r||e||t?"":this.#ge(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let u="";if("!"===this.type&&this.#be)u=(this.isStart()&&!t?a:"")+d;else{u=n+o+("!"===this.type?"))"+(!this.isStart()||t||e?"":a)+h+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&s?")":"*"===this.type&&s?")?":`)${this.type}`)}return[u,(0,i.unescape)(o),this.#se=!!this.#se,this.#ae]}#ge(e){return this.#le.map((t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");const[r,n,i,o]=t.toRegExpSource(e);return this.#ae=this.#ae||o,r})).filter((e=>!(this.isStart()&&this.isEnd()&&!e))).join("|")}static#me(e,t,r=!1){let o=!1,s="",a=!1;for(let i=0;i<e.length;i++){const l=e.charAt(i);if(o)o=!1,s+=(u.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[r,o,l,c]=(0,n.parseClass)(e,i);if(l){s+=r,a=a||o,i+=l-1,t=t||c;continue}}"*"!==l?"?"!==l?s+=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(s+=f,t=!0):(s+=r&&"*"===e?d:h,t=!0)}else i===e.length-1?s+="\\\\":o=!0}return[s,(0,i.unescape)(e),!!t,a]}}t.AST=p},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.escape=void 0;t.escape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Glob=void 0;const n=r(37),i=r(115),o=r(156),s=r(289),a=r(372),l="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";class c{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,o.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth="number"==typeof t.maxDepth?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&void 0!==this.absolute)throw new Error("cannot set absolute and withFileTypes:true");if("string"==typeof e&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(e=e.map((e=>e.replace(/\\/g,"/")))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map((e=>e.includes("/")?e:`./**/${e}`))}if(this.pattern=e,this.platform=t.platform||l,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,void 0!==t.nocase&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{const e="win32"===t.platform?i.PathScurryWin32:"darwin"===t.platform?i.PathScurryDarwin:t.platform?i.PathScurryPosix:i.PathScurry;this.scurry=new e(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;const r="darwin"===this.platform||"win32"===this.platform,a={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:r,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},c=this.pattern.map((e=>new n.Minimatch(e,a))),[u,f]=c.reduce(((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e)),[[],[]]);this.patterns=u.map(((e,t)=>{const r=f[t];if(!r)throw new Error("invalid pattern object");return new s.Pattern(e,r,0,this.platform)}))}async walk(){return[...await new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}t.Glob=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.hasMagic=void 0;const n=r(37);t.hasMagic=(e,t={})=>{Array.isArray(e)||(e=[e]);for(const r of e)if(new n.Minimatch(r,t).hasMagic())return!0;return!1}},(e,t,r)=>{var n=r(208).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=u,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=s(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=s(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AST=void 0;const n=r(379),i=r(209),o=new Set(["!","?","+","*","@"]),s=e=>o.has(e),a="(?!\\.)",l=new Set(["[","."]),c=new Set(["..","."]),u=new Set("().*{}+?[]^$\\!"),f="[^/]",h=f+"*?",d=f+"+?";class p{type;#oe;#se;#ae=!1;#le=[];#ce;#ue;#fe;#he=!1;#de;#pe;#be=!1;constructor(e,t,r={}){this.type=e,e&&(this.#se=!0),this.#ce=t,this.#oe=this.#ce?this.#ce.#oe:this,this.#de=this.#oe===this?r:this.#oe.#de,this.#fe=this.#oe===this?[]:this.#oe.#fe,"!"!==e||this.#oe.#he||this.#fe.push(this),this.#ue=this.#ce?this.#ce.#le.length:0}get hasMagic(){if(void 0!==this.#se)return this.#se;for(const e of this.#le)if("string"!=typeof e&&(e.type||e.hasMagic))return this.#se=!0;return this.#se}toString(){return void 0!==this.#pe?this.#pe:this.type?this.#pe=this.type+"("+this.#le.map((e=>String(e))).join("|")+")":this.#pe=this.#le.map((e=>String(e))).join("")}#_e(){if(this!==this.#oe)throw new Error("should only call on root");if(this.#he)return this;let e;for(this.toString(),this.#he=!0;e=this.#fe.pop();){if("!"!==e.type)continue;let t=e,r=t.#ce;for(;r;){for(let n=t.#ue+1;!r.type&&n<r.#le.length;n++)for(const t of e.#le){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(r.#le[n])}t=r,r=t.#ce}}return this}push(...e){for(const t of e)if(""!==t){if("string"!=typeof t&&!(t instanceof p&&t.#ce===this))throw new Error("invalid part: "+t);this.#le.push(t)}}toJSON(){const e=null===this.type?this.#le.slice().map((e=>"string"==typeof e?e:e.toJSON())):[this.type,...this.#le.map((e=>e.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#oe||this.#oe.#he&&"!"===this.#ce?.type)&&e.push({}),e}isStart(){if(this.#oe===this)return!0;if(!this.#ce?.isStart())return!1;if(0===this.#ue)return!0;const e=this.#ce;for(let t=0;t<this.#ue;t++){const r=e.#le[t];if(!(r instanceof p&&"!"===r.type))return!1}return!0}isEnd(){if(this.#oe===this)return!0;if("!"===this.#ce?.type)return!0;if(!this.#ce?.isEnd())return!1;if(!this.type)return this.#ce?.isEnd();const e=this.#ce?this.#ce.#le.length:0;return this.#ue===e-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(e){const t=new p(this.type,e);for(const e of this.#le)t.copyIn(e);return t}static#ye(e,t,r,n){let i=!1,o=!1,a=-1,l=!1;if(null===t.type){let c=r,u="";for(;c<e.length;){const r=e.charAt(c++);if(i||"\\"===r)i=!i,u+=r;else if(o)c===a+1?"^"!==r&&"!"!==r||(l=!0):"]"!==r||c===a+2&&l||(o=!1),u+=r;else if("["!==r)if(n.noext||!s(r)||"("!==e.charAt(c))u+=r;else{t.push(u),u="";const i=new p(r,t);c=p.#ye(e,i,c,n),t.push(i)}else o=!0,a=c,l=!1,u+=r}return t.push(u),c}let c=r+1,u=new p(null,t);const f=[];let h="";for(;c<e.length;){const r=e.charAt(c++);if(i||"\\"===r)i=!i,h+=r;else if(o)c===a+1?"^"!==r&&"!"!==r||(l=!0):"]"!==r||c===a+2&&l||(o=!1),h+=r;else if("["!==r)if(s(r)&&"("===e.charAt(c)){u.push(h),h="";const t=new p(r,u);u.push(t),c=p.#ye(e,t,c,n)}else if("|"!==r){if(")"===r)return""===h&&0===t.#le.length&&(t.#be=!0),u.push(h),h="",t.push(...f,u),c;h+=r}else u.push(h),h="",f.push(u),u=new p(null,t);else o=!0,a=c,l=!1,h+=r}return t.type=null,t.#se=void 0,t.#le=[e.substring(r-1)],c}static fromGlob(e,t={}){const r=new p(null,void 0,t);return p.#ye(e,r,0,t),r}toMMPattern(){if(this!==this.#oe)return this.#oe.toMMPattern();const e=this.toString(),[t,r,n,i]=this.toRegExpSource();if(!(n||this.#se||this.#de.nocase&&!this.#de.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;const o=(this.#de.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${t}$`,o),{_src:t,_glob:e})}toRegExpSource(e){const t=e??!!this.#de.dot;if(this.#oe===this&&this.#_e(),!this.type){const r=this.isStart()&&this.isEnd(),n=this.#le.map((t=>{const[n,i,o,s]="string"==typeof t?p.#me(t,this.#se,r):t.toRegExpSource(e);return this.#se=this.#se||o,this.#ae=this.#ae||s,n})).join("");let o="";if(this.isStart()&&"string"==typeof this.#le[0]){if(!(1===this.#le.length&&c.has(this.#le[0]))){const r=l,i=t&&r.has(n.charAt(0))||n.startsWith("\\.")&&r.has(n.charAt(2))||n.startsWith("\\.\\.")&&r.has(n.charAt(4)),s=!t&&!e&&r.has(n.charAt(0));o=i?"(?!(?:^|/)\\.\\.?(?:$|/))":s?a:""}}let s="";this.isEnd()&&this.#oe.#he&&"!"===this.#ce?.type&&(s="(?:$|\\/)");return[o+n+s,(0,i.unescape)(n),this.#se=!!this.#se,this.#ae]}const r="*"===this.type||"+"===this.type,n="!"===this.type?"(?:(?!(?:":"(?:";let o=this.#ge(t);if(this.isStart()&&this.isEnd()&&!o&&"!"!==this.type){const e=this.toString();return this.#le=[e],this.type=null,this.#se=void 0,[e,(0,i.unescape)(this.toString()),!1,!1]}let s=!r||e||t?"":this.#ge(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let u="";if("!"===this.type&&this.#be)u=(this.isStart()&&!t?a:"")+d;else{u=n+o+("!"===this.type?"))"+(!this.isStart()||t||e?"":a)+h+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&s?")":"*"===this.type&&s?")?":`)${this.type}`)}return[u,(0,i.unescape)(o),this.#se=!!this.#se,this.#ae]}#ge(e){return this.#le.map((t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");const[r,n,i,o]=t.toRegExpSource(e);return this.#ae=this.#ae||o,r})).filter((e=>!(this.isStart()&&this.isEnd()&&!e))).join("|")}static#me(e,t,r=!1){let o=!1,s="",a=!1;for(let i=0;i<e.length;i++){const l=e.charAt(i);if(o)o=!1,s+=(u.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[r,o,l,c]=(0,n.parseClass)(e,i);if(l){s+=r,a=a||o,i+=l-1,t=t||c;continue}}"*"!==l?"?"!==l?s+=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(s+=f,t=!0):(s+=r&&"*"===e?d:h,t=!0)}else i===e.length-1?s+="\\\\":o=!0}return[s,(0,i.unescape)(e),!!t,a]}}t.AST=p},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.escape=void 0;t.escape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Glob=void 0;const n=r(38),i=r(115),o=r(156),s=r(313),a=r(380),l="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";class c{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,o.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth="number"==typeof t.maxDepth?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&void 0!==this.absolute)throw new Error("cannot set absolute and withFileTypes:true");if("string"==typeof e&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(e=e.map((e=>e.replace(/\\/g,"/")))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map((e=>e.includes("/")?e:`./**/${e}`))}if(this.pattern=e,this.platform=t.platform||l,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,void 0!==t.nocase&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{const e="win32"===t.platform?i.PathScurryWin32:"darwin"===t.platform?i.PathScurryDarwin:t.platform?i.PathScurryPosix:i.PathScurry;this.scurry=new e(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;const r="darwin"===this.platform||"win32"===this.platform,a={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:r,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},c=this.pattern.map((e=>new n.Minimatch(e,a))),[u,f]=c.reduce(((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e)),[[],[]]);this.patterns=u.map(((e,t)=>{const r=f[t];if(!r)throw new Error("invalid pattern object");return new s.Pattern(e,r,0,this.platform)}))}async walk(){return[...await new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}t.Glob=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.hasMagic=void 0;const n=r(38);t.hasMagic=(e,t={})=>{Array.isArray(e)||(e=[e]);for(const r of e)if(new n.Minimatch(r,t).hasMagic())return!0;return!1}},(e,t,r)=>{r.a(e,(async(e,n)=>{try{r.r(t);var i=r(116),o=r.n(i),s=r(119),a=r.n(s),l=r(125),c=r.n(l),u=r(212),f=r.n(u),h=r(384),d=r(189),p=r(39),b=r(288),_=r(385),y=r(3),m=r(386);function G(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=H(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function H(e,t){if(e){if("string"==typeof e)return V(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?V(e,t):void 0}}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var g=new d.Logger({name:"web-documentation.deploy"}),w=(0,y.resolve)("./build/"),v=(0,y.resolve)("./data/"),S=["apiDocumentation/","api/"],E="${name}/${version}/",x=(0,y.join)(v,"distributionBundle.zip"),R=(0,y.join)(v,"distributionBundle"),A=[],O={module:{preprocessor:{ejs:{options:{locals:{__evaluate__:"parameters"}}}}},offline:null},k="",T="web-documentation",P="https://github.com/thaibault/"+T+".git",M={name:"__dummy__",version:"1.0.0"},L=!1,C=function(){var e=a()(c().mark((function e(t){var r,n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===t&&(t={}),r=o()({directory:!1,encoding:"utf8",extension:"",prefix:"DW"},t),e.next=1,(0,b.mkdtemp)((0,y.join)((0,_.tmpdir)(),r.prefix),r.encoding);case 1:if(n=e.sent,!r.directory){e.next=2;break}return e.abrupt("return",n);case 2:return e.abrupt("return",(0,y.join)(n,""+r.prefix+r.extension));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(e,t){return void 0===t&&(t={}),(0,h.execSync)(e,o()({encoding:"utf-8",shell:"/bin/bash"},t))},D=function(){try{return I.apply(void 0,arguments),!0}catch(e){return!1}},N=function(){var e=a()(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,r){var n=[];t.on("data",(function(e){return n.push(e)})),t.on("end",(function(){e(Buffer.concat(n))})),t.on("error",(function(e){r(e)}))})));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=function(){var e=a()(c().mark((function e(t,r){var n,i,s,a,l,u,f,h,_,v,A,T,P,N,j,F,U,$,z,H,V,q,K,Y,Z,Q,X,J,ee,te,re;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g.info("Generate document website artefacts."),!r){e.next=5;break}return g.info("Prepare distribution files."),n=(0,y.join)(t,(0,y.relative)("./",w),(0,y.relative)("./",x)),e.next=1,(0,b.mkdir)((0,y.dirname)(n),{recursive:!0});case 1:return e.next=2,(0,b.copyFile)(r,n);case 2:return e.next=3,(0,b.rm)(r);case 3:return i=(0,y.join)(t,(0,y.relative)("./",w),(0,y.relative)("./",R)),e.next=4,(0,b.mkdir)(i,{recursive:!0});case 4:return e.next=5,new Promise((function(e,t){(0,p.createReadStream)(n).pipe((0,m.Extract)({path:i})).on("close",(function(){e()})).on("error",(function(e){t(e)}))}));case 5:return g.info("Prepare favicon file."),s="favicon.png",e.next=6,(0,d.isFile)(s);case 6:if(!e.sent){e.next=7;break}return e.next=7,(0,b.copyFile)(s,t+"/source/image/favicon.ico");case 7:for(g.info("Render html."),a={},l=0,u=Object.entries(M.documentationWebsite||{});l<u.length;l++)f=u[l],h=f[0],_=f[1],a[(0,d.camelCaseToDelimited)(h).toUpperCase()]=_;if(!a.TAGLINE&&M.description&&(a.TAGLINE=M.description),!a.NAME&&M.name&&(a.NAME=M.name),g.debug('Found parameters "'+(0,d.represent)(a)+'" to render.'),v=null,!L){e.next=9;break}return v=S[1]+E,e.next=8,(0,d.isDirectory)(v);case 8:if(e.sent){e.next=9;break}v=S[1];case 9:return Y=o(),Z={},Q=a,X=k,J=v,e.next=10,(0,d.isFile)(x);case 10:if(!e.sent){e.next=11;break}ee=(0,y.relative)("./",x),e.next=12;break;case 11:ee=null;case 12:for(a=Y(Z,Q,{CONTENT:X,API_DOCUMENTATION_PATH:J,DISTRIBUTION_BUNDLE_FILE_PATH:ee}),A=0,T=Object.entries(a);A<T.length;A++)P=T[A],N=P[0],"string"==typeof(j=P[1])&&(a[N]=j.replace("!","#%%%#"));return F=JSON.stringify((0,d.evaluateDynamicData)(O,o()({parameters:a},M))),e.next=13,C({extension:".json"});case 13:return U=e.sent,e.next=14,(0,b.writeFile)(U,F);case 14:if(!($=(0,d.evaluate)("`yarn build:web '{__reference__: \"${parametersFilePath}\"}'`",o()({parameters:a,parametersFilePath:U},M))).error){e.next=15;break}throw new Error($.error);case 15:return z=$.result,g.debug('Use final parameters "'+F+'".'),g.info('Run "'+z+'".'),g.debug(I(z,{cwd:t})),e.next=16,(0,b.rm)(U);case 16:return te=G,e.next=17,(0,b.readdir)("./");case 17:H=te(e.sent);case 18:if((V=H()).done){e.next=22;break}if(q=V.value,re=[(0,y.resolve)(t),(0,y.resolve)(S[1])].includes((0,y.resolve)(q))){e.next=20;break}return e.next=19,W(q);case 19:re=e.sent;case 20:if(re){e.next=21;break}return e.next=21,(0,b.rm)(q,{recursive:!0});case 21:e.next=18;break;case 22:return g.info("Copy all build artefacts."),K=(0,y.join)(t,(0,y.relative)("./",w)),e.next=23,(0,d.walkDirectoryRecursively)(K,(function(e){return B(K,"./",e)}));case 23:return e.next=24,(0,b.rm)(t,{recursive:!0});case 24:D("git config user.email")||g.debug(I('git config user.email "github_actor@example.com"')),D("git config user.name")||g.debug(I('git config user.name "github_actor"')),g.debug(I("git add --all")),g.debug(I('git commit --message "Update project homepage content." --all')),g.debug(I("git push")),g.debug(I("git checkout main"));case 25:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){var e=a()(c().mark((function e(){var t,r,n,i,o,s,l,u,h,_,m;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M.scripts&&(M.scripts["build:bundle:compatible"]||M.scripts["build:bundle"]||M.scripts.build)&&(t="yarn "+(M.scripts["build:bundle:compatible"]?"build:bundle:compatible":M.scripts["build:bundle"]?"build:bundle":"build"),g.info('Build distribution bundle via "'+t+'".'),g.debug(I(t))),g.info("Pack to a zip archive."),e.next=1,C({extension:".zip"});case 1:if(r=e.sent,n=M.files||[],M.main&&n.push(M.main),0!==n.length){e.next=2;break}return e.abrupt("return",null);case 2:return i=function(){var e=a()(c().mark((function e(t){var r,n,o,s;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[],n=c().mark((function e(){var t,n,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.value,t=(0,y.resolve)(t),e.next=1,W(t);case 1:if(e.sent){e.next=6;break}return e.next=2,(0,d.isDirectory)(t);case 2:if(!e.sent){e.next=5;break}return n=r,o=i,e.next=3,(0,b.readdir)(t);case 3:return e.next=4,o(e.sent.map((function(e){return(0,y.resolve)(t,e)})));case 4:r=n.concat.call(n,e.sent),e.next=6;break;case 5:g.debug('Add "'+t+'" to distribution bundle.'),r.push(t);case 6:case"end":return e.stop()}}),e)})),o=G(t);case 1:if((s=o()).done){e.next=3;break}return e.delegateYield(n(),"t0",2);case 2:e.next=1;break;case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),(o=f()("zip",{zlib:{level:9}})).pipe((0,p.createWriteStream)(r)),s=new Promise((function(e,t){o.on("error",(function(e){t(e)})),o.on("warning",(function(e){g.warn(e)})),o.on("progress",(function(t){var r=t.entries;r.total===r.processed&&e()}))})),_=G,e.next=3,i(n);case 3:l=_(e.sent);case 4:if((u=l()).done){e.next=7;break}return h=u.value,m=o,e.next=5,N((0,p.createReadStream)(h));case 5:m.append.call(m,e.sent,{name:(0,y.relative)("./",h)});case 6:e.next=4;break;case 7:return e.next=8,o.finalize();case 8:return e.next=9,s;case 9:return e.abrupt("return",r);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),W=function(){var e=a()(c().mark((function e(t){var r,n,i,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(0,y.basename)(t,(0,y.extname)(t)).startsWith(".")&&!(0,y.basename)(t).startsWith(".yarn")||"dummyDocumentation"===(0,y.basename)(t,(0,y.extname)(t))){e.next=3;break}return e.next=1,(0,d.isDirectory)(t);case 1:if(!(i=e.sent)){e.next=2;break}i=["node_modules","build"].includes((0,y.basename)(t));case 2:n=i;case 3:if(r=n){e.next=6;break}return e.next=4,(0,d.isFile)(t);case 4:if(!(o=e.sent)){e.next=5;break}o="params.json"===(0,y.basename)(t);case 5:r=o;case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),B=function(){var e=a()(c().mark((function e(t,r,n){var i,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,W(n.path);case 1:if(o=e.sent){e.next=2;break}o="readme.md"===(0,y.basename)(n.name);case 2:if(!o){e.next=3;break}return e.abrupt("return",!1);case 3:if(r=(0,y.join)(r,(0,y.relative)(t,n.path)),g.debug('Copy "'+n.path+'" to "'+r+'".'),null==(i=n.stats)||!i.isFile()){e.next=5;break}return e.next=4,(0,b.copyFile)(n.path,r);case 4:e.next=6;break;case 5:return e.next=6,(0,b.mkdir)(r);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(){var e=a()(c().mark((function e(t){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,W(t.path);case 1:if(!e.sent){e.next=2;break}return e.abrupt("return",!1);case 2:if("readme"!==(0,y.basename)(t.name,(0,y.extname)(t.name))){e.next=4;break}return g.info('Handle "'+t.path+'".'),k&&(k+="\n"),r=k,e.next=3,(0,b.readFile)(t.path,"utf8");case 3:k=r+=e.sent;case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$=function(){var e=a()(c().mark((function e(){var t,r,n,i,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0,r=A;case 1:if(!(t<r.length)){e.next=3;break}return n=r[t],e.next=2,(0,b.rm)(n,{recursive:!0});case 2:t++,e.next=1;break;case 3:if(i=(0,y.resolve)(S[1]),!(o=L)){e.next=5;break}return e.next=4,(0,d.isDirectory)(i);case 4:o=!e.sent;case 5:if(!o){e.next=6;break}I("git checkout '"+i+"'");case 6:I("git branch").includes("* main")||g.debug(I("git checkout main"));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=a()(c().mark((function e(){var t,r,n,i,s,a,l,u,f,h,p,_;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!I("git branch --all").includes("gh-pages")){g.debug(I("git fetch --all"));try{g.debug(I("git checkout package.json"))}catch(e){}g.debug(I("git checkout gh-pages"))}if(I("git branch").includes("* main")||g.debug(I("git checkout main")),g.debug(I("git pull")),!I("git branch").includes("* main")||!I("git branch --all").includes("gh-pages")){e.next=28;break}if(M=(0,d.optionalRequire)((0,y.resolve)("./package.json"))||M,!(t=(0,d.evaluate)("`"+E+"`",M)).error){e.next=1;break}throw new Error(t.error);case 1:return E=t.result,g.info("Read and Compile all markdown files and transform to html."),e.next=2,(0,d.walkDirectoryRecursively)("./",U);case 2:return r=null,e.prev=3,e.next=4,F();case 4:r=e.sent,e.next=6;break;case 5:e.prev=5,h=e.catch(3),g.error("Error occurred during building distribution bundle:",h),process.exitCode=1;case 6:if(!(p=r)){e.next=8;break}return e.next=7,(0,d.isFile)(r);case 7:p=e.sent;case 8:if(!p){e.next=11;break}return n=(0,y.join)(v,(0,y.basename)(r)),e.next=9,(0,b.mkdir)(v,{recursive:!0});case 9:return e.next=10,(0,b.copyFile)(r,n);case 10:A.push(n);case 11:if(L=!!M.scripts&&Object.prototype.hasOwnProperty.call(M.scripts,"document"))try{g.debug(I("yarn document"))}catch(e){L=!1}return g.debug(I("git checkout gh-pages")),g.debug(I("git pull")),i=(0,y.resolve)(S[1]),e.next=12,(0,d.isDirectory)(i);case 12:if(!e.sent){e.next=13;break}return e.next=13,(0,b.rm)(i,{recursive:!0});case 13:return e.next=14,(0,d.isDirectory)(S[0]);case 14:if(!e.sent){e.next=16;break}return e.next=15,(0,b.rename)((0,y.resolve)(S[0]),i);case 15:A.push(i);case 16:return e.next=17,C({directory:!0,prefix:T});case 17:if(s=e.sent,a=(0,y.resolve)("../"+T),!(_=true)){e.next=19;break}return e.next=18,(0,d.isDirectory)(a);case 18:_=e.sent;case 19:if(!_){e.next=21;break}return g.info("Copy local existing "+T+"."),e.next=20,(0,d.walkDirectoryRecursively)(a,(function(e){return B(a,s,e)}));case 20:e.next=22;break;case 21:g.info("No local existing "+T+" found","getting it remotely."),g.debug(I("unset GIT_WORK_TREE; git clone '"+P+"'",{cwd:s})),s=(0,y.resolve)(s,T);case 22:return g.debug(I("corepack enable",{cwd:s})),g.debug(I("corepack install",{cwd:s})),g.debug(I("yarn install",{cwd:s,env:o()({},process.env,{NODE_ENV:"debug"})})),g.debug(I("yarn clear",{cwd:s})),e.next=23,j(s,r);case 23:l=0,u=[i,v,s];case 24:if(!(l<u.length)){e.next=27;break}return f=u[l],e.next=25,(0,d.isDirectory)(f);case 25:if(!e.sent){e.next=26;break}return e.next=26,(0,b.rm)(f,{recursive:!0});case 26:l++,e.next=24;break;case 27:case 28:case"end":return e.stop()}}),e,null,[[3,5]])})));return function(){return e.apply(this,arguments)}}();try{await z()}catch(q){throw await $(),q}n()}catch(K){n(K)}}),1)},(e,t,r)=>{function n(e,...t){return(...r)=>e(...t,...r)}function i(e){return function(...t){var r=t.pop();return e.call(this,t,r)}}r.r(t),r.d(t,{all:()=>be,allLimit:()=>_e,allSeries:()=>ye,any:()=>rt,anyLimit:()=>nt,anySeries:()=>it,apply:()=>n,applyEach:()=>M,applyEachSeries:()=>I,asyncify:()=>f,auto:()=>j,autoInject:()=>$,cargo:()=>V,cargoQueue:()=>q,compose:()=>Z,concat:()=>J,concatLimit:()=>X,concatSeries:()=>ee,constant:()=>te,default:()=>_t,detect:()=>ne,detectLimit:()=>ie,detectSeries:()=>oe,dir:()=>ae,doDuring:()=>le,doUntil:()=>ce,doWhilst:()=>le,during:()=>dt,each:()=>fe,eachLimit:()=>he,eachOf:()=>T,eachOfLimit:()=>A,eachOfSeries:()=>L,eachSeries:()=>de,ensureAsync:()=>pe,every:()=>be,everyLimit:()=>_e,everySeries:()=>ye,filter:()=>ve,filterLimit:()=>Se,filterSeries:()=>Ee,find:()=>ne,findLimit:()=>ie,findSeries:()=>oe,flatMap:()=>J,flatMapLimit:()=>X,flatMapSeries:()=>ee,foldl:()=>K,foldr:()=>ze,forEach:()=>fe,forEachLimit:()=>he,forEachOf:()=>T,forEachOfLimit:()=>A,forEachOfSeries:()=>L,forEachSeries:()=>de,forever:()=>xe,groupBy:()=>Ae,groupByLimit:()=>Re,groupBySeries:()=>Oe,inject:()=>K,log:()=>ke,map:()=>P,mapLimit:()=>Q,mapSeries:()=>C,mapValues:()=>Pe,mapValuesLimit:()=>Te,mapValuesSeries:()=>Me,memoize:()=>Le,nextTick:()=>Ce,parallel:()=>De,parallelLimit:()=>Ne,priorityQueue:()=>Ue,queue:()=>je,race:()=>$e,reduce:()=>K,reduceRight:()=>ze,reflect:()=>Ge,reflectAll:()=>He,reject:()=>qe,rejectLimit:()=>Ke,rejectSeries:()=>Ye,retry:()=>Je,retryable:()=>et,select:()=>ve,selectLimit:()=>Se,selectSeries:()=>Ee,seq:()=>Y,series:()=>tt,setImmediate:()=>u,some:()=>rt,someLimit:()=>nt,someSeries:()=>it,sortBy:()=>ot,timeout:()=>st,times:()=>lt,timesLimit:()=>at,timesSeries:()=>ct,transform:()=>ut,tryEach:()=>ft,unmemoize:()=>ht,until:()=>pt,waterfall:()=>bt,whilst:()=>dt,wrapSync:()=>f});var o="function"==typeof queueMicrotask&&queueMicrotask,s="function"==typeof setImmediate&&setImmediate,a="object"==typeof process&&"function"==typeof process.nextTick;function l(e){setTimeout(e,0)}function c(e){return(t,...r)=>e((()=>t(...r)))}var u=c(o?queueMicrotask:s?setImmediate:a?process.nextTick:l);function f(e){return p(e)?function(...t){const r=t.pop();return h(e.apply(this,t),r)}:i((function(t,r){var n;try{n=e.apply(this,t)}catch(e){return r(e)}if(n&&"function"==typeof n.then)return h(n,r);r(null,n)}))}function h(e,t){return e.then((e=>{d(t,null,e)}),(e=>{d(t,e&&(e instanceof Error||e.message)?e:new Error(e))}))}function d(e,t,r){try{e(t,r)}catch(e){u((e=>{throw e}),e)}}function p(e){return"AsyncFunction"===e[Symbol.toStringTag]}function b(e){if("function"!=typeof e)throw new Error("expected a function");return p(e)?f(e):e}function _(e,t){if(t||(t=e.length),!t)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[t-1]?e.apply(this,r):new Promise(((n,i)=>{r[t-1]=(e,...t)=>{if(e)return i(e);n(t.length>1?t:t[0])},e.apply(this,r)}))}}function y(e){return function(t,...r){return _((function(n){var i=this;return e(t,((e,t)=>{b(e).apply(i,r.concat(t))}),n)}))}}function m(e,t,r,n){t=t||[];var i=[],o=0,s=b(r);return e(t,((e,t,r)=>{var n=o++;s(e,((e,t)=>{i[n]=t,r(e)}))}),(e=>{n(e,i)}))}function g(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}var w={};function v(e){function t(...t){if(null!==e){var r=e;e=null,r.apply(this,t)}}return Object.assign(t,e),t}function S(e){if(g(e))return function(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}(e);var t,r,n,i,o=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return o?function(e){var t=-1;return function(){var r=e.next();return r.done?null:(t++,{value:r.value,key:t})}}(o):(r=(t=e)?Object.keys(t):[],n=-1,i=r.length,function e(){var o=r[++n];return"__proto__"===o?e():n<i?{value:t[o],key:o}:null})}function E(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var r=e;e=null,r.apply(this,t)}}function x(e,t,r,n){let i=!1,o=!1,s=!1,a=0,l=0;function c(){a>=t||s||i||(s=!0,e.next().then((({value:e,done:t})=>{if(!o&&!i){if(s=!1,t)return i=!0,void(a<=0&&n(null));a++,r(e,l,u),l++,c()}})).catch(f))}function u(e,t){if(a-=1,!o)return e?f(e):!1===e?(i=!0,void(o=!0)):t===w||i&&a<=0?(i=!0,n(null)):void c()}function f(e){o||(s=!1,i=!0,n(e))}c()}var R=e=>(t,r,n)=>{if(n=v(n),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if("AsyncGenerator"===t[Symbol.toStringTag])return x(t,e,r,n);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return x(t[Symbol.asyncIterator](),e,r,n);var i=S(t),o=!1,s=!1,a=0,l=!1;function c(e,t){if(!s)if(a-=1,e)o=!0,n(e);else if(!1===e)o=!0,s=!0;else{if(t===w||o&&a<=0)return o=!0,n(null);l||u()}}function u(){for(l=!0;a<e&&!o;){var t=i();if(null===t)return o=!0,void(a<=0&&n(null));a+=1,r(t.value,t.key,E(c))}l=!1}u()};var A=_((function(e,t,r,n){return R(t)(e,b(r),n)}),4);function O(e,t,r){r=v(r);var n=0,i=0,{length:o}=e,s=!1;function a(e,t){!1===e&&(s=!0),!0!==s&&(e?r(e):++i!==o&&t!==w||r(null))}for(0===o&&r(null);n<o;n++)t(e[n],n,E(a))}function k(e,t,r){return A(e,1/0,t,r)}var T=_((function(e,t,r){return(g(e)?O:k)(e,b(t),r)}),3);var P=_((function(e,t,r){return m(T,e,t,r)}),3),M=y(P);var L=_((function(e,t,r){return A(e,1,t,r)}),3);var C=_((function(e,t,r){return m(L,e,t,r)}),3),I=y(C);const D=Symbol("promiseCallback");function N(){let e,t;function r(r,...n){if(r)return t(r);e(n.length>1?n:n[0])}return r[D]=new Promise(((r,n)=>{e=r,t=n})),r}function j(e,t,r){"number"!=typeof t&&(r=t,t=null),r=v(r||N());var n=Object.keys(e).length;if(!n)return r(null);t||(t=n);var i={},o=0,s=!1,a=!1,l=Object.create(null),c=[],u=[],f={};function h(e,t){c.push((()=>function(e,t){if(a)return;var n=E(((t,...n)=>{if(o--,!1!==t)if(n.length<2&&([n]=n),t){var c={};if(Object.keys(i).forEach((e=>{c[e]=i[e]})),c[e]=n,a=!0,l=Object.create(null),s)return;r(t,c)}else i[e]=n,(l[e]||[]).forEach((e=>e())),d();else s=!0}));o++;var c=b(t[t.length-1]);t.length>1?c(i,n):c(n)}(e,t)))}function d(){if(!s){if(0===c.length&&0===o)return r(null,i);for(;c.length&&o<t;){c.shift()()}}}function p(t){var r=[];return Object.keys(e).forEach((n=>{const i=e[n];Array.isArray(i)&&i.indexOf(t)>=0&&r.push(n)})),r}return Object.keys(e).forEach((t=>{var r=e[t];if(!Array.isArray(r))return h(t,[r]),void u.push(t);var n=r.slice(0,r.length-1),i=n.length;if(0===i)return h(t,r),void u.push(t);f[t]=i,n.forEach((o=>{if(!e[o])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+o+"` in "+n.join(", "));!function(e,t){var r=l[e];r||(r=l[e]=[]);r.push(t)}(o,(()=>{0===--i&&h(t,r)}))}))})),function(){var e=0;for(;u.length;)e++,p(u.pop()).forEach((e=>{0==--f[e]&&u.push(e)}));if(e!==n)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),d(),r[D]}var F=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,W=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,B=/,/,U=/(=.+)?(\s*)$/;function $(e,t){var r={};return Object.keys(e).forEach((t=>{var n,i=e[t],o=p(i),s=!o&&1===i.length||o&&0===i.length;if(Array.isArray(i))n=[...i],i=n.pop(),r[t]=n.concat(n.length>0?a:i);else if(s)r[t]=i;else{if(n=function(e){const t=function(e){let t="",r=0,n=e.indexOf("*/");for(;r<e.length;)if("/"===e[r]&&"/"===e[r+1]){let t=e.indexOf("\n",r);r=-1===t?e.length:t}else if(-1!==n&&"/"===e[r]&&"*"===e[r+1]){let i=e.indexOf("*/",r);-1!==i?(r=i+2,n=e.indexOf("*/",r)):(t+=e[r],r++)}else t+=e[r],r++;return t}(e.toString());let r=t.match(F);if(r||(r=t.match(W)),!r)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,n]=r;return n.replace(/\s/g,"").split(B).map((e=>e.replace(U,"").trim()))}(i),0===i.length&&!o&&0===n.length)throw new Error("autoInject task functions require explicit parameters.");o||n.pop(),r[t]=n.concat(a)}function a(e,t){var r=n.map((t=>e[t]));r.push(t),b(i)(...r)}})),j(r,t)}class z{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):G(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):G(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:r}=t;e(t)&&this.removeLink(t),t=r}return this}}function G(e,t){e.length=1,e.head=e.tail=t}function H(e,t,r){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var n=b(e),i=0,o=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(e,t){return e?t?void(s[e]=s[e].filter((e=>e!==t))):s[e]=[]:Object.keys(s).forEach((e=>s[e]=[]))}function l(e,...t){s[e].forEach((e=>e(...t)))}var c=!1;function f(e,t,r,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");var i,o;function s(e,...t){return e?r?o(e):i():t.length<=1?i(t[0]):void i(t)}y.started=!0;var a=y._createTaskItem(e,r?s:n||s);if(t?y._tasks.unshift(a):y._tasks.push(a),c||(c=!0,u((()=>{c=!1,y.process()}))),r||!n)return new Promise(((e,t)=>{i=e,o=t}))}function h(e){return function(t,...r){i-=1;for(var n=0,s=e.length;n<s;n++){var a=e[n],c=o.indexOf(a);0===c?o.shift():c>0&&o.splice(c,1),a.callback(t,...r),null!=t&&l("error",t,a.data)}i<=y.concurrency-y.buffer&&l("unsaturated"),y.idle()&&l("drain"),y.process()}}function d(e){return!(0!==e.length||!y.idle())&&(u((()=>l("drain"))),!0)}const p=e=>t=>{if(!t)return new Promise(((t,r)=>{!function(e,t){const r=(...n)=>{a(e,r),t(...n)};s[e].push(r)}(e,((e,n)=>{if(e)return r(e);t(n)}))}));a(e),function(e,t){s[e].push(t)}(e,t)};var _=!1,y={_tasks:new z,_createTaskItem:(e,t)=>({data:e,callback:t}),*[Symbol.iterator](){yield*y._tasks[Symbol.iterator]()},concurrency:t,payload:r,buffer:t/4,started:!1,paused:!1,push(e,t){if(Array.isArray(e)){if(d(e))return;return e.map((e=>f(e,!1,!1,t)))}return f(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(d(e))return;return e.map((e=>f(e,!1,!0,t)))}return f(e,!1,!0,t)},kill(){a(),y._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(d(e))return;return e.map((e=>f(e,!0,!1,t)))}return f(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(d(e))return;return e.map((e=>f(e,!0,!0,t)))}return f(e,!0,!0,t)},remove(e){y._tasks.remove(e)},process(){if(!_){for(_=!0;!y.paused&&i<y.concurrency&&y._tasks.length;){var e=[],t=[],r=y._tasks.length;y.payload&&(r=Math.min(r,y.payload));for(var s=0;s<r;s++){var a=y._tasks.shift();e.push(a),o.push(a),t.push(a.data)}i+=1,0===y._tasks.length&&l("empty"),i===y.concurrency&&l("saturated");var c=E(h(e));n(t,c)}_=!1}},length:()=>y._tasks.length,running:()=>i,workersList:()=>o,idle:()=>y._tasks.length+i===0,pause(){y.paused=!0},resume(){!1!==y.paused&&(y.paused=!1,u(y.process))}};return Object.defineProperties(y,{saturated:{writable:!1,value:p("saturated")},unsaturated:{writable:!1,value:p("unsaturated")},empty:{writable:!1,value:p("empty")},drain:{writable:!1,value:p("drain")},error:{writable:!1,value:p("error")}}),y}function V(e,t){return H(e,1,t)}function q(e,t,r){return H(e,t,r)}var K=_((function(e,t,r,n){n=v(n);var i=b(r);return L(e,((e,r,n)=>{i(t,e,((e,r)=>{t=r,n(e)}))}),(e=>n(e,t)))}),4);function Y(...e){var t=e.map(b);return function(...e){var r=this,n=e[e.length-1];return"function"==typeof n?e.pop():n=N(),K(t,e,((e,t,n)=>{t.apply(r,e.concat(((e,...t)=>{n(e,t)})))}),((e,t)=>n(e,...t))),n[D]}}function Z(...e){return Y(...e.reverse())}var Q=_((function(e,t,r,n){return m(R(t),e,r,n)}),4);var X=_((function(e,t,r,n){var i=b(r);return Q(e,t,((e,t)=>{i(e,((e,...r)=>e?t(e):t(e,r)))}),((e,t)=>{for(var r=[],i=0;i<t.length;i++)t[i]&&(r=r.concat(...t[i]));return n(e,r)}))}),4);var J=_((function(e,t,r){return X(e,1/0,t,r)}),3);var ee=_((function(e,t,r){return X(e,1,t,r)}),3);function te(...e){return function(...t){return t.pop()(null,...e)}}function re(e,t){return(r,n,i,o)=>{var s,a=!1;const l=b(i);r(n,((r,n,i)=>{l(r,((n,o)=>n||!1===n?i(n):e(o)&&!s?(a=!0,s=t(!0,r),i(null,w)):void i()))}),(e=>{if(e)return o(e);o(null,a?s:t(!1))}))}}var ne=_((function(e,t,r){return re((e=>e),((e,t)=>t))(T,e,t,r)}),3);var ie=_((function(e,t,r,n){return re((e=>e),((e,t)=>t))(R(t),e,r,n)}),4);var oe=_((function(e,t,r){return re((e=>e),((e,t)=>t))(R(1),e,t,r)}),3);function se(e){return(t,...r)=>b(t)(...r,((t,...r)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&r.forEach((t=>console[e](t))))}))}var ae=se("dir");var le=_((function(e,t,r){r=E(r);var n,i=b(e),o=b(t);function s(e,...t){if(e)return r(e);!1!==e&&(n=t,o(...t,a))}function a(e,t){return e?r(e):!1!==e?t?void i(s):r(null,...n):void 0}return a(null,!0)}),3);function ce(e,t,r){const n=b(t);return le(e,((...e)=>{const t=e.pop();n(...e,((e,r)=>t(e,!r)))}),r)}function ue(e){return(t,r,n)=>e(t,n)}var fe=_((function(e,t,r){return T(e,ue(b(t)),r)}),3);var he=_((function(e,t,r,n){return R(t)(e,ue(b(r)),n)}),4);var de=_((function(e,t,r){return he(e,1,t,r)}),3);function pe(e){return p(e)?e:function(...t){var r=t.pop(),n=!0;t.push(((...e)=>{n?u((()=>r(...e))):r(...e)})),e.apply(this,t),n=!1}}var be=_((function(e,t,r){return re((e=>!e),(e=>!e))(T,e,t,r)}),3);var _e=_((function(e,t,r,n){return re((e=>!e),(e=>!e))(R(t),e,r,n)}),4);var ye=_((function(e,t,r){return re((e=>!e),(e=>!e))(L,e,t,r)}),3);function me(e,t,r,n){var i=new Array(t.length);e(t,((e,t,n)=>{r(e,((e,r)=>{i[t]=!!r,n(e)}))}),(e=>{if(e)return n(e);for(var r=[],o=0;o<t.length;o++)i[o]&&r.push(t[o]);n(null,r)}))}function ge(e,t,r,n){var i=[];e(t,((e,t,n)=>{r(e,((r,o)=>{if(r)return n(r);o&&i.push({index:t,value:e}),n(r)}))}),(e=>{if(e)return n(e);n(null,i.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function we(e,t,r,n){return(g(t)?me:ge)(e,t,b(r),n)}var ve=_((function(e,t,r){return we(T,e,t,r)}),3);var Se=_((function(e,t,r,n){return we(R(t),e,r,n)}),4);var Ee=_((function(e,t,r){return we(L,e,t,r)}),3);var xe=_((function(e,t){var r=E(t),n=b(pe(e));return function e(t){if(t)return r(t);!1!==t&&n(e)}()}),2);var Re=_((function(e,t,r,n){var i=b(r);return Q(e,t,((e,t)=>{i(e,((r,n)=>r?t(r):t(r,{key:n,val:e})))}),((e,t)=>{for(var r={},{hasOwnProperty:i}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:s}=t[o],{val:a}=t[o];i.call(r,s)?r[s].push(a):r[s]=[a]}return n(e,r)}))}),4);function Ae(e,t,r){return Re(e,1/0,t,r)}function Oe(e,t,r){return Re(e,1,t,r)}var ke=se("log");var Te=_((function(e,t,r,n){n=v(n);var i={},o=b(r);return R(t)(e,((e,t,r)=>{o(e,t,((e,n)=>{if(e)return r(e);i[t]=n,r(e)}))}),(e=>n(e,i)))}),4);function Pe(e,t,r){return Te(e,1/0,t,r)}function Me(e,t,r){return Te(e,1,t,r)}function Le(e,t=e=>e){var r=Object.create(null),n=Object.create(null),o=b(e),s=i(((e,i)=>{var s=t(...e);s in r?u((()=>i(null,...r[s]))):s in n?n[s].push(i):(n[s]=[i],o(...e,((e,...t)=>{e||(r[s]=t);var i=n[s];delete n[s];for(var o=0,a=i.length;o<a;o++)i[o](e,...t)})))}));return s.memo=r,s.unmemoized=e,s}var Ce=c(a?process.nextTick:s?setImmediate:l),Ie=_(((e,t,r)=>{var n=g(t)?[]:{};e(t,((e,t,r)=>{b(e)(((e,...i)=>{i.length<2&&([i]=i),n[t]=i,r(e)}))}),(e=>r(e,n)))}),3);function De(e,t){return Ie(T,e,t)}function Ne(e,t,r){return Ie(R(t),e,r)}function je(e,t){var r=b(e);return H(((e,t)=>{r(e[0],t)}),t,1)}class Fe{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){let t;for(;e>0&&Be(this.heap[e],this.heap[t=We(e)]);){let r=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=r,e=t}}percDown(e){let t;for(;(t=1+(e<<1))<this.heap.length&&(t+1<this.heap.length&&Be(this.heap[t+1],this.heap[t])&&(t+=1),!Be(this.heap[e],this.heap[t]));){let r=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=r,e=t}}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let t=0;for(let r=0;r<this.heap.length;r++)e(this.heap[r])||(this.heap[t]=this.heap[r],t++);this.heap.splice(t);for(let e=We(this.heap.length-1);e>=0;e--)this.percDown(e);return this}}function We(e){return(e+1>>1)-1}function Be(e,t){return e.priority!==t.priority?e.priority<t.priority:e.pushCount<t.pushCount}function Ue(e,t){var r=je(e,t),{push:n,pushAsync:i}=r;function o(e,t){return Array.isArray(e)?e.map((e=>({data:e,priority:t}))):{data:e,priority:t}}return r._tasks=new Fe,r._createTaskItem=({data:e,priority:t},r)=>({data:e,priority:t,callback:r}),r.push=function(e,t=0,r){return n(o(e,t),r)},r.pushAsync=function(e,t=0,r){return i(o(e,t),r)},delete r.unshift,delete r.unshiftAsync,r}var $e=_((function(e,t){if(t=v(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var r=0,n=e.length;r<n;r++)b(e[r])(t)}),2);function ze(e,t,r,n){var i=[...e].reverse();return K(i,t,r,n)}function Ge(e){var t=b(e);return i((function(e,r){return e.push(((e,...t)=>{let n={};if(e&&(n.error=e),t.length>0){var i=t;t.length<=1&&([i]=t),n.value=i}r(null,n)})),t.apply(this,e)}))}function He(e){var t;return Array.isArray(e)?t=e.map(Ge):(t={},Object.keys(e).forEach((r=>{t[r]=Ge.call(this,e[r])}))),t}function Ve(e,t,r,n){const i=b(r);return we(e,t,((e,t)=>{i(e,((e,r)=>{t(e,!r)}))}),n)}var qe=_((function(e,t,r){return Ve(T,e,t,r)}),3);var Ke=_((function(e,t,r,n){return Ve(R(t),e,r,n)}),4);var Ye=_((function(e,t,r){return Ve(L,e,t,r)}),3);function Ze(e){return function(){return e}}const Qe=5,Xe=0;function Je(e,t,r){var n={times:Qe,intervalFunc:Ze(Xe)};if(arguments.length<3&&"function"==typeof e?(r=t||N(),t=e):(!function(e,t){if("object"==typeof t)e.times=+t.times||Qe,e.intervalFunc="function"==typeof t.interval?t.interval:Ze(+t.interval||Xe),e.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");e.times=+t||Qe}}(n,e),r=r||N()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var i=b(t),o=1;return function e(){i(((t,...i)=>{!1!==t&&(t&&o++<n.times&&("function"!=typeof n.errorFilter||n.errorFilter(t))?setTimeout(e,n.intervalFunc(o-1)):r(t,...i))}))}(),r[D]}function et(e,t){t||(t=e,e=null);let r=e&&e.arity||t.length;p(t)&&(r+=1);var n=b(t);return i(((t,i)=>{function o(e){n(...t,e)}return(t.length<r-1||null==i)&&(t.push(i),i=N()),e?Je(e,o,i):Je(o,i),i[D]}))}function tt(e,t){return Ie(L,e,t)}var rt=_((function(e,t,r){return re(Boolean,(e=>e))(T,e,t,r)}),3);var nt=_((function(e,t,r,n){return re(Boolean,(e=>e))(R(t),e,r,n)}),4);var it=_((function(e,t,r){return re(Boolean,(e=>e))(L,e,t,r)}),3);var ot=_((function(e,t,r){var n=b(t);return P(e,((e,t)=>{n(e,((r,n)=>{if(r)return t(r);t(r,{value:e,criteria:n})}))}),((e,t)=>{if(e)return r(e);r(null,t.sort(i).map((e=>e.value)))}));function i(e,t){var r=e.criteria,n=t.criteria;return r<n?-1:r>n?1:0}}),3);function st(e,t,r){var n=b(e);return i(((i,o)=>{var s,a=!1;i.push(((...e)=>{a||(o(...e),clearTimeout(s))})),s=setTimeout((function(){var t=e.name||"anonymous",n=new Error('Callback function "'+t+'" timed out.');n.code="ETIMEDOUT",r&&(n.info=r),a=!0,o(n)}),t),n(...i)}))}function at(e,t,r,n){var i=b(r);return Q(function(e){for(var t=Array(e);e--;)t[e]=e;return t}(e),t,i,n)}function lt(e,t,r){return at(e,1/0,t,r)}function ct(e,t,r){return at(e,1,t,r)}function ut(e,t,r,n){arguments.length<=3&&"function"==typeof t&&(n=r,r=t,t=Array.isArray(e)?[]:{}),n=v(n||N());var i=b(r);return T(e,((e,r,n)=>{i(t,e,r,n)}),(e=>n(e,t))),n[D]}var ft=_((function(e,t){var r,n=null;return de(e,((e,t)=>{b(e)(((e,...i)=>{if(!1===e)return t(e);i.length<2?[r]=i:r=i,n=e,t(e?null:{})}))}),(()=>t(n,r)))}));function ht(e){return(...t)=>(e.unmemoized||e)(...t)}var dt=_((function(e,t,r){r=E(r);var n=b(t),i=b(e),o=[];function s(e,...t){if(e)return r(e);o=t,!1!==e&&i(a)}function a(e,t){return e?r(e):!1!==e?t?void n(s):r(null,...o):void 0}return i(a)}),3);function pt(e,t,r){const n=b(e);return dt((e=>n(((t,r)=>e(t,!r)))),t,r)}var bt=_((function(e,t){if(t=v(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function n(t){b(e[r++])(...t,E(i))}function i(i,...o){if(!1!==i)return i||r===e.length?t(i,...o):void n(o)}n([])})),_t={apply:n,applyEach:M,applyEachSeries:I,asyncify:f,auto:j,autoInject:$,cargo:V,cargoQueue:q,compose:Z,concat:J,concatLimit:X,concatSeries:ee,constant:te,detect:ne,detectLimit:ie,detectSeries:oe,dir:ae,doUntil:ce,doWhilst:le,each:fe,eachLimit:he,eachOf:T,eachOfLimit:A,eachOfSeries:L,eachSeries:de,ensureAsync:pe,every:be,everyLimit:_e,everySeries:ye,filter:ve,filterLimit:Se,filterSeries:Ee,forever:xe,groupBy:Ae,groupByLimit:Re,groupBySeries:Oe,log:ke,map:P,mapLimit:Q,mapSeries:C,mapValues:Pe,mapValuesLimit:Te,mapValuesSeries:Me,memoize:Le,nextTick:Ce,parallel:De,parallelLimit:Ne,priorityQueue:Ue,queue:je,race:$e,reduce:K,reduceRight:ze,reflect:Ge,reflectAll:He,reject:qe,rejectLimit:Ke,rejectSeries:Ye,retry:Je,retryable:et,seq:Y,series:tt,setImmediate:u,some:rt,someLimit:nt,someSeries:it,sortBy:ot,timeout:st,times:lt,timesLimit:at,timesSeries:ct,transform:ut,tryEach:ft,unmemoize:ht,until:pt,waterfall:bt,whilst:dt,all:be,allLimit:_e,allSeries:ye,any:rt,anyLimit:nt,anySeries:it,find:ne,findLimit:ie,findSeries:oe,flatMap:J,flatMapLimit:X,flatMapSeries:ee,forEach:fe,forEachSeries:de,forEachLimit:he,forEachOf:T,forEachOfSeries:L,forEachOfLimit:A,inject:K,foldl:K,foldr:ze,select:ve,selectLimit:Se,selectSeries:Ee,wrapSync:f,during:dt,doDuring:le}},e=>{e.exports=require("constants")},e=>{e.exports=require("assert")},(e,t,r)=>{e.exports=r(80).PassThrough},(e,t,r)=>{const n=globalThis.AbortController||r(8).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:l}=r(12),{validateAbortSignal:c,validateInteger:u,validateObject:f}=r(47),h=r(4).Symbol("kWeak"),d=r(4).Symbol("kResistStopPropagation"),{finished:p}=r(28),b=r(141),{addAbortSignalNoValidate:_}=r(62),{isWritable:y,isNodeStream:m}=r(24),{deprecate:g}=r(17),{ArrayPrototypePush:w,Boolean:v,MathFloor:S,Number:E,NumberIsNaN:x,Promise:R,PromiseReject:A,PromiseResolve:O,PromisePrototypeThen:k,Symbol:T}=r(4),P=T("kEmpty"),M=T("kEof");function L(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=S(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=S(t.highWaterMark)),u(n,"options.concurrency",1),u(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(17).AbortSignalAny([null==t?void 0:t.signal].filter(v)),s=this,a=[],c={signal:o};let u,f,h=!1,d=0;function p(){h=!0,b()}function b(){d-=1,_()}function _(){f&&!h&&d<n&&a.length<i&&(f(),f=null)}!async function(){try{for await(let t of s){if(h)return;if(o.aborted)throw new l;try{if(t=e(t,c),t===P)continue;t=O(t)}catch(e){t=A(e)}d+=1,k(t,b,p),a.push(t),u&&(u(),u=null),!h&&(a.length>=i||d>=n)&&await new R((e=>{f=e}))}a.push(M)}catch(e){const t=A(e);k(t,b,p),a.push(t)}finally{h=!0,u&&(u(),u=null)}}();try{for(;;){for(;a.length>0;){const e=await a[0];if(e===M)return;if(o.aborted)throw new l;e!==P&&(yield e),a.shift(),_()}await new R((e=>{u=e}))}}finally{h=!0,f&&(f(),f=null)}}.call(this)}async function C(e,t=void 0){for await(const r of I.call(this,e,t))return!0;return!1}function I(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return L.call(this,(async function(t,r){return await e(t,r)?t:P}),t)}class D extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function N(e){if(e=E(e),x(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:g((function(e=void 0){return null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=N(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;e--<=0&&(yield r)}}.call(this)},filter:I,flatMap:function(e,t){const r=L.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:L,take:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=N(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),m(e)&&!y(e))throw new i("stream",e,"must be writable");const r=b(this,e);return null!=t&&t.signal&&_(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await C.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of L.call(this,(async function(t,r){return await e(t,r),P}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&f(r,"options"),null!=(null==r?void 0:r.signal)&&c(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new l(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(e)),e}const a=new n,u=a.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this,[d]:!0};r.signal.addEventListener("abort",(()=>a.abort()),e)}let b=!1;try{for await(const n of this){var _;if(b=!0,null!=r&&null!==(_=r.signal)&&void 0!==_&&_.aborted)throw new l;s?t=await e(t,n,{signal:u}):(t=n,s=!0)}if(!b&&!s)throw new D}finally{a.abort()}return t},toArray:async function(e){null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l(void 0,{cause:e.signal.reason});w(t,n)}return t},some:C,find:async function(e,t){for await(const r of I.call(this,e,t))return r}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assertValidPattern=void 0;t.assertValidPattern=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseClass=void 0;const r={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},n=e=>e.replace(/[[\]\\-]/g,"\\$&"),i=e=>e.join("");t.parseClass=(e,t)=>{const o=t;if("["!==e.charAt(o))throw new Error("not in a brace expression");const s=[],a=[];let l=o+1,c=!1,u=!1,f=!1,h=!1,d=o,p="";e:for(;l<e.length;){const t=e.charAt(l);if("!"!==t&&"^"!==t||l!==o+1){if("]"===t&&c&&!f){d=l+1;break}if(c=!0,"\\"!==t||f){if("["===t&&!f)for(const[t,[n,i,c]]of Object.entries(r))if(e.startsWith(t,l)){if(p)return["$.",!1,e.length-o,!0];l+=t.length,c?a.push(n):s.push(n),u=u||i;continue e}f=!1,p?(t>p?s.push(n(p)+"-"+n(t)):t===p&&s.push(n(t)),p="",l++):e.startsWith("-]",l+1)?(s.push(n(t+"-")),l+=2):e.startsWith("-",l+1)?(p=t,l+=2):(s.push(n(t)),l++)}else f=!0,l++}else h=!0,l++}if(d<l)return["",!1,0,!1];if(!s.length&&!a.length)return["$.",!1,e.length-o,!0];if(0===a.length&&1===s.length&&/^\\?.$/.test(s[0])&&!h){const e=2===s[0].length?s[0].slice(-1):s[0];return[(b=e,b.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,d-o,!1]}var b;const _="["+(h?"^":"")+i(s)+"]",y="["+(h?"":"^")+i(a)+"]";return[s.length&&a.length?"("+_+"|"+y+")":s.length?_:y,u,d-o,!0]}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=void 0;const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,n=new Set,i="object"==typeof process&&process?process:{},o=(e,t,r,n)=>{"function"==typeof i.emitWarning?i.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)};let s=globalThis.AbortController,a=globalThis.AbortSignal;if(void 0===s){a=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},s=class{constructor(){t()}signal=new a;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(const t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e="1"!==i.env?.LRU_CACHE_IGNORE_AC_WARNING;const t=()=>{e&&(e=!1,o("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}Symbol("type");const l=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),c=e=>l(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?u:null:null;class u extends Array{constructor(e){super(e),this.fill(0)}}class f{heap;length;static#we=!1;static create(e){const t=c(e);if(!t)return[];f.#we=!0;const r=new f(e,t);return f.#we=!1,r}constructor(e,t){if(!f.#we)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class h{#ve;#Se;#Ee;#xe;#Re;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#Ae;#Oe;#ke;#Te;#Pe;#Me;#Le;#Ce;#Ie;#De;#Ne;#je;#Fe;#We;#Be;#Ue;static unsafeExposeInternals(e){return{starts:e.#je,ttls:e.#Fe,sizes:e.#Ne,keyMap:e.#Oe,keyList:e.#ke,valList:e.#Te,next:e.#Pe,prev:e.#Me,get head(){return e.#Le},get tail(){return e.#Ce},free:e.#Ie,isBackgroundFetch:t=>e.#$e(t),backgroundFetch:(t,r,n,i)=>e.#ze(t,r,n,i),moveToTail:t=>e.#Ge(t),indexes:t=>e.#He(t),rindexes:t=>e.#Ve(t),isStale:t=>e.#qe(t)}}get max(){return this.#ve}get maxSize(){return this.#Se}get calculatedSize(){return this.#Ae}get size(){return this.#c}get fetchMethod(){return this.#Re}get dispose(){return this.#Ee}get disposeAfter(){return this.#xe}constructor(e){const{max:t=0,ttl:r,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:a,updateAgeOnHas:u,allowStale:d,dispose:p,disposeAfter:b,noDisposeOnSet:_,noUpdateTTL:y,maxSize:m=0,maxEntrySize:g=0,sizeCalculation:w,fetchMethod:v,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:R,ignoreFetchAbort:A}=e;if(0!==t&&!l(t))throw new TypeError("max option must be a nonnegative integer");const O=t?c(t):Array;if(!O)throw new Error("invalid max value: "+t);if(this.#ve=t,this.#Se=m,this.maxEntrySize=g||this.#Se,this.sizeCalculation=w,this.sizeCalculation){if(!this.#Se&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==v&&"function"!=typeof v)throw new TypeError("fetchMethod must be a function if specified");if(this.#Re=v,this.#Be=!!v,this.#Oe=new Map,this.#ke=new Array(t).fill(void 0),this.#Te=new Array(t).fill(void 0),this.#Pe=new O(t),this.#Me=new O(t),this.#Le=0,this.#Ce=0,this.#Ie=f.create(t),this.#c=0,this.#Ae=0,"function"==typeof p&&(this.#Ee=p),"function"==typeof b?(this.#xe=b,this.#De=[]):(this.#xe=void 0,this.#De=void 0),this.#We=!!this.#Ee,this.#Ue=!!this.#xe,this.noDisposeOnSet=!!_,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!R,this.ignoreFetchAbort=!!A,0!==this.maxEntrySize){if(0!==this.#Se&&!l(this.#Se))throw new TypeError("maxSize must be a positive integer if specified");if(!l(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#Ke()}if(this.allowStale=!!d,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!u,this.ttlResolution=l(i)||0===i?i:1,this.ttlAutopurge=!!s,this.ttl=r||0,this.ttl){if(!l(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#Ye()}if(0===this.#ve&&0===this.ttl&&0===this.#Se)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#ve&&!this.#Se){const e="LRU_CACHE_UNBOUNDED";if((e=>!n.has(e))(e)){n.add(e);o("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,h)}}}getRemainingTTL(e){return this.#Oe.has(e)?1/0:0}#Ye(){const e=new u(this.#ve),t=new u(this.#ve);this.#Fe=e,this.#je=t,this.#Ze=(n,i,o=r.now())=>{if(t[n]=0!==i?o:0,e[n]=i,0!==i&&this.ttlAutopurge){const e=setTimeout((()=>{this.#qe(n)&&this.delete(this.#ke[n])}),i+1);e.unref&&e.unref()}},this.#Qe=n=>{t[n]=0!==e[n]?r.now():0},this.#Xe=(r,o)=>{if(e[o]){const s=e[o],a=t[o];if(!s||!a)return;r.ttl=s,r.start=a,r.now=n||i();const l=r.now-a;r.remainingTTL=s-l}};let n=0;const i=()=>{const e=r.now();if(this.ttlResolution>0){n=e;const t=setTimeout((()=>n=0),this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=r=>{const o=this.#Oe.get(r);if(void 0===o)return 0;const s=e[o],a=t[o];if(!s||!a)return 1/0;return s-((n||i())-a)},this.#qe=r=>{const o=t[r],s=e[r];return!!s&&!!o&&(n||i())-o>s}}#Qe=()=>{};#Xe=()=>{};#Ze=()=>{};#qe=()=>!1;#Ke(){const e=new u(this.#ve);this.#Ae=0,this.#Ne=e,this.#Je=t=>{this.#Ae-=e[t],e[t]=0},this.#et=(e,t,r,n)=>{if(this.#$e(t))return 0;if(!l(r)){if(!n)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(r=n(t,e),!l(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return r},this.#tt=(t,r,n)=>{if(e[t]=r,this.#Se){const r=this.#Se-e[t];for(;this.#Ae>r;)this.#rt(!0)}this.#Ae+=e[t],n&&(n.entrySize=r,n.totalCalculatedSize=this.#Ae)}}#Je=e=>{};#tt=(e,t,r)=>{};#et=(e,t,r,n)=>{if(r||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#He({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#Ce;this.#nt(t)&&(!e&&this.#qe(t)||(yield t),t!==this.#Le);)t=this.#Me[t]}*#Ve({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#Le;this.#nt(t)&&(!e&&this.#qe(t)||(yield t),t!==this.#Ce);)t=this.#Pe[t]}#nt(e){return void 0!==e&&this.#Oe.get(this.#ke[e])===e}*entries(){for(const e of this.#He())void 0===this.#Te[e]||void 0===this.#ke[e]||this.#$e(this.#Te[e])||(yield[this.#ke[e],this.#Te[e]])}*rentries(){for(const e of this.#Ve())void 0===this.#Te[e]||void 0===this.#ke[e]||this.#$e(this.#Te[e])||(yield[this.#ke[e],this.#Te[e]])}*keys(){for(const e of this.#He()){const t=this.#ke[e];void 0===t||this.#$e(this.#Te[e])||(yield t)}}*rkeys(){for(const e of this.#Ve()){const t=this.#ke[e];void 0===t||this.#$e(this.#Te[e])||(yield t)}}*values(){for(const e of this.#He()){void 0===this.#Te[e]||this.#$e(this.#Te[e])||(yield this.#Te[e])}}*rvalues(){for(const e of this.#Ve()){void 0===this.#Te[e]||this.#$e(this.#Te[e])||(yield this.#Te[e])}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(const r of this.#He()){const n=this.#Te[r],i=this.#$e(n)?n.__staleWhileFetching:n;if(void 0!==i&&e(i,this.#ke[r],this))return this.get(this.#ke[r],t)}}forEach(e,t=this){for(const r of this.#He()){const n=this.#Te[r],i=this.#$e(n)?n.__staleWhileFetching:n;void 0!==i&&e.call(t,i,this.#ke[r],this)}}rforEach(e,t=this){for(const r of this.#Ve()){const n=this.#Te[r],i=this.#$e(n)?n.__staleWhileFetching:n;void 0!==i&&e.call(t,i,this.#ke[r],this)}}purgeStale(){let e=!1;for(const t of this.#Ve({allowStale:!0}))this.#qe(t)&&(this.delete(this.#ke[t]),e=!0);return e}info(e){const t=this.#Oe.get(e);if(void 0===t)return;const n=this.#Te[t],i=this.#$e(n)?n.__staleWhileFetching:n;if(void 0===i)return;const o={value:i};if(this.#Fe&&this.#je){const e=this.#Fe[t],n=this.#je[t];if(e&&n){const t=e-(r.now()-n);o.ttl=t,o.start=Date.now()}}return this.#Ne&&(o.size=this.#Ne[t]),o}dump(){const e=[];for(const t of this.#He({allowStale:!0})){const n=this.#ke[t],i=this.#Te[t],o=this.#$e(i)?i.__staleWhileFetching:i;if(void 0===o||void 0===n)continue;const s={value:o};if(this.#Fe&&this.#je){s.ttl=this.#Fe[t];const e=r.now()-this.#je[t];s.start=Math.floor(Date.now()-e)}this.#Ne&&(s.size=this.#Ne[t]),e.unshift([n,s])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}set(e,t,r={}){if(void 0===t)return this.delete(e),this;const{ttl:n=this.ttl,start:i,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:a}=r;let{noUpdateTTL:l=this.noUpdateTTL}=r;const c=this.#et(e,t,r.size||0,s);if(this.maxEntrySize&&c>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.delete(e),this;let u=0===this.#c?void 0:this.#Oe.get(e);if(void 0===u)u=0===this.#c?this.#Ce:0!==this.#Ie.length?this.#Ie.pop():this.#c===this.#ve?this.#rt(!1):this.#c,this.#ke[u]=e,this.#Te[u]=t,this.#Oe.set(e,u),this.#Pe[this.#Ce]=u,this.#Me[u]=this.#Ce,this.#Ce=u,this.#c++,this.#tt(u,c,a),a&&(a.set="add"),l=!1;else{this.#Ge(u);const r=this.#Te[u];if(t!==r){if(this.#Be&&this.#$e(r)){r.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=r;void 0===t||o||(this.#We&&this.#Ee?.(t,e,"set"),this.#Ue&&this.#De?.push([t,e,"set"]))}else o||(this.#We&&this.#Ee?.(r,e,"set"),this.#Ue&&this.#De?.push([r,e,"set"]));if(this.#Je(u),this.#tt(u,c,a),this.#Te[u]=t,a){a.set="replace";const e=r&&this.#$e(r)?r.__staleWhileFetching:r;void 0!==e&&(a.oldValue=e)}}else a&&(a.set="update")}if(0===n||this.#Fe||this.#Ye(),this.#Fe&&(l||this.#Ze(u,n,i),a&&this.#Xe(a,u)),!o&&this.#Ue&&this.#De){const e=this.#De;let t;for(;t=e?.shift();)this.#xe?.(...t)}return this}pop(){try{for(;this.#c;){const e=this.#Te[this.#Le];if(this.#rt(!0),this.#$e(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#Ue&&this.#De){const e=this.#De;let t;for(;t=e?.shift();)this.#xe?.(...t)}}}#rt(e){const t=this.#Le,r=this.#ke[t],n=this.#Te[t];return this.#Be&&this.#$e(n)?n.__abortController.abort(new Error("evicted")):(this.#We||this.#Ue)&&(this.#We&&this.#Ee?.(n,r,"evict"),this.#Ue&&this.#De?.push([n,r,"evict"])),this.#Je(t),e&&(this.#ke[t]=void 0,this.#Te[t]=void 0,this.#Ie.push(t)),1===this.#c?(this.#Le=this.#Ce=0,this.#Ie.length=0):this.#Le=this.#Pe[t],this.#Oe.delete(r),this.#c--,t}has(e,t={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:n}=t,i=this.#Oe.get(e);if(void 0!==i){const e=this.#Te[i];if(this.#$e(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#qe(i))return r&&this.#Qe(i),n&&(n.has="hit",this.#Xe(n,i)),!0;n&&(n.has="stale",this.#Xe(n,i))}else n&&(n.has="miss");return!1}peek(e,t={}){const{allowStale:r=this.allowStale}=t,n=this.#Oe.get(e);if(void 0===n||!r&&this.#qe(n))return;const i=this.#Te[n];return this.#$e(i)?i.__staleWhileFetching:i}#ze(e,t,r,n){const i=void 0===t?void 0:this.#Te[t];if(this.#$e(i))return i;const o=new s,{signal:a}=r;a?.addEventListener("abort",(()=>o.abort(a.reason)),{signal:o.signal});const l={signal:o.signal,options:r,context:n},c=(n,i=!1)=>{const{aborted:s}=o.signal,a=r.ignoreFetchAbort&&void 0!==n;if(r.status&&(s&&!i?(r.status.fetchAborted=!0,r.status.fetchError=o.signal.reason,a&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),s&&!a&&!i)return u(o.signal.reason);const c=f;return this.#Te[t]===f&&(void 0===n?c.__staleWhileFetching?this.#Te[t]=c.__staleWhileFetching:this.delete(e):(r.status&&(r.status.fetchUpdated=!0),this.set(e,n,l.options))),n},u=n=>{const{aborted:i}=o.signal,s=i&&r.allowStaleOnFetchAbort,a=s||r.allowStaleOnFetchRejection,l=a||r.noDeleteOnFetchRejection,c=f;if(this.#Te[t]===f){!l||void 0===c.__staleWhileFetching?this.delete(e):s||(this.#Te[t]=c.__staleWhileFetching)}if(a)return r.status&&void 0!==c.__staleWhileFetching&&(r.status.returnedStale=!0),c.__staleWhileFetching;if(c.__returned===c)throw n};r.status&&(r.status.fetchDispatched=!0);const f=new Promise(((t,n)=>{const s=this.#Re?.(e,i,l);s&&s instanceof Promise&&s.then((e=>t(void 0===e?void 0:e)),n),o.signal.addEventListener("abort",(()=>{r.ignoreFetchAbort&&!r.allowStaleOnFetchAbort||(t(void 0),r.allowStaleOnFetchAbort&&(t=e=>c(e,!0)))}))})).then(c,(e=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=e),u(e)))),h=Object.assign(f,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return void 0===t?(this.set(e,h,{...l.options,status:void 0}),t=this.#Oe.get(e)):this.#Te[t]=h,h}#$e(e){if(!this.#Be)return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof s}async fetch(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:p,forceRefresh:b=!1,status:_,signal:y}=t;if(!this.#Be)return _&&(_.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,status:_});const m={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:o,noDisposeOnSet:s,size:a,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:d,ignoreFetchAbort:h,status:_,signal:y};let g=this.#Oe.get(e);if(void 0===g){_&&(_.fetch="miss");const t=this.#ze(e,g,m,p);return t.__returned=t}{const t=this.#Te[g];if(this.#$e(t)){const e=r&&void 0!==t.__staleWhileFetching;return _&&(_.fetch="inflight",e&&(_.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}const i=this.#qe(g);if(!b&&!i)return _&&(_.fetch="hit"),this.#Ge(g),n&&this.#Qe(g),_&&this.#Xe(_,g),t;const o=this.#ze(e,g,m,p),s=void 0!==o.__staleWhileFetching&&r;return _&&(_.fetch=i?"stale":"refresh",s&&i&&(_.returnedStale=!0)),s?o.__staleWhileFetching:o.__returned=o}}get(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:o}=t,s=this.#Oe.get(e);if(void 0!==s){const t=this.#Te[s],a=this.#$e(t);return o&&this.#Xe(o,s),this.#qe(s)?(o&&(o.get="stale"),a?(o&&r&&void 0!==t.__staleWhileFetching&&(o.returnedStale=!0),r?t.__staleWhileFetching:void 0):(i||this.delete(e),o&&r&&(o.returnedStale=!0),r?t:void 0)):(o&&(o.get="hit"),a?t.__staleWhileFetching:(this.#Ge(s),n&&this.#Qe(s),t))}o&&(o.get="miss")}#it(e,t){this.#Me[t]=e,this.#Pe[e]=t}#Ge(e){e!==this.#Ce&&(e===this.#Le?this.#Le=this.#Pe[e]:this.#it(this.#Me[e],this.#Pe[e]),this.#it(this.#Ce,e),this.#Ce=e)}delete(e){let t=!1;if(0!==this.#c){const r=this.#Oe.get(e);if(void 0!==r)if(t=!0,1===this.#c)this.clear();else{this.#Je(r);const t=this.#Te[r];if(this.#$e(t)?t.__abortController.abort(new Error("deleted")):(this.#We||this.#Ue)&&(this.#We&&this.#Ee?.(t,e,"delete"),this.#Ue&&this.#De?.push([t,e,"delete"])),this.#Oe.delete(e),this.#ke[r]=void 0,this.#Te[r]=void 0,r===this.#Ce)this.#Ce=this.#Me[r];else if(r===this.#Le)this.#Le=this.#Pe[r];else{const e=this.#Me[r];this.#Pe[e]=this.#Pe[r];const t=this.#Pe[r];this.#Me[t]=this.#Me[r]}this.#c--,this.#Ie.push(r)}}if(this.#Ue&&this.#De?.length){const e=this.#De;let t;for(;t=e?.shift();)this.#xe?.(...t)}return t}clear(){for(const e of this.#Ve({allowStale:!0})){const t=this.#Te[e];if(this.#$e(t))t.__abortController.abort(new Error("deleted"));else{const r=this.#ke[e];this.#We&&this.#Ee?.(t,r,"delete"),this.#Ue&&this.#De?.push([t,r,"delete"])}}if(this.#Oe.clear(),this.#Te.fill(void 0),this.#ke.fill(void 0),this.#Fe&&this.#je&&(this.#Fe.fill(0),this.#je.fill(0)),this.#Ne&&this.#Ne.fill(0),this.#Le=0,this.#Ce=0,this.#Ie.length=0,this.#Ae=0,this.#c=0,this.#Ue&&this.#De){const e=this.#De;let t;for(;t=e?.shift();)this.#xe?.(...t)}}}t.LRUCache=h},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobStream=t.GlobWalker=t.GlobUtil=void 0;const n=r(79),i=r(373),o=r(374);class s{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#ot=[];#st;#at;signal;maxDepth;constructor(e,t,r){this.patterns=e,this.path=t,this.opts=r,this.#at=r.posix||"win32"!==r.platform?"/":"\\",r.ignore&&(this.#st=((e,t)=>"string"==typeof e?new i.Ignore([e],t):Array.isArray(e)?new i.Ignore(e,t):e)(r.ignore,r)),this.maxDepth=r.maxDepth||1/0,r.signal&&(this.signal=r.signal,this.signal.addEventListener("abort",(()=>{this.#ot.length=0})))}#lt(e){return this.seen.has(e)||!!this.#st?.ignored?.(e)}#ct(e){return!!this.#st?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;let e;for(this.paused=!1;!this.paused&&(e=this.#ot.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#ot.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||await e.realpath(),!r)return;e=r}const n=e.isUnknown()||this.opts.stat;return this.matchCheckTest(n?await e.lstat():e,t)}matchCheckTest(e,t){return!e||!(this.maxDepth===1/0||e.depth()<=this.maxDepth)||t&&!e.canReaddir()||this.opts.nodir&&e.isDirectory()||this.#lt(e)?void 0:e}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||e.realpathSync(),!r)return;e=r}const n=e.isUnknown()||this.opts.stat;return this.matchCheckTest(n?e.lstatSync():e,t)}matchFinish(e,t){if(this.#lt(e))return;const r=void 0===this.opts.absolute?t:this.opts.absolute;this.seen.add(e);const n=this.opts.mark&&e.isDirectory()?this.#at:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(r){const t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+n)}else{const t=this.opts.posix?e.relativePosix():e.relative(),r=this.opts.dotRelative&&!t.startsWith(".."+this.#at)?"."+this.#at:"";this.matchEmit(t?r+t+n:"."+n)}}async match(e,t,r){const n=await this.matchCheck(e,r);n&&this.matchFinish(n,t)}matchSync(e,t,r){const n=this.matchCheckSync(e,r);n&&this.matchFinish(n,t)}walkCB(e,t,r){this.signal?.aborted&&r(),this.walkCB2(e,t,new o.Processor(this.opts),r)}walkCB2(e,t,r,n){if(this.#ct(e))return n();if(this.signal?.aborted&&n(),this.paused)return void this.onResume((()=>this.walkCB2(e,t,r,n)));r.processPatterns(e,t);let i=1;const o=()=>{0==--i&&n()};for(const[e,t,n]of r.matches.entries())this.#lt(e)||(i++,this.match(e,t,n).then((()=>o())));for(const e of r.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;const t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,r,o):e.readdirCB(((t,n)=>this.walkCB3(e,n,r,o)),!0)}o()}walkCB3(e,t,r,n){r=r.filterEntries(e,t);let i=1;const o=()=>{0==--i&&n()};for(const[e,t,n]of r.matches.entries())this.#lt(e)||(i++,this.match(e,t,n).then((()=>o())));for(const[e,t]of r.subwalks.entries())i++,this.walkCB2(e,t,r.child(),o);o()}walkCBSync(e,t,r){this.signal?.aborted&&r(),this.walkCB2Sync(e,t,new o.Processor(this.opts),r)}walkCB2Sync(e,t,r,n){if(this.#ct(e))return n();if(this.signal?.aborted&&n(),this.paused)return void this.onResume((()=>this.walkCB2Sync(e,t,r,n)));r.processPatterns(e,t);let i=1;const o=()=>{0==--i&&n()};for(const[e,t,n]of r.matches.entries())this.#lt(e)||this.matchSync(e,t,n);for(const e of r.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;const t=e.readdirSync();this.walkCB3Sync(e,t,r,o)}o()}walkCB3Sync(e,t,r,n){r=r.filterEntries(e,t);let i=1;const o=()=>{0==--i&&n()};for(const[e,t,n]of r.matches.entries())this.#lt(e)||this.matchSync(e,t,n);for(const[e,t]of r.subwalks.entries())i++,this.walkCB2Sync(e,t,r.child(),o);o()}}t.GlobUtil=s;t.GlobWalker=class extends s{matches;constructor(e,t,r){super(e,t,r),this.matches=new Set}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise(((e,t)=>{this.walkCB(this.path,this.patterns,(()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)}))})),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,(()=>{if(this.signal?.aborted)throw this.signal.reason})),this.matches}};t.GlobStream=class extends s{results;constructor(e,t,r){super(e,t,r),this.results=new n.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",(()=>this.resume())),this.results.on("resume",(()=>this.resume()))}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){const e=this.path;return e.isUnknown()?e.lstat().then((()=>{this.walkCB(e,this.patterns,(()=>this.results.end()))})):this.walkCB(e,this.patterns,(()=>this.results.end())),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,(()=>this.results.end())),this.results}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Ignore=void 0;const n=r(37),i=r(289),o="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";t.Ignore=class{relative;relativeChildren;absolute;absoluteChildren;constructor(e,{nobrace:t,nocase:r,noext:s,noglobstar:a,platform:l=o}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[];const c={dot:!0,nobrace:t,nocase:r,noext:s,noglobstar:a,optimizationLevel:2,platform:l,nocomment:!0,nonegate:!0};for(const t of e){const e=new n.Minimatch(t,c);for(let t=0;t<e.set.length;t++){const r=e.set[t],o=e.globParts[t];if(!r||!o)throw new Error("invalid pattern object");const s=new i.Pattern(r,o,0,l),a=new n.Minimatch(s.globString(),c),u="**"===o[o.length-1],f=s.isAbsolute();f?this.absolute.push(a):this.relative.push(a),u&&(f?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}}ignored(e){const t=e.fullpath(),r=`${t}/`,n=e.relative()||".",i=`${n}/`;for(const e of this.relative)if(e.match(n)||e.match(i))return!0;for(const e of this.absolute)if(e.match(t)||e.match(r))return!0;return!1}childrenIgnored(e){const t=e.fullpath()+"/",r=(e.relative()||".")+"/";for(const e of this.relativeChildren)if(e.match(r))return!0;for(const e of this.absoluteChildren)if(e.match(t))return!0;return!1}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Processor=t.SubWalks=t.MatchRecord=t.HasWalkedCache=void 0;const n=r(37);class i{store;constructor(e=new Map){this.store=e}copy(){return new i(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){const r=e.fullpath(),n=this.store.get(r);n?n.add(t.globString()):this.store.set(r,new Set([t.globString()]))}}t.HasWalkedCache=i;class o{store=new Map;add(e,t,r){const n=(t?2:0)|(r?1:0),i=this.store.get(e);this.store.set(e,void 0===i?n:n&i)}entries(){return[...this.store.entries()].map((([e,t])=>[e,!!(2&t),!!(1&t)]))}}t.MatchRecord=o;class s{store=new Map;add(e,t){if(!e.canReaddir())return;const r=this.store.get(e);r?r.find((e=>e.globString()===t.globString()))||r.push(t):this.store.set(e,[t])}get(e){const t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map((e=>[e,this.store.get(e)]))}keys(){return[...this.store.keys()].filter((e=>e.canReaddir()))}}t.SubWalks=s;class a{hasWalkedCache;matches=new o;subwalks=new s;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new i}processPatterns(e,t){this.patterns=t;const r=t.map((t=>[e,t]));for(let[e,t]of r){this.hasWalkedCache.storeWalked(e,t);const r=t.root(),i=t.isAbsolute()&&!1!==this.opts.absolute;if(r){e=e.resolve("/"===r&&void 0!==this.opts.root?this.opts.root:r);const n=t.rest();if(!n){this.matches.add(e,!0,!1);continue}t=n}if(e.isENOENT())continue;let o,s,a=!1;for(;"string"==typeof(o=t.pattern())&&(s=t.rest());){const r=e.resolve(o);e=r,t=s,a=!0}if(o=t.pattern(),s=t.rest(),a){if(this.hasWalkedCache.hasWalked(e,t))continue;this.hasWalkedCache.storeWalked(e,t)}if("string"!=typeof o)if(o===n.GLOBSTAR){(!e.isSymbolicLink()||this.follow||t.checkFollowGlobstar())&&this.subwalks.add(e,t);const r=s?.pattern(),n=s?.rest();if(s&&(""!==r&&"."!==r||n)){if(".."===r){const t=e.parent||e;n?this.hasWalkedCache.hasWalked(t,n)||this.subwalks.add(t,n):this.matches.add(t,i,!0)}}else this.matches.add(e,i,""===r||"."===r)}else o instanceof RegExp&&this.subwalks.add(e,t);else{const t=".."===o||""===o||"."===o;this.matches.add(e.resolve(o),i,t)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new a(this.opts,this.hasWalkedCache)}filterEntries(e,t){const r=this.subwalks.get(e),i=this.child();for(const e of t)for(const t of r){const r=t.isAbsolute(),o=t.pattern(),s=t.rest();o===n.GLOBSTAR?i.testGlobstar(e,t,s,r):o instanceof RegExp?i.testRegExp(e,o,s,r):i.testString(e,o,s,r)}return i}testGlobstar(e,t,r,n){if(!this.dot&&e.name.startsWith(".")||(t.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(r&&t.checkFollowGlobstar()?this.subwalks.add(e,r):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),r){const t=r.pattern();if("string"==typeof t&&".."!==t&&""!==t&&"."!==t)this.testString(e,t,r.rest(),n);else if(".."===t){const t=e.parent||e;this.subwalks.add(t,r)}else t instanceof RegExp&&this.testRegExp(e,t,r.rest(),n)}}testRegExp(e,t,r,n){t.test(e.name)&&(r?this.subwalks.add(e,r):this.matches.add(e,n,!1))}testString(e,t,r,n){e.isNamed(t)&&(r?this.subwalks.add(e,r):this.matches.add(e,n,!1))}}t.Processor=a},(e,t,r)=>{const n=globalThis.AbortController||r(8).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:l}=r(13),{validateAbortSignal:c,validateInteger:u,validateObject:f}=r(48),h=r(5).Symbol("kWeak"),d=r(5).Symbol("kResistStopPropagation"),{finished:p}=r(29),b=r(157),{addAbortSignalNoValidate:_}=r(69),{isWritable:y,isNodeStream:m}=r(25),{deprecate:g}=r(18),{ArrayPrototypePush:w,Boolean:v,MathFloor:S,Number:E,NumberIsNaN:x,Promise:R,PromiseReject:A,PromiseResolve:O,PromisePrototypeThen:k,Symbol:T}=r(5),P=T("kEmpty"),M=T("kEof");function L(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=S(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=S(t.highWaterMark)),u(n,"options.concurrency",1),u(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(18).AbortSignalAny([null==t?void 0:t.signal].filter(v)),s=this,a=[],c={signal:o};let u,f,h=!1,d=0;function p(){h=!0,b()}function b(){d-=1,_()}function _(){f&&!h&&d<n&&a.length<i&&(f(),f=null)}!async function(){try{for await(let t of s){if(h)return;if(o.aborted)throw new l;try{if(t=e(t,c),t===P)continue;t=O(t)}catch(e){t=A(e)}d+=1,k(t,b,p),a.push(t),u&&(u(),u=null),!h&&(a.length>=i||d>=n)&&await new R((e=>{f=e}))}a.push(M)}catch(e){const t=A(e);k(t,b,p),a.push(t)}finally{h=!0,u&&(u(),u=null)}}();try{for(;;){for(;a.length>0;){const e=await a[0];if(e===M)return;if(o.aborted)throw new l;e!==P&&(yield e),a.shift(),_()}await new R((e=>{u=e}))}}finally{h=!0,f&&(f(),f=null)}}.call(this)}async function C(e,t=void 0){for await(const r of I.call(this,e,t))return!0;return!1}function I(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return L.call(this,(async function(t,r){return await e(t,r)?t:P}),t)}class D extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function N(e){if(e=E(e),x(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:g((function(e=void 0){return null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=N(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;e--<=0&&(yield r)}}.call(this)},filter:I,flatMap:function(e,t){const r=L.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:L,take:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=N(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),m(e)&&!y(e))throw new i("stream",e,"must be writable");const r=b(this,e);return null!=t&&t.signal&&_(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await C.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of L.call(this,(async function(t,r){return await e(t,r),P}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&f(r,"options"),null!=(null==r?void 0:r.signal)&&c(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new l(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(e)),e}const a=new n,u=a.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this,[d]:!0};r.signal.addEventListener("abort",(()=>a.abort()),e)}let b=!1;try{for await(const n of this){var _;if(b=!0,null!=r&&null!==(_=r.signal)&&void 0!==_&&_.aborted)throw new l;s?t=await e(t,n,{signal:u}):(t=n,s=!0)}if(!b&&!s)throw new D}finally{a.abort()}return t},toArray:async function(e){null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l(void 0,{cause:e.signal.reason});w(t,n)}return t},some:C,find:async function(e,t){for await(const r of I.call(this,e,t))return r}}},(e,t,r)=>{const n=globalThis.AbortController||r(8).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:l}=r(14),{validateAbortSignal:c,validateInteger:u,validateObject:f}=r(49),h=r(6).Symbol("kWeak"),d=r(6).Symbol("kResistStopPropagation"),{finished:p}=r(30),b=r(166),{addAbortSignalNoValidate:_}=r(72),{isWritable:y,isNodeStream:m}=r(26),{deprecate:g}=r(19),{ArrayPrototypePush:w,Boolean:v,MathFloor:S,Number:E,NumberIsNaN:x,Promise:R,PromiseReject:A,PromiseResolve:O,PromisePrototypeThen:k,Symbol:T}=r(6),P=T("kEmpty"),M=T("kEof");function L(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=S(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=S(t.highWaterMark)),u(n,"options.concurrency",1),u(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(19).AbortSignalAny([null==t?void 0:t.signal].filter(v)),s=this,a=[],c={signal:o};let u,f,h=!1,d=0;function p(){h=!0,b()}function b(){d-=1,_()}function _(){f&&!h&&d<n&&a.length<i&&(f(),f=null)}!async function(){try{for await(let t of s){if(h)return;if(o.aborted)throw new l;try{if(t=e(t,c),t===P)continue;t=O(t)}catch(e){t=A(e)}d+=1,k(t,b,p),a.push(t),u&&(u(),u=null),!h&&(a.length>=i||d>=n)&&await new R((e=>{f=e}))}a.push(M)}catch(e){const t=A(e);k(t,b,p),a.push(t)}finally{h=!0,u&&(u(),u=null)}}();try{for(;;){for(;a.length>0;){const e=await a[0];if(e===M)return;if(o.aborted)throw new l;e!==P&&(yield e),a.shift(),_()}await new R((e=>{u=e}))}}finally{h=!0,f&&(f(),f=null)}}.call(this)}async function C(e,t=void 0){for await(const r of I.call(this,e,t))return!0;return!1}function I(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return L.call(this,(async function(t,r){return await e(t,r)?t:P}),t)}class D extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function N(e){if(e=E(e),x(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:g((function(e=void 0){return null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=N(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;e--<=0&&(yield r)}}.call(this)},filter:I,flatMap:function(e,t){const r=L.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:L,take:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=N(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),m(e)&&!y(e))throw new i("stream",e,"must be writable");const r=b(this,e);return null!=t&&t.signal&&_(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await C.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of L.call(this,(async function(t,r){return await e(t,r),P}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&f(r,"options"),null!=(null==r?void 0:r.signal)&&c(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new l(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(e)),e}const a=new n,u=a.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this,[d]:!0};r.signal.addEventListener("abort",(()=>a.abort()),e)}let b=!1;try{for await(const n of this){var _;if(b=!0,null!=r&&null!==(_=r.signal)&&void 0!==_&&_.aborted)throw new l;s?t=await e(t,n,{signal:u}):(t=n,s=!0)}if(!b&&!s)throw new D}finally{a.abort()}return t},toArray:async function(e){null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l(void 0,{cause:e.signal.reason});w(t,n)}return t},some:C,find:async function(e,t){for await(const r of I.call(this,e,t))return r}}},(e,t,r)=>{const n=globalThis.AbortController||r(8).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:l}=r(15),{validateAbortSignal:c,validateInteger:u,validateObject:f}=r(50),h=r(7).Symbol("kWeak"),d=r(7).Symbol("kResistStopPropagation"),{finished:p}=r(31),b=r(172),{addAbortSignalNoValidate:_}=r(75),{isWritable:y,isNodeStream:m}=r(27),{deprecate:g}=r(20),{ArrayPrototypePush:w,Boolean:v,MathFloor:S,Number:E,NumberIsNaN:x,Promise:R,PromiseReject:A,PromiseResolve:O,PromisePrototypeThen:k,Symbol:T}=r(7),P=T("kEmpty"),M=T("kEof");function L(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=S(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=S(t.highWaterMark)),u(n,"options.concurrency",1),u(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(20).AbortSignalAny([null==t?void 0:t.signal].filter(v)),s=this,a=[],c={signal:o};let u,f,h=!1,d=0;function p(){h=!0,b()}function b(){d-=1,_()}function _(){f&&!h&&d<n&&a.length<i&&(f(),f=null)}!async function(){try{for await(let t of s){if(h)return;if(o.aborted)throw new l;try{if(t=e(t,c),t===P)continue;t=O(t)}catch(e){t=A(e)}d+=1,k(t,b,p),a.push(t),u&&(u(),u=null),!h&&(a.length>=i||d>=n)&&await new R((e=>{f=e}))}a.push(M)}catch(e){const t=A(e);k(t,b,p),a.push(t)}finally{h=!0,u&&(u(),u=null)}}();try{for(;;){for(;a.length>0;){const e=await a[0];if(e===M)return;if(o.aborted)throw new l;e!==P&&(yield e),a.shift(),_()}await new R((e=>{u=e}))}}finally{h=!0,f&&(f(),f=null)}}.call(this)}async function C(e,t=void 0){for await(const r of I.call(this,e,t))return!0;return!1}function I(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return L.call(this,(async function(t,r){return await e(t,r)?t:P}),t)}class D extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function N(e){if(e=E(e),x(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:g((function(e=void 0){return null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=N(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;e--<=0&&(yield r)}}.call(this)},filter:I,flatMap:function(e,t){const r=L.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:L,take:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=N(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),m(e)&&!y(e))throw new i("stream",e,"must be writable");const r=b(this,e);return null!=t&&t.signal&&_(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await C.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of L.call(this,(async function(t,r){return await e(t,r),P}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&f(r,"options"),null!=(null==r?void 0:r.signal)&&c(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new l(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(e)),e}const a=new n,u=a.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this,[d]:!0};r.signal.addEventListener("abort",(()=>a.abort()),e)}let b=!1;try{for await(const n of this){var _;if(b=!0,null!=r&&null!==(_=r.signal)&&void 0!==_&&_.aborted)throw new l;s?t=await e(t,n,{signal:u}):(t=n,s=!0)}if(!b&&!s)throw new D}finally{a.abort()}return t},toArray:async function(e){null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l(void 0,{cause:e.signal.reason});w(t,n)}return t},some:C,find:async function(e,t){for await(const r of I.call(this,e,t))return r}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assertValidPattern=void 0;t.assertValidPattern=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseClass=void 0;const r={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},n=e=>e.replace(/[[\]\\-]/g,"\\$&"),i=e=>e.join("");t.parseClass=(e,t)=>{const o=t;if("["!==e.charAt(o))throw new Error("not in a brace expression");const s=[],a=[];let l=o+1,c=!1,u=!1,f=!1,h=!1,d=o,p="";e:for(;l<e.length;){const t=e.charAt(l);if("!"!==t&&"^"!==t||l!==o+1){if("]"===t&&c&&!f){d=l+1;break}if(c=!0,"\\"!==t||f){if("["===t&&!f)for(const[t,[n,i,c]]of Object.entries(r))if(e.startsWith(t,l)){if(p)return["$.",!1,e.length-o,!0];l+=t.length,c?a.push(n):s.push(n),u=u||i;continue e}f=!1,p?(t>p?s.push(n(p)+"-"+n(t)):t===p&&s.push(n(t)),p="",l++):e.startsWith("-]",l+1)?(s.push(n(t+"-")),l+=2):e.startsWith("-",l+1)?(p=t,l+=2):(s.push(n(t)),l++)}else f=!0,l++}else h=!0,l++}if(d<l)return["",!1,0,!1];if(!s.length&&!a.length)return["$.",!1,e.length-o,!0];if(0===a.length&&1===s.length&&/^\\?.$/.test(s[0])&&!h){const e=2===s[0].length?s[0].slice(-1):s[0];return[(b=e,b.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,d-o,!1]}var b;const _="["+(h?"^":"")+i(s)+"]",y="["+(h?"":"^")+i(a)+"]";return[s.length&&a.length?"("+_+"|"+y+")":s.length?_:y,u,d-o,!0]}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobStream=t.GlobWalker=t.GlobUtil=void 0;const n=r(79),i=r(381),o=r(382);class s{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#ot=[];#st;#at;signal;maxDepth;constructor(e,t,r){this.patterns=e,this.path=t,this.opts=r,this.#at=r.posix||"win32"!==r.platform?"/":"\\",r.ignore&&(this.#st=((e,t)=>"string"==typeof e?new i.Ignore([e],t):Array.isArray(e)?new i.Ignore(e,t):e)(r.ignore,r)),this.maxDepth=r.maxDepth||1/0,r.signal&&(this.signal=r.signal,this.signal.addEventListener("abort",(()=>{this.#ot.length=0})))}#lt(e){return this.seen.has(e)||!!this.#st?.ignored?.(e)}#ct(e){return!!this.#st?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;let e;for(this.paused=!1;!this.paused&&(e=this.#ot.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#ot.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||await e.realpath(),!r)return;e=r}const n=e.isUnknown()||this.opts.stat;return this.matchCheckTest(n?await e.lstat():e,t)}matchCheckTest(e,t){return!e||!(this.maxDepth===1/0||e.depth()<=this.maxDepth)||t&&!e.canReaddir()||this.opts.nodir&&e.isDirectory()||this.#lt(e)?void 0:e}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||e.realpathSync(),!r)return;e=r}const n=e.isUnknown()||this.opts.stat;return this.matchCheckTest(n?e.lstatSync():e,t)}matchFinish(e,t){if(this.#lt(e))return;const r=void 0===this.opts.absolute?t:this.opts.absolute;this.seen.add(e);const n=this.opts.mark&&e.isDirectory()?this.#at:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(r){const t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+n)}else{const t=this.opts.posix?e.relativePosix():e.relative(),r=this.opts.dotRelative&&!t.startsWith(".."+this.#at)?"."+this.#at:"";this.matchEmit(t?r+t+n:"."+n)}}async match(e,t,r){const n=await this.matchCheck(e,r);n&&this.matchFinish(n,t)}matchSync(e,t,r){const n=this.matchCheckSync(e,r);n&&this.matchFinish(n,t)}walkCB(e,t,r){this.signal?.aborted&&r(),this.walkCB2(e,t,new o.Processor(this.opts),r)}walkCB2(e,t,r,n){if(this.#ct(e))return n();if(this.signal?.aborted&&n(),this.paused)return void this.onResume((()=>this.walkCB2(e,t,r,n)));r.processPatterns(e,t);let i=1;const o=()=>{0==--i&&n()};for(const[e,t,n]of r.matches.entries())this.#lt(e)||(i++,this.match(e,t,n).then((()=>o())));for(const e of r.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;const t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,r,o):e.readdirCB(((t,n)=>this.walkCB3(e,n,r,o)),!0)}o()}walkCB3(e,t,r,n){r=r.filterEntries(e,t);let i=1;const o=()=>{0==--i&&n()};for(const[e,t,n]of r.matches.entries())this.#lt(e)||(i++,this.match(e,t,n).then((()=>o())));for(const[e,t]of r.subwalks.entries())i++,this.walkCB2(e,t,r.child(),o);o()}walkCBSync(e,t,r){this.signal?.aborted&&r(),this.walkCB2Sync(e,t,new o.Processor(this.opts),r)}walkCB2Sync(e,t,r,n){if(this.#ct(e))return n();if(this.signal?.aborted&&n(),this.paused)return void this.onResume((()=>this.walkCB2Sync(e,t,r,n)));r.processPatterns(e,t);let i=1;const o=()=>{0==--i&&n()};for(const[e,t,n]of r.matches.entries())this.#lt(e)||this.matchSync(e,t,n);for(const e of r.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;const t=e.readdirSync();this.walkCB3Sync(e,t,r,o)}o()}walkCB3Sync(e,t,r,n){r=r.filterEntries(e,t);let i=1;const o=()=>{0==--i&&n()};for(const[e,t,n]of r.matches.entries())this.#lt(e)||this.matchSync(e,t,n);for(const[e,t]of r.subwalks.entries())i++,this.walkCB2Sync(e,t,r.child(),o);o()}}t.GlobUtil=s;t.GlobWalker=class extends s{matches;constructor(e,t,r){super(e,t,r),this.matches=new Set}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise(((e,t)=>{this.walkCB(this.path,this.patterns,(()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)}))})),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,(()=>{if(this.signal?.aborted)throw this.signal.reason})),this.matches}};t.GlobStream=class extends s{results;constructor(e,t,r){super(e,t,r),this.results=new n.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",(()=>this.resume())),this.results.on("resume",(()=>this.resume()))}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){const e=this.path;return e.isUnknown()?e.lstat().then((()=>{this.walkCB(e,this.patterns,(()=>this.results.end()))})):this.walkCB(e,this.patterns,(()=>this.results.end())),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,(()=>this.results.end())),this.results}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Ignore=void 0;const n=r(38),i=r(313),o="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";t.Ignore=class{relative;relativeChildren;absolute;absoluteChildren;constructor(e,{nobrace:t,nocase:r,noext:s,noglobstar:a,platform:l=o}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[];const c={dot:!0,nobrace:t,nocase:r,noext:s,noglobstar:a,optimizationLevel:2,platform:l,nocomment:!0,nonegate:!0};for(const t of e){const e=new n.Minimatch(t,c);for(let t=0;t<e.set.length;t++){const r=e.set[t],o=e.globParts[t];if(!r||!o)throw new Error("invalid pattern object");const s=new i.Pattern(r,o,0,l),a=new n.Minimatch(s.globString(),c),u="**"===o[o.length-1],f=s.isAbsolute();f?this.absolute.push(a):this.relative.push(a),u&&(f?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}}ignored(e){const t=e.fullpath(),r=`${t}/`,n=e.relative()||".",i=`${n}/`;for(const e of this.relative)if(e.match(n)||e.match(i))return!0;for(const e of this.absolute)if(e.match(t)||e.match(r))return!0;return!1}childrenIgnored(e){const t=e.fullpath()+"/",r=(e.relative()||".")+"/";for(const e of this.relativeChildren)if(e.match(r))return!0;for(const e of this.absoluteChildren)if(e.match(t))return!0;return!1}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Processor=t.SubWalks=t.MatchRecord=t.HasWalkedCache=void 0;const n=r(38);class i{store;constructor(e=new Map){this.store=e}copy(){return new i(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){const r=e.fullpath(),n=this.store.get(r);n?n.add(t.globString()):this.store.set(r,new Set([t.globString()]))}}t.HasWalkedCache=i;class o{store=new Map;add(e,t,r){const n=(t?2:0)|(r?1:0),i=this.store.get(e);this.store.set(e,void 0===i?n:n&i)}entries(){return[...this.store.entries()].map((([e,t])=>[e,!!(2&t),!!(1&t)]))}}t.MatchRecord=o;class s{store=new Map;add(e,t){if(!e.canReaddir())return;const r=this.store.get(e);r?r.find((e=>e.globString()===t.globString()))||r.push(t):this.store.set(e,[t])}get(e){const t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map((e=>[e,this.store.get(e)]))}keys(){return[...this.store.keys()].filter((e=>e.canReaddir()))}}t.SubWalks=s;class a{hasWalkedCache;matches=new o;subwalks=new s;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new i}processPatterns(e,t){this.patterns=t;const r=t.map((t=>[e,t]));for(let[e,t]of r){this.hasWalkedCache.storeWalked(e,t);const r=t.root(),i=t.isAbsolute()&&!1!==this.opts.absolute;if(r){e=e.resolve("/"===r&&void 0!==this.opts.root?this.opts.root:r);const n=t.rest();if(!n){this.matches.add(e,!0,!1);continue}t=n}if(e.isENOENT())continue;let o,s,a=!1;for(;"string"==typeof(o=t.pattern())&&(s=t.rest());){const r=e.resolve(o);e=r,t=s,a=!0}if(o=t.pattern(),s=t.rest(),a){if(this.hasWalkedCache.hasWalked(e,t))continue;this.hasWalkedCache.storeWalked(e,t)}if("string"!=typeof o)if(o===n.GLOBSTAR){(!e.isSymbolicLink()||this.follow||t.checkFollowGlobstar())&&this.subwalks.add(e,t);const r=s?.pattern(),n=s?.rest();if(s&&(""!==r&&"."!==r||n)){if(".."===r){const t=e.parent||e;n?this.hasWalkedCache.hasWalked(t,n)||this.subwalks.add(t,n):this.matches.add(t,i,!0)}}else this.matches.add(e,i,""===r||"."===r)}else o instanceof RegExp&&this.subwalks.add(e,t);else{const t=".."===o||""===o||"."===o;this.matches.add(e.resolve(o),i,t)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new a(this.opts,this.hasWalkedCache)}filterEntries(e,t){const r=this.subwalks.get(e),i=this.child();for(const e of t)for(const t of r){const r=t.isAbsolute(),o=t.pattern(),s=t.rest();o===n.GLOBSTAR?i.testGlobstar(e,t,s,r):o instanceof RegExp?i.testRegExp(e,o,s,r):i.testString(e,o,s,r)}return i}testGlobstar(e,t,r,n){if(!this.dot&&e.name.startsWith(".")||(t.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(r&&t.checkFollowGlobstar()?this.subwalks.add(e,r):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),r){const t=r.pattern();if("string"==typeof t&&".."!==t&&""!==t&&"."!==t)this.testString(e,t,r.rest(),n);else if(".."===t){const t=e.parent||e;this.subwalks.add(t,r)}else t instanceof RegExp&&this.testRegExp(e,t,r.rest(),n)}}testRegExp(e,t,r,n){t.test(e.name)&&(r?this.subwalks.add(e,r):this.matches.add(e,n,!1))}testString(e,t,r,n){e.isNamed(t)&&(r?this.subwalks.add(e,r):this.matches.add(e,n,!1))}}t.Processor=a},(e,t,r)=>{t.extract=r(315),t.pack=r(324)},e=>{e.exports=require("child_process")},e=>{e.exports=require("node:os")},(e,t,r)=>{r(107),r(328),t.Extract=r(329),r(347)},(e,t,r)=>{const n=r(11),{checkPath:i}=r(388),o=e=>"number"==typeof e?e:{mode:511,...e}.mode;e.exports.makeDir=async(e,t)=>(i(e),n.mkdir(e,{mode:o(t),recursive:!0})),e.exports.makeDirSync=(e,t)=>(i(e),n.mkdirSync(e,{mode:o(t),recursive:!0}))},(e,t,r)=>{const n=r(3);e.exports.checkPath=function(e){if("win32"===process.platform){if(/[<>:"|?*]/.test(e.replace(n.parse(e).root,""))){const t=new Error(`Path contains invalid characters: ${e}`);throw t.code="EINVAL",t}}}},(e,t,r)=>{function n(e,t,r){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=r}r.d(t,{GetObjectCommand:()=>ki,HeadObjectCommand:()=>Ii});const i="WHEN_SUPPORTED",o="WHEN_REQUIRED",s="WHEN_SUPPORTED",a="WHEN_REQUIRED";var l,c;!function(e){e.MD5="MD5",e.CRC32="CRC32",e.CRC32C="CRC32C",e.CRC64NVME="CRC64NVME",e.SHA1="SHA1",e.SHA256="SHA256"}(l||(l={})),function(e){e.HEADER="header",e.TRAILER="trailer"}(c||(c={}));const u=l.CRC32,f={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0};class h{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new h({...e,headers:{...e.headers}});var r;return t.query&&(t.query=(r=t.query,Object.keys(r).reduce(((e,t)=>{const n=r[t];return{...e,[t]:Array.isArray(n)?[...n]:n}}),{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return h.clone(this)}}class d{allocByteArray;byteLength=0;byteArrays=[];constructor(e){this.allocByteArray=e}push(e){this.byteArrays.push(e),this.byteLength+=e.byteLength}flush(){if(1===this.byteArrays.length){const e=this.byteArrays[0];return this.reset(),e}const e=this.allocByteArray(this.byteLength);let t=0;for(let r=0;r<this.byteArrays.length;++r){const n=this.byteArrays[r];e.set(n,t),t+=n.byteLength}return this.reset(),e}reset(){this.byteArrays=[],this.byteLength=0}}const p=function(e,t,r){const n=e.getReader();let i=!1,o=0;const s=["",new d((e=>new Uint8Array(e)))];let a=-1;const l=async e=>{const{value:c,done:u}=await n.read(),f=c;if(u){if(-1!==a){const t=b(s,a);_(t)>0&&e.enqueue(t)}e.close()}else{const n=function(e,t=!0){if(t&&"undefined"!=typeof Buffer&&e instanceof Buffer)return 2;if(e instanceof Uint8Array)return 1;if("string"==typeof e)return 0;return-1}(f,!1);if(a!==n&&(a>=0&&e.enqueue(b(s,a)),a=n),-1===a)return void e.enqueue(f);const c=_(f);o+=c;const u=_(s[a]);if(c>=t&&0===u)e.enqueue(f);else{const n=function(e,t,r){switch(t){case 0:return e[0]+=r,_(e[0]);case 1:case 2:return e[t].push(r),_(e[t])}}(s,a,f);!i&&o>2*t&&(i=!0,r?.warn(`@smithy/util-stream - stream chunk size ${c} is below threshold of ${t}, automatically buffering.`)),n>=t?e.enqueue(b(s,a)):await l(e)}}};return new ReadableStream({pull:l})};function b(e,t){switch(t){case 0:const r=e[0];return e[0]="",r;case 1:case 2:return e[t].flush()}throw new Error(`@smithy/util-stream - invalid index ${t} given to flush()`)}function _(e){return e?.byteLength??e?.length??0}const y=e=>e===l.MD5?"content-md5":`x-amz-checksum-${e.toLowerCase()}`,m=e=>{return!(void 0===e||"string"==typeof e||ArrayBuffer.isView(e)||(t=e,"function"==typeof ArrayBuffer&&t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)));var t};function g(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))}function w(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}Object.create;function v(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var S="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function E(e){return e instanceof Uint8Array?e:"string"==typeof e?S(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function x(e){return"string"==typeof e?0===e.length:0===e.byteLength}function R(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}function A(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}var O=function(){function e(){this.crc32c=new k}return e.prototype.update=function(e){x(e)||this.crc32c.update(E(e))},e.prototype.digest=function(){return g(this,void 0,void 0,(function(){return w(this,(function(e){return[2,R(this.crc32c.digest())]}))}))},e.prototype.reset=function(){this.crc32c=new k},e}();var k=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,r;try{for(var n=v(e),i=n.next();!i.done;i=n.next()){var o=i.value;this.checksum=this.checksum>>>8^T[255&(this.checksum^o)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),T=A([0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697]);let P,M,L,C,I,D,N,j,F;const W=()=>{P||(P=(()=>{const e=new Array(8);for(let t=0;t<8;t++){const r=new Array(512);for(let e=0;e<256;e++){let n=BigInt(e);for(let e=0;e<8*(t+1);e++)1n&n?n=n>>1n^0x9a6c9329ac4bc9b5n:n>>=1n;r[2*e]=Number(n>>32n&0xffffffffn),r[2*e+1]=Number(0xffffffffn&n)}e[t]=new Uint32Array(r)}return e})(),[M,L,C,I,D,N,j,F]=P)};class B{c1=0;c2=0;constructor(){W(),this.reset()}update(e){const t=e.length;let r=0,n=this.c1,i=this.c2;for(;r+8<=t;){const t=(255&(i^e[r++]))<<1,o=(255&(i>>>8^e[r++]))<<1,s=(255&(i>>>16^e[r++]))<<1,a=(255&(i>>>24^e[r++]))<<1,l=(255&(n^e[r++]))<<1,c=(255&(n>>>8^e[r++]))<<1,u=(255&(n>>>16^e[r++]))<<1,f=(255&(n>>>24^e[r++]))<<1;n=F[t]^j[o]^N[s]^D[a]^I[l]^C[c]^L[u]^M[f],i=F[t+1]^j[o+1]^N[s+1]^D[a+1]^I[l+1]^C[c+1]^L[u+1]^M[f+1]}for(;r<t;){const t=(255&(i^e[r]))<<1;i=(i>>>8|(255&n)<<24)>>>0,n=n>>>8^M[t],i^=M[t+1],r++}this.c1=n,this.c2=i}async digest(){const e=4294967295^this.c1,t=4294967295^this.c2;return new Uint8Array([e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t])}reset(){this.c1=4294967295,this.c2=4294967295}}const U=null;var $=function(){function e(){this.crc32=new z}return e.prototype.update=function(e){x(e)||this.crc32.update(E(e))},e.prototype.digest=function(){return g(this,void 0,void 0,(function(){return w(this,(function(e){return[2,R(this.crc32.digest())]}))}))},e.prototype.reset=function(){this.crc32=new z},e}();var z=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,r;try{for(var n=v(e),i=n.next();!i.done;i=n.next()){var o=i.value;this.checksum=this.checksum>>>8^G[255&(this.checksum^o)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),G=A([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);const H=[l.CRC32,l.CRC32C,l.CRC64NVME,l.SHA1,l.SHA256],V=[l.SHA256,l.SHA1,l.CRC32,l.CRC32C,l.CRC64NVME],q=(e,t)=>{const{checksumAlgorithms:r={}}=t;switch(e){case l.MD5:return r?.MD5??t.md5;case l.CRC32:return r?.CRC32??$;case l.CRC32C:return r?.CRC32C??O;case l.CRC64NVME:return"function"!=typeof U?r?.CRC64NVME??B:r?.CRC64NVME??U;case l.SHA1:return r?.SHA1??t.sha1;case l.SHA256:return r?.SHA256??t.sha256;default:if(r?.[e])return r[e];throw new Error(`The checksum algorithm "${e}" is not supported by the client. Select one of ${H}, or provide an implementation to the client constructor checksums field.`)}},K=e=>(new TextEncoder).encode(e),Y=(e,t)=>{const r=new e;var n;return r.update("string"==typeof(n=t||"")?K(n):ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(n)),r.digest()},Z={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},Q=(e,t)=>(r,o)=>async s=>{if(!h.isInstance(s.request))return r(s);if(((e,t)=>{const r=e.toLowerCase();for(const e of Object.keys(t))if(e.toLowerCase().startsWith(r))return!0;return!1})("x-amz-checksum-",s.request.headers))return r(s);const{request:a,input:c}=s,{body:f,headers:d}=a,{base64Encoder:b,streamHasher:_}=e,{requestChecksumRequired:g,requestAlgorithmMember:w}=t,v=await e.requestChecksumCalculation(),S=w?.name,E=w?.httpHeader;S&&!c[S]&&(v===i||g)&&(c[S]=u,E&&(d[E]=u));const x=((e,{requestChecksumRequired:t,requestAlgorithmMember:r,requestChecksumCalculation:n})=>{if(!r)return n===i||t?u:void 0;if(!e[r])return;return e[r]})(c,{requestChecksumRequired:g,requestAlgorithmMember:w?.name,requestChecksumCalculation:v});let R=f,A=d;if(x){switch(x){case l.CRC32:n(o,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case l.CRC32C:n(o,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case l.CRC64NVME:n(o,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case l.SHA1:n(o,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case l.SHA256:n(o,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y")}const t=y(x),r=q(x,e);if(m(f)){const{getAwsChunkedEncodingStream:n,bodyLengthChecker:i}=e;R=n("number"==typeof e.requestStreamBufferSize&&e.requestStreamBufferSize>=8192?p(f,e.requestStreamBufferSize,o.logger):f,{base64Encoder:b,bodyLengthChecker:i,checksumLocationName:t,checksumAlgorithmFn:r,streamHasher:_}),A={...d,"content-encoding":d["content-encoding"]?`${d["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":d["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":t},delete A["content-length"]}else if(!((e,t)=>{const r=e.toLowerCase();for(const e of Object.keys(t))if(r===e.toLowerCase())return!0;return!1})(t,d)){const e=await Y(r,f);A={...d,[t]:b(e)}}}try{return await r({...s,request:{...a,headers:A,body:R}})}catch(e){if(e instanceof Error&&"InvalidChunkSizeError"===e.name)try{e.message.endsWith(".")||(e.message+="."),e.message+=" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."}catch(e){}throw e}},X=(e=[])=>{const t=[];let r=V.length;for(const n of e){const e=V.indexOf(n);-1!==e?t[e]=n:t[r++]=n}return t.filter(Boolean)},J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ee=(Object.entries(J).reduce(((e,[t,r])=>(e[r]=Number(t),e)),{}),J.split(""));function te(e){let t;t="string"==typeof e?K(e):e;const r="object"==typeof t&&"number"==typeof t.length,n="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let r=0,n=0;for(let i=e,o=Math.min(e+3,t.length);i<o;i++)r|=t[i]<<8*(o-i-1),n+=8;const o=Math.ceil(n/6);r<<=6*o-n;for(let e=1;e<=o;e++){const t=6*(o-e);i+=ee[(r&63<<t)>>t]}i+="==".slice(0,4-o)}return i}const re="function"==typeof ReadableStream?ReadableStream:function(){};class ne extends re{}const ie=({expectedChecksum:e,checksum:t,source:r,checksumSourceLocation:n,base64Encoder:i})=>{if(o=r,"function"!=typeof ReadableStream||!(o?.constructor?.name===ReadableStream.name||o instanceof ReadableStream))throw new Error(`@smithy/util-stream: unsupported source type ${r?.constructor?.name??r} in ChecksumStream.`);var o;const s=i??te;if("function"!=typeof TransformStream)throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const a=new TransformStream({start(){},async transform(e,r){t.update(e),r.enqueue(e)},async flush(r){const i=await t.digest(),o=s(i);if(e!==o){const t=new Error(`Checksum mismatch: expected "${e}" but received "${o}" in response header "${n}".`);r.error(t)}else r.terminate()}});r.pipeThrough(a);const l=a.readable;return Object.setPrototypeOf(l,ne.prototype),l},oe=async(e,{checksumAlgorithmFn:t,base64Encoder:r})=>r(await Y(t,e)),se={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},ae=(e,t)=>(r,n)=>async i=>{if(!h.isInstance(i.request))return r(i);const o=i.input,s=await r(i),a=s.response,{requestValidationModeMember:c,responseAlgorithms:u}=t;if(c&&"ENABLED"===o[c]){const{clientName:t,commandName:r}=n,i=Object.keys(e.checksumAlgorithms??{}).filter((e=>{const t=y(e);return void 0!==a.headers[t]})),o=X([...u??[],...i]);if("S3Client"===t&&"GetObjectCommand"===r&&o.every((e=>{const t=y(e),r=a.headers[t];return!r||(e=>{const t=e.lastIndexOf("-");if(-1!==t){const r=e.slice(t+1);if(!r.startsWith("0")){const e=parseInt(r,10);if(!isNaN(e)&&e>=1&&e<=1e4)return!0}}return!1})(r)})))return s;await(async(e,{config:t,responseAlgorithms:r,logger:n})=>{const i=X(r),{body:o,headers:s}=e;for(const r of i){const i=y(r),a=s[i];if(a){let s;try{s=q(r,t)}catch(e){if(r===l.CRC64NVME){n?.warn(`Skipping ${l.CRC64NVME} checksum validation: ${e.message}`);continue}throw e}const{base64Encoder:c}=t;if(m(o))return void(e.body=ie({expectedChecksum:a,checksumSourceLocation:i,checksum:new s,source:o,base64Encoder:c}));const u=await oe(o,{checksumAlgorithmFn:s,base64Encoder:c});if(u===a)break;throw new Error(`Checksum mismatch: expected "${u}" but received "${a}" in response header "${i}".`)}}})(a,{config:e,responseAlgorithms:o,logger:n.logger})}return s},le=(e,t)=>({applyToStack:r=>{r.add(Q(e,t),Z),r.addRelativeTo(((e,t)=>(r,l)=>async c=>{const u=c.input,{requestValidationModeMember:f}=t,h=await e.requestChecksumCalculation(),d=await e.responseChecksumValidation();switch(h){case o:n(l,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case i:n(l,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z")}switch(d){case a:n(l,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case s:n(l,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b")}return f&&!u[f]&&d===s&&(u[f]="ENABLED"),r(c)})(e,t),f),r.addRelativeTo(ae(e,t),se)}});class ce{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const ue=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&Se.warn(ve(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},fe=Math.ceil(2**127*(2-2**-23)),he=e=>{const t=ue(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>fe)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},de=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},pe=e=>_e(e,16),be=e=>_e(e,8),_e=(e,t)=>{const r=de(e);if(void 0!==r&&ye(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},ye=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},me=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,ge=e=>{const t=e.match(me);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},we=e=>pe("string"==typeof e?ge(e):e),ve=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),Se={warn:console.warn};const Ee=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];const xe=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Re=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Ae=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),Oe=(e,t,r,n)=>{const i=t-1;return Le(e,i,r),new Date(Date.UTC(e,i,r,Ie(n.hours,"hour",0,23),Ie(n.minutes,"minute",0,59),Ie(n.seconds,"seconds",0,60),De(n.fractionalMilliseconds)))},ke=e=>{const t=(new Date).getUTCFullYear(),r=100*Math.floor(t/100)+we(Ne(e));return r<t?r+100:r},Te=e=>e.getTime()-(new Date).getTime()>15768e8?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,Pe=e=>{const t=Ee.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Me=[31,28,31,30,31,30,31,31,30,31,30,31],Le=(e,t,r)=>{let n=Me[t];if(1===t&&Ce(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${Ee[t]} in ${e}: ${r}`)},Ce=e=>e%4==0&&(e%100!=0||e%400==0),Ie=(e,t,r,n)=>{const i=(e=>be("string"==typeof e?ge(e):e))(Ne(e));if(i<r||i>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return i},De=e=>null==e?0:1e3*(e=>he("string"==typeof e?ge(e):e))("0."+e),Ne=e=>{let t=0;for(;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)},je=e=>(e,t)=>async r=>{const n=await e(r),{response:i}=n;if(ce.isInstance(i)&&i.headers.expires){i.headers.expiresstring=i.headers.expires;try{(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=xe.exec(e);if(t){const[e,r,n,i,o,s,a,l]=t;return Oe(we(Ne(i)),Pe(n),Ie(r,"day",1,31),{hours:o,minutes:s,seconds:a,fractionalMilliseconds:l})}if(t=Re.exec(e),t){const[e,r,n,i,o,s,a,l]=t;return Te(Oe(ke(i),Pe(n),Ie(r,"day",1,31),{hours:o,minutes:s,seconds:a,fractionalMilliseconds:l}))}if(t=Ae.exec(e),t){const[e,r,n,i,o,s,a,l]=t;return Oe(we(Ne(l)),Pe(r),Ie(n.trimLeft(),"day",1,31),{hours:i,minutes:o,seconds:s,fractionalMilliseconds:a})}throw new TypeError("Invalid RFC-7231 date-time value")})(i.headers.expires)}catch(e){t.logger?.warn(`AWS SDK Warning for ${t.clientName}::${t.commandName} response parsing (${i.headers.expires}): ${e}`),delete i.headers.expires}}return n},Fe={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},We=e=>({applyToStack:e=>{e.addRelativeTo(je(),Fe)}});const Be={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},Ue=e=>({applyToStack:t=>{var r;t.add((r=e,e=>async t=>{const n={...t.input},i=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const e of i){const t=n[e.target];if(t){let i;"string"==typeof t?$e(t,r)?i=r.base64Decoder(t):(i=r.utf8Decoder(t),n[e.target]=r.base64Encoder(i)):(i=ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t),n[e.target]=r.base64Encoder(i));const o=new r.md5;o.update(i),n[e.hash]=r.base64Encoder(await o.digest())}}return e({...t,input:n})}),Be)}});function $e(e,t){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e))return!1;try{return 32===t.base64Decoder(e).length}catch{return!1}}const ze={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};const Ge="__smithy_context",He=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Ve=/(\d+\.){3}\d+/,qe=/\.\./,Ke=e=>He.test(e)&&!Ve.test(e)&&!qe.test(e),Ye=e=>{const[t,r,n,,,i]=e.split(":"),o="arn"===t&&e.split(":").length>=6,s=Boolean(o&&r&&n&&i);if(o&&!s)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return s},Ze=(e,t,r,n=!1)=>{const i=async()=>{let i;if(n){const n=r.clientContextParams,o=n?.[e];i=o??r[e]??r[t]}else i=r[e]??r[t];return"function"==typeof i?i():i};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof r.credentials?await r.credentials():r.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof r.credentials?await r.credentials():r.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===r.isCustomEndpoint)return;const e=await i();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:r,port:n,path:i}=e;return`${t}//${r}${n?":"+n:""}${i}`}}return e}:i};const Qe=e=>{if("string"==typeof e)return Qe(new URL(e));const{hostname:t,pathname:r,port:n,protocol:i,search:o}=e;let s;return o&&(s=function(e){const t={};if(e=e.replace(/^\?/,""))for(const r of e.split("&")){let[e,n=null]=r.split("=");e=decodeURIComponent(e),n&&(n=decodeURIComponent(n)),e in t?Array.isArray(t[e])?t[e].push(n):t[e]=[t[e],n]:t[e]=n}return t}(o)),{hostname:t,port:n?parseInt(n):void 0,protocol:i,path:r,query:s}},Xe=async(e,t,r,n)=>{if(!r.isCustomEndpoint){let e;e=r.serviceConfiguredEndpoint?await r.serviceConfiguredEndpoint():await(async()=>{})(r.serviceId),e&&(r.endpoint=()=>Promise.resolve((e=>{if("object"==typeof e){if("url"in e){const t=Qe(e.url);if(e.headers){t.headers={};for(const[r,n]of Object.entries(e.headers))t.headers[r.toLowerCase()]=n.join(", ")}return t}return e}return Qe(e)})(e)),r.isCustomEndpoint=!0)}const i=await Je(e,t,r);if("function"!=typeof r.endpointProvider)throw new Error("config.endpointProvider is not set.");const o=r.endpointProvider(i,n);if(r.isCustomEndpoint&&r.endpoint){const e=await r.endpoint();if(e?.headers){o.headers??={};for(const[t,r]of Object.entries(e.headers))o.headers[t]=Array.isArray(r)?r:[r]}}return o},Je=async(e,t,r)=>{const n={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,o]of Object.entries(i))switch(o.type){case"staticContextParams":n[t]=o.value;break;case"contextParams":n[t]=e[o.name];break;case"clientContextParams":case"builtInParams":n[t]=await Ze(o.name,t,r,"builtInParams"!==o.type)();break;case"operationContextParams":n[t]=o.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return 0===Object.keys(i).length&&Object.assign(n,r),"s3"===String(r.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Ye(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Ke(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(n),n},et=({config:e,instructions:t})=>(r,n)=>async i=>{e.isCustomEndpoint&&function(e,t,r){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=r}(n,"ENDPOINT_OVERRIDE","N");const o=await Xe(i.input,{getEndpointParameterInstructions:()=>t},{...e},n);n.endpointV2=o,n.authSchemes=o.properties?.authSchemes;const s=n.authSchemes?.[0];if(s){n.signing_region=s.signingRegion,n.signing_service=s.signingName;const e=(e=>e[Ge]||(e[Ge]={}))(n),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return r({...i})},tt={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:ze.name},rt=(e,t)=>({applyToStack:r=>{r.addRelativeTo(et({config:e,instructions:t}),tt)}}),nt=(e,t)=>{const r=[];if(e&&r.push(e),t)for(const e of t)r.push(e);return r},it=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,ot=()=>{let e=[],t=[],r=!1;const n=new Set,i=r=>(e.forEach((e=>{r.add(e.middleware,{...e})})),t.forEach((e=>{r.addRelativeTo(e.middleware,{...e})})),r.identifyOnResolve?.(a.identifyOnResolve()),r),o=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))})),t},s=(r=!1)=>{const n=[],i=[],s={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of nt(t.name,t.aliases))s[e]=t;n.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of nt(t.name,t.aliases))s[e]=t;i.push(t)})),i.forEach((e=>{if(e.toMiddleware){const t=s[e.toMiddleware];if(void 0===t){if(r)return;throw new Error(`${e.toMiddleware} is not found when adding ${it(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}));var a;return(a=n,a.sort(((e,t)=>st[t.step]-st[e.step]||at[t.priority||"normal"]-at[e.priority||"normal"]))).map(o).reduce(((e,t)=>(e.push(...t),e)),[])},a={add:(t,r={})=>{const{name:i,override:o,aliases:s}=r,a={step:"initialize",priority:"normal",middleware:t,...r},l=nt(i,s);if(l.length>0){if(l.some((e=>n.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${it(i,s)}'`);for(const t of l){const r=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===r)continue;const n=e[r];if(n.step!==a.step||a.priority!==n.priority)throw new Error(`"${it(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${it(i,s)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(r,1)}}for(const e of l)n.add(e)}e.push(a)},addRelativeTo:(e,r)=>{const{name:i,override:o,aliases:s}=r,a={middleware:e,...r},l=nt(i,s);if(l.length>0){if(l.some((e=>n.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${it(i,s)}'`);for(const e of l){const r=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===r)continue;const n=t[r];if(n.toMiddleware!==a.toMiddleware||n.relation!==a.relation)throw new Error(`"${it(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${it(i,s)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(r,1)}}for(const e of l)n.add(e)}t.push(a)},clone:()=>i(ot()),use:e=>{e.applyToStack(a)},remove:r=>"string"==typeof r?(r=>{let i=!1;const o=e=>{const t=nt(e.name,e.aliases);if(t.includes(r)){i=!0;for(const e of t)n.delete(e);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(r):(r=>{let i=!1;const o=e=>{if(e.middleware===r){i=!0;for(const t of nt(e.name,e.aliases))n.delete(t);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(r),removeByTag:r=>{let i=!1;const o=e=>{const{tags:t,name:o,aliases:s}=e;if(t&&t.includes(r)){const e=nt(o,s);for(const t of e)n.delete(t);return i=!0,!1}return!0};return e=e.filter(o),t=t.filter(o),i},concat:e=>{const t=i(ot());return t.use(e),t.identifyOnResolve(r||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>s(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return it(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(r=e),r),resolve:(e,t)=>{for(const r of s().map((e=>e.middleware)).reverse())e=r(e,t);return r&&console.log(a.identify()),e}};return a},st={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},at={high:3,normal:2,low:1},lt=e=>"function"==typeof e?e():e,ct=[];function ut(e){if("object"==typeof e)return e;if(ct[e|=0])return ct[e];const t={};let r=0;for(const n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])1==(e>>r++&1)&&(t[n]=1);return ct[e]=t}const ft=Symbol.for("@smithy/nor-struct-it"),ht=Symbol.for("@smithy/ns"),dt=[],pt={};class bt{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=bt.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,t){this.ref=e,this.memberName=t;const r=[];let n=e,i=e;for(this._isMemberSchema=!1;yt(n);)r.push(n[1]),n=n[0],i=lt(n),this._isMemberSchema=!0;if(r.length>0){this.memberTraits={};for(let e=r.length-1;e>=0;--e){const t=r[e];Object.assign(this.memberTraits,ut(t))}}else this.memberTraits=0;if(i instanceof bt){const e=this.memberTraits;return Object.assign(this,i),this.memberTraits=Object.assign({},e,i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,void(this.memberName=t??i.memberName)}if(this.schema=lt(i),mt(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(i),this.traits=0),this._isMemberSchema&&!t)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){const t=this.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===this.symbol}return t}static of(e){const t="function"==typeof e||"object"==typeof e&&null!==e;if("number"==typeof e){if(dt[e])return dt[e]}else if("string"==typeof e){if(pt[e])return pt[e]}else if(t&&e[ht])return e[ht];const r=lt(e);if(r instanceof bt)return r;if(yt(r)){const[t,n]=r;if(t instanceof bt)return Object.assign(t.getMergedTraits(),ut(n)),t;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}const n=new bt(r);return t?e[ht]=n:"string"==typeof r?pt[r]=n:"number"==typeof r?dt[r]=n:n}getSchema(){const e=this.schema;return Array.isArray(e)&&0===e[0]?e[4]:e}getName(e=!1){const{name:t}=this;return!e&&t&&t.includes("#")?t.split("#")[1]:t||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const e=this.getSchema();return"number"==typeof e?e>=64&&e<128:1===e[0]}isMapSchema(){const e=this.getSchema();return"number"==typeof e?e>=128&&e<=255:2===e[0]}isStructSchema(){const e=this.getSchema();if("object"!=typeof e)return!1;const t=e[0];return 3===t||-3===t||4===t}isUnionSchema(){const e=this.getSchema();return"object"==typeof e&&4===e[0]}isBlobSchema(){const e=this.getSchema();return 21===e||42===e}isTimestampSchema(){const e=this.getSchema();return"number"==typeof e&&e>=4&&e<=7}isUnitSchema(){return"unit"===this.getSchema()}isDocumentSchema(){return 15===this.getSchema()}isStringSchema(){return 0===this.getSchema()}isBooleanSchema(){return 2===this.getSchema()}isNumericSchema(){return 1===this.getSchema()}isBigIntegerSchema(){return 17===this.getSchema()}isBigDecimalSchema(){return 19===this.getSchema()}isStreaming(){const{streaming:e}=this.getMergedTraits();return!!e||42===this.getSchema()}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return ut(this.memberTraits)}getOwnTraits(){return ut(this.traits)}getKeySchema(){const[e,t]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!t)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const r=this.getSchema();return _t([e?15:r[4]??0,0],"key")}getValueSchema(){const e=this.getSchema(),[t,r,n]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],i="number"==typeof e?63&e:e&&"object"==typeof e&&(r||n)?e[3+e[0]]:t?15:void 0;if(null!=i)return _t([i,0],r?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){const t=this.getSchema();if(this.isStructSchema()&&t[4].includes(e)){const r=t[4].indexOf(e),n=t[5][r];return _t(yt(n)?n:[n,0],e)}if(this.isDocumentSchema())return _t([15,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${e}.`)}getMemberSchemas(){const e={};try{for(const[t,r]of this.structIterator())e[t]=r}catch(e){}return e}getEventStreamMember(){if(this.isStructSchema())for(const[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e;return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const e=this.getSchema(),t=e[4].length;let r=e[ft];if(r&&t===r.length)yield*r;else{r=Array(t);for(let n=0;n<t;++n){const t=e[4][n],i=_t([e[5][n],0],t);yield r[n]=[t,i]}e[ft]=r}}}function _t(e,t){if(e instanceof bt)return Object.assign(e,{memberName:t,_isMemberSchema:!0});return new bt(e,t)}const yt=e=>Array.isArray(e)&&2===e.length,mt=e=>Array.isArray(e)&&e.length>=5,gt="***SensitiveInformation***";function wt(e,t){if(null==t)return t;const r=bt.of(e);if(r.getMergedTraits().sensitive)return gt;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return gt}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return gt}else if(r.isStructSchema()&&"object"==typeof t){const e=t,n={};for(const[t,i]of r.structIterator())null!=e[t]&&(n[t]=wt(i,e[t]));return n}return t}class vt{middlewareStack=ot();schema;static classBuilder(){return new St}resolveMiddlewareWithContext(e,t,r,{middlewareFn:n,clientName:i,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,smithyContext:l,additionalContext:c,CommandCtor:u}){for(const i of n.bind(this)(u,e,t,r))this.middlewareStack.use(i);const f=e.concat(this.middlewareStack),{logger:h}=t,d={logger:h,clientName:i,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,[Ge]:{commandInstance:this,...l},...c},{requestHandler:p}=t;let b=r??{};return l.eventStream&&(b={isEventStream:!0,...b}),f.resolve((e=>p.handle(e.request,b)),d)}}class St{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,r={}){return this._smithyContext={service:e,operation:t,...r},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends vt{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.input=t??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(r,n,i){const o=e._operationSchema,s=o?.[4]??o?.input,a=o?.[5]??o?.output;return this.resolveMiddlewareWithContext(r,n,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(o?wt.bind(null,s):e=>e),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(o?wt.bind(null,a):e=>e),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}const Et={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class xt{namespace;schemas;exceptions;static registries=new Map;constructor(e,t=new Map,r=new Map){this.namespace=e,this.schemas=t,this.exceptions=r}static for(e){return xt.registries.has(e)||xt.registries.set(e,new xt(e)),xt.registries.get(e)}copyFrom(e){const{schemas:t,exceptions:r}=this;for(const[r,n]of e.schemas)t.has(r)||t.set(r,n);for(const[t,n]of e.exceptions)r.has(t)||r.set(t,n)}register(e,t){const r=this.normalizeShapeId(e);for(const e of[this,xt.for(r.split("#")[0])])e.schemas.set(r,t)}getSchema(e){const t=this.normalizeShapeId(e);if(!this.schemas.has(t))throw new Error(`@smithy/core/schema - schema not found for ${t}`);return this.schemas.get(t)}registerError(e,t){const r=e,n=r[1];for(const e of[this,xt.for(n)])e.schemas.set(n+"#"+r[2],r),e.exceptions.set(r,t)}getErrorCtor(e){const t=e;if(this.exceptions.has(t))return this.exceptions.get(t);return xt.for(t[1]).exceptions.get(t)}getBaseException(){for(const e of this.exceptions.keys())if(Array.isArray(e)){const[,t,r]=e,n=t+"#"+r;if(n.startsWith("smithy.ts.sdk.synthetic.")&&n.endsWith("ServiceException"))return e}}find(e){return[...this.schemas.values()].find(e)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}}class Rt extends Error{$fault;$response;$retryable;$metadata;constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return Rt.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===Rt?Rt.isInstance(e):!!Rt.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}class At extends Rt{constructor(e){super(e),Object.setPrototypeOf(this,At.prototype)}}class Ot extends At{name="NoSuchUpload";$fault="client";constructor(e){super({name:"NoSuchUpload",$fault:"client",...e}),Object.setPrototypeOf(this,Ot.prototype)}}class kt extends At{name="AccessDenied";$fault="client";constructor(e){super({name:"AccessDenied",$fault:"client",...e}),Object.setPrototypeOf(this,kt.prototype)}}class Tt extends At{name="ObjectNotInActiveTierError";$fault="client";constructor(e){super({name:"ObjectNotInActiveTierError",$fault:"client",...e}),Object.setPrototypeOf(this,Tt.prototype)}}class Pt extends At{name="BucketAlreadyExists";$fault="client";constructor(e){super({name:"BucketAlreadyExists",$fault:"client",...e}),Object.setPrototypeOf(this,Pt.prototype)}}class Mt extends At{name="BucketAlreadyOwnedByYou";$fault="client";constructor(e){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...e}),Object.setPrototypeOf(this,Mt.prototype)}}class Lt extends At{name="NoSuchBucket";$fault="client";constructor(e){super({name:"NoSuchBucket",$fault:"client",...e}),Object.setPrototypeOf(this,Lt.prototype)}}class Ct extends At{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(e){super({name:"InvalidObjectState",$fault:"client",...e}),Object.setPrototypeOf(this,Ct.prototype),this.StorageClass=e.StorageClass,this.AccessTier=e.AccessTier}}class It extends At{name="NoSuchKey";$fault="client";constructor(e){super({name:"NoSuchKey",$fault:"client",...e}),Object.setPrototypeOf(this,It.prototype)}}class Dt extends At{name="NotFound";$fault="client";constructor(e){super({name:"NotFound",$fault:"client",...e}),Object.setPrototypeOf(this,Dt.prototype)}}class Nt extends At{name="EncryptionTypeMismatch";$fault="client";constructor(e){super({name:"EncryptionTypeMismatch",$fault:"client",...e}),Object.setPrototypeOf(this,Nt.prototype)}}class jt extends At{name="InvalidRequest";$fault="client";constructor(e){super({name:"InvalidRequest",$fault:"client",...e}),Object.setPrototypeOf(this,jt.prototype)}}class Ft extends At{name="InvalidWriteOffset";$fault="client";constructor(e){super({name:"InvalidWriteOffset",$fault:"client",...e}),Object.setPrototypeOf(this,Ft.prototype)}}class Wt extends At{name="TooManyParts";$fault="client";constructor(e){super({name:"TooManyParts",$fault:"client",...e}),Object.setPrototypeOf(this,Wt.prototype)}}class Bt extends At{name="IdempotencyParameterMismatch";$fault="client";constructor(e){super({name:"IdempotencyParameterMismatch",$fault:"client",...e}),Object.setPrototypeOf(this,Bt.prototype)}}class Ut extends At{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(e){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...e}),Object.setPrototypeOf(this,Ut.prototype)}}const $t="AcceptRanges",zt="AccessTier",Gt="Bucket",Ht="BucketKeyEnabled",Vt="Body",qt="CacheControl",Kt="ChecksumCRC32",Yt="ChecksumCRC32C",Zt="ChecksumCRC64NVME",Qt="Cache-Control",Xt="Content-Disposition",Jt="ContentDisposition",er="Content-Encoding",tr="ContentEncoding",rr="ContentLanguage",nr="Content-Language",ir="Content-Length",or="ContentLength",sr="ChecksumMode",ar="ContentRange",lr="Content-Range",cr="ChecksumSHA1",ur="ChecksumSHA256",fr="ChecksumType",hr="Content-Type",dr="ContentType",pr="DeleteMarker",br="Expiration",_r="ExpectedBucketOwner",yr="ExpiresString",mr="ETag",gr="Expires",wr="IfMatch",vr="If-Modified-Since",Sr="IfModifiedSince",Er="If-Match",xr="IfNoneMatch",Rr="If-None-Match",Ar="IfUnmodifiedSince",Or="If-Unmodified-Since",kr="Key",Tr="LastModified",Pr="Last-Modified",Mr="Metadata",Lr="MissingMeta",Cr="ObjectLockLegalHoldStatus",Ir="ObjectLockMode",Dr="ObjectLockRetainUntilDate",Nr="PartsCount",jr="PartNumber",Fr="RequestCharged",Wr="ResponseCacheControl",Br="ResponseContentDisposition",Ur="ResponseContentEncoding",$r="ResponseContentLanguage",zr="ResponseContentType",Gr="ResponseExpires",Hr="RequestPayer",Vr="ReplicationStatus",qr="Range",Kr="Restore",Yr="StorageClass",Zr="ServerSideEncryption",Qr="SSECustomerAlgorithm",Xr="SSECustomerKey",Jr="SSECustomerKeyMD5",en="SSEKMSKeyId",tn="TagCount",rn="VersionId",nn="WebsiteRedirectLocation",on="accept-ranges",sn="client",an="error",ln="http",cn="httpChecksum",un="httpError",fn="httpHeader",hn="httpPrefixHeaders",dn="httpQuery",pn="partNumber",bn="response-cache-control",_n="response-content-disposition",yn="response-content-encoding",mn="response-content-language",gn="response-content-type",wn="response-expires",vn="smithy.ts.sdk.synthetic.com.amazonaws.s3",Sn="streaming",En="versionId",xn="x-amz-checksum-crc32",Rn="x-amz-checksum-crc32c",An="x-amz-checksum-crc64nvme",On="x-amz-checksum-mode",kn="x-amz-checksum-sha1",Tn="x-amz-checksum-sha256",Pn="x-amz-checksum-type",Mn="x-amz-delete-marker",Ln="x-amz-expiration",Cn="x-amz-expected-bucket-owner",In="x-amz-meta-",Dn="x-amz-missing-meta",Nn="x-amz-mp-parts-count",jn="x-amz-object-lock-legal-hold",Fn="x-amz-object-lock-mode",Wn="x-amz-object-lock-retain-until-date",Bn="x-amz-restore",Un="x-amz-request-charged",$n="x-amz-request-payer",zn="x-amz-replication-status",Gn="x-amz-storage-class",Hn="x-amz-server-side-encryption",Vn="x-amz-server-side-encryption-aws-kms-key-id",qn="x-amz-server-side-encryption-bucket-key-enabled",Kn="x-amz-server-side-encryption-customer-algorithm",Yn="x-amz-server-side-encryption-customer-key",Zn="x-amz-server-side-encryption-customer-key-MD5",Qn="x-amz-tagging-count",Xn="x-amz-version-id",Jn="x-amz-website-redirect-location",ei="com.amazonaws.s3",ti=xt.for(vn);var ri=[-3,vn,"S3ServiceException",0,[],[]];ti.registerError(ri,At);const ni=xt.for(ei);var ii=[-3,ei,"AccessDenied",{[an]:sn,[un]:403},[],[]];ni.registerError(ii,kt);var oi=[-3,ei,"BucketAlreadyExists",{[an]:sn,[un]:409},[],[]];ni.registerError(oi,Pt);var si=[-3,ei,"BucketAlreadyOwnedByYou",{[an]:sn,[un]:409},[],[]];ni.registerError(si,Mt);var ai=[-3,ei,"EncryptionTypeMismatch",{[an]:sn,[un]:400},[],[]];ni.registerError(ai,Nt);var li=[-3,ei,"IdempotencyParameterMismatch",{[an]:sn,[un]:400},[],[]];ni.registerError(li,Bt);var ci=[-3,ei,"InvalidObjectState",{[an]:sn,[un]:403},[Yr,zt],[0,0]];ni.registerError(ci,Ct);var ui=[-3,ei,"InvalidRequest",{[an]:sn,[un]:400},[],[]];ni.registerError(ui,jt);var fi=[-3,ei,"InvalidWriteOffset",{[an]:sn,[un]:400},[],[]];ni.registerError(fi,Ft);var hi=[-3,ei,"NoSuchBucket",{[an]:sn,[un]:404},[],[]];ni.registerError(hi,Lt);var di=[-3,ei,"NoSuchKey",{[an]:sn,[un]:404},[],[]];ni.registerError(di,It);var pi=[-3,ei,"NoSuchUpload",{[an]:sn,[un]:404},[],[]];ni.registerError(pi,Ot);var bi=[-3,ei,"NotFound",{[an]:sn},[],[]];ni.registerError(bi,Dt);var _i=[-3,ei,"ObjectAlreadyInActiveTierError",{[an]:sn,[un]:403},[],[]];ni.registerError(_i,Ut);var yi=[-3,ei,"ObjectNotInActiveTierError",{[an]:sn,[un]:403},[],[]];ni.registerError(yi,Tt);var mi=[-3,ei,"TooManyParts",{[an]:sn,[un]:400},[],[]];ni.registerError(mi,Wt);var gi=[0,ei,Xr,8,0],wi=[0,ei,en,8,0],vi=[0,ei,"StreamingBlob",{[Sn]:1},42],Si=[3,ei,"GetObjectOutput",0,[Vt,pr,$t,br,Kr,Tr,or,mr,Kt,Yt,Zt,cr,ur,fr,Lr,rn,qt,Jt,tr,rr,ar,dr,gr,yr,nn,Zr,Mr,Qr,Jr,en,Ht,Yr,Fr,Vr,Nr,tn,Ir,Dr,Cr],[[()=>vi,16],[2,{[fn]:Mn}],[0,{[fn]:on}],[0,{[fn]:Ln}],[0,{[fn]:Bn}],[4,{[fn]:Pr}],[1,{[fn]:ir}],[0,{[fn]:mr}],[0,{[fn]:xn}],[0,{[fn]:Rn}],[0,{[fn]:An}],[0,{[fn]:kn}],[0,{[fn]:Tn}],[0,{[fn]:Pn}],[1,{[fn]:Dn}],[0,{[fn]:Xn}],[0,{[fn]:Qt}],[0,{[fn]:Xt}],[0,{[fn]:er}],[0,{[fn]:nr}],[0,{[fn]:lr}],[0,{[fn]:hr}],[4,{[fn]:gr}],[0,{[fn]:yr}],[0,{[fn]:Jn}],[0,{[fn]:Hn}],[128,{[hn]:In}],[0,{[fn]:Kn}],[0,{[fn]:Zn}],[()=>wi,{[fn]:Vn}],[2,{[fn]:qn}],[0,{[fn]:Gn}],[0,{[fn]:Un}],[0,{[fn]:zn}],[1,{[fn]:Nn}],[1,{[fn]:Qn}],[0,{[fn]:Fn}],[5,{[fn]:Wn}],[0,{[fn]:jn}]]],Ei=[3,ei,"GetObjectRequest",0,[Gt,kr,wr,Sr,xr,Ar,qr,Wr,Br,Ur,$r,zr,Gr,rn,Qr,Xr,Jr,Hr,jr,_r,sr],[[0,1],[0,1],[0,{[fn]:Er}],[4,{[fn]:vr}],[0,{[fn]:Rr}],[4,{[fn]:Or}],[0,{[fn]:qr}],[0,{[dn]:bn}],[0,{[dn]:_n}],[0,{[dn]:yn}],[0,{[dn]:mn}],[0,{[dn]:gn}],[6,{[dn]:wn}],[0,{[dn]:En}],[0,{[fn]:Kn}],[()=>gi,{[fn]:Yn}],[0,{[fn]:Zn}],[0,{[fn]:$n}],[1,{[dn]:pn}],[0,{[fn]:Cn}],[0,{[fn]:On}]],2],xi=[3,ei,"HeadObjectOutput",0,[pr,$t,br,Kr,"ArchiveStatus",Tr,or,Kt,Yt,Zt,cr,ur,fr,mr,Lr,rn,qt,Jt,tr,rr,dr,ar,gr,yr,nn,Zr,Mr,Qr,Jr,en,Ht,Yr,Fr,Vr,Nr,tn,Ir,Dr,Cr],[[2,{[fn]:Mn}],[0,{[fn]:on}],[0,{[fn]:Ln}],[0,{[fn]:Bn}],[0,{[fn]:"x-amz-archive-status"}],[4,{[fn]:Pr}],[1,{[fn]:ir}],[0,{[fn]:xn}],[0,{[fn]:Rn}],[0,{[fn]:An}],[0,{[fn]:kn}],[0,{[fn]:Tn}],[0,{[fn]:Pn}],[0,{[fn]:mr}],[1,{[fn]:Dn}],[0,{[fn]:Xn}],[0,{[fn]:Qt}],[0,{[fn]:Xt}],[0,{[fn]:er}],[0,{[fn]:nr}],[0,{[fn]:hr}],[0,{[fn]:lr}],[4,{[fn]:gr}],[0,{[fn]:yr}],[0,{[fn]:Jn}],[0,{[fn]:Hn}],[128,{[hn]:In}],[0,{[fn]:Kn}],[0,{[fn]:Zn}],[()=>wi,{[fn]:Vn}],[2,{[fn]:qn}],[0,{[fn]:Gn}],[0,{[fn]:Un}],[0,{[fn]:zn}],[1,{[fn]:Nn}],[1,{[fn]:Qn}],[0,{[fn]:Fn}],[5,{[fn]:Wn}],[0,{[fn]:jn}]]],Ri=[3,ei,"HeadObjectRequest",0,[Gt,kr,wr,Sr,xr,Ar,qr,Wr,Br,Ur,$r,zr,Gr,rn,Qr,Xr,Jr,Hr,jr,_r,sr],[[0,1],[0,1],[0,{[fn]:Er}],[4,{[fn]:vr}],[0,{[fn]:Rr}],[4,{[fn]:Or}],[0,{[fn]:qr}],[0,{[dn]:bn}],[0,{[dn]:_n}],[0,{[dn]:yn}],[0,{[dn]:mn}],[0,{[dn]:gn}],[6,{[dn]:wn}],[0,{[dn]:En}],[0,{[fn]:Kn}],[()=>gi,{[fn]:Yn}],[0,{[fn]:Zn}],[0,{[fn]:$n}],[1,{[dn]:pn}],[0,{[fn]:Cn}],[0,{[fn]:On}]],2],Ai=[9,ei,"GetObject",{[cn]:"-",[ln]:["GET","/{Key+}?x-id=GetObject",200]},()=>Ei,()=>Si],Oi=[9,ei,"HeadObject",{[ln]:["HEAD","/{Key+}",200]},()=>Ri,()=>xi];class ki extends(vt.classBuilder().ep({...Et,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,r,n){return[rt(r,e.getEndpointParameterInstructions()),le(r,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),Ue(r),We()]})).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").sc(Ai).build()){}const Ti={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},Pi=e=>(t,r)=>async n=>{const i=await t(n),{response:o}=i;if(!ce.isInstance(o))return i;const{statusCode:s,body:a}=o;if(s<200||s>=300)return i;if(!("function"==typeof a?.stream||"function"==typeof a?.pipe||"function"==typeof a?.tee))return i;let l=a,c=a;!a||"object"!=typeof a||a instanceof Uint8Array||([l,c]=await async function(e){return"function"==typeof e.stream&&(e=e.stream()),e.tee()}(a)),o.body=c;const u=await Mi(l,{streamCollector:async e=>async function(e,t){let r=0;const n=[],i=e.getReader();let o=!1;for(;!o;){const{done:e,value:s}=await i.read();if(s&&(n.push(s),r+=s?.byteLength??0),r>=t)break;o=e}i.releaseLock();const s=new Uint8Array(Math.min(t,r));let a=0;for(const e of n){if(e.byteLength>s.byteLength-a){s.set(e.subarray(0,s.byteLength-a),a);break}s.set(e,a),a+=e.length}return s}(e,3e3)});"function"==typeof l?.destroy&&l.destroy();const f=e.utf8Encoder(u.subarray(u.length-16));if(0===u.length&&Ti[r.commandName]){const e=new Error("S3 aborted request");throw e.name="InternalError",e}return f&&f.endsWith("</Error>")&&(o.statusCode=400),i},Mi=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),Li={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},Ci=e=>({applyToStack:t=>{t.addRelativeTo(Pi(e),Li)}});class Ii extends(vt.classBuilder().ep({...Et,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,r,n){return[rt(r,e.getEndpointParameterInstructions()),Ci(r),Ue(r),We()]})).s("AmazonS3","HeadObject",{}).n("S3Client","HeadObjectCommand").sc(Oi).build()){}}],__webpack_module_cache__={},hasSymbol,webpackQueues,webpackExports,webpackError,resolveQueue;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}hasSymbol="function"==typeof Symbol,webpackQueues=hasSymbol?Symbol("webpack queues"):"__webpack_queues__",webpackExports=hasSymbol?Symbol("webpack exports"):"__webpack_exports__",webpackError=hasSymbol?Symbol("webpack error"):"__webpack_error__",resolveQueue=e=>{e&&e.d<1&&(e.d=1,e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))},__webpack_require__.a=(e,t,r)=>{var n;r&&((n=[]).d=-1);var i,o,s,a=new Set,l=e.exports,c=new Promise(((e,t)=>{s=t,o=e}));c[webpackExports]=l,c[webpackQueues]=e=>(n&&e(n),a.forEach(e),c.catch((e=>{}))),e.exports=c,t((e=>{var t;i=(e=>e.map((e=>{if(null!==e&&"object"==typeof e){if(e[webpackQueues])return e;if(e.then){var t=[];t.d=0,e.then((e=>{r[webpackExports]=e,resolveQueue(t)}),(e=>{r[webpackError]=e,resolveQueue(t)}));var r={};return r[webpackQueues]=e=>e(t),r}}var n={};return n[webpackQueues]=e=>{},n[webpackExports]=e,n})))(e);var r=()=>i.map((e=>{if(e[webpackError])throw e[webpackError];return e[webpackExports]})),o=new Promise((e=>{(t=()=>e(r)).r=0;var o=e=>e!==n&&!a.has(e)&&(a.add(e),e&&!e.d&&(t.r++,e.push(t)));i.map((e=>e[webpackQueues](o)))}));return t.r?o:r()}),(e=>(e?s(c[webpackError]=e):o(l),resolveQueue(n)))),n&&n.d<0&&(n.d=0)},__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__=__webpack_require__(363);module.exports["web-documentation"]=__webpack_exports__})();
71
+ var n=r(10).inherits,i=r(123).Transform,o=r(326),s=r(56),a=function(e){if(!(this instanceof a))return new a(e);e=this.options=s.defaults(e,{}),i.call(this,e),this.supports={directory:!0,symlink:!0},this.files=[]};n(a,i),a.prototype._transform=function(e,t,r){r(null,e)},a.prototype._writeStringified=function(){var e=JSON.stringify(this.files);this.write(e)},a.prototype.append=function(e,t,r){var n=this;function i(e,i){e?r(e):(t.size=i.length||0,t.crc32=o.unsigned(i),n.files.push(t),r(null,t))}t.crc32=0,"buffer"===t.sourceType?i(null,e):"stream"===t.sourceType&&s.collectStream(e,i)},a.prototype.finalize=function(){this._writeStringified(),this.end()},e.exports=a},e=>{function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const r=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function n(e){if(Buffer.isBuffer(e))return e;if("number"==typeof e)return Buffer.alloc(e);if("string"==typeof e)return Buffer.from(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function i(e,t){e=n(e),Buffer.isBuffer(t)&&(t=t.readUInt32BE(0));let i=~t;for(var o=0;o<e.length;o++)i=r[255&(i^e[o])]^i>>>8;return~i}function o(){return function(e){const t=n(4);return t.writeInt32BE(e,0),t}(i.apply(null,arguments))}o.signed=function(){return i.apply(null,arguments)},o.unsigned=function(){return i.apply(null,arguments)>>>0};const s=t(o);e.exports=s},(e,t,r)=>{const n=r(16);function i(){if(!(this instanceof i))return new i;n.Transform.call(this)}r(10).inherits(i,n.Transform),i.prototype._transform=function(e,t,r){r()},e.exports=i},(e,t,r)=>{const n=r(16),i=r(107),o=r(184),s=r(109);e.exports=function(e,t){const r=n.PassThrough({objectMode:!0}),a=n.PassThrough(),l=n.Transform({objectMode:!0}),c=e instanceof RegExp?e:e&&new RegExp(e);let u;l._transform=function(e,t,r){if(u||c&&!c.exec(e.path))return e.autodrain(),r();u=!0,f.emit("entry",e),e.on("error",(function(e){a.emit("error",e)})),e.pipe(a).on("error",(function(e){r(e)})).on("finish",(function(e){r(null,e)}))},r.pipe(i(t)).on("error",(function(e){a.emit("error",e)})).pipe(l).on("error",Object).on("finish",(function(){u?a.end():a.emit("error",new Error("PATTERN_NOT_FOUND"))}));const f=o(r,a);return f.buffer=function(){return s(a)},f}},(e,t,r)=>{e.exports=function(e){e.path=o.resolve(o.normalize(e.path));const t=new n(e),r=new s.Writable({objectMode:!0});r._write=async function(t,r,n){const s=o.join(e.path,t.path.replace(/\\/g,"/"));if(0!=s.indexOf(e.path))return n();if("Directory"==t.type)return await i.ensureDir(s),n();await i.ensureDir(o.dirname(s));const a=e.getWriter?e.getWriter({path:s}):i.createWriteStream(s);t.pipe(a).on("error",n).on("close",n)};const l=a(t,r);return t.once("crx-header",(function(e){l.crxHeader=e})),t.pipe(r).on("finish",(function(){l.emit("close")})),l.promise=function(){return new Promise((function(e,t){l.on("close",e),l.on("error",t)}))},l};const n=r(107),i=r(185),o=r(3),s=r(16),a=r(184)},(e,t,r)=>{const n=r(11),i=r(3),{mkdirs:o}=r(23),{pathExists:s}=r(36),{utimesMillis:a}=r(186),l=r(44);async function c(e,t,r){return!r.filter||r.filter(e,t)}async function u(e,t,r,o){const s=o.dereference?n.stat:n.lstat,a=await s(t);if(a.isDirectory())return async function(e,t,r,o,s){t||await n.mkdir(o);const a=await n.readdir(r);await Promise.all(a.map((async e=>{const t=i.join(r,e),n=i.join(o,e);if(!await c(t,n,s))return;const{destStat:a}=await l.checkPaths(t,n,"copy",s);return u(a,t,n,s)}))),t||await n.chmod(o,e.mode)}(a,e,t,r,o);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return async function(e,t,r,i,o){if(!t)return f(e,r,i,o);if(o.overwrite)return await n.unlink(i),f(e,r,i,o);if(o.errorOnExist)throw new Error(`'${i}' already exists`)}(a,e,t,r,o);if(a.isSymbolicLink())return async function(e,t,r,o){let s=await n.readlink(t);o.dereference&&(s=i.resolve(process.cwd(),s));if(!e)return n.symlink(s,r);let a=null;try{a=await n.readlink(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlink(s,r);throw e}o.dereference&&(a=i.resolve(process.cwd(),a));if(l.isSrcSubdir(s,a))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${a}'.`);if(l.isSrcSubdir(a,s))throw new Error(`Cannot overwrite '${a}' with '${s}'.`);return await n.unlink(r),n.symlink(s,r)}(e,t,r,o);if(a.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(a.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}async function f(e,t,r,i){if(await n.copyFile(t,r),i.preserveTimestamps){128&e.mode||await function(e,t){return n.chmod(e,128|t)}(r,e.mode);const i=await n.stat(t);await a(r,i.atime,i.mtime)}return n.chmod(r,e.mode)}e.exports=async function(e,t,r={}){"function"==typeof r&&(r={filter:r}),r.clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0001");const{srcStat:n,destStat:a}=await l.checkPaths(e,t,"copy",r);if(await l.checkParentPaths(e,n,t,"copy"),!await c(e,t,r))return;const f=i.dirname(t);await s(f)||await o(f),await u(a,e,t,r)}},(e,t,r)=>{const n=r(21),i=r(3),o=r(23).mkdirsSync,s=r(186).utimesMillisSync,a=r(44);function l(e,t,r,o){const s=(o.dereference?n.statSync:n.lstatSync)(t);if(s.isDirectory())return function(e,t,r,i,o){return t?f(r,i,o):function(e,t,r,i){return n.mkdirSync(r),f(t,r,i),u(r,e)}(e.mode,r,i,o)}(s,e,t,r,o);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return function(e,t,r,i,o){return t?function(e,t,r,i){if(i.overwrite)return n.unlinkSync(r),c(e,t,r,i);if(i.errorOnExist)throw new Error(`'${r}' already exists`)}(e,r,i,o):c(e,r,i,o)}(s,e,t,r,o);if(s.isSymbolicLink())return function(e,t,r,o){let s=n.readlinkSync(t);o.dereference&&(s=i.resolve(process.cwd(),s));if(e){let e;try{e=n.readlinkSync(r)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return n.symlinkSync(s,r);throw e}if(o.dereference&&(e=i.resolve(process.cwd(),e)),a.isSrcSubdir(s,e))throw new Error(`Cannot copy '${s}' to a subdirectory of itself, '${e}'.`);if(a.isSrcSubdir(e,s))throw new Error(`Cannot overwrite '${e}' with '${s}'.`);return function(e,t){return n.unlinkSync(t),n.symlinkSync(e,t)}(s,r)}return n.symlinkSync(s,r)}(e,t,r,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 c(e,t,r,i){return n.copyFileSync(t,r),i.preserveTimestamps&&function(e,t,r){(function(e){return!(128&e)})(e)&&function(e,t){u(e,128|t)}(r,e);(function(e,t){const r=n.statSync(e);s(t,r.atime,r.mtime)})(t,r)}(e.mode,t,r),u(r,e.mode)}function u(e,t){return n.chmodSync(e,t)}function f(e,t,r){n.readdirSync(e).forEach((n=>function(e,t,r,n){const o=i.join(t,e),s=i.join(r,e);if(n.filter&&!n.filter(o,s))return;const{destStat:c}=a.checkPathsSync(o,s,"copy",n);return l(c,o,s,n)}(n,e,t,r)))}e.exports=function(e,t,r){"function"==typeof r&&(r={filter:r}),(r=r||{}).clobber=!("clobber"in r)||!!r.clobber,r.overwrite="overwrite"in r?!!r.overwrite:r.clobber,r.preserveTimestamps&&"ia32"===process.arch&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended;\n\n\tsee https://github.com/jprichardson/node-fs-extra/issues/269","Warning","fs-extra-WARN0002");const{srcStat:s,destStat:c}=a.checkPathsSync(e,t,"copy",r);if(a.checkParentPathsSync(e,s,t,"copy"),r.filter&&!r.filter(e,t))return;const u=i.dirname(t);return n.existsSync(u)||o(u),l(c,e,t,r)}},(e,t,r)=>{const n=r(9).fromPromise,i=r(11),o=r(3),s=r(23),a=r(78),l=n((async function(e){let t;try{t=await i.readdir(e)}catch{return s.mkdirs(e)}return Promise.all(t.map((t=>a.remove(o.join(e,t)))))}));function c(e){let t;try{t=i.readdirSync(e)}catch{return s.mkdirsSync(e)}t.forEach((t=>{t=o.join(e,t),a.removeSync(t)}))}e.exports={emptyDirSync:c,emptydirSync:c,emptyDir:l,emptydir:l}},(e,t,r)=>{const{createFile:n,createFileSync:i}=r(334),{createLink:o,createLinkSync:s}=r(335),{createSymlink:a,createSymlinkSync:l}=r(336);e.exports={createFile:n,createFileSync:i,ensureFile:n,ensureFileSync:i,createLink:o,createLinkSync:s,ensureLink:o,ensureLinkSync:s,createSymlink:a,createSymlinkSync:l,ensureSymlink:a,ensureSymlinkSync:l}},(e,t,r)=>{const n=r(9).fromPromise,i=r(3),o=r(11),s=r(23);e.exports={createFile:n((async function(e){let t;try{t=await o.stat(e)}catch{}if(t&&t.isFile())return;const r=i.dirname(e);let n=null;try{n=await o.stat(r)}catch(t){if("ENOENT"===t.code)return await s.mkdirs(r),void await o.writeFile(e,"");throw t}n.isDirectory()?await o.writeFile(e,""):await o.readdir(r)})),createFileSync:function(e){let t;try{t=o.statSync(e)}catch{}if(t&&t.isFile())return;const r=i.dirname(e);try{o.statSync(r).isDirectory()||o.readdirSync(r)}catch(e){if(!e||"ENOENT"!==e.code)throw e;s.mkdirsSync(r)}o.writeFileSync(e,"")}}},(e,t,r)=>{const n=r(9).fromPromise,i=r(3),o=r(11),s=r(23),{pathExists:a}=r(36),{areIdentical:l}=r(44);e.exports={createLink:n((async function(e,t){let r,n;try{r=await o.lstat(t)}catch{}try{n=await o.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}if(r&&l(n,r))return;const c=i.dirname(t);await a(c)||await s.mkdirs(c),await o.link(e,t)})),createLinkSync:function(e,t){let r;try{r=o.lstatSync(t)}catch{}try{const t=o.lstatSync(e);if(r&&l(t,r))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const n=i.dirname(t);return o.existsSync(n)||s.mkdirsSync(n),o.linkSync(e,t)}}},(e,t,r)=>{const n=r(9).fromPromise,i=r(3),o=r(11),{mkdirs:s,mkdirsSync:a}=r(23),{symlinkPaths:l,symlinkPathsSync:c}=r(337),{symlinkType:u,symlinkTypeSync:f}=r(338),{pathExists:h}=r(36),{areIdentical:d}=r(44);e.exports={createSymlink:n((async function(e,t,r){let n;try{n=await o.lstat(t)}catch{}if(n&&n.isSymbolicLink()){const[r,n]=await Promise.all([o.stat(e),o.stat(t)]);if(d(r,n))return}const a=await l(e,t);e=a.toDst;const c=await u(a.toCwd,r),f=i.dirname(t);return await h(f)||await s(f),o.symlink(e,t,c)})),createSymlinkSync:function(e,t,r){let n;try{n=o.lstatSync(t)}catch{}if(n&&n.isSymbolicLink()){const r=o.statSync(e),n=o.statSync(t);if(d(r,n))return}const s=c(e,t);e=s.toDst,r=f(s.toCwd,r);const l=i.dirname(t);return o.existsSync(l)||a(l),o.symlinkSync(e,t,r)}}},(e,t,r)=>{const n=r(3),i=r(11),{pathExists:o}=r(36),s=r(9).fromPromise;e.exports={symlinkPaths:s((async function(e,t){if(n.isAbsolute(e)){try{await i.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:e}}const r=n.dirname(t),s=n.join(r,e);if(await o(s))return{toCwd:s,toDst:e};try{await i.lstat(e)}catch(e){throw e.message=e.message.replace("lstat","ensureSymlink"),e}return{toCwd:e,toDst:n.relative(r,e)}})),symlinkPathsSync:function(e,t){if(n.isAbsolute(e)){if(!i.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}const r=n.dirname(t),o=n.join(r,e);if(i.existsSync(o))return{toCwd:o,toDst:e};if(!i.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:n.relative(r,e)}}}},(e,t,r)=>{const n=r(11),i=r(9).fromPromise;e.exports={symlinkType:i((async function(e,t){if(t)return t;let r;try{r=await n.lstat(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"})),symlinkTypeSync:function(e,t){if(t)return t;let r;try{r=n.lstatSync(e)}catch{return"file"}return r&&r.isDirectory()?"dir":"file"}}},(e,t,r)=>{const n=r(9).fromPromise,i=r(340);i.outputJson=n(r(342)),i.outputJsonSync=r(343),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},(e,t,r)=>{const n=r(341);e.exports={readJson:n.readFile,readJsonSync:n.readFileSync,writeJson:n.writeFile,writeJsonSync:n.writeFileSync}},(e,t,r)=>{let n;try{n=r(21)}catch(e){n=r(39)}const i=r(9),{stringify:o,stripBom:s}=r(113);const a={readFile:i.fromPromise((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,o=!("throws"in t)||t.throws;let a,l=await i.fromCallback(r.readFile)(e,t);l=s(l);try{a=JSON.parse(l,t?t.reviver:null)}catch(t){if(o)throw t.message=`${e}: ${t.message}`,t;return null}return a})),readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const r=t.fs||n,i=!("throws"in t)||t.throws;try{let n=r.readFileSync(e,t);return n=s(n),JSON.parse(n,t.reviver)}catch(t){if(i)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:i.fromPromise((async function(e,t,r={}){const s=r.fs||n,a=o(t,r);await i.fromCallback(s.writeFile)(e,a,r)})),writeFileSync:function(e,t,r={}){const i=r.fs||n,s=o(t,r);return i.writeFileSync(e,s,r)}};e.exports=a},(e,t,r)=>{const{stringify:n}=r(113),{outputFile:i}=r(114);e.exports=async function(e,t,r={}){const o=n(t,r);await i(e,o,r)}},(e,t,r)=>{const{stringify:n}=r(113),{outputFileSync:i}=r(114);e.exports=function(e,t,r){const o=n(t,r);i(e,o,r)}},(e,t,r)=>{const n=r(9).fromPromise;e.exports={move:n(r(345)),moveSync:r(346)}},(e,t,r)=>{const n=r(11),i=r(3),{copy:o}=r(112),{remove:s}=r(78),{mkdirp:a}=r(23),{pathExists:l}=r(36),c=r(44);e.exports=async function(e,t,r={}){const u=r.overwrite||r.clobber||!1,{srcStat:f,isChangingCase:h=!1}=await c.checkPaths(e,t,"move",r);await c.checkParentPaths(e,f,t,"move");const d=i.dirname(t);return i.parse(d).root!==d&&await a(d),async function(e,t,r,i){if(!i)if(r)await s(t);else if(await l(t))throw new Error("dest already exists.");try{await n.rename(e,t)}catch(n){if("EXDEV"!==n.code)throw n;await async function(e,t,r){const n={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return await o(e,t,n),s(e)}(e,t,r)}}(e,t,u,h)}},(e,t,r)=>{const n=r(21),i=r(3),o=r(112).copySync,s=r(78).removeSync,a=r(23).mkdirpSync,l=r(44);function c(e,t,r){try{n.renameSync(e,t)}catch(n){if("EXDEV"!==n.code)throw n;return function(e,t,r){const n={overwrite:r,errorOnExist:!0,preserveTimestamps:!0};return o(e,t,n),s(e)}(e,t,r)}}e.exports=function(e,t,r){const o=(r=r||{}).overwrite||r.clobber||!1,{srcStat:u,isChangingCase:f=!1}=l.checkPathsSync(e,t,"move",r);return l.checkParentPathsSync(e,u,t,"move"),function(e){const t=i.dirname(e);return i.parse(t).root===t}(t)||a(i.dirname(t)),function(e,t,r,i){if(i)return c(e,t,r);if(r)return s(t),c(e,t,r);if(n.existsSync(t))throw new Error("dest already exists.");return c(e,t,r)}(e,t,o,f)}},(e,t,r)=>{const n=r(21),i=r(348),o=r(16);e.exports={buffer:function(e,t){return i({stream:function(t,r){const n=o.PassThrough(),i=r?t+r:void 0;return n.end(e.slice(t,i)),n},size:function(){return Promise.resolve(e.length)}},t)},file:function(e,t){return i({stream:function(t,r){const i=r?t+r:void 0;return n.createReadStream(e,{start:t,end:i})},size:function(){return new Promise((function(t,r){n.stat(e,(function(e,n){e?r(e):t(n.size)}))}))}},t)},url:function(e,t,r){if("string"==typeof t&&(t={url:t}),!t.url)throw"URL missing";t.headers=t.headers||{};const n={stream:function(r,n){const i=Object.create(t),o=n?r+n:"";return i.headers=Object.create(t.headers),i.headers.range="bytes="+r+"-"+o,e(i)},size:function(){return new Promise((function(r,n){const i=e(t);i.on("response",(function(e){i.abort(),e.headers["content-length"]?r(e.headers["content-length"]):n(new Error("Missing content length header"))})).on("error",n)}))}};return i(n,r)},s3:function(e,t,r){return i({size:function(){return new Promise((function(r,n){e.headObject(t,(function(e,t){e?n(e):r(t.ContentLength)}))}))},stream:function(r,n){const i={};for(const e in t)i[e]=t[e];const o=n?r+n:"";return i.Range="bytes="+r+"-"+o,e.getObject(i).createReadStream()}},r)},s3_v3:function(e,t,n){const{GetObjectCommand:s,HeadObjectCommand:a}=r(389);return i({size:async()=>{const r=await e.send(new a({Bucket:t.Bucket,Key:t.Key}));return r.ContentLength?r.ContentLength:0},stream:(r,n)=>{const i=o.PassThrough(),a=n?r+n:"";return e.send(new s({Bucket:t.Bucket,Key:t.Key,Range:`bytes=${r}-${a}`})).then((e=>{e.Body.pipe(i)})).catch((e=>{i.emit("error",e)})),i}},n)},custom:function(e,t){return i(e,t)}}},(e,t,r)=>{const n=r(108),i=r(349),o=r(109),s=r(110),a=r(3),l=r(185),c=r(111),u=r(77),f=r(352),h=Buffer.alloc(4);h.writeUInt32LE(101010256,0),e.exports=function(e,t){const r=n(),d=n(),p=t&&t.tailSize||80;let b,_,y,m;return t&&t.crx&&(_=function(e){const t=e.stream(0).pipe(n());return t.pull(4).then((function(e){if(875721283===e.readUInt32LE(0)){let e;return t.pull(12).then((function(t){e=u.parse(t,[["version",4],["pubKeyLength",4],["signatureLength",4]])})).then((function(){return t.pull(e.pubKeyLength+e.signatureLength)})).then((function(t){return e.publicKey=t.slice(0,e.pubKeyLength),e.signature=t.slice(e.pubKeyLength),e.size=16+e.pubKeyLength+e.signatureLength,e}))}}))}(e)),e.size().then((function(t){return b=t,e.stream(Math.max(0,t-p)).on("error",(function(e){r.emit("error",e)})).pipe(r),r.pull(h)})).then((function(){return f.props({directory:r.pull(22),crxHeader:_})})).then((function(t){const i=t.directory;if(y=t.crxHeader&&t.crxHeader.size||0,m=u.parse(i,[["signature",4],["diskNumber",2],["diskStart",2],["numberOfRecordsOnDisk",2],["numberOfRecords",2],["sizeOfCentralDirectory",4],["offsetToStartOfCentralDirectory",4],["commentLength",2]]),65535==m.diskNumber||65535==m.numberOfRecords||4294967295==m.offsetToStartOfCentralDirectory){const t=20,i=b-(p-r.match+t),o=n();return e.stream(i).pipe(o),o.pull(t).then((function(t){return function(e,t){const r=u.parse(t,[["signature",4],["diskNumber",4],["offsetToStartOfCentralDirectory",8],["numberOfDisks",4]]);if(117853008!=r.signature)throw new Error("invalid zip64 end of central dir locator signature (0x07064b50): 0x"+r.signature.toString(16));const i=n();return e.stream(r.offsetToStartOfCentralDirectory).pipe(i),i.pull(56)}(e,t)})).then((function(e){m=function(e){const t=u.parse(e,[["signature",4],["sizeOfCentralDirectory",8],["version",2],["versionsNeededToExtract",2],["diskNumber",4],["diskStart",4],["numberOfRecordsOnDisk",8],["numberOfRecords",8],["sizeOfCentralDirectory",8],["offsetToStartOfCentralDirectory",8]]);if(101075792!=t.signature)throw new Error("invalid zip64 end of central dir locator signature (0x06064b50): 0x0"+t.signature.toString(16));return t}(e)}))}m.offsetToStartOfCentralDirectory+=y})).then((function(){if(m.commentLength)return r.pull(m.commentLength).then((function(e){m.comment=e.toString("utf8")}))})).then((function(){return e.stream(m.offsetToStartOfCentralDirectory).pipe(d),m.extract=function(e){if(!e||!e.path)throw new Error("PATH_MISSING");return e.path=a.resolve(a.normalize(e.path)),m.files.then((function(t){return f.map(t,(async function(t){const r=a.join(e.path,t.path);if(0!=r.indexOf(e.path))return;if("Directory"==t.type)return void await l.ensureDir(r);await l.ensureDir(a.dirname(r));const n=e.getWriter?e.getWriter({path:r}):l.createWriteStream(r);return new Promise((function(r,i){t.stream(e.password).on("error",i).pipe(n).on("close",r).on("error",i)}))}),{concurrency:e.concurrency>1?e.concurrency:1})}))},m.files=f.mapSeries(Array(m.numberOfRecords),(function(){return d.pull(46).then((function(r){const n=u.parse(r,[["signature",4],["versionMadeBy",2],["versionsNeededToExtract",2],["flags",2],["compressionMethod",2],["lastModifiedTime",2],["lastModifiedDate",2],["crc32",4],["compressedSize",4],["uncompressedSize",4],["fileNameLength",2],["extraFieldLength",2],["fileCommentLength",2],["diskNumber",2],["internalFileAttributes",2],["externalFileAttributes",4],["offsetToLocalFileHeader",4]]);return n.offsetToLocalFileHeader+=y,n.lastModifiedDateTime=c(n.lastModifiedDate,n.lastModifiedTime),d.pull(n.fileNameLength).then((function(e){return n.pathBuffer=e,n.path=e.toString("utf8"),n.isUnicode=!!(2048&n.flags),d.pull(n.extraFieldLength)})).then((function(e){return n.extra=s(e,n),d.pull(n.fileCommentLength)})).then((function(r){n.comment=r,n.type=0===n.uncompressedSize&&/[/\\]$/.test(n.path)?"Directory":"File";const s=t&&t.padding||1e3;return n.stream=function(t){const r=30+s+(n.extraFieldLength||0)+(n.fileNameLength||0)+n.compressedSize;return i(e,n.offsetToLocalFileHeader,t,n,r)},n.buffer=function(e){return o(n.stream(e))},n}))}))})),f.props(m)}))}},(e,t,r)=>{const n=r(350),i=r(108),o=r(16),s=r(105),a=r(110),l=r(111),c=r(77);e.exports=function(e,t,r,u,f){const h=i(),d=o.PassThrough(),p=e.stream(t,f);return p.pipe(h).on("error",(function(e){d.emit("error",e)})),d.vars=h.pull(30).then((function(e){let t=c.parse(e,[["signature",4],["versionsNeededToExtract",2],["flags",2],["compressionMethod",2],["lastModifiedTime",2],["lastModifiedDate",2],["crc32",4],["compressedSize",4],["uncompressedSize",4],["fileNameLength",2],["extraFieldLength",2]]);return t.lastModifiedDateTime=l(t.lastModifiedDate,t.lastModifiedTime),h.pull(t.fileNameLength).then((function(e){return t.fileName=e.toString("utf8"),h.pull(t.extraFieldLength)})).then((function(e){let i;return t.extra=a(e,t),u&&u.compressedSize&&(t=u),1&t.flags&&(i=h.pull(12).then((function(e){if(!r)throw new Error("MISSING_PASSWORD");const i=n();String(r).split("").forEach((function(e){i.update(e)}));for(let t=0;t<e.length;t++)e[t]=i.decryptByte(e[t]);t.decrypt=i,t.compressedSize-=12;const o=8&t.flags?t.lastModifiedTime>>8&255:t.crc32>>24&255;if(e[11]!==o)throw new Error("BAD_PASSWORD");return t}))),Promise.resolve(i).then((function(){return d.emit("vars",t),t}))}))})),d.vars.then((function(e){const t=!(8&e.flags)||e.compressedSize>0;let r;const n=e.compressionMethod?s.createInflateRaw():o.PassThrough();t?(d.size=e.uncompressedSize,r=e.compressedSize):(r=Buffer.alloc(4),r.writeUInt32LE(134695760,0));let i=h.stream(r);e.decrypt&&(i=i.pipe(e.decrypt.stream())),i.pipe(n).on("error",(function(e){d.emit("error",e)})).pipe(d).on("finish",(function(){p.destroy?p.destroy():p.abort?p.abort():p.close?p.close():p.push?p.push():console.log("warning - unable to close stream")}))})).catch((function(e){d.emit("error",e)})),d}},(e,t,r)=>{const n=r(351);let i,o=r(16);function s(e,t){i||function(){let e,t,r;for(i=[],t=0;t<256;t++){for(e=t,r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>=1;i[t]=e>>>0}}(),e.charCodeAt&&(e=e.charCodeAt(0));return(t.readUInt32BE()>>8&16777215^i[255&(t.readUInt32BE()^e>>>0)])>>>0}function a(e,t){const r=65535&e,n=65535&t;return(((e>>16&65535)*n+r*(t>>16&65535)&65535)<<16>>>0)+r*n}function l(){if(!(this instanceof l))return new l;this.key0=Buffer.allocUnsafe(4),this.key1=Buffer.allocUnsafe(4),this.key2=Buffer.allocUnsafe(4),this.key0.writeUInt32BE(305419896,0),this.key1.writeUInt32BE(591751049,0),this.key2.writeUInt32BE(878082192,0)}o.Writable&&o.Writable.prototype.destroy||(o=r(80)),l.prototype.update=function(e){this.key0.writeUInt32BE(s(e,this.key0)),this.key1.writeUInt32BE((255&this.key0.readUInt32BE())+this.key1.readUInt32BE()>>>0);const t=new n(a(this.key1.readUInt32BE(),134775813)+1&4294967295),r=Buffer.alloc(8);t.copy(r,0),r.copy(this.key1,0,4,8),this.key2.writeUInt32BE(s((this.key1.readUInt32BE()>>24&255)>>>0,this.key2))},l.prototype.decryptByte=function(e){const t=(2|this.key2.readUInt32BE())>>>0;return e^=a(t,1^t)>>8&255,this.update(e),e},l.prototype.stream=function(){const e=o.Transform(),t=this;return e._transform=function(e,r,n){for(let r=0;r<e.length;r++)e[r]=t.decryptByte(e[r]);this.push(e),n()},e},e.exports=l},e=>{for(var t=4294967296,r=[],n=0;n<256;n++)r[n]=(n>15?"":"0")+n.toString(16);var i=e.exports=function(e,t){e instanceof Buffer?(this.buffer=e,this.offset=t||0):"[object Uint8Array]"==Object.prototype.toString.call(e)?(this.buffer=new Buffer(e),this.offset=t||0):(this.buffer=this.buffer||new Buffer(8),this.offset=0,this.setValue.apply(this,arguments))};i.MAX_INT=Math.pow(2,53),i.MIN_INT=-Math.pow(2,53),i.prototype={constructor:i,_2scomp:function(){for(var e=this.buffer,t=this.offset,r=1,n=t+7;n>=t;n--){var i=(255^e[n])+r;e[n]=255&i,r=i>>8}},setValue:function(e,r){var n=!1;if(1==arguments.length)if("number"==typeof e){if(n=e<0,r=(e=Math.abs(e))%t,(e/=t)>t)throw new RangeError(e+" is outside Int64 range");e|=0}else{if("string"!=typeof e)throw new Error(e+" must be a Number or String");r=(e=(e+"").replace(/^0x/,"")).substr(-8),e=e.length>8?e.substr(0,e.length-8):"",e=parseInt(e,16),r=parseInt(r,16)}for(var i=this.buffer,o=this.offset,s=7;s>=0;s--)i[o+s]=255&r,r=4==s?e:r>>>8;n&&this._2scomp()},toNumber:function(e){for(var t=this.buffer,r=this.offset,n=128&t[r],o=0,s=1,a=7,l=1;a>=0;a--,l*=256){var c=t[r+a];n&&(s=(c=(255^c)+s)>>8,c&=255),o+=c*l}return!e&&o>=i.MAX_INT?n?-1/0:1/0:n?-o:o},valueOf:function(){return this.toNumber(!1)},toString:function(e){return this.valueOf().toString(e||10)},toOctetString:function(e){for(var t=new Array(8),n=this.buffer,i=this.offset,o=0;o<8;o++)t[o]=r[n[i+o]];return t.join(e||"")},toBuffer:function(e){if(e&&0===this.offset)return this.buffer;var t=new Buffer(8);return this.buffer.copy(t,0,this.offset,this.offset+8),t},copy:function(e,t){this.buffer.copy(e,t||0,this.offset,this.offset+8)},compare:function(e){if((128&this.buffer[this.offset])!=(128&e.buffer[e.offset]))return e.buffer[e.offset]-this.buffer[this.offset];for(var t=0;t<8;t++)if(this.buffer[this.offset+t]!==e.buffer[e.offset+t])return this.buffer[this.offset+t]-e.buffer[e.offset+t];return 0},equals:function(e){return 0===this.compare(e)},inspect:function(){return"[Int64 value:"+this+" octets:"+this.toOctetString(" ")+"]"}}},(e,t,r)=>{e.exports=function e(t,r,n){function i(s,a){if(!r[s]){if(!t[s]){var l="function"==typeof _dereq_&&_dereq_;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[s]={exports:{}};t[s][0].call(u.exports,(function(e){var r=t[s][1][e];return i(r||e)}),u,u.exports,e,t,r,n)}return r[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(e,t,r){t.exports=function(e){var t=e._SomePromiseArray;function r(e){var r=new t(e),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}e.any=function(e){return r(e)},e.prototype.any=function(){return r(this)}}},{}],2:[function(e,t,r){var n;try{throw new Error}catch(e){n=e}var i=e("./schedule"),o=e("./queue");function s(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new o(16),this._normalQueue=new o(16),this._haveDrainedQueues=!1;var e=this;this.drainQueues=function(){e._drainQueues()},this._schedule=i}function a(e,t,r){this._lateQueue.push(e,t,r),this._queueTick()}function l(e,t,r){this._normalQueue.push(e,t,r),this._queueTick()}function c(e){this._normalQueue._pushOne(e),this._queueTick()}function u(e){for(;e.length()>0;)f(e)}function f(e){var t=e.shift();if("function"!=typeof t)t._settlePromises();else{var r=e.shift(),n=e.shift();t.call(r,n)}}s.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t},s.prototype.hasCustomScheduler=function(){return this._customScheduler},s.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},s.prototype.fatalError=function(e,t){t?(process.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),process.exit(2)):this.throwLater(e)},s.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!=typeof setTimeout)setTimeout((function(){e(t)}),0);else try{this._schedule((function(){e(t)}))}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},s.prototype.invokeLater=a,s.prototype.invoke=l,s.prototype.settlePromises=c,s.prototype._drainQueues=function(){u(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,u(this._lateQueue)},s.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},s.prototype._reset=function(){this._isTickUsed=!1},t.exports=s,t.exports.firstLineError=n},{"./queue":26,"./schedule":29}],3:[function(e,t,r){t.exports=function(e,t,r,n){var i=!1,o=function(e,t){this._reject(t)},s=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},a=function(e,t){50397184&this._bitField||this._resolveCallback(t.target)},l=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){i||(i=!0,e.prototype._propagateFrom=n.propagateFromFunction(),e.prototype._boundValue=n.boundValueFunction());var c=r(o),u=new e(t);u._propagateFrom(this,1);var f=this._target();if(u._setBoundTo(c),c instanceof e){var h={promiseRejectionQueued:!1,promise:u,target:f,bindingPromise:c};f._then(t,s,void 0,u,h),c._then(a,l,void 0,u,h),u._setOnCancel(c)}else u._resolveCallback(f);return u},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return!(2097152&~this._bitField)},e.bind=function(t,r){return e.resolve(r).bind(t)}}},{}],4:[function(e,t,r){var n;function i(){try{Promise===o&&(Promise=n)}catch(e){}return o}"undefined"!=typeof Promise&&(n=Promise);var o=e("./promise")();o.noConflict=i,t.exports=o},{"./promise":22}],5:[function(e,t,r){var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}t.exports=function(t){var r,n=e("./util"),i=n.canEvaluate;function o(e,r){var i;if(null!=e&&(i=e[r]),"function"!=typeof i){var o="Object "+n.classString(e)+" has no method '"+n.toString(r)+"'";throw new t.TypeError(o)}return i}function s(e){return o(e,this.pop()).apply(e,this)}function a(e){return e[this]}function l(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}n.isIdentifier,t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(s,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t;if("number"==typeof e)t=l;else if(i){var n=r(e);t=null!==n?n:a}else t=a;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,r){t.exports=function(t,r,n,i){var o=e("./util"),s=o.tryCatch,a=o.errorObj,l=t._async;t.prototype.break=t.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var r=e._cancellationParent;if(null==r||!r._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=r}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),l.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(o.isArray(e))for(var r=0;r<e.length;++r)this._doInvokeOnCancel(e[r],t);else if(void 0!==e)if("function"==typeof e){if(!t){var n=s(e).call(this._boundValue());n===a&&(this._attachExtraTrace(n.e),l.throwLater(n.e))}}else e._resultCancelled(this)},t.prototype._invokeOnCancel=function(){var e=this._onCancel();this._unsetOnCancel(),l.invoke(this._doInvokeOnCancel,this,e)},t.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},t.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(e,t,r){t.exports=function(t){var r=e("./util"),n=e("./es5").keys,i=r.tryCatch,o=r.errorObj;function s(e,s,a){return function(l){var c=a._boundValue();e:for(var u=0;u<e.length;++u){var f=e[u];if(f===Error||null!=f&&f.prototype instanceof Error){if(l instanceof f)return i(s).call(c,l)}else if("function"==typeof f){var h=i(f).call(c,l);if(h===o)return h;if(h)return i(s).call(c,l)}else if(r.isObject(l)){for(var d=n(f),p=0;p<d.length;++p){var b=d[p];if(f[b]!=l[b])continue e}return i(s).call(c,l)}}return t}}return s}},{"./es5":13,"./util":36}],8:[function(e,t,r){t.exports=function(e){var t=!1,r=[];function n(){this._trace=new n.CapturedTrace(o())}function i(){if(t)return new n}function o(){var e=r.length-1;if(e>=0)return r[e]}return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var e=r.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},n.CapturedTrace=null,n.create=i,n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=e.prototype._pushContext,i=e.prototype._popContext,s=e._peekContext,a=e.prototype._peekContext,l=e.prototype._promiseCreated;n.deactivateLongStackTraces=function(){e.prototype._pushContext=r,e.prototype._popContext=i,e._peekContext=s,e.prototype._peekContext=a,e.prototype._promiseCreated=l,t=!1},t=!0,e.prototype._pushContext=n.prototype._pushContext,e.prototype._popContext=n.prototype._popContext,e._peekContext=e.prototype._peekContext=o,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},n}},{}],9:[function(e,t,r){t.exports=function(t,r,n,i){var o,s,a,l,c=t._async,u=e("./errors").Warning,f=e("./util"),h=e("./es5"),d=f.canAttachTrace,p=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,b=/\((?:timers\.js):\d+:\d+\)/,_=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,y=null,m=null,g=!1,w=!(0==f.env("BLUEBIRD_DEBUG")),v=!(0==f.env("BLUEBIRD_WARNINGS")||!w&&!f.env("BLUEBIRD_WARNINGS")),S=!(0==f.env("BLUEBIRD_LONG_STACK_TRACES")||!w&&!f.env("BLUEBIRD_LONG_STACK_TRACES")),E=0!=f.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(v||!!f.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){var e=[];function r(){for(var t=0;t<e.length;++t)e[t]._notifyUnhandledRejection();n()}function n(){e.length=0}l=function(t){e.push(t),setTimeout(r,1)},h.defineProperty(t,"_unhandledRejectionCheck",{value:r}),h.defineProperty(t,"_unhandledRejectionClear",{value:n})}(),t.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=-1048577&e._bitField|524288},t.prototype._ensurePossibleRejectionHandled=function(){524288&this._bitField||(this._setRejectionIsUnhandled(),l(this))},t.prototype._notifyUnhandledRejectionIsHandled=function(){ee("rejectionHandled",o,void 0,this)},t.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},t.prototype._returnedNonUndefined=function(){return!!(268435456&this._bitField)},t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),ee("unhandledRejection",s,e,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(e,t,r){return V(e,t,r||this)},t.onPossiblyUnhandledRejection=function(e){var r=t._getContext();s=f.contextBind(r,e)},t.onUnhandledRejectionHandled=function(e){var r=t._getContext();o=f.contextBind(r,e)};var x=function(){};t.longStackTraces=function(){if(c.haveItemsQueued()&&!ue.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ue.longStackTraces&&ne()){var e=t.prototype._captureStackTrace,n=t.prototype._attachExtraTrace,i=t.prototype._dereferenceTrace;ue.longStackTraces=!0,x=function(){if(c.haveItemsQueued()&&!ue.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");t.prototype._captureStackTrace=e,t.prototype._attachExtraTrace=n,t.prototype._dereferenceTrace=i,r.deactivateLongStackTraces(),ue.longStackTraces=!1},t.prototype._captureStackTrace=U,t.prototype._attachExtraTrace=$,t.prototype._dereferenceTrace=z,r.activateLongStackTraces()}},t.hasLongStackTraces=function(){return ue.longStackTraces&&ne()};var R={unhandledrejection:{before:function(){var e=f.global.onunhandledrejection;return f.global.onunhandledrejection=null,e},after:function(e){f.global.onunhandledrejection=e}},rejectionhandled:{before:function(){var e=f.global.onrejectionhandled;return f.global.onrejectionhandled=null,e},after:function(e){f.global.onrejectionhandled=e}}},A=function(){var e=function(e,t){if(!e)return!f.global.dispatchEvent(t);var r;try{return r=e.before(),!f.global.dispatchEvent(t)}finally{e.after(r)}};try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return f.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=new CustomEvent(t,{detail:r,cancelable:!0});return h.defineProperty(n,"promise",{value:r.promise}),h.defineProperty(n,"reason",{value:r.reason}),e(R[t],n)}}return"function"==typeof Event?(t=new Event("CustomEvent"),f.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=new Event(t,{cancelable:!0});return n.detail=r,h.defineProperty(n,"promise",{value:r.promise}),h.defineProperty(n,"reason",{value:r.reason}),e(R[t],n)}):((t=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),f.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!0,r),e(R[t],n)})}catch(e){}return function(){return!1}}(),O=f.isNode?function(){return process.emit.apply(process,arguments)}:f.global?function(e){var t="on"+e.toLowerCase(),r=f.global[t];return!!r&&(r.apply(f.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function k(e,t){return{promise:t}}var T={promiseCreated:k,promiseFulfilled:k,promiseRejected:k,promiseResolved:k,promiseCancelled:k,promiseChained:function(e,t,r){return{promise:t,child:r}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,r){return{reason:t,promise:r}},rejectionHandled:k},P=function(e){var t=!1;try{t=O.apply(null,arguments)}catch(e){c.throwLater(e),t=!0}var r=!1;try{r=A(e,T[e].apply(null,arguments))}catch(e){c.throwLater(e),r=!0}return r||t};function M(){return!1}function L(e,t,r){var n=this;try{e(t,r,(function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+f.toString(e));n._attachCancellationCallback(e)}))}catch(e){return e}}function C(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?f.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function I(){return this._onCancelField}function D(e){this._onCancelField=e}function N(){this._cancellationParent=void 0,this._onCancelField=void 0}function j(e,t){if(1&t){this._cancellationParent=e;var r=e._branchesRemainingToCancel;void 0===r&&(r=0),e._branchesRemainingToCancel=r+1}2&t&&e._isBound()&&this._setBoundTo(e._boundTo)}function F(e,t){2&t&&e._isBound()&&this._setBoundTo(e._boundTo)}t.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&x()),"warnings"in e){var r=e.warnings;ue.warnings=!!r,E=ue.warnings,f.isObject(r)&&"wForgottenReturn"in r&&(E=!!r.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!ue.cancellation){if(c.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=N,t.prototype._propagateFrom=j,t.prototype._onCancel=I,t.prototype._setOnCancel=D,t.prototype._attachCancellationCallback=C,t.prototype._execute=L,W=j,ue.cancellation=!0}if("monitoring"in e&&(e.monitoring&&!ue.monitoring?(ue.monitoring=!0,t.prototype._fireEvent=P):!e.monitoring&&ue.monitoring&&(ue.monitoring=!1,t.prototype._fireEvent=M)),"asyncHooks"in e&&f.nodeSupportsAsyncResource){var o=ue.asyncHooks,s=!!e.asyncHooks;o!==s&&(ue.asyncHooks=s,s?n():i())}return t},t.prototype._fireEvent=M,t.prototype._execute=function(e,t,r){try{e(t,r)}catch(e){return e}},t.prototype._onCancel=function(){},t.prototype._setOnCancel=function(e){},t.prototype._attachCancellationCallback=function(e){},t.prototype._captureStackTrace=function(){},t.prototype._attachExtraTrace=function(){},t.prototype._dereferenceTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(e,t){};var W=F;function B(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function U(){this._trace=new le(this._peekContext())}function $(e,t){if(d(e)){var r=this._trace;if(void 0!==r&&t&&(r=r._parent),void 0!==r)r.attachExtraTrace(e);else if(!e.__stackCleaned__){var n=X(e);f.notEnumerableProp(e,"stack",n.message+"\n"+n.stack.join("\n")),f.notEnumerableProp(e,"__stackCleaned__",!0)}}}function z(){this._trace=void 0}function G(e,t,r,n,i){if(void 0===e&&null!==t&&E){if(void 0!==i&&i._returnedNonUndefined())return;if(!(65535&n._bitField))return;r&&(r+=" ");var o="",s="";if(t._trace){for(var a=t._trace.stack.split("\n"),l=Z(a),c=l.length-1;c>=0;--c){var u=l[c];if(!b.test(u)){var f=u.match(_);f&&(o="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(l.length>0){var h=l[0];for(c=0;c<a.length;++c)if(a[c]===h){c>0&&(s="\n"+a[c-1]);break}}}var d="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;n._warn(d,!0,t)}}function H(e,t){var r=e+" is deprecated and will be removed in a future version.";return t&&(r+=" Use "+t+" instead."),V(r)}function V(e,r,n){if(ue.warnings){var i,o=new u(e);if(r)n._attachExtraTrace(o);else if(ue.longStackTraces&&(i=t._peekContext()))i.attachExtraTrace(o);else{var s=X(o);o.stack=s.message+"\n"+s.stack.join("\n")}P("warning",o)||J(o,"",!0)}}function q(e,t){for(var r=0;r<t.length-1;++r)t[r].push("From previous event:"),t[r]=t[r].join("\n");return r<t.length&&(t[r]=t[r].join("\n")),e+"\n"+t.join("\n")}function K(e){for(var t=0;t<e.length;++t)(0===e[t].length||t+1<e.length&&e[t][0]===e[t+1][0])&&(e.splice(t,1),t--)}function Y(e){for(var t=e[0],r=1;r<e.length;++r){for(var n=e[r],i=t.length-1,o=t[i],s=-1,a=n.length-1;a>=0;--a)if(n[a]===o){s=a;break}for(a=s;a>=0;--a){var l=n[a];if(t[i]!==l)break;t.pop(),i--}t=n}}function Z(e){for(var t=[],r=0;r<e.length;++r){var n=e[r],i=" (No stack trace)"===n||y.test(n),o=i&&ie(n);i&&!o&&(g&&" "!==n.charAt(0)&&(n=" "+n),t.push(n))}return t}function Q(e){for(var t=e.stack.replace(/\s+$/g,"").split("\n"),r=0;r<t.length;++r){var n=t[r];if(" (No stack trace)"===n||y.test(n))break}return r>0&&"SyntaxError"!=e.name&&(t=t.slice(r)),t}function X(e){var t=e.stack,r=e.toString();return t="string"==typeof t&&t.length>0?Q(e):[" (No stack trace)"],{message:r,stack:"SyntaxError"==e.name?t:Z(t)}}function J(e,t,r){if("undefined"!=typeof console){var n;if(f.isObject(e)){var i=e.stack;n=t+m(i,e)}else n=t+String(e);"function"==typeof a?a(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function ee(e,t,r,n){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(n):t(r,n))}catch(e){c.throwLater(e)}"unhandledRejection"===e?P(e,r,n)||i||J(r,"Unhandled rejection "):P(e,n)}function te(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{if(t=e&&"function"==typeof e.toString?e.toString():f.toString(e),/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+re(t)+">, no stack trace)"}function re(e){var t=41;return e.length<t?e:e.substr(0,t-3)+"..."}function ne(){return"function"==typeof ce}var ie=function(){return!1},oe=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function se(e){var t=e.match(oe);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function ae(e,t){if(ne()){for(var r,n,i=(e.stack||"").split("\n"),o=(t.stack||"").split("\n"),s=-1,a=-1,l=0;l<i.length;++l)if(c=se(i[l])){r=c.fileName,s=c.line;break}for(l=0;l<o.length;++l){var c;if(c=se(o[l])){n=c.fileName,a=c.line;break}}s<0||a<0||!r||!n||r!==n||s>=a||(ie=function(e){if(p.test(e))return!0;var t=se(e);return!!(t&&t.fileName===r&&s<=t.line&&t.line<=a)})}}function le(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);ce(this,le),t>32&&this.uncycle()}f.inherits(le,Error),r.CapturedTrace=le,le.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],r={},n=0,i=this;void 0!==i;++n)t.push(i),i=i._parent;for(n=(e=this._length=n)-1;n>=0;--n){var o=t[n].stack;void 0===r[o]&&(r[o]=n)}for(n=0;n<e;++n){var s=r[t[n].stack];if(void 0!==s&&s!==n){s>0&&(t[s-1]._parent=void 0,t[s-1]._length=1),t[n]._parent=void 0,t[n]._length=1;var a=n>0?t[n-1]:this;s<e-1?(a._parent=t[s+1],a._parent.uncycle(),a._length=a._parent._length+1):(a._parent=void 0,a._length=1);for(var l=a._length+1,c=n-2;c>=0;--c)t[c]._length=l,l++;return}}}},le.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=X(e),r=t.message,n=[t.stack],i=this;void 0!==i;)n.push(Z(i.stack.split("\n"))),i=i._parent;Y(n),K(n),f.notEnumerableProp(e,"stack",q(r,n)),f.notEnumerableProp(e,"__stackCleaned__",!0)}};var ce=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():te(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,y=e,m=t;var r=Error.captureStackTrace;return ie=function(e){return p.test(e)},function(e,t){Error.stackTraceLimit+=6,r(e,t),Error.stackTraceLimit-=6}}var n,i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return y=/@/,m=t,g=!0,function(e){e.stack=(new Error).stack};try{throw new Error}catch(e){n="stack"in e}return!("stack"in i)&&n&&"number"==typeof Error.stackTraceLimit?(y=e,m=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6}):(m=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?te(t):t.toString()},null)}();"undefined"!=typeof console&&void 0!==console.warn&&(a=function(e){console.warn(e)},f.isNode&&process.stderr.isTTY?a=function(e,t){var r=t?"":"";console.warn(r+e+"\n")}:f.isNode||"string"!=typeof(new Error).stack||(a=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var ue={warnings:v,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return S&&t.longStackTraces(),{asyncHooks:function(){return ue.asyncHooks},longStackTraces:function(){return ue.longStackTraces},warnings:function(){return ue.warnings},cancellation:function(){return ue.cancellation},monitoring:function(){return ue.monitoring},propagateFromFunction:function(){return W},boundValueFunction:function(){return B},checkForgottenReturns:G,setBounds:ae,warn:V,deprecated:H,CapturedTrace:le,fireDomEvent:A,fireGlobalEvent:O}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(e,t,r){t.exports=function(e){function t(){return this.value}function r(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(r){return r instanceof e&&r.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:r},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(r,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:e},void 0);var t=arguments[1],n=function(){throw t};return this.caught(e,n)},e.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof e&&r.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:r},void 0);var n=arguments[1];n instanceof e&&n.suppressUnhandledRejections();var i=function(){return n};return this.caught(r,i)}}},{}],11:[function(e,t,r){t.exports=function(e,t){var r=e.reduce,n=e.all;function i(){return n(this)}function o(e,n){return r(e,n,t,t)}e.prototype.each=function(e){return r(this,e,t,0)._then(i,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return r(this,e,t,t)},e.each=function(e,n){return r(e,n,t,0)._then(i,void 0,void 0,e,void 0)},e.mapSeries=o}},{}],12:[function(e,t,r){var n,i,o=e("./es5"),s=o.freeze,a=e("./util"),l=a.inherits,c=a.notEnumerableProp;function u(e,t){function r(n){if(!(this instanceof r))return new r(n);c(this,"message","string"==typeof n?n:t),c(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return l(r,Error),r}var f=u("Warning","warning"),h=u("CancellationError","cancellation error"),d=u("TimeoutError","timeout error"),p=u("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(e){n=u("TypeError","type error"),i=u("RangeError","range error")}for(var b="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),_=0;_<b.length;++_)"function"==typeof Array.prototype[b[_]]&&(p.prototype[b[_]]=Array.prototype[b[_]]);o.defineProperty(p.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),p.prototype.isOperational=!0;var y=0;function m(e){if(!(this instanceof m))return new m(e);c(this,"name","OperationalError"),c(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(c(this,"message",e.message),c(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}p.prototype.toString=function(){var e=Array(4*y+1).join(" "),t="\n"+e+"AggregateError of:\n";y++,e=Array(4*y+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split("\n"),o=0;o<i.length;++o)i[o]=e+i[o];t+=(n=i.join("\n"))+"\n"}return y--,t},l(m,Error);var g=Error.__BluebirdErrorTypes__;g||(g=s({CancellationError:h,TimeoutError:d,OperationalError:m,RejectionError:m,AggregateError:p}),o.defineProperty(Error,"__BluebirdErrorTypes__",{value:g,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error,TypeError:n,RangeError:i,CancellationError:g.CancellationError,OperationalError:g.OperationalError,TimeoutError:g.TimeoutError,AggregateError:g.AggregateError,Warning:f}},{"./es5":13,"./util":36}],13:[function(e,t,r){var n=function(){return void 0===this}();if(n)t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:n,propertyIsWritable:function(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!(r&&!r.writable&&!r.set)}};else{var i={}.hasOwnProperty,o={}.toString,s={}.constructor.prototype,a=function(e){var t=[];for(var r in e)i.call(e,r)&&t.push(r);return t},l=function(e,t){return{value:e[t]}},c=function(e,t,r){return e[t]=r.value,e},u=function(e){return e},f=function(e){try{return Object(e).constructor.prototype}catch(e){return s}},h=function(e){try{return"[object Array]"===o.call(e)}catch(e){return!1}};t.exports={isArray:h,keys:a,names:a,defineProperty:c,getDescriptor:l,freeze:u,getPrototypeOf:f,isES5:n,propertyIsWritable:function(){return!0}}}},{}],14:[function(e,t,r){t.exports=function(e,t){var r=e.map;e.prototype.filter=function(e,n){return r(this,e,n,t)},e.filter=function(e,n,i){return r(e,n,i,t)}}},{}],15:[function(e,t,r){t.exports=function(t,r,n){var i=e("./util"),o=t.CancellationError,s=i.errorObj,a=e("./catch_filter")(n);function l(e,t,r){this.promise=e,this.type=t,this.handler=r,this.called=!1,this.cancelPromise=null}function c(e){this.finallyHandler=e}function u(e,t){return null!=e.cancelPromise&&(arguments.length>1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function f(){return d.call(this,this.promise._target()._settledValue())}function h(e){if(!u(this,e))return s.e=e,s}function d(e){var i=this.promise,a=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?a.call(i._boundValue()):a.call(i._boundValue(),e);if(l===n)return l;if(void 0!==l){i._setReturnedNonUndefined();var d=r(l,i);if(d instanceof t){if(null!=this.cancelPromise){if(d._isCancelled()){var p=new o("late cancellation observer");return i._attachExtraTrace(p),s.e=p,s}d.isPending()&&d._attachCancellationCallback(new c(this))}return d._then(f,h,void 0,this,void 0)}}}return i.isRejected()?(u(this),s.e=e,s):(u(this),e)}return l.prototype.isFinallyHandler=function(){return 0===this.type},c.prototype._resultCancelled=function(){u(this.finallyHandler)},t.prototype._passThrough=function(e,t,r,n){return"function"!=typeof e?this.then():this._then(r,n,void 0,new l(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,d,d)},t.prototype.tap=function(e){return this._passThrough(e,1,d)},t.prototype.tapCatch=function(e){var r=arguments.length;if(1===r)return this._passThrough(e,1,void 0,d);var n,o=new Array(r-1),s=0;for(n=0;n<r-1;++n){var l=arguments[n];if(!i.isObject(l))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+i.classString(l)));o[s++]=l}o.length=s;var c=arguments[n];return this._passThrough(a(o,c,this),1,void 0,d)},l}},{"./catch_filter":7,"./util":36}],16:[function(e,t,r){t.exports=function(t,r,n,i,o,s){var a=e("./errors").TypeError,l=e("./util"),c=l.errorObj,u=l.tryCatch,f=[];function h(e,r,n){for(var o=0;o<r.length;++o){n._pushContext();var s=u(r[o])(e);if(n._popContext(),s===c){n._pushContext();var a=t.reject(c.e);return n._popContext(),a}var l=i(s,n);if(l instanceof t)return l}return null}function d(e,r,i,o){if(s.cancellation()){var a=new t(n),l=this._finallyPromise=new t(n);this._promise=a.lastly((function(){return l})),a._captureStackTrace(),a._setOnCancel(this)}else(this._promise=new t(n))._captureStackTrace();this._stack=o,this._generatorFunction=e,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(f):f,this._yieldedPromise=null,this._cancellationPhase=!1}l.inherits(d,o),d.prototype._isResolved=function(){return null===this._promise},d.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},d.prototype._promiseCancelled=function(){if(!this._isResolved()){var e;if(void 0!==this._generator.return)this._promise._pushContext(),e=u(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),e=u(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},d.prototype._promiseFulfilled=function(e){this._yieldedPromise=null,this._promise._pushContext();var t=u(this._generator.next).call(this._generator,e);this._promise._popContext(),this._continue(t)},d.prototype._promiseRejected=function(e){this._yieldedPromise=null,this._promise._attachExtraTrace(e),this._promise._pushContext();var t=u(this._generator.throw).call(this._generator,e);this._promise._popContext(),this._continue(t)},d.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},d.prototype.promise=function(){return this._promise},d.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},d.prototype._continue=function(e){var r=this._promise;if(e===c)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(e.e,!1);var n=e.value;if(!0===e.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var o=i(n,this._promise);if(o instanceof t||null!==(o=h(o,this._yieldHandlers,this._promise))){var s=(o=o._target())._bitField;50397184&s?33554432&s?t._async.invoke(this._promiseFulfilled,this,o._value()):16777216&s?t._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled():(this._yieldedPromise=o,o._proxy(this,null))}else this._promiseRejected(new a("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(n))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},t.coroutine=function(e,t){if("function"!=typeof e)throw new a("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(t).yieldHandler,n=d,i=(new Error).stack;return function(){var t=e.apply(this,arguments),o=new n(void 0,void 0,r,i),s=o.promise();return o._generator=t,o._promiseFulfilled(void 0),s}},t.coroutine.addYieldHandler=function(e){if("function"!=typeof e)throw new a("expecting a function but got "+l.classString(e));f.push(e)},t.spawn=function(e){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof e)return r("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new d(e,this),i=n.promise();return n._run(t.spawn),i}}},{"./errors":12,"./util":36}],17:[function(e,t,r){t.exports=function(t,r,n,i,o){var s=e("./util");s.canEvaluate,s.tryCatch,s.errorObj,t.join=function(){var e,t=arguments.length-1;t>0&&"function"==typeof arguments[t]&&(e=arguments[t]);var n=[].slice.call(arguments);e&&n.pop();var i=new r(n).promise();return void 0!==e?i.spread(e):i}}},{"./util":36}],18:[function(e,t,r){t.exports=function(t,r,n,i,o,s){var a=e("./util"),l=a.tryCatch,c=a.errorObj,u=t._async;function f(e,r,n,i){this.constructor$(e),this._promise._captureStackTrace();var s=t._getContext();if(this._callback=a.contextBind(s,r),this._preservedValues=i===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],u.invoke(this._asyncInit,this,void 0),a.isArray(e))for(var l=0;l<e.length;++l){var c=e[l];c instanceof t&&c.suppressUnhandledRejections()}}function h(e,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+a.classString(r));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return t.reject(new TypeError("options argument must be an object but it is "+a.classString(i)));if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+a.classString(i.concurrency)));s=i.concurrency}return new f(e,r,s="number"==typeof s&&isFinite(s)&&s>=1?s:0,o).promise()}a.inherits(f,r),f.prototype._asyncInit=function(){this._init$(void 0,-2)},f.prototype._init=function(){},f.prototype._promiseFulfilled=function(e,r){var n=this._values,o=this.length(),a=this._preservedValues,u=this._limit;if(r<0){if(n[r=-1*r-1]=e,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return n[r]=e,this._queue.push(r),!1;null!==a&&(a[r]=e);var f=this._promise,h=this._callback,d=f._boundValue();f._pushContext();var p=l(h).call(d,e,r,o),b=f._popContext();if(s.checkForgottenReturns(p,b,null!==a?"Promise.filter":"Promise.map",f),p===c)return this._reject(p.e),!0;var _=i(p,this._promise);if(_ instanceof t){var y=(_=_._target())._bitField;if(!(50397184&y))return u>=1&&this._inFlight++,n[r]=_,_._proxy(this,-1*(r+1)),!1;if(!(33554432&y))return 16777216&y?(this._reject(_._reason()),!0):(this._cancel(),!0);p=_._value()}n[r]=p}return++this._totalResolved>=o&&(null!==a?this._filter(n,a):this._resolve(n),!0)},f.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,r=this._values;e.length>0&&this._inFlight<t;){if(this._isResolved())return;var n=e.pop();this._promiseFulfilled(r[n],n)}},f.prototype._filter=function(e,t){for(var r=t.length,n=new Array(r),i=0,o=0;o<r;++o)e[o]&&(n[i++]=t[o]);n.length=i,this._resolve(n)},f.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(e,t){return h(this,e,t,null)},t.map=function(e,t,r,n){return h(e,t,r,n)}}},{"./util":36}],19:[function(e,t,r){t.exports=function(t,r,n,i,o){var s=e("./util"),a=s.tryCatch;t.method=function(e){if("function"!=typeof e)throw new t.TypeError("expecting a function but got "+s.classString(e));return function(){var n=new t(r);n._captureStackTrace(),n._pushContext();var i=a(e).apply(this,arguments),s=n._popContext();return o.checkForgottenReturns(i,s,"Promise.method",n),n._resolveFromSyncValue(i),n}},t.attempt=t.try=function(e){if("function"!=typeof e)return i("expecting a function but got "+s.classString(e));var n,l=new t(r);if(l._captureStackTrace(),l._pushContext(),arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],u=arguments[2];n=s.isArray(c)?a(e).apply(u,c):a(e).call(u,c)}else n=a(e)();var f=l._popContext();return o.checkForgottenReturns(n,f,"Promise.try",l),l._resolveFromSyncValue(n),l},t.prototype._resolveFromSyncValue=function(e){e===s.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,r){var n=e("./util"),i=n.maybeWrapAsError,o=e("./errors").OperationalError,s=e("./es5");function a(e){return e instanceof Error&&s.getPrototypeOf(e)===Error.prototype}var l=/^(?:name|message|stack|cause)$/;function c(e){var t;if(a(e)){(t=new o(e)).name=e.name,t.message=e.message,t.stack=e.stack;for(var r=s.keys(e),i=0;i<r.length;++i){var c=r[i];l.test(c)||(t[c]=e[c])}return t}return n.markAsOriginatingFromRejection(e),e}function u(e,t){return function(r,n){if(null!==e){if(r){var o=c(i(r));e._attachExtraTrace(o),e._reject(o)}else if(t){var s=[].slice.call(arguments,1);e._fulfill(s)}else e._fulfill(n);e=null}}}t.exports=u},{"./errors":12,"./es5":13,"./util":36}],21:[function(e,t,r){t.exports=function(t){var r=e("./util"),n=t._async,i=r.tryCatch,o=r.errorObj;function s(e,t){var s=this;if(!r.isArray(e))return a.call(s,e,t);var l=i(t).apply(s._boundValue(),[null].concat(e));l===o&&n.throwLater(l.e)}function a(e,t){var r=this._boundValue(),s=void 0===e?i(t).call(r,null):i(t).call(r,null,e);s===o&&n.throwLater(s.e)}function l(e,t){var r=this;if(!e){var s=new Error(e+"");s.cause=e,e=s}var a=i(t).call(r._boundValue(),e);a===o&&n.throwLater(a.e)}t.prototype.asCallback=t.prototype.nodeify=function(e,t){if("function"==typeof e){var r=a;void 0!==t&&Object(t).spread&&(r=s),this._then(r,l,void 0,this,e)}return this}}},{"./util":36}],22:[function(e,t,r){t.exports=function(){var r=function(){return new w("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},n=function(){return new N.PromiseInspection(this._target())},i=function(e){return N.reject(new w(e))};function o(){}var s={},a=e("./util");a.setReflectHandler(n);var l=function(){var e=process.domain;return void 0===e?null:e},c=function(){return null},u=function(){return{domain:l(),async:null}},f=a.isNode&&a.nodeSupportsAsyncResource?e("async_hooks").AsyncResource:null,h=function(){return{domain:l(),async:new f("Bluebird::Promise")}},d=a.isNode?u:c;a.notEnumerableProp(N,"_getContext",d);var p=function(){d=h,a.notEnumerableProp(N,"_getContext",h)},b=function(){d=u,a.notEnumerableProp(N,"_getContext",u)},_=e("./es5"),y=e("./async"),m=new y;_.defineProperty(N,"_async",{value:m});var g=e("./errors"),w=N.TypeError=g.TypeError;N.RangeError=g.RangeError;var v=N.CancellationError=g.CancellationError;N.TimeoutError=g.TimeoutError,N.OperationalError=g.OperationalError,N.RejectionError=g.OperationalError,N.AggregateError=g.AggregateError;var S=function(){},E={},x={},R=e("./thenables")(N,S),A=e("./promise_array")(N,S,R,i,o),O=e("./context")(N),k=O.create,T=e("./debuggability")(N,O,p,b),P=(T.CapturedTrace,e("./finally")(N,R,x)),M=e("./catch_filter")(x),L=e("./nodeback"),C=a.errorObj,I=a.tryCatch;function D(e,t){if(null==e||e.constructor!==N)throw new w("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof t)throw new w("expecting a function but got "+a.classString(t))}function N(e){e!==S&&D(this,e),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(e),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function j(e){this.promise._resolveCallback(e)}function F(e){this.promise._rejectCallback(e,!1)}function W(e){var t=new N(S);t._fulfillmentHandler0=e,t._rejectionHandler0=e,t._promise0=e,t._receiver0=e}return N.prototype.toString=function(){return"[object Promise]"},N.prototype.caught=N.prototype.catch=function(e){var t=arguments.length;if(t>1){var r,n=new Array(t-1),o=0;for(r=0;r<t-1;++r){var s=arguments[r];if(!a.isObject(s))return i("Catch statement predicate: expecting an object but got "+a.classString(s));n[o++]=s}if(n.length=o,"function"!=typeof(e=arguments[r]))throw new w("The last argument to .catch() must be a function, got "+a.toString(e));return this.then(void 0,M(n,e,this))}return this.then(void 0,e)},N.prototype.reflect=function(){return this._then(n,n,void 0,this,void 0)},N.prototype.then=function(e,t){if(T.warnings()&&arguments.length>0&&"function"!=typeof e&&"function"!=typeof t){var r=".then() only accepts functions but was passed: "+a.classString(e);arguments.length>1&&(r+=", "+a.classString(t)),this._warn(r)}return this._then(e,t,void 0,void 0,void 0)},N.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},N.prototype.spread=function(e){return"function"!=typeof e?i("expecting a function but got "+a.classString(e)):this.all()._then(e,void 0,void 0,E,void 0)},N.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},N.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new A(this).promise()},N.prototype.error=function(e){return this.caught(a.originatesFromRejection,e)},N.getNewLibraryCopy=t.exports,N.is=function(e){return e instanceof N},N.fromNode=N.fromCallback=function(e){var t=new N(S);t._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=I(e)(L(t,r));return n===C&&t._rejectCallback(n.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},N.all=function(e){return new A(e).promise()},N.cast=function(e){var t=R(e);return t instanceof N||((t=new N(S))._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},N.resolve=N.fulfilled=N.cast,N.reject=N.rejected=function(e){var t=new N(S);return t._captureStackTrace(),t._rejectCallback(e,!0),t},N.setScheduler=function(e){if("function"!=typeof e)throw new w("expecting a function but got "+a.classString(e));return m.setScheduler(e)},N.prototype._then=function(e,t,r,n,i){var o=void 0!==i,s=o?i:new N(S),l=this._target(),c=l._bitField;o||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===n&&2097152&this._bitField&&(n=50397184&c?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var u=d();if(50397184&c){var f,h,p=l._settlePromiseCtx;33554432&c?(h=l._rejectionHandler0,f=e):16777216&c?(h=l._fulfillmentHandler0,f=t,l._unsetRejectionIsUnhandled()):(p=l._settlePromiseLateCancellationObserver,h=new v("late cancellation observer"),l._attachExtraTrace(h),f=t),m.invoke(p,l,{handler:a.contextBind(u,f),promise:s,receiver:n,value:h})}else l._addCallbacks(e,t,s,n,u);return s},N.prototype._length=function(){return 65535&this._bitField},N.prototype._isFateSealed=function(){return!!(117506048&this._bitField)},N.prototype._isFollowing=function(){return!(67108864&~this._bitField)},N.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},N.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},N.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},N.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},N.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},N.prototype._isFinal=function(){return(4194304&this._bitField)>0},N.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},N.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},N.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},N.prototype._setAsyncGuaranteed=function(){if(!m.hasCustomScheduler()){var e=this._bitField;this._bitField=e|(536870912&e)>>2^134217728}},N.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&this._bitField|536870912},N.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==s)return void 0===t&&this._isBound()?this._boundValue():t},N.prototype._promiseAt=function(e){return this[4*e-4+2]},N.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},N.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},N.prototype._boundValue=function(){},N.prototype._migrateCallback0=function(e){e._bitField;var t=e._fulfillmentHandler0,r=e._rejectionHandler0,n=e._promise0,i=e._receiverAt(0);void 0===i&&(i=s),this._addCallbacks(t,r,n,i,null)},N.prototype._migrateCallbackAt=function(e,t){var r=e._fulfillmentHandlerAt(t),n=e._rejectionHandlerAt(t),i=e._promiseAt(t),o=e._receiverAt(t);void 0===o&&(o=s),this._addCallbacks(r,n,i,o,null)},N.prototype._addCallbacks=function(e,t,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,"function"==typeof e&&(this._fulfillmentHandler0=a.contextBind(i,e)),"function"==typeof t&&(this._rejectionHandler0=a.contextBind(i,t));else{var s=4*o-4;this[s+2]=r,this[s+3]=n,"function"==typeof e&&(this[s+0]=a.contextBind(i,e)),"function"==typeof t&&(this[s+1]=a.contextBind(i,t))}return this._setLength(o+1),o},N.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},N.prototype._resolveCallback=function(e,t){if(!(117506048&this._bitField)){if(e===this)return this._rejectCallback(r(),!1);var n=R(e,this);if(!(n instanceof N))return this._fulfill(e);t&&this._propagateFrom(n,2);var i=n._target();if(i!==this){var o=i._bitField;if(50397184&o)if(33554432&o)this._fulfill(i._value());else if(16777216&o)this._reject(i._reason());else{var s=new v("late cancellation observer");i._attachExtraTrace(s),this._reject(s)}else{var a=this._length();a>0&&i._migrateCallback0(this);for(var l=1;l<a;++l)i._migrateCallbackAt(this,l);this._setFollowing(),this._setLength(0),this._setFollowee(n)}}else this._reject(r())}},N.prototype._rejectCallback=function(e,t,r){var n=a.ensureErrorObject(e),i=n===e;if(!i&&!r&&T.warnings()){var o="a promise was rejected with a non-error: "+a.classString(e);this._warn(o,!0)}this._attachExtraTrace(n,!!t&&i),this._reject(e)},N.prototype._resolveFromExecutor=function(e){if(e!==S){var t=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(e,(function(e){t._resolveCallback(e)}),(function(e){t._rejectCallback(e,r)}));r=!1,this._popContext(),void 0!==n&&t._rejectCallback(n,!0)}},N.prototype._settlePromiseFromHandler=function(e,t,r,n){var i=n._bitField;if(!(65536&i)){var o;n._pushContext(),t===E?r&&"number"==typeof r.length?o=I(e).apply(this._boundValue(),r):(o=C).e=new w("cannot .spread() a non-array: "+a.classString(r)):o=I(e).call(t,r);var s=n._popContext();65536&(i=n._bitField)||(o===x?n._reject(r):o===C?n._rejectCallback(o.e,!1):(T.checkForgottenReturns(o,s,"",n,this),n._resolveCallback(o)))}},N.prototype._target=function(){for(var e=this;e._isFollowing();)e=e._followee();return e},N.prototype._followee=function(){return this._rejectionHandler0},N.prototype._setFollowee=function(e){this._rejectionHandler0=e},N.prototype._settlePromise=function(e,t,r,i){var s=e instanceof N,a=this._bitField,l=!!(134217728&a);65536&a?(s&&e._invokeInternalOnCancel(),r instanceof P&&r.isFinallyHandler()?(r.cancelPromise=e,I(t).call(r,i)===C&&e._reject(C.e)):t===n?e._fulfill(n.call(r)):r instanceof o?r._promiseCancelled(e):s||e instanceof A?e._cancel():r.cancel()):"function"==typeof t?s?(l&&e._setAsyncGuaranteed(),this._settlePromiseFromHandler(t,r,i,e)):t.call(r,i,e):r instanceof o?r._isResolved()||(33554432&a?r._promiseFulfilled(i,e):r._promiseRejected(i,e)):s&&(l&&e._setAsyncGuaranteed(),33554432&a?e._fulfill(i):e._reject(i))},N.prototype._settlePromiseLateCancellationObserver=function(e){var t=e.handler,r=e.promise,n=e.receiver,i=e.value;"function"==typeof t?r instanceof N?this._settlePromiseFromHandler(t,n,i,r):t.call(n,i,r):r instanceof N&&r._reject(i)},N.prototype._settlePromiseCtx=function(e){this._settlePromise(e.promise,e.handler,e.receiver,e.value)},N.prototype._settlePromise0=function(e,t,r){var n=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,e,i,t)},N.prototype._clearCallbackDataAtIndex=function(e){var t=4*e-4;this[t+2]=this[t+3]=this[t+0]=this[t+1]=void 0},N.prototype._fulfill=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(e===this){var n=r();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(134217728&t?this._settlePromises():m.settlePromises(this),this._dereferenceTrace())}},N.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return m.fatalError(e,a.isNode);(65535&t)>0?m.settlePromises(this):this._ensurePossibleRejectionHandled()}},N.prototype._fulfillPromises=function(e,t){for(var r=1;r<e;r++){var n=this._fulfillmentHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,t)}},N.prototype._rejectPromises=function(e,t){for(var r=1;r<e;r++){var n=this._rejectionHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,t)}},N.prototype._settlePromises=function(){var e=this._bitField,t=65535&e;if(t>0){if(16842752&e){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,e),this._rejectPromises(t,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,e),this._fulfillPromises(t,n)}this._setLength(0)}this._clearCancellationData()},N.prototype._settledValue=function(){var e=this._bitField;return 33554432&e?this._rejectionHandler0:16777216&e?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&_.defineProperty(N.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),N.defer=N.pending=function(){return T.deprecated("Promise.defer","new Promise"),{promise:new N(S),resolve:j,reject:F}},a.notEnumerableProp(N,"_makeSelfResolutionError",r),e("./method")(N,S,R,i,T),e("./bind")(N,S,R,T),e("./cancel")(N,A,i,T),e("./direct_resolve")(N),e("./synchronous_inspection")(N),e("./join")(N,A,R,S,m),N.Promise=N,N.version="3.7.2",e("./call_get.js")(N),e("./generators.js")(N,i,S,R,o,T),e("./map.js")(N,A,i,R,S,T),e("./nodeify.js")(N),e("./promisify.js")(N,S),e("./props.js")(N,A,R,i),e("./race.js")(N,S,R,i),e("./reduce.js")(N,A,i,R,S,T),e("./settle.js")(N,A,T),e("./some.js")(N,A,i),e("./timers.js")(N,S,T),e("./using.js")(N,i,R,k,S,T),e("./any.js")(N),e("./each.js")(N,S),e("./filter.js")(N,S),a.toFastProperties(N),a.toFastProperties(N.prototype),W({a:1}),W({b:2}),W({c:3}),W(1),W((function(){})),W(void 0),W(!1),W(new N(S)),T.setBounds(y.firstLineError,a.lastLineError),N}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36,async_hooks:void 0}],23:[function(e,t,r){t.exports=function(t,r,n,i,o){var s=e("./util");function a(e){switch(e){case-2:return[];case-3:return{};case-6:return new Map}}function l(e){var n=this._promise=new t(r);e instanceof t&&(n._propagateFrom(e,3),e.suppressUnhandledRejections()),n._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return s.isArray,s.inherits(l,o),l.prototype.length=function(){return this._length},l.prototype.promise=function(){return this._promise},l.prototype._init=function e(r,o){var l=n(this._values,this._promise);if(l instanceof t){var c=(l=l._target())._bitField;if(this._values=l,!(50397184&c))return this._promise._setAsyncGuaranteed(),l._then(e,this._reject,void 0,this,o);if(!(33554432&c))return 16777216&c?this._reject(l._reason()):this._cancel();l=l._value()}if(null!==(l=s.asArray(l)))0!==l.length?this._iterate(l):-5===o?this._resolveEmptyArray():this._resolve(a(o));else{var u=i("expecting an array or an iterable object but got "+s.classString(l)).reason();this._promise._rejectCallback(u,!1)}},l.prototype._iterate=function(e){var r=this.getActualLength(e.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,s=null,a=0;a<r;++a){var l=n(e[a],i);s=l instanceof t?(l=l._target())._bitField:null,o?null!==s&&l.suppressUnhandledRejections():null!==s?50397184&s?o=33554432&s?this._promiseFulfilled(l._value(),a):16777216&s?this._promiseRejected(l._reason(),a):this._promiseCancelled(a):(l._proxy(this,a),this._values[a]=l):o=this._promiseFulfilled(l,a)}o||i._setAsyncGuaranteed()},l.prototype._isResolved=function(){return null===this._values},l.prototype._resolve=function(e){this._values=null,this._promise._fulfill(e)},l.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},l.prototype._reject=function(e){this._values=null,this._promise._rejectCallback(e,!1)},l.prototype._promiseFulfilled=function(e,t){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},l.prototype._promiseCancelled=function(){return this._cancel(),!0},l.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},l.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var r=0;r<e.length;++r)e[r]instanceof t&&e[r].cancel()}},l.prototype.shouldCopyValues=function(){return!0},l.prototype.getActualLength=function(e){return e},l}},{"./util":36}],24:[function(e,t,r){t.exports=function(t,r){var n={},i=e("./util"),o=e("./nodeback"),s=i.withAppended,a=i.maybeWrapAsError,l=i.canEvaluate,c=e("./errors").TypeError,u="Async",f={__isPromisified__:!0},h=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),d=function(e){return i.isIdentifier(e)&&"_"!==e.charAt(0)&&"constructor"!==e};function p(e){return!h.test(e)}function b(e){try{return!0===e.__isPromisified__}catch(e){return!1}}function _(e,t,r){var n=i.getDataPropertyOrDefault(e,t+r,f);return!!n&&b(n)}function y(e,t,r){for(var n=0;n<e.length;n+=2){var i=e[n];if(r.test(i))for(var o=i.replace(r,""),s=0;s<e.length;s+=2)if(e[s]===o)throw new c("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",t))}}function m(e,t,r,n){for(var o=i.inheritedDataKeys(e),s=[],a=0;a<o.length;++a){var l=o[a],c=e[l],u=n===d||d(l,c,e);"function"!=typeof c||b(c)||_(e,l,t)||!n(l,c,e,u)||s.push(l,c)}return y(s,t,r),s}var g,w=function(e){return e.replace(/([$])/,"\\$")};function v(e,l,c,u,f,h){var d=function(){return this}(),p=e;function b(){var i=l;l===n&&(i=this);var c=new t(r);c._captureStackTrace();var u="string"==typeof p&&this!==d?this[p]:e,f=o(c,h);try{u.apply(i,s(arguments,f))}catch(e){c._rejectCallback(a(e),!0,!0)}return c._isFateSealed()||c._setAsyncGuaranteed(),c}return"string"==typeof p&&(e=u),i.notEnumerableProp(b,"__isPromisified__",!0),b}var S=l?g:v;function E(e,t,r,o,s){for(var a=new RegExp(w(t)+"$"),l=m(e,t,a,r),c=0,u=l.length;c<u;c+=2){var f=l[c],h=l[c+1],d=f+t;if(o===S)e[d]=S(f,n,f,h,t,s);else{var p=o(h,(function(){return S(f,n,f,h,t,s)}));i.notEnumerableProp(p,"__isPromisified__",!0),e[d]=p}}return i.toFastProperties(e),e}function x(e,t,r){return S(e,t,void 0,e,null,r)}t.promisify=function(e,t){if("function"!=typeof e)throw new c("expecting a function but got "+i.classString(e));if(b(e))return e;var r=x(e,void 0===(t=Object(t)).context?n:t.context,!!t.multiArgs);return i.copyDescriptors(e,r,p),r},t.promisifyAll=function(e,t){if("function"!=typeof e&&"object"!=typeof e)throw new c("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var r=!!(t=Object(t)).multiArgs,n=t.suffix;"string"!=typeof n&&(n=u);var o=t.filter;"function"!=typeof o&&(o=d);var s=t.promisifier;if("function"!=typeof s&&(s=S),!i.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=i.inheritedDataKeys(e),l=0;l<a.length;++l){var f=e[a[l]];"constructor"!==a[l]&&i.isClass(f)&&(E(f.prototype,n,o,s,r),E(f,n,o,s,r))}return E(e,n,o,s,r)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(e,t,r){t.exports=function(t,r,n,i){var o,s=e("./util"),a=s.isObject,l=e("./es5");"function"==typeof Map&&(o=Map);var c=function(){var e=0,t=0;function r(r,n){this[e]=r,this[e+t]=n,e++}return function(n){t=n.size,e=0;var i=new Array(2*n.size);return n.forEach(r,i),i}}(),u=function(e){for(var t=new o,r=e.length/2|0,n=0;n<r;++n){var i=e[r+n],s=e[n];t.set(i,s)}return t};function f(e){var t,r=!1;if(void 0!==o&&e instanceof o)t=c(e),r=!0;else{var n=l.keys(e),i=n.length;t=new Array(2*i);for(var s=0;s<i;++s){var a=n[s];t[s]=e[a],t[s+i]=a}}this.constructor$(t),this._isMap=r,this._init$(void 0,r?-6:-3)}function h(e){var r,o=n(e);return a(o)?(r=o instanceof t?o._then(t.props,void 0,void 0,void 0,void 0):new f(o).promise(),o instanceof t&&r._propagateFrom(o,2),r):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}s.inherits(f,r),f.prototype._init=function(){},f.prototype._promiseFulfilled=function(e,t){if(this._values[t]=e,++this._totalResolved>=this._length){var r;if(this._isMap)r=u(this._values);else{r={};for(var n=this.length(),i=0,o=this.length();i<o;++i)r[this._values[i+n]]=this._values[i]}return this._resolve(r),!0}return!1},f.prototype.shouldCopyValues=function(){return!1},f.prototype.getActualLength=function(e){return e>>1},t.prototype.props=function(){return h(this)},t.props=function(e){return h(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,r){function n(e,t,r,n,i){for(var o=0;o<i;++o)r[o+n]=e[o+t],e[o+t]=void 0}function i(e){this._capacity=e,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(e){return this._capacity<e},i.prototype._pushOne=function(e){var t=this.length();this._checkCapacity(t+1),this[this._front+t&this._capacity-1]=e,this._length=t+1},i.prototype.push=function(e,t,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(e),this._pushOne(t),void this._pushOne(r);var i=this._front+n-3;this._checkCapacity(n);var o=this._capacity-1;this[i+0&o]=e,this[i+1&o]=t,this[i+2&o]=r,this._length=n},i.prototype.shift=function(){var e=this._front,t=this[e];return this[e]=void 0,this._front=e+1&this._capacity-1,this._length--,t},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(e){this._capacity<e&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(e){var t=this._capacity;this._capacity=e,n(this,0,this,t,this._front+this._length&t-1)},t.exports=i},{}],27:[function(e,t,r){t.exports=function(t,r,n,i){var o=e("./util"),s=function(e){return e.then((function(t){return a(t,e)}))};function a(e,a){var l=n(e);if(l instanceof t)return s(l);if(null===(e=o.asArray(e)))return i("expecting an array or an iterable object but got "+o.classString(e));var c=new t(r);void 0!==a&&c._propagateFrom(a,3);for(var u=c._fulfill,f=c._reject,h=0,d=e.length;h<d;++h){var p=e[h];(void 0!==p||h in e)&&t.cast(p)._then(u,f,void 0,c,null)}return c}t.race=function(e){return a(e,void 0)},t.prototype.race=function(){return a(this,void 0)}}},{"./util":36}],28:[function(e,t,r){t.exports=function(t,r,n,i,o,s){var a=e("./util"),l=a.tryCatch;function c(e,r,n,i){this.constructor$(e);var s=t._getContext();this._fn=a.contextBind(s,r),void 0!==n&&(n=t.resolve(n))._attachCancellationCallback(this),this._initialValue=n,this._currentCancellable=null,this._eachValues=i===o?Array(this._length):0===i?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function u(e,t){this.isFulfilled()?t._resolve(e):t._reject(e)}function f(e,t,r,i){return"function"!=typeof t?n("expecting a function but got "+a.classString(t)):new c(e,t,r,i).promise()}function h(e){this.accum=e,this.array._gotAccum(e);var r=i(this.value,this.array._promise);return r instanceof t?(this.array._currentCancellable=r,r._then(d,void 0,void 0,this,void 0)):d.call(this,r)}function d(e){var r,n=this.array,i=n._promise,o=l(n._fn);i._pushContext(),(r=void 0!==n._eachValues?o.call(i._boundValue(),e,this.index,this.length):o.call(i._boundValue(),this.accum,e,this.index,this.length))instanceof t&&(n._currentCancellable=r);var a=i._popContext();return s.checkForgottenReturns(r,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",i),r}a.inherits(c,r),c.prototype._gotAccum=function(e){void 0!==this._eachValues&&null!==this._eachValues&&e!==o&&this._eachValues.push(e)},c.prototype._eachComplete=function(e){return null!==this._eachValues&&this._eachValues.push(e),this._eachValues},c.prototype._init=function(){},c.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},c.prototype.shouldCopyValues=function(){return!1},c.prototype._resolve=function(e){this._promise._resolveCallback(e),this._values=null},c.prototype._resultCancelled=function(e){if(e===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel())},c.prototype._iterate=function(e){var r,n;this._values=e;var i=e.length;void 0!==this._initialValue?(r=this._initialValue,n=0):(r=t.resolve(e[0]),n=1),this._currentCancellable=r;for(var o=n;o<i;++o){var s=e[o];s instanceof t&&s.suppressUnhandledRejections()}if(!r.isRejected())for(;n<i;++n){var a={accum:null,value:e[n],index:n,length:i,array:this};r=r._then(h,void 0,void 0,a,void 0),127&n||r._setNoAsyncGuarantee()}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(u,u,void 0,r,this)},t.prototype.reduce=function(e,t){return f(this,e,t,null)},t.reduce=function(e,t,r,n){return f(e,t,r,n)}}},{"./util":36}],29:[function(e,t,n){var i,o=e("./util"),s=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},a=o.getNativePromise();if(o.isNode&&"undefined"==typeof MutationObserver){var l=r.g.setImmediate,c=process.nextTick;i=o.isRecentNode?function(e){l.call(r.g,e)}:function(e){c.call(process,e)}}else if("function"==typeof a&&"function"==typeof a.resolve){var u=a.resolve();i=function(e){u.then(e)}}else i="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)||!("classList"in document.documentElement)?"undefined"!=typeof setImmediate?function(e){setImmediate(e)}:"undefined"!=typeof setTimeout?function(e){setTimeout(e,0)}:s:function(){var e=document.createElement("div"),t={attributes:!0},r=!1,n=document.createElement("div");new MutationObserver((function(){e.classList.toggle("foo"),r=!1})).observe(n,t);var i=function(){r||(r=!0,n.classList.toggle("foo"))};return function(r){var n=new MutationObserver((function(){n.disconnect(),r()}));n.observe(e,t),i()}}();t.exports=i},{"./util":36}],30:[function(e,t,r){t.exports=function(t,r,n){var i=t.PromiseInspection;function o(e){this.constructor$(e)}e("./util").inherits(o,r),o.prototype._promiseResolved=function(e,t){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(e,t){var r=new i;return r._bitField=33554432,r._settledValueField=e,this._promiseResolved(t,r)},o.prototype._promiseRejected=function(e,t){var r=new i;return r._bitField=16777216,r._settledValueField=e,this._promiseResolved(t,r)},t.settle=function(e){return n.deprecated(".settle()",".reflect()"),new o(e).promise()},t.allSettled=function(e){return new o(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,r){t.exports=function(t,r,n){var i=e("./util"),o=e("./errors").RangeError,s=e("./errors").AggregateError,a=i.isArray,l={};function c(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function u(e,t){if((0|t)!==t||t<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new c(e),i=r.promise();return r.setHowMany(t),r.init(),i}i.inherits(c,r),c.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var e=a(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},c.prototype.init=function(){this._initialized=!0,this._init()},c.prototype.setUnwrap=function(){this._unwrap=!0},c.prototype.howMany=function(){return this._howMany},c.prototype.setHowMany=function(e){this._howMany=e},c.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},c.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},c.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},c.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new s,t=this.length();t<this._values.length;++t)this._values[t]!==l&&e.push(this._values[t]);return e.length>0?this._reject(e):this._cancel(),!0}return!1},c.prototype._fulfilled=function(){return this._totalResolved},c.prototype._rejected=function(){return this._values.length-this.length()},c.prototype._addRejected=function(e){this._values.push(e)},c.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},c.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},c.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new o(t)},c.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return u(e,t)},t.prototype.some=function(e){return u(this,e)},t._SomePromiseArray=c}},{"./errors":12,"./util":36}],32:[function(e,t,r){t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var r=t.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=t.prototype.error=t.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=t.prototype.isFulfilled=function(){return!!(33554432&this._bitField)},o=t.prototype.isRejected=function(){return!!(16777216&this._bitField)},s=t.prototype.isPending=function(){return!(50397184&this._bitField)},a=t.prototype.isResolved=function(){return!!(50331648&this._bitField)};t.prototype.isCancelled=function(){return!!(8454144&this._bitField)},e.prototype.__isCancelled=function(){return!(65536&~this._bitField)},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return!!(8454144&this._target()._bitField)},e.prototype.isPending=function(){return s.call(this._target())},e.prototype.isRejected=function(){return o.call(this._target())},e.prototype.isFulfilled=function(){return i.call(this._target())},e.prototype.isResolved=function(){return a.call(this._target())},e.prototype.value=function(){return r.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),n.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,r){t.exports=function(t,r){var n=e("./util"),i=n.errorObj,o=n.isObject;function s(e,n){if(o(e)){if(e instanceof t)return e;var s=l(e);if(s===i){n&&n._pushContext();var a=t.reject(s.e);return n&&n._popContext(),a}if("function"==typeof s)return u(e)?(a=new t(r),e._then(a._fulfill,a._reject,void 0,a,null),a):f(e,s,n)}return e}function a(e){return e.then}function l(e){try{return a(e)}catch(e){return i.e=e,i}}var c={}.hasOwnProperty;function u(e){try{return c.call(e,"_promise0")}catch(e){return!1}}function f(e,o,s){var a=new t(r),l=a;s&&s._pushContext(),a._captureStackTrace(),s&&s._popContext();var c=!0,u=n.tryCatch(o).call(e,f,h);function f(e){a&&(a._resolveCallback(e),a=null)}function h(e){a&&(a._rejectCallback(e,c,!0),a=null)}return c=!1,a&&u===i&&(a._rejectCallback(u.e,!0,!0),a=null),l}return s}},{"./util":36}],34:[function(e,t,r){t.exports=function(t,r,n){var i=e("./util"),o=t.TimeoutError;function s(e){this.handle=e}s.prototype._resultCancelled=function(){clearTimeout(this.handle)};var a=function(e){return l(+this).thenReturn(e)},l=t.delay=function(e,i){var o,l;return void 0!==i?(o=t.resolve(i)._then(a,null,null,e,void 0),n.cancellation()&&i instanceof t&&o._setOnCancel(i)):(o=new t(r),l=setTimeout((function(){o._fulfill()}),+e),n.cancellation()&&o._setOnCancel(new s(l)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};t.prototype.delay=function(e){return l(e,this)};var c=function(e,t,r){var n;n="string"!=typeof t?t instanceof Error?t:new o("operation timed out"):new o(t),i.markAsOriginatingFromRejection(n),e._attachExtraTrace(n),e._reject(n),null!=r&&r.cancel()};function u(e){return clearTimeout(this.handle),e}function f(e){throw clearTimeout(this.handle),e}t.prototype.timeout=function(e,t){var r,i;e=+e;var o=new s(setTimeout((function(){r.isPending()&&c(r,t,i)}),e));return n.cancellation()?(i=this.then(),(r=i._then(u,f,void 0,o,void 0))._setOnCancel(o)):r=this._then(u,f,void 0,o,void 0),r}}},{"./util":36}],35:[function(e,t,r){t.exports=function(t,r,n,i,o,s){var a=e("./util"),l=e("./errors").TypeError,c=e("./util").inherits,u=a.errorObj,f=a.tryCatch,h={};function d(e){setTimeout((function(){throw e}),0)}function p(e){var t=n(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}function b(e,r){var i=0,s=e.length,a=new t(o);function l(){if(i>=s)return a._fulfill();var o=p(e[i++]);if(o instanceof t&&o._isDisposable()){try{o=n(o._getDisposer().tryDispose(r),e.promise)}catch(e){return d(e)}if(o instanceof t)return o._then(l,d,null,null,null)}l()}return l(),a}function _(e,t,r){this._data=e,this._promise=t,this._context=r}function y(e,t,r){this.constructor$(e,t,r)}function m(e){return _.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function g(e){this.length=e,this.promise=null,this[e-1]=null}_.prototype.data=function(){return this._data},_.prototype.promise=function(){return this._promise},_.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():h},_.prototype.tryDispose=function(e){var t=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=t!==h?this.doDispose(t,e):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},_.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},c(y,_),y.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},g.prototype._resultCancelled=function(){for(var e=this.length,r=0;r<e;++r){var n=this[r];n instanceof t&&n.cancel()}},t.using=function(){var e=arguments.length;if(e<2)return r("you must pass at least 2 arguments to Promise.using");var i,o=arguments[e-1];if("function"!=typeof o)return r("expecting a function but got "+a.classString(o));var l=!0;2===e&&Array.isArray(arguments[0])?(e=(i=arguments[0]).length,l=!1):(i=arguments,e--);for(var c=new g(e),h=0;h<e;++h){var d=i[h];if(_.isDisposer(d)){var p=d;(d=d.promise())._setDisposable(p)}else{var y=n(d);y instanceof t&&(d=y._then(m,null,null,{resources:c,index:h},void 0))}c[h]=d}var w=new Array(c.length);for(h=0;h<w.length;++h)w[h]=t.resolve(c[h]).reflect();var v=t.all(w).then((function(e){for(var t=0;t<e.length;++t){var r=e[t];if(r.isRejected())return u.e=r.error(),u;if(!r.isFulfilled())return void v.cancel();e[t]=r.value()}S._pushContext(),o=f(o);var n=l?o.apply(void 0,e):o(e),i=S._popContext();return s.checkForgottenReturns(n,i,"Promise.using",S),n})),S=v.lastly((function(){var e=new t.PromiseInspection(v);return b(c,e)}));return c.promise=S,S._setOnCancel(c),S},t.prototype._setDisposable=function(e){this._bitField=131072|this._bitField,this._disposer=e},t.prototype._isDisposable=function(){return(131072&this._bitField)>0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(e){if("function"==typeof e)return new y(e,this,i());throw new l}}},{"./errors":12,"./util":36}],36:[function(e,t,n){var i,o=e("./es5"),s="undefined"==typeof navigator,a={e:{}},l="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r.g?r.g:void 0!==this?this:null;function c(){try{var e=i;return i=null,e.apply(this,arguments)}catch(e){return a.e=e,a}}function u(e){return i=e,c}var f=function(e,t){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=e,this.constructor$=t,t.prototype)r.call(t.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=t.prototype[n])}return n.prototype=t.prototype,e.prototype=new n,e.prototype};function h(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function d(e){return"function"==typeof e||"object"==typeof e&&null!==e}function p(e){return h(e)?new Error(A(e)):e}function b(e,t){var r,n=e.length,i=new Array(n+1);for(r=0;r<n;++r)i[r]=e[r];return i[r]=t,i}function _(e,t,r){if(!o.isES5)return{}.hasOwnProperty.call(e,t)?e[t]:void 0;var n=Object.getOwnPropertyDescriptor(e,t);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function y(e,t,r){if(h(e))return e;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return o.defineProperty(e,t,n),e}function m(e){throw e}var g=function(){var e=[Array.prototype,Object.prototype,Function.prototype],t=function(t){for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1};if(o.isES5){var r=Object.getOwnPropertyNames;return function(e){for(var n=[],i=Object.create(null);null!=e&&!t(e);){var s;try{s=r(e)}catch(e){return n}for(var a=0;a<s.length;++a){var l=s[a];if(!i[l]){i[l]=!0;var c=Object.getOwnPropertyDescriptor(e,l);null!=c&&null==c.get&&null==c.set&&n.push(l)}}e=o.getPrototypeOf(e)}return n}}var n={}.hasOwnProperty;return function(r){if(t(r))return[];var i=[];e:for(var o in r)if(n.call(r,o))i.push(o);else{for(var s=0;s<e.length;++s)if(n.call(e[s],o))continue e;i.push(o)}return i}}(),w=/this\s*\.\s*\S+\s*=/;function v(e){try{if("function"==typeof e){var t=o.names(e.prototype),r=o.isES5&&t.length>1,n=t.length>0&&!(1===t.length&&"constructor"===t[0]),i=w.test(e+"")&&o.names(e).length>0;if(r||n||i)return!0}return!1}catch(e){return!1}}function S(e){function t(){}t.prototype=e;var r=new t;function n(){return typeof r.foo}return n(),n(),e}var E=/^[a-z$_][a-z$_0-9]*$/i;function x(e){return E.test(e)}function R(e,t,r){for(var n=new Array(e),i=0;i<e;++i)n[i]=t+i+r;return n}function A(e){try{return e+""}catch(e){return"[no string representation]"}}function O(e){return e instanceof Error||null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name}function k(e){try{y(e,"isOperational",!0)}catch(e){}}function T(e){return null!=e&&(e instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===e.isOperational)}function P(e){return O(e)&&o.propertyIsWritable(e,"stack")}var M="stack"in new Error?function(e){return P(e)?e:new Error(A(e))}:function(e){if(P(e))return e;try{throw new Error(A(e))}catch(e){return e}};function L(e){return{}.toString.call(e)}function C(e,t,r){for(var n=o.names(e),i=0;i<n.length;++i){var s=n[i];if(r(s))try{o.defineProperty(t,s,o.getDescriptor(e,s))}catch(e){}}}var I=function(e){return o.isArray(e)?e:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var D="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){for(var t,r=[],n=e[Symbol.iterator]();!(t=n.next()).done;)r.push(t.value);return r};I=function(e){return o.isArray(e)?e:null!=e&&"function"==typeof e[Symbol.iterator]?D(e):null}}var N,j="undefined"!=typeof process&&"[object process]"===L(process).toLowerCase(),F="undefined"!=typeof process&&void 0!==process.env;function W(e){return F?process.env[e]:void 0}function B(){if("function"==typeof Promise)try{if("[object Promise]"===L(new Promise((function(){}))))return Promise}catch(e){}}function U(e,t){if(null===e||"function"!=typeof t||t===N)return t;null!==e.domain&&(t=e.domain.bind(t));var r=e.async;if(null!==r){var n=t;t=function(){var e=new Array(2).concat([].slice.call(arguments));return e[0]=n,e[1]=this,r.runInAsyncScope.apply(r,e)}}return t}var $,z={setReflectHandler:function(e){N=e},isClass:v,isIdentifier:x,inheritedDataKeys:g,getDataPropertyOrDefault:_,thrower:m,isArray:o.isArray,asArray:I,notEnumerableProp:y,isPrimitive:h,isObject:d,isError:O,canEvaluate:s,errorObj:a,tryCatch:u,inherits:f,withAppended:b,maybeWrapAsError:p,toFastProperties:S,filledRange:R,toString:A,canAttachTrace:P,ensureErrorObject:M,originatesFromRejection:T,markAsOriginatingFromRejection:k,classString:L,copyDescriptors:C,isNode:j,hasEnvVariables:F,env:W,global:l,getNativePromise:B,contextBind:U};z.isRecentNode=z.isNode&&(process.versions&&process.versions.node?$=process.versions.node.split(".").map(Number):process.version&&($=process.version.split(".").map(Number)),0===$[0]&&$[1]>10||$[0]>0),z.nodeSupportsAsyncResource=z.isNode&&function(){var t=!1;try{t="function"==typeof e("async_hooks").AsyncResource.prototype.runInAsyncScope}catch(e){t=!1}return t}(),z.isNode&&z.toFastProperties(process);try{throw new Error}catch(e){z.lastLineError=e}t.exports=z},{"./es5":13,async_hooks:void 0}]},{},[4])(4),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)},(e,t,r)=>{var n=r(55).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=u,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=s(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=s(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AST=void 0;const n=r(370),i=r(203),o=new Set(["!","?","+","*","@"]),s=e=>o.has(e),a="(?!\\.)",l=new Set(["[","."]),c=new Set(["..","."]),u=new Set("().*{}+?[]^$\\!"),f="[^/]",h=f+"*?",d=f+"+?";class p{type;#oe;#se;#ae=!1;#le=[];#ce;#ue;#fe;#he=!1;#de;#pe;#be=!1;constructor(e,t,r={}){this.type=e,e&&(this.#se=!0),this.#ce=t,this.#oe=this.#ce?this.#ce.#oe:this,this.#de=this.#oe===this?r:this.#oe.#de,this.#fe=this.#oe===this?[]:this.#oe.#fe,"!"!==e||this.#oe.#he||this.#fe.push(this),this.#ue=this.#ce?this.#ce.#le.length:0}get hasMagic(){if(void 0!==this.#se)return this.#se;for(const e of this.#le)if("string"!=typeof e&&(e.type||e.hasMagic))return this.#se=!0;return this.#se}toString(){return void 0!==this.#pe?this.#pe:this.type?this.#pe=this.type+"("+this.#le.map((e=>String(e))).join("|")+")":this.#pe=this.#le.map((e=>String(e))).join("")}#_e(){if(this!==this.#oe)throw new Error("should only call on root");if(this.#he)return this;let e;for(this.toString(),this.#he=!0;e=this.#fe.pop();){if("!"!==e.type)continue;let t=e,r=t.#ce;for(;r;){for(let n=t.#ue+1;!r.type&&n<r.#le.length;n++)for(const t of e.#le){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(r.#le[n])}t=r,r=t.#ce}}return this}push(...e){for(const t of e)if(""!==t){if("string"!=typeof t&&!(t instanceof p&&t.#ce===this))throw new Error("invalid part: "+t);this.#le.push(t)}}toJSON(){const e=null===this.type?this.#le.slice().map((e=>"string"==typeof e?e:e.toJSON())):[this.type,...this.#le.map((e=>e.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#oe||this.#oe.#he&&"!"===this.#ce?.type)&&e.push({}),e}isStart(){if(this.#oe===this)return!0;if(!this.#ce?.isStart())return!1;if(0===this.#ue)return!0;const e=this.#ce;for(let t=0;t<this.#ue;t++){const r=e.#le[t];if(!(r instanceof p&&"!"===r.type))return!1}return!0}isEnd(){if(this.#oe===this)return!0;if("!"===this.#ce?.type)return!0;if(!this.#ce?.isEnd())return!1;if(!this.type)return this.#ce?.isEnd();const e=this.#ce?this.#ce.#le.length:0;return this.#ue===e-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(e){const t=new p(this.type,e);for(const e of this.#le)t.copyIn(e);return t}static#ye(e,t,r,n){let i=!1,o=!1,a=-1,l=!1;if(null===t.type){let c=r,u="";for(;c<e.length;){const r=e.charAt(c++);if(i||"\\"===r)i=!i,u+=r;else if(o)c===a+1?"^"!==r&&"!"!==r||(l=!0):"]"!==r||c===a+2&&l||(o=!1),u+=r;else if("["!==r)if(n.noext||!s(r)||"("!==e.charAt(c))u+=r;else{t.push(u),u="";const i=new p(r,t);c=p.#ye(e,i,c,n),t.push(i)}else o=!0,a=c,l=!1,u+=r}return t.push(u),c}let c=r+1,u=new p(null,t);const f=[];let h="";for(;c<e.length;){const r=e.charAt(c++);if(i||"\\"===r)i=!i,h+=r;else if(o)c===a+1?"^"!==r&&"!"!==r||(l=!0):"]"!==r||c===a+2&&l||(o=!1),h+=r;else if("["!==r)if(s(r)&&"("===e.charAt(c)){u.push(h),h="";const t=new p(r,u);u.push(t),c=p.#ye(e,t,c,n)}else if("|"!==r){if(")"===r)return""===h&&0===t.#le.length&&(t.#be=!0),u.push(h),h="",t.push(...f,u),c;h+=r}else u.push(h),h="",f.push(u),u=new p(null,t);else o=!0,a=c,l=!1,h+=r}return t.type=null,t.#se=void 0,t.#le=[e.substring(r-1)],c}static fromGlob(e,t={}){const r=new p(null,void 0,t);return p.#ye(e,r,0,t),r}toMMPattern(){if(this!==this.#oe)return this.#oe.toMMPattern();const e=this.toString(),[t,r,n,i]=this.toRegExpSource();if(!(n||this.#se||this.#de.nocase&&!this.#de.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;const o=(this.#de.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${t}$`,o),{_src:t,_glob:e})}toRegExpSource(e){const t=e??!!this.#de.dot;if(this.#oe===this&&this.#_e(),!this.type){const r=this.isStart()&&this.isEnd(),n=this.#le.map((t=>{const[n,i,o,s]="string"==typeof t?p.#me(t,this.#se,r):t.toRegExpSource(e);return this.#se=this.#se||o,this.#ae=this.#ae||s,n})).join("");let o="";if(this.isStart()&&"string"==typeof this.#le[0]){if(!(1===this.#le.length&&c.has(this.#le[0]))){const r=l,i=t&&r.has(n.charAt(0))||n.startsWith("\\.")&&r.has(n.charAt(2))||n.startsWith("\\.\\.")&&r.has(n.charAt(4)),s=!t&&!e&&r.has(n.charAt(0));o=i?"(?!(?:^|/)\\.\\.?(?:$|/))":s?a:""}}let s="";this.isEnd()&&this.#oe.#he&&"!"===this.#ce?.type&&(s="(?:$|\\/)");return[o+n+s,(0,i.unescape)(n),this.#se=!!this.#se,this.#ae]}const r="*"===this.type||"+"===this.type,n="!"===this.type?"(?:(?!(?:":"(?:";let o=this.#ge(t);if(this.isStart()&&this.isEnd()&&!o&&"!"!==this.type){const e=this.toString();return this.#le=[e],this.type=null,this.#se=void 0,[e,(0,i.unescape)(this.toString()),!1,!1]}let s=!r||e||t?"":this.#ge(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let u="";if("!"===this.type&&this.#be)u=(this.isStart()&&!t?a:"")+d;else{u=n+o+("!"===this.type?"))"+(!this.isStart()||t||e?"":a)+h+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&s?")":"*"===this.type&&s?")?":`)${this.type}`)}return[u,(0,i.unescape)(o),this.#se=!!this.#se,this.#ae]}#ge(e){return this.#le.map((t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");const[r,n,i,o]=t.toRegExpSource(e);return this.#ae=this.#ae||o,r})).filter((e=>!(this.isStart()&&this.isEnd()&&!e))).join("|")}static#me(e,t,r=!1){let o=!1,s="",a=!1;for(let i=0;i<e.length;i++){const l=e.charAt(i);if(o)o=!1,s+=(u.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[r,o,l,c]=(0,n.parseClass)(e,i);if(l){s+=r,a=a||o,i+=l-1,t=t||c;continue}}"*"!==l?"?"!==l?s+=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(s+=f,t=!0):(s+=r&&"*"===e?d:h,t=!0)}else i===e.length-1?s+="\\\\":o=!0}return[s,(0,i.unescape)(e),!!t,a]}}t.AST=p},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.escape=void 0;t.escape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Glob=void 0;const n=r(37),i=r(115),o=r(156),s=r(289),a=r(372),l="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";class c{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,o.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth="number"==typeof t.maxDepth?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&void 0!==this.absolute)throw new Error("cannot set absolute and withFileTypes:true");if("string"==typeof e&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(e=e.map((e=>e.replace(/\\/g,"/")))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map((e=>e.includes("/")?e:`./**/${e}`))}if(this.pattern=e,this.platform=t.platform||l,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,void 0!==t.nocase&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{const e="win32"===t.platform?i.PathScurryWin32:"darwin"===t.platform?i.PathScurryDarwin:t.platform?i.PathScurryPosix:i.PathScurry;this.scurry=new e(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;const r="darwin"===this.platform||"win32"===this.platform,a={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:r,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},c=this.pattern.map((e=>new n.Minimatch(e,a))),[u,f]=c.reduce(((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e)),[[],[]]);this.patterns=u.map(((e,t)=>{const r=f[t];if(!r)throw new Error("invalid pattern object");return new s.Pattern(e,r,0,this.platform)}))}async walk(){return[...await new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}t.Glob=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.hasMagic=void 0;const n=r(37);t.hasMagic=(e,t={})=>{Array.isArray(e)||(e=[e]);for(const r of e)if(new n.Minimatch(r,t).hasMagic())return!0;return!1}},(e,t,r)=>{var n=r(208).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=u,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=s(t[n]),i>=0)return i>0&&(e.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=s(t[n]),i>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AST=void 0;const n=r(379),i=r(209),o=new Set(["!","?","+","*","@"]),s=e=>o.has(e),a="(?!\\.)",l=new Set(["[","."]),c=new Set(["..","."]),u=new Set("().*{}+?[]^$\\!"),f="[^/]",h=f+"*?",d=f+"+?";class p{type;#oe;#se;#ae=!1;#le=[];#ce;#ue;#fe;#he=!1;#de;#pe;#be=!1;constructor(e,t,r={}){this.type=e,e&&(this.#se=!0),this.#ce=t,this.#oe=this.#ce?this.#ce.#oe:this,this.#de=this.#oe===this?r:this.#oe.#de,this.#fe=this.#oe===this?[]:this.#oe.#fe,"!"!==e||this.#oe.#he||this.#fe.push(this),this.#ue=this.#ce?this.#ce.#le.length:0}get hasMagic(){if(void 0!==this.#se)return this.#se;for(const e of this.#le)if("string"!=typeof e&&(e.type||e.hasMagic))return this.#se=!0;return this.#se}toString(){return void 0!==this.#pe?this.#pe:this.type?this.#pe=this.type+"("+this.#le.map((e=>String(e))).join("|")+")":this.#pe=this.#le.map((e=>String(e))).join("")}#_e(){if(this!==this.#oe)throw new Error("should only call on root");if(this.#he)return this;let e;for(this.toString(),this.#he=!0;e=this.#fe.pop();){if("!"!==e.type)continue;let t=e,r=t.#ce;for(;r;){for(let n=t.#ue+1;!r.type&&n<r.#le.length;n++)for(const t of e.#le){if("string"==typeof t)throw new Error("string part in extglob AST??");t.copyIn(r.#le[n])}t=r,r=t.#ce}}return this}push(...e){for(const t of e)if(""!==t){if("string"!=typeof t&&!(t instanceof p&&t.#ce===this))throw new Error("invalid part: "+t);this.#le.push(t)}}toJSON(){const e=null===this.type?this.#le.slice().map((e=>"string"==typeof e?e:e.toJSON())):[this.type,...this.#le.map((e=>e.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#oe||this.#oe.#he&&"!"===this.#ce?.type)&&e.push({}),e}isStart(){if(this.#oe===this)return!0;if(!this.#ce?.isStart())return!1;if(0===this.#ue)return!0;const e=this.#ce;for(let t=0;t<this.#ue;t++){const r=e.#le[t];if(!(r instanceof p&&"!"===r.type))return!1}return!0}isEnd(){if(this.#oe===this)return!0;if("!"===this.#ce?.type)return!0;if(!this.#ce?.isEnd())return!1;if(!this.type)return this.#ce?.isEnd();const e=this.#ce?this.#ce.#le.length:0;return this.#ue===e-1}copyIn(e){"string"==typeof e?this.push(e):this.push(e.clone(this))}clone(e){const t=new p(this.type,e);for(const e of this.#le)t.copyIn(e);return t}static#ye(e,t,r,n){let i=!1,o=!1,a=-1,l=!1;if(null===t.type){let c=r,u="";for(;c<e.length;){const r=e.charAt(c++);if(i||"\\"===r)i=!i,u+=r;else if(o)c===a+1?"^"!==r&&"!"!==r||(l=!0):"]"!==r||c===a+2&&l||(o=!1),u+=r;else if("["!==r)if(n.noext||!s(r)||"("!==e.charAt(c))u+=r;else{t.push(u),u="";const i=new p(r,t);c=p.#ye(e,i,c,n),t.push(i)}else o=!0,a=c,l=!1,u+=r}return t.push(u),c}let c=r+1,u=new p(null,t);const f=[];let h="";for(;c<e.length;){const r=e.charAt(c++);if(i||"\\"===r)i=!i,h+=r;else if(o)c===a+1?"^"!==r&&"!"!==r||(l=!0):"]"!==r||c===a+2&&l||(o=!1),h+=r;else if("["!==r)if(s(r)&&"("===e.charAt(c)){u.push(h),h="";const t=new p(r,u);u.push(t),c=p.#ye(e,t,c,n)}else if("|"!==r){if(")"===r)return""===h&&0===t.#le.length&&(t.#be=!0),u.push(h),h="",t.push(...f,u),c;h+=r}else u.push(h),h="",f.push(u),u=new p(null,t);else o=!0,a=c,l=!1,h+=r}return t.type=null,t.#se=void 0,t.#le=[e.substring(r-1)],c}static fromGlob(e,t={}){const r=new p(null,void 0,t);return p.#ye(e,r,0,t),r}toMMPattern(){if(this!==this.#oe)return this.#oe.toMMPattern();const e=this.toString(),[t,r,n,i]=this.toRegExpSource();if(!(n||this.#se||this.#de.nocase&&!this.#de.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return r;const o=(this.#de.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${t}$`,o),{_src:t,_glob:e})}toRegExpSource(e){const t=e??!!this.#de.dot;if(this.#oe===this&&this.#_e(),!this.type){const r=this.isStart()&&this.isEnd(),n=this.#le.map((t=>{const[n,i,o,s]="string"==typeof t?p.#me(t,this.#se,r):t.toRegExpSource(e);return this.#se=this.#se||o,this.#ae=this.#ae||s,n})).join("");let o="";if(this.isStart()&&"string"==typeof this.#le[0]){if(!(1===this.#le.length&&c.has(this.#le[0]))){const r=l,i=t&&r.has(n.charAt(0))||n.startsWith("\\.")&&r.has(n.charAt(2))||n.startsWith("\\.\\.")&&r.has(n.charAt(4)),s=!t&&!e&&r.has(n.charAt(0));o=i?"(?!(?:^|/)\\.\\.?(?:$|/))":s?a:""}}let s="";this.isEnd()&&this.#oe.#he&&"!"===this.#ce?.type&&(s="(?:$|\\/)");return[o+n+s,(0,i.unescape)(n),this.#se=!!this.#se,this.#ae]}const r="*"===this.type||"+"===this.type,n="!"===this.type?"(?:(?!(?:":"(?:";let o=this.#ge(t);if(this.isStart()&&this.isEnd()&&!o&&"!"!==this.type){const e=this.toString();return this.#le=[e],this.type=null,this.#se=void 0,[e,(0,i.unescape)(this.toString()),!1,!1]}let s=!r||e||t?"":this.#ge(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let u="";if("!"===this.type&&this.#be)u=(this.isStart()&&!t?a:"")+d;else{u=n+o+("!"===this.type?"))"+(!this.isStart()||t||e?"":a)+h+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&s?")":"*"===this.type&&s?")?":`)${this.type}`)}return[u,(0,i.unescape)(o),this.#se=!!this.#se,this.#ae]}#ge(e){return this.#le.map((t=>{if("string"==typeof t)throw new Error("string type in extglob ast??");const[r,n,i,o]=t.toRegExpSource(e);return this.#ae=this.#ae||o,r})).filter((e=>!(this.isStart()&&this.isEnd()&&!e))).join("|")}static#me(e,t,r=!1){let o=!1,s="",a=!1;for(let i=0;i<e.length;i++){const l=e.charAt(i);if(o)o=!1,s+=(u.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[r,o,l,c]=(0,n.parseClass)(e,i);if(l){s+=r,a=a||o,i+=l-1,t=t||c;continue}}"*"!==l?"?"!==l?s+=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(s+=f,t=!0):(s+=r&&"*"===e?d:h,t=!0)}else i===e.length-1?s+="\\\\":o=!0}return[s,(0,i.unescape)(e),!!t,a]}}t.AST=p},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.escape=void 0;t.escape=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&")},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Glob=void 0;const n=r(38),i=r(115),o=r(156),s=r(313),a=r(380),l="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";class c{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,o.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth="number"==typeof t.maxDepth?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&void 0!==this.absolute)throw new Error("cannot set absolute and withFileTypes:true");if("string"==typeof e&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(e=e.map((e=>e.replace(/\\/g,"/")))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map((e=>e.includes("/")?e:`./**/${e}`))}if(this.pattern=e,this.platform=t.platform||l,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,void 0!==t.nocase&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{const e="win32"===t.platform?i.PathScurryWin32:"darwin"===t.platform?i.PathScurryDarwin:t.platform?i.PathScurryPosix:i.PathScurry;this.scurry=new e(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;const r="darwin"===this.platform||"win32"===this.platform,a={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:r,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},c=this.pattern.map((e=>new n.Minimatch(e,a))),[u,f]=c.reduce(((e,t)=>(e[0].push(...t.set),e[1].push(...t.globParts),e)),[[],[]]);this.patterns=u.map(((e,t)=>{const r=f[t];if(!r)throw new Error("invalid pattern object");return new s.Pattern(e,r,0,this.platform)}))}async walk(){return[...await new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walk()]}walkSync(){return[...new a.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).walkSync()]}stream(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).stream()}streamSync(){return new a.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}t.Glob=c},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.hasMagic=void 0;const n=r(38);t.hasMagic=(e,t={})=>{Array.isArray(e)||(e=[e]);for(const r of e)if(new n.Minimatch(r,t).hasMagic())return!0;return!1}},(e,t,r)=>{r.a(e,(async(e,n)=>{try{r.r(t);var i=r(116),o=r.n(i),s=r(119),a=r.n(s),l=r(125),c=r.n(l),u=r(212),f=r.n(u),h=r(384),d=r(189),p=r(39),b=r(288),_=r(385),y=r(3),m=r(386);function G(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=H(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function H(e,t){if(e){if("string"==typeof e)return V(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?V(e,t):void 0}}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var g=new d.Logger({name:"web-documentation.deploy"}),w=(0,y.resolve)("./build/"),v=(0,y.resolve)("./data/"),S=["apiDocumentation/","api/"],E="${name}/${version}/",x=(0,y.join)(v,"distributionBundle.zip"),R=(0,y.join)(v,"distributionBundle"),A=[],O={module:{preprocessor:{ejs:{options:{locals:{__evaluate__:"parameters"}}}}},offline:null},k="",T="web-documentation",P="https://github.com/thaibault/"+T+".git",M={name:"__dummy__",version:"1.0.0"},L=!1,C=function(){var e=a()(c().mark((function e(t){var r,n;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===t&&(t={}),r=o()({directory:!1,encoding:"utf8",extension:"",prefix:"DW"},t),e.next=1,(0,b.mkdtemp)((0,y.join)((0,_.tmpdir)(),r.prefix),r.encoding);case 1:if(n=e.sent,!r.directory){e.next=2;break}return e.abrupt("return",n);case 2:return e.abrupt("return",(0,y.join)(n,""+r.prefix+r.extension));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(e,t){return void 0===t&&(t={}),(0,h.execSync)(e,o()({encoding:"utf-8",shell:"/bin/bash"},t))},D=function(){try{return I.apply(void 0,arguments),!0}catch(e){return!1}},N=function(){var e=a()(c().mark((function e(t){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,r){var n=[];t.on("data",(function(e){return n.push(e)})),t.on("end",(function(){e(Buffer.concat(n))})),t.on("error",(function(e){r(e)}))})));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=function(){var e=a()(c().mark((function e(t,r){var n,i,s,a,l,u,f,h,_,v,A,T,P,N,j,F,U,$,z,H,V,q,K,Y,Z,Q,X,J,ee,te,re;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g.info("Generate document website artefacts."),!r){e.next=5;break}return g.info("Prepare distribution files."),n=(0,y.join)(t,(0,y.relative)("./",w),(0,y.relative)("./",x)),e.next=1,(0,b.mkdir)((0,y.dirname)(n),{recursive:!0});case 1:return e.next=2,(0,b.copyFile)(r,n);case 2:return e.next=3,(0,b.rm)(r);case 3:return i=(0,y.join)(t,(0,y.relative)("./",w),(0,y.relative)("./",R)),e.next=4,(0,b.mkdir)(i,{recursive:!0});case 4:return e.next=5,new Promise((function(e,t){(0,p.createReadStream)(n).pipe((0,m.Extract)({path:i})).on("close",(function(){e()})).on("error",(function(e){t(e)}))}));case 5:return g.info("Prepare favicon file."),s="favicon.png",e.next=6,(0,d.isFile)(s);case 6:if(!e.sent){e.next=7;break}return e.next=7,(0,b.copyFile)(s,t+"/source/image/favicon.ico");case 7:for(g.info("Render html."),a={},l=0,u=Object.entries(M.documentationWebsite||{});l<u.length;l++)f=u[l],h=f[0],_=f[1],a[(0,d.camelCaseToDelimited)(h).toUpperCase()]=_;if(!a.TAGLINE&&M.description&&(a.TAGLINE=M.description),!a.NAME&&M.name&&(a.NAME=M.name),g.debug('Found parameters "'+(0,d.represent)(a)+'" to render.'),v=null,!L){e.next=9;break}return v=S[1]+E,e.next=8,(0,d.isDirectory)(v);case 8:if(e.sent){e.next=9;break}v=S[1];case 9:return Y=o(),Z={},Q=a,X=k,J=v,e.next=10,(0,d.isFile)(x);case 10:if(!e.sent){e.next=11;break}ee=(0,y.relative)("./",x),e.next=12;break;case 11:ee=null;case 12:for(a=Y(Z,Q,{CONTENT:X,API_DOCUMENTATION_PATH:J,DISTRIBUTION_BUNDLE_FILE_PATH:ee}),A=0,T=Object.entries(a);A<T.length;A++)P=T[A],N=P[0],"string"==typeof(j=P[1])&&(a[N]=j.replace("!","#%%%#"));return F=JSON.stringify((0,d.evaluateDynamicData)(O,o()({parameters:a},M))),e.next=13,C({extension:".json"});case 13:return U=e.sent,e.next=14,(0,b.writeFile)(U,F);case 14:if(!($=(0,d.evaluate)("`yarn build:web '{__reference__: \"${parametersFilePath}\"}'`",o()({parameters:a,parametersFilePath:U},M))).error){e.next=15;break}throw new Error($.error);case 15:return z=$.result,g.debug('Use final parameters "'+F+'".'),g.info('Run "'+z+'".'),g.debug(I(z,{cwd:t})),e.next=16,(0,b.rm)(U);case 16:return te=G,e.next=17,(0,b.readdir)("./");case 17:H=te(e.sent);case 18:if((V=H()).done){e.next=22;break}if(q=V.value,re=[(0,y.resolve)(t),(0,y.resolve)(S[1])].includes((0,y.resolve)(q))){e.next=20;break}return e.next=19,W(q);case 19:re=e.sent;case 20:if(re){e.next=21;break}return e.next=21,(0,b.rm)(q,{recursive:!0});case 21:e.next=18;break;case 22:return g.info("Copy all build artefacts."),K=(0,y.join)(t,(0,y.relative)("./",w)),e.next=23,(0,d.walkDirectoryRecursively)(K,(function(e){return B(K,"./",e)}));case 23:return e.next=24,(0,b.rm)(t,{recursive:!0});case 24:D("git config user.email")||g.debug(I('git config user.email "github_actor@example.com"')),D("git config user.name")||g.debug(I('git config user.name "github_actor"')),g.debug(I("git add --all")),g.debug(I('git commit --message "Update project homepage content." --all')),g.debug(I("git push")),g.debug(I("git checkout main"));case 25:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){var e=a()(c().mark((function e(){var t,r,n,i,o,s,l,u,h,_,m;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M.scripts&&(M.scripts["build:bundle:compatible"]||M.scripts["build:bundle"]||M.scripts.build)&&(t="yarn "+(M.scripts["build:bundle:compatible"]?"build:bundle:compatible":M.scripts["build:bundle"]?"build:bundle":"build"),g.info('Build distribution bundle via "'+t+'".'),g.debug(I(t))),g.info("Pack to a zip archive."),e.next=1,C({extension:".zip"});case 1:if(r=e.sent,n=M.files||[],M.main&&n.push(M.main),0!==n.length){e.next=2;break}return e.abrupt("return",null);case 2:return i=function(){var e=a()(c().mark((function e(t){var r,n,o,s;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[],n=c().mark((function e(){var t,n,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.value,t=(0,y.resolve)(t),e.next=1,W(t);case 1:if(e.sent){e.next=6;break}return e.next=2,(0,d.isDirectory)(t);case 2:if(!e.sent){e.next=5;break}return n=r,o=i,e.next=3,(0,b.readdir)(t);case 3:return e.next=4,o(e.sent.map((function(e){return(0,y.resolve)(t,e)})));case 4:r=n.concat.call(n,e.sent),e.next=6;break;case 5:g.debug('Add "'+t+'" to distribution bundle.'),r.push(t);case 6:case"end":return e.stop()}}),e)})),o=G(t);case 1:if((s=o()).done){e.next=3;break}return e.delegateYield(n(),"t0",2);case 2:e.next=1;break;case 3:return e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),(o=f()("zip",{zlib:{level:9}})).pipe((0,p.createWriteStream)(r)),s=new Promise((function(e,t){o.on("error",(function(e){t(e)})),o.on("warning",(function(e){g.warn(e)})),o.on("progress",(function(t){var r=t.entries;r.total===r.processed&&e()}))})),_=G,e.next=3,i(n);case 3:l=_(e.sent);case 4:if((u=l()).done){e.next=7;break}return h=u.value,m=o,e.next=5,N((0,p.createReadStream)(h));case 5:m.append.call(m,e.sent,{name:(0,y.relative)("./",h)});case 6:e.next=4;break;case 7:return e.next=8,o.finalize();case 8:return e.next=9,s;case 9:return e.abrupt("return",r);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),W=function(){var e=a()(c().mark((function e(t){var r,n,i,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(0,y.basename)(t,(0,y.extname)(t)).startsWith(".")&&!(0,y.basename)(t).startsWith(".yarn")||"dummyDocumentation"===(0,y.basename)(t,(0,y.extname)(t))){e.next=3;break}return e.next=1,(0,d.isDirectory)(t);case 1:if(!(i=e.sent)){e.next=2;break}i=["node_modules","build"].includes((0,y.basename)(t));case 2:n=i;case 3:if(r=n){e.next=6;break}return e.next=4,(0,d.isFile)(t);case 4:if(!(o=e.sent)){e.next=5;break}o="params.json"===(0,y.basename)(t);case 5:r=o;case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),B=function(){var e=a()(c().mark((function e(t,r,n){var i,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,W(n.path);case 1:if(o=e.sent){e.next=2;break}o="readme.md"===(0,y.basename)(n.name);case 2:if(!o){e.next=3;break}return e.abrupt("return",!1);case 3:if(r=(0,y.join)(r,(0,y.relative)(t,n.path)),g.debug('Copy "'+n.path+'" to "'+r+'".'),null==(i=n.stats)||!i.isFile()){e.next=5;break}return e.next=4,(0,b.copyFile)(n.path,r);case 4:e.next=6;break;case 5:return e.next=6,(0,b.mkdir)(r);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(){var e=a()(c().mark((function e(t){var r;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,W(t.path);case 1:if(!e.sent){e.next=2;break}return e.abrupt("return",!1);case 2:if("readme"!==(0,y.basename)(t.name,(0,y.extname)(t.name))){e.next=4;break}return g.info('Handle "'+t.path+'".'),k&&(k+="\n"),r=k,e.next=3,(0,b.readFile)(t.path,"utf8");case 3:k=r+=e.sent;case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$=function(){var e=a()(c().mark((function e(){var t,r,n,i,o;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=0,r=A;case 1:if(!(t<r.length)){e.next=3;break}return n=r[t],e.next=2,(0,b.rm)(n,{recursive:!0});case 2:t++,e.next=1;break;case 3:if(i=(0,y.resolve)(S[1]),!(o=L)){e.next=5;break}return e.next=4,(0,d.isDirectory)(i);case 4:o=!e.sent;case 5:if(!o){e.next=6;break}I("git checkout '"+i+"'");case 6:I("git branch").includes("* main")||g.debug(I("git checkout main"));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=a()(c().mark((function e(){var t,r,n,i,s,a,l,u,f,h,p,_;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!I("git branch --all").includes("gh-pages")){g.debug(I("git fetch --all"));try{g.debug(I("git checkout package.json"))}catch(e){}g.debug(I("git checkout gh-pages"))}if(I("git branch").includes("* main")||g.debug(I("git checkout main")),g.debug(I("git pull")),!I("git branch").includes("* main")||!I("git branch --all").includes("gh-pages")){e.next=28;break}if(M=(0,d.optionalRequire)((0,y.resolve)("./package.json"))||M,!(t=(0,d.evaluate)("`"+E+"`",M)).error){e.next=1;break}throw new Error(t.error);case 1:return E=t.result,g.info("Read and Compile all markdown files and transform to html."),e.next=2,(0,d.walkDirectoryRecursively)("./",U);case 2:return r=null,e.prev=3,e.next=4,F();case 4:r=e.sent,e.next=6;break;case 5:e.prev=5,h=e.catch(3),g.error("Error occurred during building distribution bundle:",h),process.exitCode=1;case 6:if(!(p=r)){e.next=8;break}return e.next=7,(0,d.isFile)(r);case 7:p=e.sent;case 8:if(!p){e.next=11;break}return n=(0,y.join)(v,(0,y.basename)(r)),e.next=9,(0,b.mkdir)(v,{recursive:!0});case 9:return e.next=10,(0,b.copyFile)(r,n);case 10:A.push(n);case 11:if(L=!!M.scripts&&Object.prototype.hasOwnProperty.call(M.scripts,"document"))try{g.debug(I("yarn document"))}catch(e){L=!1}return g.debug(I("git checkout gh-pages")),g.debug(I("git pull")),i=(0,y.resolve)(S[1]),e.next=12,(0,d.isDirectory)(i);case 12:if(!e.sent){e.next=13;break}return e.next=13,(0,b.rm)(i,{recursive:!0});case 13:return e.next=14,(0,d.isDirectory)(S[0]);case 14:if(!e.sent){e.next=16;break}return e.next=15,(0,b.rename)((0,y.resolve)(S[0]),i);case 15:A.push(i);case 16:return e.next=17,C({directory:!0,prefix:T});case 17:if(s=e.sent,a=(0,y.resolve)("../"+T),!(_=true)){e.next=19;break}return e.next=18,(0,d.isDirectory)(a);case 18:_=e.sent;case 19:if(!_){e.next=21;break}return g.info("Copy local existing "+T+"."),e.next=20,(0,d.walkDirectoryRecursively)(a,(function(e){return B(a,s,e)}));case 20:e.next=22;break;case 21:g.info("No local existing "+T+" found","getting it remotely."),g.debug(I("unset GIT_WORK_TREE; git clone '"+P+"'",{cwd:s})),s=(0,y.resolve)(s,T);case 22:return g.debug(I("corepack enable",{cwd:s})),g.debug(I("corepack install",{cwd:s})),g.debug(I("yarn install",{cwd:s,env:o()({},process.env,{NODE_ENV:"debug"})})),g.debug(I("yarn clear",{cwd:s})),e.next=23,j(s,r);case 23:l=0,u=[i,v,s];case 24:if(!(l<u.length)){e.next=27;break}return f=u[l],e.next=25,(0,d.isDirectory)(f);case 25:if(!e.sent){e.next=26;break}return e.next=26,(0,b.rm)(f,{recursive:!0});case 26:l++,e.next=24;break;case 27:case 28:case"end":return e.stop()}}),e,null,[[3,5]])})));return function(){return e.apply(this,arguments)}}();try{await z()}catch(q){throw await $(),q}n()}catch(K){n(K)}}),1)},(e,t,r)=>{function n(e,...t){return(...r)=>e(...t,...r)}function i(e){return function(...t){var r=t.pop();return e.call(this,t,r)}}r.r(t),r.d(t,{all:()=>be,allLimit:()=>_e,allSeries:()=>ye,any:()=>rt,anyLimit:()=>nt,anySeries:()=>it,apply:()=>n,applyEach:()=>M,applyEachSeries:()=>I,asyncify:()=>f,auto:()=>j,autoInject:()=>$,cargo:()=>V,cargoQueue:()=>q,compose:()=>Z,concat:()=>J,concatLimit:()=>X,concatSeries:()=>ee,constant:()=>te,default:()=>_t,detect:()=>ne,detectLimit:()=>ie,detectSeries:()=>oe,dir:()=>ae,doDuring:()=>le,doUntil:()=>ce,doWhilst:()=>le,during:()=>dt,each:()=>fe,eachLimit:()=>he,eachOf:()=>T,eachOfLimit:()=>A,eachOfSeries:()=>L,eachSeries:()=>de,ensureAsync:()=>pe,every:()=>be,everyLimit:()=>_e,everySeries:()=>ye,filter:()=>ve,filterLimit:()=>Se,filterSeries:()=>Ee,find:()=>ne,findLimit:()=>ie,findSeries:()=>oe,flatMap:()=>J,flatMapLimit:()=>X,flatMapSeries:()=>ee,foldl:()=>K,foldr:()=>ze,forEach:()=>fe,forEachLimit:()=>he,forEachOf:()=>T,forEachOfLimit:()=>A,forEachOfSeries:()=>L,forEachSeries:()=>de,forever:()=>xe,groupBy:()=>Ae,groupByLimit:()=>Re,groupBySeries:()=>Oe,inject:()=>K,log:()=>ke,map:()=>P,mapLimit:()=>Q,mapSeries:()=>C,mapValues:()=>Pe,mapValuesLimit:()=>Te,mapValuesSeries:()=>Me,memoize:()=>Le,nextTick:()=>Ce,parallel:()=>De,parallelLimit:()=>Ne,priorityQueue:()=>Ue,queue:()=>je,race:()=>$e,reduce:()=>K,reduceRight:()=>ze,reflect:()=>Ge,reflectAll:()=>He,reject:()=>qe,rejectLimit:()=>Ke,rejectSeries:()=>Ye,retry:()=>Je,retryable:()=>et,select:()=>ve,selectLimit:()=>Se,selectSeries:()=>Ee,seq:()=>Y,series:()=>tt,setImmediate:()=>u,some:()=>rt,someLimit:()=>nt,someSeries:()=>it,sortBy:()=>ot,timeout:()=>st,times:()=>lt,timesLimit:()=>at,timesSeries:()=>ct,transform:()=>ut,tryEach:()=>ft,unmemoize:()=>ht,until:()=>pt,waterfall:()=>bt,whilst:()=>dt,wrapSync:()=>f});var o="function"==typeof queueMicrotask&&queueMicrotask,s="function"==typeof setImmediate&&setImmediate,a="object"==typeof process&&"function"==typeof process.nextTick;function l(e){setTimeout(e,0)}function c(e){return(t,...r)=>e((()=>t(...r)))}var u=c(o?queueMicrotask:s?setImmediate:a?process.nextTick:l);function f(e){return p(e)?function(...t){const r=t.pop();return h(e.apply(this,t),r)}:i((function(t,r){var n;try{n=e.apply(this,t)}catch(e){return r(e)}if(n&&"function"==typeof n.then)return h(n,r);r(null,n)}))}function h(e,t){return e.then((e=>{d(t,null,e)}),(e=>{d(t,e&&(e instanceof Error||e.message)?e:new Error(e))}))}function d(e,t,r){try{e(t,r)}catch(e){u((e=>{throw e}),e)}}function p(e){return"AsyncFunction"===e[Symbol.toStringTag]}function b(e){if("function"!=typeof e)throw new Error("expected a function");return p(e)?f(e):e}function _(e,t){if(t||(t=e.length),!t)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[t-1]?e.apply(this,r):new Promise(((n,i)=>{r[t-1]=(e,...t)=>{if(e)return i(e);n(t.length>1?t:t[0])},e.apply(this,r)}))}}function y(e){return function(t,...r){return _((function(n){var i=this;return e(t,((e,t)=>{b(e).apply(i,r.concat(t))}),n)}))}}function m(e,t,r,n){t=t||[];var i=[],o=0,s=b(r);return e(t,((e,t,r)=>{var n=o++;s(e,((e,t)=>{i[n]=t,r(e)}))}),(e=>{n(e,i)}))}function g(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0}var w={};function v(e){function t(...t){if(null!==e){var r=e;e=null,r.apply(this,t)}}return Object.assign(t,e),t}function S(e){if(g(e))return function(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}(e);var t,r,n,i,o=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()}(e);return o?function(e){var t=-1;return function(){var r=e.next();return r.done?null:(t++,{value:r.value,key:t})}}(o):(r=(t=e)?Object.keys(t):[],n=-1,i=r.length,function e(){var o=r[++n];return"__proto__"===o?e():n<i?{value:t[o],key:o}:null})}function E(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var r=e;e=null,r.apply(this,t)}}function x(e,t,r,n){let i=!1,o=!1,s=!1,a=0,l=0;function c(){a>=t||s||i||(s=!0,e.next().then((({value:e,done:t})=>{if(!o&&!i){if(s=!1,t)return i=!0,void(a<=0&&n(null));a++,r(e,l,u),l++,c()}})).catch(f))}function u(e,t){if(a-=1,!o)return e?f(e):!1===e?(i=!0,void(o=!0)):t===w||i&&a<=0?(i=!0,n(null)):void c()}function f(e){o||(s=!1,i=!0,n(e))}c()}var R=e=>(t,r,n)=>{if(n=v(n),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return n(null);if("AsyncGenerator"===t[Symbol.toStringTag])return x(t,e,r,n);if(function(e){return"function"==typeof e[Symbol.asyncIterator]}(t))return x(t[Symbol.asyncIterator](),e,r,n);var i=S(t),o=!1,s=!1,a=0,l=!1;function c(e,t){if(!s)if(a-=1,e)o=!0,n(e);else if(!1===e)o=!0,s=!0;else{if(t===w||o&&a<=0)return o=!0,n(null);l||u()}}function u(){for(l=!0;a<e&&!o;){var t=i();if(null===t)return o=!0,void(a<=0&&n(null));a+=1,r(t.value,t.key,E(c))}l=!1}u()};var A=_((function(e,t,r,n){return R(t)(e,b(r),n)}),4);function O(e,t,r){r=v(r);var n=0,i=0,{length:o}=e,s=!1;function a(e,t){!1===e&&(s=!0),!0!==s&&(e?r(e):++i!==o&&t!==w||r(null))}for(0===o&&r(null);n<o;n++)t(e[n],n,E(a))}function k(e,t,r){return A(e,1/0,t,r)}var T=_((function(e,t,r){return(g(e)?O:k)(e,b(t),r)}),3);var P=_((function(e,t,r){return m(T,e,t,r)}),3),M=y(P);var L=_((function(e,t,r){return A(e,1,t,r)}),3);var C=_((function(e,t,r){return m(L,e,t,r)}),3),I=y(C);const D=Symbol("promiseCallback");function N(){let e,t;function r(r,...n){if(r)return t(r);e(n.length>1?n:n[0])}return r[D]=new Promise(((r,n)=>{e=r,t=n})),r}function j(e,t,r){"number"!=typeof t&&(r=t,t=null),r=v(r||N());var n=Object.keys(e).length;if(!n)return r(null);t||(t=n);var i={},o=0,s=!1,a=!1,l=Object.create(null),c=[],u=[],f={};function h(e,t){c.push((()=>function(e,t){if(a)return;var n=E(((t,...n)=>{if(o--,!1!==t)if(n.length<2&&([n]=n),t){var c={};if(Object.keys(i).forEach((e=>{c[e]=i[e]})),c[e]=n,a=!0,l=Object.create(null),s)return;r(t,c)}else i[e]=n,(l[e]||[]).forEach((e=>e())),d();else s=!0}));o++;var c=b(t[t.length-1]);t.length>1?c(i,n):c(n)}(e,t)))}function d(){if(!s){if(0===c.length&&0===o)return r(null,i);for(;c.length&&o<t;){c.shift()()}}}function p(t){var r=[];return Object.keys(e).forEach((n=>{const i=e[n];Array.isArray(i)&&i.indexOf(t)>=0&&r.push(n)})),r}return Object.keys(e).forEach((t=>{var r=e[t];if(!Array.isArray(r))return h(t,[r]),void u.push(t);var n=r.slice(0,r.length-1),i=n.length;if(0===i)return h(t,r),void u.push(t);f[t]=i,n.forEach((o=>{if(!e[o])throw new Error("async.auto task `"+t+"` has a non-existent dependency `"+o+"` in "+n.join(", "));!function(e,t){var r=l[e];r||(r=l[e]=[]);r.push(t)}(o,(()=>{0===--i&&h(t,r)}))}))})),function(){var e=0;for(;u.length;)e++,p(u.pop()).forEach((e=>{0==--f[e]&&u.push(e)}));if(e!==n)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),d(),r[D]}var F=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,W=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,B=/,/,U=/(=.+)?(\s*)$/;function $(e,t){var r={};return Object.keys(e).forEach((t=>{var n,i=e[t],o=p(i),s=!o&&1===i.length||o&&0===i.length;if(Array.isArray(i))n=[...i],i=n.pop(),r[t]=n.concat(n.length>0?a:i);else if(s)r[t]=i;else{if(n=function(e){const t=function(e){let t="",r=0,n=e.indexOf("*/");for(;r<e.length;)if("/"===e[r]&&"/"===e[r+1]){let t=e.indexOf("\n",r);r=-1===t?e.length:t}else if(-1!==n&&"/"===e[r]&&"*"===e[r+1]){let i=e.indexOf("*/",r);-1!==i?(r=i+2,n=e.indexOf("*/",r)):(t+=e[r],r++)}else t+=e[r],r++;return t}(e.toString());let r=t.match(F);if(r||(r=t.match(W)),!r)throw new Error("could not parse args in autoInject\nSource:\n"+t);let[,n]=r;return n.replace(/\s/g,"").split(B).map((e=>e.replace(U,"").trim()))}(i),0===i.length&&!o&&0===n.length)throw new Error("autoInject task functions require explicit parameters.");o||n.pop(),r[t]=n.concat(a)}function a(e,t){var r=n.map((t=>e[t]));r.push(t),b(i)(...r)}})),j(r,t)}class z{constructor(){this.head=this.tail=null,this.length=0}removeLink(e){return e.prev?e.prev.next=e.next:this.head=e.next,e.next?e.next.prev=e.prev:this.tail=e.prev,e.prev=e.next=null,this.length-=1,e}empty(){for(;this.head;)this.shift();return this}insertAfter(e,t){t.prev=e,t.next=e.next,e.next?e.next.prev=t:this.tail=t,e.next=t,this.length+=1}insertBefore(e,t){t.prev=e.prev,t.next=e,e.prev?e.prev.next=t:this.head=t,e.prev=t,this.length+=1}unshift(e){this.head?this.insertBefore(this.head,e):G(this,e)}push(e){this.tail?this.insertAfter(this.tail,e):G(this,e)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var e=this.head;e;)yield e.data,e=e.next}remove(e){for(var t=this.head;t;){var{next:r}=t;e(t)&&this.removeLink(t),t=r}return this}}function G(e,t){e.length=1,e.head=e.tail=t}function H(e,t,r){if(null==t)t=1;else if(0===t)throw new RangeError("Concurrency must not be zero");var n=b(e),i=0,o=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(e,t){return e?t?void(s[e]=s[e].filter((e=>e!==t))):s[e]=[]:Object.keys(s).forEach((e=>s[e]=[]))}function l(e,...t){s[e].forEach((e=>e(...t)))}var c=!1;function f(e,t,r,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");var i,o;function s(e,...t){return e?r?o(e):i():t.length<=1?i(t[0]):void i(t)}y.started=!0;var a=y._createTaskItem(e,r?s:n||s);if(t?y._tasks.unshift(a):y._tasks.push(a),c||(c=!0,u((()=>{c=!1,y.process()}))),r||!n)return new Promise(((e,t)=>{i=e,o=t}))}function h(e){return function(t,...r){i-=1;for(var n=0,s=e.length;n<s;n++){var a=e[n],c=o.indexOf(a);0===c?o.shift():c>0&&o.splice(c,1),a.callback(t,...r),null!=t&&l("error",t,a.data)}i<=y.concurrency-y.buffer&&l("unsaturated"),y.idle()&&l("drain"),y.process()}}function d(e){return!(0!==e.length||!y.idle())&&(u((()=>l("drain"))),!0)}const p=e=>t=>{if(!t)return new Promise(((t,r)=>{!function(e,t){const r=(...n)=>{a(e,r),t(...n)};s[e].push(r)}(e,((e,n)=>{if(e)return r(e);t(n)}))}));a(e),function(e,t){s[e].push(t)}(e,t)};var _=!1,y={_tasks:new z,_createTaskItem:(e,t)=>({data:e,callback:t}),*[Symbol.iterator](){yield*y._tasks[Symbol.iterator]()},concurrency:t,payload:r,buffer:t/4,started:!1,paused:!1,push(e,t){if(Array.isArray(e)){if(d(e))return;return e.map((e=>f(e,!1,!1,t)))}return f(e,!1,!1,t)},pushAsync(e,t){if(Array.isArray(e)){if(d(e))return;return e.map((e=>f(e,!1,!0,t)))}return f(e,!1,!0,t)},kill(){a(),y._tasks.empty()},unshift(e,t){if(Array.isArray(e)){if(d(e))return;return e.map((e=>f(e,!0,!1,t)))}return f(e,!0,!1,t)},unshiftAsync(e,t){if(Array.isArray(e)){if(d(e))return;return e.map((e=>f(e,!0,!0,t)))}return f(e,!0,!0,t)},remove(e){y._tasks.remove(e)},process(){if(!_){for(_=!0;!y.paused&&i<y.concurrency&&y._tasks.length;){var e=[],t=[],r=y._tasks.length;y.payload&&(r=Math.min(r,y.payload));for(var s=0;s<r;s++){var a=y._tasks.shift();e.push(a),o.push(a),t.push(a.data)}i+=1,0===y._tasks.length&&l("empty"),i===y.concurrency&&l("saturated");var c=E(h(e));n(t,c)}_=!1}},length:()=>y._tasks.length,running:()=>i,workersList:()=>o,idle:()=>y._tasks.length+i===0,pause(){y.paused=!0},resume(){!1!==y.paused&&(y.paused=!1,u(y.process))}};return Object.defineProperties(y,{saturated:{writable:!1,value:p("saturated")},unsaturated:{writable:!1,value:p("unsaturated")},empty:{writable:!1,value:p("empty")},drain:{writable:!1,value:p("drain")},error:{writable:!1,value:p("error")}}),y}function V(e,t){return H(e,1,t)}function q(e,t,r){return H(e,t,r)}var K=_((function(e,t,r,n){n=v(n);var i=b(r);return L(e,((e,r,n)=>{i(t,e,((e,r)=>{t=r,n(e)}))}),(e=>n(e,t)))}),4);function Y(...e){var t=e.map(b);return function(...e){var r=this,n=e[e.length-1];return"function"==typeof n?e.pop():n=N(),K(t,e,((e,t,n)=>{t.apply(r,e.concat(((e,...t)=>{n(e,t)})))}),((e,t)=>n(e,...t))),n[D]}}function Z(...e){return Y(...e.reverse())}var Q=_((function(e,t,r,n){return m(R(t),e,r,n)}),4);var X=_((function(e,t,r,n){var i=b(r);return Q(e,t,((e,t)=>{i(e,((e,...r)=>e?t(e):t(e,r)))}),((e,t)=>{for(var r=[],i=0;i<t.length;i++)t[i]&&(r=r.concat(...t[i]));return n(e,r)}))}),4);var J=_((function(e,t,r){return X(e,1/0,t,r)}),3);var ee=_((function(e,t,r){return X(e,1,t,r)}),3);function te(...e){return function(...t){return t.pop()(null,...e)}}function re(e,t){return(r,n,i,o)=>{var s,a=!1;const l=b(i);r(n,((r,n,i)=>{l(r,((n,o)=>n||!1===n?i(n):e(o)&&!s?(a=!0,s=t(!0,r),i(null,w)):void i()))}),(e=>{if(e)return o(e);o(null,a?s:t(!1))}))}}var ne=_((function(e,t,r){return re((e=>e),((e,t)=>t))(T,e,t,r)}),3);var ie=_((function(e,t,r,n){return re((e=>e),((e,t)=>t))(R(t),e,r,n)}),4);var oe=_((function(e,t,r){return re((e=>e),((e,t)=>t))(R(1),e,t,r)}),3);function se(e){return(t,...r)=>b(t)(...r,((t,...r)=>{"object"==typeof console&&(t?console.error&&console.error(t):console[e]&&r.forEach((t=>console[e](t))))}))}var ae=se("dir");var le=_((function(e,t,r){r=E(r);var n,i=b(e),o=b(t);function s(e,...t){if(e)return r(e);!1!==e&&(n=t,o(...t,a))}function a(e,t){return e?r(e):!1!==e?t?void i(s):r(null,...n):void 0}return a(null,!0)}),3);function ce(e,t,r){const n=b(t);return le(e,((...e)=>{const t=e.pop();n(...e,((e,r)=>t(e,!r)))}),r)}function ue(e){return(t,r,n)=>e(t,n)}var fe=_((function(e,t,r){return T(e,ue(b(t)),r)}),3);var he=_((function(e,t,r,n){return R(t)(e,ue(b(r)),n)}),4);var de=_((function(e,t,r){return he(e,1,t,r)}),3);function pe(e){return p(e)?e:function(...t){var r=t.pop(),n=!0;t.push(((...e)=>{n?u((()=>r(...e))):r(...e)})),e.apply(this,t),n=!1}}var be=_((function(e,t,r){return re((e=>!e),(e=>!e))(T,e,t,r)}),3);var _e=_((function(e,t,r,n){return re((e=>!e),(e=>!e))(R(t),e,r,n)}),4);var ye=_((function(e,t,r){return re((e=>!e),(e=>!e))(L,e,t,r)}),3);function me(e,t,r,n){var i=new Array(t.length);e(t,((e,t,n)=>{r(e,((e,r)=>{i[t]=!!r,n(e)}))}),(e=>{if(e)return n(e);for(var r=[],o=0;o<t.length;o++)i[o]&&r.push(t[o]);n(null,r)}))}function ge(e,t,r,n){var i=[];e(t,((e,t,n)=>{r(e,((r,o)=>{if(r)return n(r);o&&i.push({index:t,value:e}),n(r)}))}),(e=>{if(e)return n(e);n(null,i.sort(((e,t)=>e.index-t.index)).map((e=>e.value)))}))}function we(e,t,r,n){return(g(t)?me:ge)(e,t,b(r),n)}var ve=_((function(e,t,r){return we(T,e,t,r)}),3);var Se=_((function(e,t,r,n){return we(R(t),e,r,n)}),4);var Ee=_((function(e,t,r){return we(L,e,t,r)}),3);var xe=_((function(e,t){var r=E(t),n=b(pe(e));return function e(t){if(t)return r(t);!1!==t&&n(e)}()}),2);var Re=_((function(e,t,r,n){var i=b(r);return Q(e,t,((e,t)=>{i(e,((r,n)=>r?t(r):t(r,{key:n,val:e})))}),((e,t)=>{for(var r={},{hasOwnProperty:i}=Object.prototype,o=0;o<t.length;o++)if(t[o]){var{key:s}=t[o],{val:a}=t[o];i.call(r,s)?r[s].push(a):r[s]=[a]}return n(e,r)}))}),4);function Ae(e,t,r){return Re(e,1/0,t,r)}function Oe(e,t,r){return Re(e,1,t,r)}var ke=se("log");var Te=_((function(e,t,r,n){n=v(n);var i={},o=b(r);return R(t)(e,((e,t,r)=>{o(e,t,((e,n)=>{if(e)return r(e);i[t]=n,r(e)}))}),(e=>n(e,i)))}),4);function Pe(e,t,r){return Te(e,1/0,t,r)}function Me(e,t,r){return Te(e,1,t,r)}function Le(e,t=e=>e){var r=Object.create(null),n=Object.create(null),o=b(e),s=i(((e,i)=>{var s=t(...e);s in r?u((()=>i(null,...r[s]))):s in n?n[s].push(i):(n[s]=[i],o(...e,((e,...t)=>{e||(r[s]=t);var i=n[s];delete n[s];for(var o=0,a=i.length;o<a;o++)i[o](e,...t)})))}));return s.memo=r,s.unmemoized=e,s}var Ce=c(a?process.nextTick:s?setImmediate:l),Ie=_(((e,t,r)=>{var n=g(t)?[]:{};e(t,((e,t,r)=>{b(e)(((e,...i)=>{i.length<2&&([i]=i),n[t]=i,r(e)}))}),(e=>r(e,n)))}),3);function De(e,t){return Ie(T,e,t)}function Ne(e,t,r){return Ie(R(t),e,r)}function je(e,t){var r=b(e);return H(((e,t)=>{r(e[0],t)}),t,1)}class Fe{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(e){let t;for(;e>0&&Be(this.heap[e],this.heap[t=We(e)]);){let r=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=r,e=t}}percDown(e){let t;for(;(t=1+(e<<1))<this.heap.length&&(t+1<this.heap.length&&Be(this.heap[t+1],this.heap[t])&&(t+=1),!Be(this.heap[e],this.heap[t]));){let r=this.heap[e];this.heap[e]=this.heap[t],this.heap[t]=r,e=t}}push(e){e.pushCount=++this.pushCount,this.heap.push(e),this.percUp(this.heap.length-1)}unshift(e){return this.heap.push(e)}shift(){let[e]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),e}toArray(){return[...this]}*[Symbol.iterator](){for(let e=0;e<this.heap.length;e++)yield this.heap[e].data}remove(e){let t=0;for(let r=0;r<this.heap.length;r++)e(this.heap[r])||(this.heap[t]=this.heap[r],t++);this.heap.splice(t);for(let e=We(this.heap.length-1);e>=0;e--)this.percDown(e);return this}}function We(e){return(e+1>>1)-1}function Be(e,t){return e.priority!==t.priority?e.priority<t.priority:e.pushCount<t.pushCount}function Ue(e,t){var r=je(e,t),{push:n,pushAsync:i}=r;function o(e,t){return Array.isArray(e)?e.map((e=>({data:e,priority:t}))):{data:e,priority:t}}return r._tasks=new Fe,r._createTaskItem=({data:e,priority:t},r)=>({data:e,priority:t,callback:r}),r.push=function(e,t=0,r){return n(o(e,t),r)},r.pushAsync=function(e,t=0,r){return i(o(e,t),r)},delete r.unshift,delete r.unshiftAsync,r}var $e=_((function(e,t){if(t=v(t),!Array.isArray(e))return t(new TypeError("First argument to race must be an array of functions"));if(!e.length)return t();for(var r=0,n=e.length;r<n;r++)b(e[r])(t)}),2);function ze(e,t,r,n){var i=[...e].reverse();return K(i,t,r,n)}function Ge(e){var t=b(e);return i((function(e,r){return e.push(((e,...t)=>{let n={};if(e&&(n.error=e),t.length>0){var i=t;t.length<=1&&([i]=t),n.value=i}r(null,n)})),t.apply(this,e)}))}function He(e){var t;return Array.isArray(e)?t=e.map(Ge):(t={},Object.keys(e).forEach((r=>{t[r]=Ge.call(this,e[r])}))),t}function Ve(e,t,r,n){const i=b(r);return we(e,t,((e,t)=>{i(e,((e,r)=>{t(e,!r)}))}),n)}var qe=_((function(e,t,r){return Ve(T,e,t,r)}),3);var Ke=_((function(e,t,r,n){return Ve(R(t),e,r,n)}),4);var Ye=_((function(e,t,r){return Ve(L,e,t,r)}),3);function Ze(e){return function(){return e}}const Qe=5,Xe=0;function Je(e,t,r){var n={times:Qe,intervalFunc:Ze(Xe)};if(arguments.length<3&&"function"==typeof e?(r=t||N(),t=e):(!function(e,t){if("object"==typeof t)e.times=+t.times||Qe,e.intervalFunc="function"==typeof t.interval?t.interval:Ze(+t.interval||Xe),e.errorFilter=t.errorFilter;else{if("number"!=typeof t&&"string"!=typeof t)throw new Error("Invalid arguments for async.retry");e.times=+t||Qe}}(n,e),r=r||N()),"function"!=typeof t)throw new Error("Invalid arguments for async.retry");var i=b(t),o=1;return function e(){i(((t,...i)=>{!1!==t&&(t&&o++<n.times&&("function"!=typeof n.errorFilter||n.errorFilter(t))?setTimeout(e,n.intervalFunc(o-1)):r(t,...i))}))}(),r[D]}function et(e,t){t||(t=e,e=null);let r=e&&e.arity||t.length;p(t)&&(r+=1);var n=b(t);return i(((t,i)=>{function o(e){n(...t,e)}return(t.length<r-1||null==i)&&(t.push(i),i=N()),e?Je(e,o,i):Je(o,i),i[D]}))}function tt(e,t){return Ie(L,e,t)}var rt=_((function(e,t,r){return re(Boolean,(e=>e))(T,e,t,r)}),3);var nt=_((function(e,t,r,n){return re(Boolean,(e=>e))(R(t),e,r,n)}),4);var it=_((function(e,t,r){return re(Boolean,(e=>e))(L,e,t,r)}),3);var ot=_((function(e,t,r){var n=b(t);return P(e,((e,t)=>{n(e,((r,n)=>{if(r)return t(r);t(r,{value:e,criteria:n})}))}),((e,t)=>{if(e)return r(e);r(null,t.sort(i).map((e=>e.value)))}));function i(e,t){var r=e.criteria,n=t.criteria;return r<n?-1:r>n?1:0}}),3);function st(e,t,r){var n=b(e);return i(((i,o)=>{var s,a=!1;i.push(((...e)=>{a||(o(...e),clearTimeout(s))})),s=setTimeout((function(){var t=e.name||"anonymous",n=new Error('Callback function "'+t+'" timed out.');n.code="ETIMEDOUT",r&&(n.info=r),a=!0,o(n)}),t),n(...i)}))}function at(e,t,r,n){var i=b(r);return Q(function(e){for(var t=Array(e);e--;)t[e]=e;return t}(e),t,i,n)}function lt(e,t,r){return at(e,1/0,t,r)}function ct(e,t,r){return at(e,1,t,r)}function ut(e,t,r,n){arguments.length<=3&&"function"==typeof t&&(n=r,r=t,t=Array.isArray(e)?[]:{}),n=v(n||N());var i=b(r);return T(e,((e,r,n)=>{i(t,e,r,n)}),(e=>n(e,t))),n[D]}var ft=_((function(e,t){var r,n=null;return de(e,((e,t)=>{b(e)(((e,...i)=>{if(!1===e)return t(e);i.length<2?[r]=i:r=i,n=e,t(e?null:{})}))}),(()=>t(n,r)))}));function ht(e){return(...t)=>(e.unmemoized||e)(...t)}var dt=_((function(e,t,r){r=E(r);var n=b(t),i=b(e),o=[];function s(e,...t){if(e)return r(e);o=t,!1!==e&&i(a)}function a(e,t){return e?r(e):!1!==e?t?void n(s):r(null,...o):void 0}return i(a)}),3);function pt(e,t,r){const n=b(e);return dt((e=>n(((t,r)=>e(t,!r)))),t,r)}var bt=_((function(e,t){if(t=v(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var r=0;function n(t){b(e[r++])(...t,E(i))}function i(i,...o){if(!1!==i)return i||r===e.length?t(i,...o):void n(o)}n([])})),_t={apply:n,applyEach:M,applyEachSeries:I,asyncify:f,auto:j,autoInject:$,cargo:V,cargoQueue:q,compose:Z,concat:J,concatLimit:X,concatSeries:ee,constant:te,detect:ne,detectLimit:ie,detectSeries:oe,dir:ae,doUntil:ce,doWhilst:le,each:fe,eachLimit:he,eachOf:T,eachOfLimit:A,eachOfSeries:L,eachSeries:de,ensureAsync:pe,every:be,everyLimit:_e,everySeries:ye,filter:ve,filterLimit:Se,filterSeries:Ee,forever:xe,groupBy:Ae,groupByLimit:Re,groupBySeries:Oe,log:ke,map:P,mapLimit:Q,mapSeries:C,mapValues:Pe,mapValuesLimit:Te,mapValuesSeries:Me,memoize:Le,nextTick:Ce,parallel:De,parallelLimit:Ne,priorityQueue:Ue,queue:je,race:$e,reduce:K,reduceRight:ze,reflect:Ge,reflectAll:He,reject:qe,rejectLimit:Ke,rejectSeries:Ye,retry:Je,retryable:et,seq:Y,series:tt,setImmediate:u,some:rt,someLimit:nt,someSeries:it,sortBy:ot,timeout:st,times:lt,timesLimit:at,timesSeries:ct,transform:ut,tryEach:ft,unmemoize:ht,until:pt,waterfall:bt,whilst:dt,all:be,allLimit:_e,allSeries:ye,any:rt,anyLimit:nt,anySeries:it,find:ne,findLimit:ie,findSeries:oe,flatMap:J,flatMapLimit:X,flatMapSeries:ee,forEach:fe,forEachSeries:de,forEachLimit:he,forEachOf:T,forEachOfSeries:L,forEachOfLimit:A,inject:K,foldl:K,foldr:ze,select:ve,selectLimit:Se,selectSeries:Ee,wrapSync:f,during:dt,doDuring:le}},e=>{e.exports=require("constants")},e=>{e.exports=require("assert")},(e,t,r)=>{e.exports=r(80).PassThrough},(e,t,r)=>{const n=globalThis.AbortController||r(8).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:l}=r(12),{validateAbortSignal:c,validateInteger:u,validateObject:f}=r(47),h=r(4).Symbol("kWeak"),d=r(4).Symbol("kResistStopPropagation"),{finished:p}=r(28),b=r(141),{addAbortSignalNoValidate:_}=r(62),{isWritable:y,isNodeStream:m}=r(24),{deprecate:g}=r(17),{ArrayPrototypePush:w,Boolean:v,MathFloor:S,Number:E,NumberIsNaN:x,Promise:R,PromiseReject:A,PromiseResolve:O,PromisePrototypeThen:k,Symbol:T}=r(4),P=T("kEmpty"),M=T("kEof");function L(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=S(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=S(t.highWaterMark)),u(n,"options.concurrency",1),u(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(17).AbortSignalAny([null==t?void 0:t.signal].filter(v)),s=this,a=[],c={signal:o};let u,f,h=!1,d=0;function p(){h=!0,b()}function b(){d-=1,_()}function _(){f&&!h&&d<n&&a.length<i&&(f(),f=null)}!async function(){try{for await(let t of s){if(h)return;if(o.aborted)throw new l;try{if(t=e(t,c),t===P)continue;t=O(t)}catch(e){t=A(e)}d+=1,k(t,b,p),a.push(t),u&&(u(),u=null),!h&&(a.length>=i||d>=n)&&await new R((e=>{f=e}))}a.push(M)}catch(e){const t=A(e);k(t,b,p),a.push(t)}finally{h=!0,u&&(u(),u=null)}}();try{for(;;){for(;a.length>0;){const e=await a[0];if(e===M)return;if(o.aborted)throw new l;e!==P&&(yield e),a.shift(),_()}await new R((e=>{u=e}))}}finally{h=!0,f&&(f(),f=null)}}.call(this)}async function C(e,t=void 0){for await(const r of I.call(this,e,t))return!0;return!1}function I(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return L.call(this,(async function(t,r){return await e(t,r)?t:P}),t)}class D extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function N(e){if(e=E(e),x(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:g((function(e=void 0){return null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=N(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;e--<=0&&(yield r)}}.call(this)},filter:I,flatMap:function(e,t){const r=L.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:L,take:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=N(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),m(e)&&!y(e))throw new i("stream",e,"must be writable");const r=b(this,e);return null!=t&&t.signal&&_(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await C.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of L.call(this,(async function(t,r){return await e(t,r),P}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&f(r,"options"),null!=(null==r?void 0:r.signal)&&c(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new l(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(e)),e}const a=new n,u=a.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this,[d]:!0};r.signal.addEventListener("abort",(()=>a.abort()),e)}let b=!1;try{for await(const n of this){var _;if(b=!0,null!=r&&null!==(_=r.signal)&&void 0!==_&&_.aborted)throw new l;s?t=await e(t,n,{signal:u}):(t=n,s=!0)}if(!b&&!s)throw new D}finally{a.abort()}return t},toArray:async function(e){null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l(void 0,{cause:e.signal.reason});w(t,n)}return t},some:C,find:async function(e,t){for await(const r of I.call(this,e,t))return r}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assertValidPattern=void 0;t.assertValidPattern=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseClass=void 0;const r={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},n=e=>e.replace(/[[\]\\-]/g,"\\$&"),i=e=>e.join("");t.parseClass=(e,t)=>{const o=t;if("["!==e.charAt(o))throw new Error("not in a brace expression");const s=[],a=[];let l=o+1,c=!1,u=!1,f=!1,h=!1,d=o,p="";e:for(;l<e.length;){const t=e.charAt(l);if("!"!==t&&"^"!==t||l!==o+1){if("]"===t&&c&&!f){d=l+1;break}if(c=!0,"\\"!==t||f){if("["===t&&!f)for(const[t,[n,i,c]]of Object.entries(r))if(e.startsWith(t,l)){if(p)return["$.",!1,e.length-o,!0];l+=t.length,c?a.push(n):s.push(n),u=u||i;continue e}f=!1,p?(t>p?s.push(n(p)+"-"+n(t)):t===p&&s.push(n(t)),p="",l++):e.startsWith("-]",l+1)?(s.push(n(t+"-")),l+=2):e.startsWith("-",l+1)?(p=t,l+=2):(s.push(n(t)),l++)}else f=!0,l++}else h=!0,l++}if(d<l)return["",!1,0,!1];if(!s.length&&!a.length)return["$.",!1,e.length-o,!0];if(0===a.length&&1===s.length&&/^\\?.$/.test(s[0])&&!h){const e=2===s[0].length?s[0].slice(-1):s[0];return[(b=e,b.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,d-o,!1]}var b;const _="["+(h?"^":"")+i(s)+"]",y="["+(h?"":"^")+i(a)+"]";return[s.length&&a.length?"("+_+"|"+y+")":s.length?_:y,u,d-o,!0]}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=void 0;const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,n=new Set,i="object"==typeof process&&process?process:{},o=(e,t,r,n)=>{"function"==typeof i.emitWarning?i.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)};let s=globalThis.AbortController,a=globalThis.AbortSignal;if(void 0===s){a=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},s=class{constructor(){t()}signal=new a;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(const t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e="1"!==i.env?.LRU_CACHE_IGNORE_AC_WARNING;const t=()=>{e&&(e=!1,o("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}Symbol("type");const l=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),c=e=>l(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?u:null:null;class u extends Array{constructor(e){super(e),this.fill(0)}}class f{heap;length;static#we=!1;static create(e){const t=c(e);if(!t)return[];f.#we=!0;const r=new f(e,t);return f.#we=!1,r}constructor(e,t){if(!f.#we)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class h{#ve;#Se;#Ee;#xe;#Re;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#Ae;#Oe;#ke;#Te;#Pe;#Me;#Le;#Ce;#Ie;#De;#Ne;#je;#Fe;#We;#Be;#Ue;static unsafeExposeInternals(e){return{starts:e.#je,ttls:e.#Fe,sizes:e.#Ne,keyMap:e.#Oe,keyList:e.#ke,valList:e.#Te,next:e.#Pe,prev:e.#Me,get head(){return e.#Le},get tail(){return e.#Ce},free:e.#Ie,isBackgroundFetch:t=>e.#$e(t),backgroundFetch:(t,r,n,i)=>e.#ze(t,r,n,i),moveToTail:t=>e.#Ge(t),indexes:t=>e.#He(t),rindexes:t=>e.#Ve(t),isStale:t=>e.#qe(t)}}get max(){return this.#ve}get maxSize(){return this.#Se}get calculatedSize(){return this.#Ae}get size(){return this.#c}get fetchMethod(){return this.#Re}get dispose(){return this.#Ee}get disposeAfter(){return this.#xe}constructor(e){const{max:t=0,ttl:r,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:a,updateAgeOnHas:u,allowStale:d,dispose:p,disposeAfter:b,noDisposeOnSet:_,noUpdateTTL:y,maxSize:m=0,maxEntrySize:g=0,sizeCalculation:w,fetchMethod:v,noDeleteOnFetchRejection:S,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:R,ignoreFetchAbort:A}=e;if(0!==t&&!l(t))throw new TypeError("max option must be a nonnegative integer");const O=t?c(t):Array;if(!O)throw new Error("invalid max value: "+t);if(this.#ve=t,this.#Se=m,this.maxEntrySize=g||this.#Se,this.sizeCalculation=w,this.sizeCalculation){if(!this.#Se&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==v&&"function"!=typeof v)throw new TypeError("fetchMethod must be a function if specified");if(this.#Re=v,this.#Be=!!v,this.#Oe=new Map,this.#ke=new Array(t).fill(void 0),this.#Te=new Array(t).fill(void 0),this.#Pe=new O(t),this.#Me=new O(t),this.#Le=0,this.#Ce=0,this.#Ie=f.create(t),this.#c=0,this.#Ae=0,"function"==typeof p&&(this.#Ee=p),"function"==typeof b?(this.#xe=b,this.#De=[]):(this.#xe=void 0,this.#De=void 0),this.#We=!!this.#Ee,this.#Ue=!!this.#xe,this.noDisposeOnSet=!!_,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!S,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!R,this.ignoreFetchAbort=!!A,0!==this.maxEntrySize){if(0!==this.#Se&&!l(this.#Se))throw new TypeError("maxSize must be a positive integer if specified");if(!l(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#Ke()}if(this.allowStale=!!d,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!u,this.ttlResolution=l(i)||0===i?i:1,this.ttlAutopurge=!!s,this.ttl=r||0,this.ttl){if(!l(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#Ye()}if(0===this.#ve&&0===this.ttl&&0===this.#Se)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#ve&&!this.#Se){const e="LRU_CACHE_UNBOUNDED";if((e=>!n.has(e))(e)){n.add(e);o("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,h)}}}getRemainingTTL(e){return this.#Oe.has(e)?1/0:0}#Ye(){const e=new u(this.#ve),t=new u(this.#ve);this.#Fe=e,this.#je=t,this.#Ze=(n,i,o=r.now())=>{if(t[n]=0!==i?o:0,e[n]=i,0!==i&&this.ttlAutopurge){const e=setTimeout((()=>{this.#qe(n)&&this.delete(this.#ke[n])}),i+1);e.unref&&e.unref()}},this.#Qe=n=>{t[n]=0!==e[n]?r.now():0},this.#Xe=(r,o)=>{if(e[o]){const s=e[o],a=t[o];if(!s||!a)return;r.ttl=s,r.start=a,r.now=n||i();const l=r.now-a;r.remainingTTL=s-l}};let n=0;const i=()=>{const e=r.now();if(this.ttlResolution>0){n=e;const t=setTimeout((()=>n=0),this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=r=>{const o=this.#Oe.get(r);if(void 0===o)return 0;const s=e[o],a=t[o];if(!s||!a)return 1/0;return s-((n||i())-a)},this.#qe=r=>{const o=t[r],s=e[r];return!!s&&!!o&&(n||i())-o>s}}#Qe=()=>{};#Xe=()=>{};#Ze=()=>{};#qe=()=>!1;#Ke(){const e=new u(this.#ve);this.#Ae=0,this.#Ne=e,this.#Je=t=>{this.#Ae-=e[t],e[t]=0},this.#et=(e,t,r,n)=>{if(this.#$e(t))return 0;if(!l(r)){if(!n)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(r=n(t,e),!l(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return r},this.#tt=(t,r,n)=>{if(e[t]=r,this.#Se){const r=this.#Se-e[t];for(;this.#Ae>r;)this.#rt(!0)}this.#Ae+=e[t],n&&(n.entrySize=r,n.totalCalculatedSize=this.#Ae)}}#Je=e=>{};#tt=(e,t,r)=>{};#et=(e,t,r,n)=>{if(r||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#He({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#Ce;this.#nt(t)&&(!e&&this.#qe(t)||(yield t),t!==this.#Le);)t=this.#Me[t]}*#Ve({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#Le;this.#nt(t)&&(!e&&this.#qe(t)||(yield t),t!==this.#Ce);)t=this.#Pe[t]}#nt(e){return void 0!==e&&this.#Oe.get(this.#ke[e])===e}*entries(){for(const e of this.#He())void 0===this.#Te[e]||void 0===this.#ke[e]||this.#$e(this.#Te[e])||(yield[this.#ke[e],this.#Te[e]])}*rentries(){for(const e of this.#Ve())void 0===this.#Te[e]||void 0===this.#ke[e]||this.#$e(this.#Te[e])||(yield[this.#ke[e],this.#Te[e]])}*keys(){for(const e of this.#He()){const t=this.#ke[e];void 0===t||this.#$e(this.#Te[e])||(yield t)}}*rkeys(){for(const e of this.#Ve()){const t=this.#ke[e];void 0===t||this.#$e(this.#Te[e])||(yield t)}}*values(){for(const e of this.#He()){void 0===this.#Te[e]||this.#$e(this.#Te[e])||(yield this.#Te[e])}}*rvalues(){for(const e of this.#Ve()){void 0===this.#Te[e]||this.#$e(this.#Te[e])||(yield this.#Te[e])}}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(const r of this.#He()){const n=this.#Te[r],i=this.#$e(n)?n.__staleWhileFetching:n;if(void 0!==i&&e(i,this.#ke[r],this))return this.get(this.#ke[r],t)}}forEach(e,t=this){for(const r of this.#He()){const n=this.#Te[r],i=this.#$e(n)?n.__staleWhileFetching:n;void 0!==i&&e.call(t,i,this.#ke[r],this)}}rforEach(e,t=this){for(const r of this.#Ve()){const n=this.#Te[r],i=this.#$e(n)?n.__staleWhileFetching:n;void 0!==i&&e.call(t,i,this.#ke[r],this)}}purgeStale(){let e=!1;for(const t of this.#Ve({allowStale:!0}))this.#qe(t)&&(this.delete(this.#ke[t]),e=!0);return e}info(e){const t=this.#Oe.get(e);if(void 0===t)return;const n=this.#Te[t],i=this.#$e(n)?n.__staleWhileFetching:n;if(void 0===i)return;const o={value:i};if(this.#Fe&&this.#je){const e=this.#Fe[t],n=this.#je[t];if(e&&n){const t=e-(r.now()-n);o.ttl=t,o.start=Date.now()}}return this.#Ne&&(o.size=this.#Ne[t]),o}dump(){const e=[];for(const t of this.#He({allowStale:!0})){const n=this.#ke[t],i=this.#Te[t],o=this.#$e(i)?i.__staleWhileFetching:i;if(void 0===o||void 0===n)continue;const s={value:o};if(this.#Fe&&this.#je){s.ttl=this.#Fe[t];const e=r.now()-this.#je[t];s.start=Math.floor(Date.now()-e)}this.#Ne&&(s.size=this.#Ne[t]),e.unshift([n,s])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}set(e,t,r={}){if(void 0===t)return this.delete(e),this;const{ttl:n=this.ttl,start:i,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:a}=r;let{noUpdateTTL:l=this.noUpdateTTL}=r;const c=this.#et(e,t,r.size||0,s);if(this.maxEntrySize&&c>this.maxEntrySize)return a&&(a.set="miss",a.maxEntrySizeExceeded=!0),this.delete(e),this;let u=0===this.#c?void 0:this.#Oe.get(e);if(void 0===u)u=0===this.#c?this.#Ce:0!==this.#Ie.length?this.#Ie.pop():this.#c===this.#ve?this.#rt(!1):this.#c,this.#ke[u]=e,this.#Te[u]=t,this.#Oe.set(e,u),this.#Pe[this.#Ce]=u,this.#Me[u]=this.#Ce,this.#Ce=u,this.#c++,this.#tt(u,c,a),a&&(a.set="add"),l=!1;else{this.#Ge(u);const r=this.#Te[u];if(t!==r){if(this.#Be&&this.#$e(r)){r.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=r;void 0===t||o||(this.#We&&this.#Ee?.(t,e,"set"),this.#Ue&&this.#De?.push([t,e,"set"]))}else o||(this.#We&&this.#Ee?.(r,e,"set"),this.#Ue&&this.#De?.push([r,e,"set"]));if(this.#Je(u),this.#tt(u,c,a),this.#Te[u]=t,a){a.set="replace";const e=r&&this.#$e(r)?r.__staleWhileFetching:r;void 0!==e&&(a.oldValue=e)}}else a&&(a.set="update")}if(0===n||this.#Fe||this.#Ye(),this.#Fe&&(l||this.#Ze(u,n,i),a&&this.#Xe(a,u)),!o&&this.#Ue&&this.#De){const e=this.#De;let t;for(;t=e?.shift();)this.#xe?.(...t)}return this}pop(){try{for(;this.#c;){const e=this.#Te[this.#Le];if(this.#rt(!0),this.#$e(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#Ue&&this.#De){const e=this.#De;let t;for(;t=e?.shift();)this.#xe?.(...t)}}}#rt(e){const t=this.#Le,r=this.#ke[t],n=this.#Te[t];return this.#Be&&this.#$e(n)?n.__abortController.abort(new Error("evicted")):(this.#We||this.#Ue)&&(this.#We&&this.#Ee?.(n,r,"evict"),this.#Ue&&this.#De?.push([n,r,"evict"])),this.#Je(t),e&&(this.#ke[t]=void 0,this.#Te[t]=void 0,this.#Ie.push(t)),1===this.#c?(this.#Le=this.#Ce=0,this.#Ie.length=0):this.#Le=this.#Pe[t],this.#Oe.delete(r),this.#c--,t}has(e,t={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:n}=t,i=this.#Oe.get(e);if(void 0!==i){const e=this.#Te[i];if(this.#$e(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#qe(i))return r&&this.#Qe(i),n&&(n.has="hit",this.#Xe(n,i)),!0;n&&(n.has="stale",this.#Xe(n,i))}else n&&(n.has="miss");return!1}peek(e,t={}){const{allowStale:r=this.allowStale}=t,n=this.#Oe.get(e);if(void 0===n||!r&&this.#qe(n))return;const i=this.#Te[n];return this.#$e(i)?i.__staleWhileFetching:i}#ze(e,t,r,n){const i=void 0===t?void 0:this.#Te[t];if(this.#$e(i))return i;const o=new s,{signal:a}=r;a?.addEventListener("abort",(()=>o.abort(a.reason)),{signal:o.signal});const l={signal:o.signal,options:r,context:n},c=(n,i=!1)=>{const{aborted:s}=o.signal,a=r.ignoreFetchAbort&&void 0!==n;if(r.status&&(s&&!i?(r.status.fetchAborted=!0,r.status.fetchError=o.signal.reason,a&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),s&&!a&&!i)return u(o.signal.reason);const c=f;return this.#Te[t]===f&&(void 0===n?c.__staleWhileFetching?this.#Te[t]=c.__staleWhileFetching:this.delete(e):(r.status&&(r.status.fetchUpdated=!0),this.set(e,n,l.options))),n},u=n=>{const{aborted:i}=o.signal,s=i&&r.allowStaleOnFetchAbort,a=s||r.allowStaleOnFetchRejection,l=a||r.noDeleteOnFetchRejection,c=f;if(this.#Te[t]===f){!l||void 0===c.__staleWhileFetching?this.delete(e):s||(this.#Te[t]=c.__staleWhileFetching)}if(a)return r.status&&void 0!==c.__staleWhileFetching&&(r.status.returnedStale=!0),c.__staleWhileFetching;if(c.__returned===c)throw n};r.status&&(r.status.fetchDispatched=!0);const f=new Promise(((t,n)=>{const s=this.#Re?.(e,i,l);s&&s instanceof Promise&&s.then((e=>t(void 0===e?void 0:e)),n),o.signal.addEventListener("abort",(()=>{r.ignoreFetchAbort&&!r.allowStaleOnFetchAbort||(t(void 0),r.allowStaleOnFetchAbort&&(t=e=>c(e,!0)))}))})).then(c,(e=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=e),u(e)))),h=Object.assign(f,{__abortController:o,__staleWhileFetching:i,__returned:void 0});return void 0===t?(this.set(e,h,{...l.options,status:void 0}),t=this.#Oe.get(e)):this.#Te[t]=h,h}#$e(e){if(!this.#Be)return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof s}async fetch(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:p,forceRefresh:b=!1,status:_,signal:y}=t;if(!this.#Be)return _&&(_.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,status:_});const m={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:o,noDisposeOnSet:s,size:a,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:d,ignoreFetchAbort:h,status:_,signal:y};let g=this.#Oe.get(e);if(void 0===g){_&&(_.fetch="miss");const t=this.#ze(e,g,m,p);return t.__returned=t}{const t=this.#Te[g];if(this.#$e(t)){const e=r&&void 0!==t.__staleWhileFetching;return _&&(_.fetch="inflight",e&&(_.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}const i=this.#qe(g);if(!b&&!i)return _&&(_.fetch="hit"),this.#Ge(g),n&&this.#Qe(g),_&&this.#Xe(_,g),t;const o=this.#ze(e,g,m,p),s=void 0!==o.__staleWhileFetching&&r;return _&&(_.fetch=i?"stale":"refresh",s&&i&&(_.returnedStale=!0)),s?o.__staleWhileFetching:o.__returned=o}}get(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:o}=t,s=this.#Oe.get(e);if(void 0!==s){const t=this.#Te[s],a=this.#$e(t);return o&&this.#Xe(o,s),this.#qe(s)?(o&&(o.get="stale"),a?(o&&r&&void 0!==t.__staleWhileFetching&&(o.returnedStale=!0),r?t.__staleWhileFetching:void 0):(i||this.delete(e),o&&r&&(o.returnedStale=!0),r?t:void 0)):(o&&(o.get="hit"),a?t.__staleWhileFetching:(this.#Ge(s),n&&this.#Qe(s),t))}o&&(o.get="miss")}#it(e,t){this.#Me[t]=e,this.#Pe[e]=t}#Ge(e){e!==this.#Ce&&(e===this.#Le?this.#Le=this.#Pe[e]:this.#it(this.#Me[e],this.#Pe[e]),this.#it(this.#Ce,e),this.#Ce=e)}delete(e){let t=!1;if(0!==this.#c){const r=this.#Oe.get(e);if(void 0!==r)if(t=!0,1===this.#c)this.clear();else{this.#Je(r);const t=this.#Te[r];if(this.#$e(t)?t.__abortController.abort(new Error("deleted")):(this.#We||this.#Ue)&&(this.#We&&this.#Ee?.(t,e,"delete"),this.#Ue&&this.#De?.push([t,e,"delete"])),this.#Oe.delete(e),this.#ke[r]=void 0,this.#Te[r]=void 0,r===this.#Ce)this.#Ce=this.#Me[r];else if(r===this.#Le)this.#Le=this.#Pe[r];else{const e=this.#Me[r];this.#Pe[e]=this.#Pe[r];const t=this.#Pe[r];this.#Me[t]=this.#Me[r]}this.#c--,this.#Ie.push(r)}}if(this.#Ue&&this.#De?.length){const e=this.#De;let t;for(;t=e?.shift();)this.#xe?.(...t)}return t}clear(){for(const e of this.#Ve({allowStale:!0})){const t=this.#Te[e];if(this.#$e(t))t.__abortController.abort(new Error("deleted"));else{const r=this.#ke[e];this.#We&&this.#Ee?.(t,r,"delete"),this.#Ue&&this.#De?.push([t,r,"delete"])}}if(this.#Oe.clear(),this.#Te.fill(void 0),this.#ke.fill(void 0),this.#Fe&&this.#je&&(this.#Fe.fill(0),this.#je.fill(0)),this.#Ne&&this.#Ne.fill(0),this.#Le=0,this.#Ce=0,this.#Ie.length=0,this.#Ae=0,this.#c=0,this.#Ue&&this.#De){const e=this.#De;let t;for(;t=e?.shift();)this.#xe?.(...t)}}}t.LRUCache=h},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobStream=t.GlobWalker=t.GlobUtil=void 0;const n=r(79),i=r(373),o=r(374);class s{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#ot=[];#st;#at;signal;maxDepth;constructor(e,t,r){this.patterns=e,this.path=t,this.opts=r,this.#at=r.posix||"win32"!==r.platform?"/":"\\",r.ignore&&(this.#st=((e,t)=>"string"==typeof e?new i.Ignore([e],t):Array.isArray(e)?new i.Ignore(e,t):e)(r.ignore,r)),this.maxDepth=r.maxDepth||1/0,r.signal&&(this.signal=r.signal,this.signal.addEventListener("abort",(()=>{this.#ot.length=0})))}#lt(e){return this.seen.has(e)||!!this.#st?.ignored?.(e)}#ct(e){return!!this.#st?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;let e;for(this.paused=!1;!this.paused&&(e=this.#ot.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#ot.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||await e.realpath(),!r)return;e=r}const n=e.isUnknown()||this.opts.stat;return this.matchCheckTest(n?await e.lstat():e,t)}matchCheckTest(e,t){return!e||!(this.maxDepth===1/0||e.depth()<=this.maxDepth)||t&&!e.canReaddir()||this.opts.nodir&&e.isDirectory()||this.#lt(e)?void 0:e}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||e.realpathSync(),!r)return;e=r}const n=e.isUnknown()||this.opts.stat;return this.matchCheckTest(n?e.lstatSync():e,t)}matchFinish(e,t){if(this.#lt(e))return;const r=void 0===this.opts.absolute?t:this.opts.absolute;this.seen.add(e);const n=this.opts.mark&&e.isDirectory()?this.#at:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(r){const t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+n)}else{const t=this.opts.posix?e.relativePosix():e.relative(),r=this.opts.dotRelative&&!t.startsWith(".."+this.#at)?"."+this.#at:"";this.matchEmit(t?r+t+n:"."+n)}}async match(e,t,r){const n=await this.matchCheck(e,r);n&&this.matchFinish(n,t)}matchSync(e,t,r){const n=this.matchCheckSync(e,r);n&&this.matchFinish(n,t)}walkCB(e,t,r){this.signal?.aborted&&r(),this.walkCB2(e,t,new o.Processor(this.opts),r)}walkCB2(e,t,r,n){if(this.#ct(e))return n();if(this.signal?.aborted&&n(),this.paused)return void this.onResume((()=>this.walkCB2(e,t,r,n)));r.processPatterns(e,t);let i=1;const o=()=>{0==--i&&n()};for(const[e,t,n]of r.matches.entries())this.#lt(e)||(i++,this.match(e,t,n).then((()=>o())));for(const e of r.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;const t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,r,o):e.readdirCB(((t,n)=>this.walkCB3(e,n,r,o)),!0)}o()}walkCB3(e,t,r,n){r=r.filterEntries(e,t);let i=1;const o=()=>{0==--i&&n()};for(const[e,t,n]of r.matches.entries())this.#lt(e)||(i++,this.match(e,t,n).then((()=>o())));for(const[e,t]of r.subwalks.entries())i++,this.walkCB2(e,t,r.child(),o);o()}walkCBSync(e,t,r){this.signal?.aborted&&r(),this.walkCB2Sync(e,t,new o.Processor(this.opts),r)}walkCB2Sync(e,t,r,n){if(this.#ct(e))return n();if(this.signal?.aborted&&n(),this.paused)return void this.onResume((()=>this.walkCB2Sync(e,t,r,n)));r.processPatterns(e,t);let i=1;const o=()=>{0==--i&&n()};for(const[e,t,n]of r.matches.entries())this.#lt(e)||this.matchSync(e,t,n);for(const e of r.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;const t=e.readdirSync();this.walkCB3Sync(e,t,r,o)}o()}walkCB3Sync(e,t,r,n){r=r.filterEntries(e,t);let i=1;const o=()=>{0==--i&&n()};for(const[e,t,n]of r.matches.entries())this.#lt(e)||this.matchSync(e,t,n);for(const[e,t]of r.subwalks.entries())i++,this.walkCB2Sync(e,t,r.child(),o);o()}}t.GlobUtil=s;t.GlobWalker=class extends s{matches;constructor(e,t,r){super(e,t,r),this.matches=new Set}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise(((e,t)=>{this.walkCB(this.path,this.patterns,(()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)}))})),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,(()=>{if(this.signal?.aborted)throw this.signal.reason})),this.matches}};t.GlobStream=class extends s{results;constructor(e,t,r){super(e,t,r),this.results=new n.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",(()=>this.resume())),this.results.on("resume",(()=>this.resume()))}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){const e=this.path;return e.isUnknown()?e.lstat().then((()=>{this.walkCB(e,this.patterns,(()=>this.results.end()))})):this.walkCB(e,this.patterns,(()=>this.results.end())),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,(()=>this.results.end())),this.results}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Ignore=void 0;const n=r(37),i=r(289),o="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";t.Ignore=class{relative;relativeChildren;absolute;absoluteChildren;constructor(e,{nobrace:t,nocase:r,noext:s,noglobstar:a,platform:l=o}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[];const c={dot:!0,nobrace:t,nocase:r,noext:s,noglobstar:a,optimizationLevel:2,platform:l,nocomment:!0,nonegate:!0};for(const t of e){const e=new n.Minimatch(t,c);for(let t=0;t<e.set.length;t++){const r=e.set[t],o=e.globParts[t];if(!r||!o)throw new Error("invalid pattern object");const s=new i.Pattern(r,o,0,l),a=new n.Minimatch(s.globString(),c),u="**"===o[o.length-1],f=s.isAbsolute();f?this.absolute.push(a):this.relative.push(a),u&&(f?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}}ignored(e){const t=e.fullpath(),r=`${t}/`,n=e.relative()||".",i=`${n}/`;for(const e of this.relative)if(e.match(n)||e.match(i))return!0;for(const e of this.absolute)if(e.match(t)||e.match(r))return!0;return!1}childrenIgnored(e){const t=e.fullpath()+"/",r=(e.relative()||".")+"/";for(const e of this.relativeChildren)if(e.match(r))return!0;for(const e of this.absoluteChildren)if(e.match(t))return!0;return!1}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Processor=t.SubWalks=t.MatchRecord=t.HasWalkedCache=void 0;const n=r(37);class i{store;constructor(e=new Map){this.store=e}copy(){return new i(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){const r=e.fullpath(),n=this.store.get(r);n?n.add(t.globString()):this.store.set(r,new Set([t.globString()]))}}t.HasWalkedCache=i;class o{store=new Map;add(e,t,r){const n=(t?2:0)|(r?1:0),i=this.store.get(e);this.store.set(e,void 0===i?n:n&i)}entries(){return[...this.store.entries()].map((([e,t])=>[e,!!(2&t),!!(1&t)]))}}t.MatchRecord=o;class s{store=new Map;add(e,t){if(!e.canReaddir())return;const r=this.store.get(e);r?r.find((e=>e.globString()===t.globString()))||r.push(t):this.store.set(e,[t])}get(e){const t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map((e=>[e,this.store.get(e)]))}keys(){return[...this.store.keys()].filter((e=>e.canReaddir()))}}t.SubWalks=s;class a{hasWalkedCache;matches=new o;subwalks=new s;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new i}processPatterns(e,t){this.patterns=t;const r=t.map((t=>[e,t]));for(let[e,t]of r){this.hasWalkedCache.storeWalked(e,t);const r=t.root(),i=t.isAbsolute()&&!1!==this.opts.absolute;if(r){e=e.resolve("/"===r&&void 0!==this.opts.root?this.opts.root:r);const n=t.rest();if(!n){this.matches.add(e,!0,!1);continue}t=n}if(e.isENOENT())continue;let o,s,a=!1;for(;"string"==typeof(o=t.pattern())&&(s=t.rest());){const r=e.resolve(o);e=r,t=s,a=!0}if(o=t.pattern(),s=t.rest(),a){if(this.hasWalkedCache.hasWalked(e,t))continue;this.hasWalkedCache.storeWalked(e,t)}if("string"!=typeof o)if(o===n.GLOBSTAR){(!e.isSymbolicLink()||this.follow||t.checkFollowGlobstar())&&this.subwalks.add(e,t);const r=s?.pattern(),n=s?.rest();if(s&&(""!==r&&"."!==r||n)){if(".."===r){const t=e.parent||e;n?this.hasWalkedCache.hasWalked(t,n)||this.subwalks.add(t,n):this.matches.add(t,i,!0)}}else this.matches.add(e,i,""===r||"."===r)}else o instanceof RegExp&&this.subwalks.add(e,t);else{const t=".."===o||""===o||"."===o;this.matches.add(e.resolve(o),i,t)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new a(this.opts,this.hasWalkedCache)}filterEntries(e,t){const r=this.subwalks.get(e),i=this.child();for(const e of t)for(const t of r){const r=t.isAbsolute(),o=t.pattern(),s=t.rest();o===n.GLOBSTAR?i.testGlobstar(e,t,s,r):o instanceof RegExp?i.testRegExp(e,o,s,r):i.testString(e,o,s,r)}return i}testGlobstar(e,t,r,n){if(!this.dot&&e.name.startsWith(".")||(t.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(r&&t.checkFollowGlobstar()?this.subwalks.add(e,r):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),r){const t=r.pattern();if("string"==typeof t&&".."!==t&&""!==t&&"."!==t)this.testString(e,t,r.rest(),n);else if(".."===t){const t=e.parent||e;this.subwalks.add(t,r)}else t instanceof RegExp&&this.testRegExp(e,t,r.rest(),n)}}testRegExp(e,t,r,n){t.test(e.name)&&(r?this.subwalks.add(e,r):this.matches.add(e,n,!1))}testString(e,t,r,n){e.isNamed(t)&&(r?this.subwalks.add(e,r):this.matches.add(e,n,!1))}}t.Processor=a},(e,t,r)=>{const n=globalThis.AbortController||r(8).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:l}=r(13),{validateAbortSignal:c,validateInteger:u,validateObject:f}=r(48),h=r(5).Symbol("kWeak"),d=r(5).Symbol("kResistStopPropagation"),{finished:p}=r(29),b=r(157),{addAbortSignalNoValidate:_}=r(69),{isWritable:y,isNodeStream:m}=r(25),{deprecate:g}=r(18),{ArrayPrototypePush:w,Boolean:v,MathFloor:S,Number:E,NumberIsNaN:x,Promise:R,PromiseReject:A,PromiseResolve:O,PromisePrototypeThen:k,Symbol:T}=r(5),P=T("kEmpty"),M=T("kEof");function L(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=S(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=S(t.highWaterMark)),u(n,"options.concurrency",1),u(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(18).AbortSignalAny([null==t?void 0:t.signal].filter(v)),s=this,a=[],c={signal:o};let u,f,h=!1,d=0;function p(){h=!0,b()}function b(){d-=1,_()}function _(){f&&!h&&d<n&&a.length<i&&(f(),f=null)}!async function(){try{for await(let t of s){if(h)return;if(o.aborted)throw new l;try{if(t=e(t,c),t===P)continue;t=O(t)}catch(e){t=A(e)}d+=1,k(t,b,p),a.push(t),u&&(u(),u=null),!h&&(a.length>=i||d>=n)&&await new R((e=>{f=e}))}a.push(M)}catch(e){const t=A(e);k(t,b,p),a.push(t)}finally{h=!0,u&&(u(),u=null)}}();try{for(;;){for(;a.length>0;){const e=await a[0];if(e===M)return;if(o.aborted)throw new l;e!==P&&(yield e),a.shift(),_()}await new R((e=>{u=e}))}}finally{h=!0,f&&(f(),f=null)}}.call(this)}async function C(e,t=void 0){for await(const r of I.call(this,e,t))return!0;return!1}function I(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return L.call(this,(async function(t,r){return await e(t,r)?t:P}),t)}class D extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function N(e){if(e=E(e),x(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:g((function(e=void 0){return null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=N(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;e--<=0&&(yield r)}}.call(this)},filter:I,flatMap:function(e,t){const r=L.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:L,take:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=N(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),m(e)&&!y(e))throw new i("stream",e,"must be writable");const r=b(this,e);return null!=t&&t.signal&&_(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await C.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of L.call(this,(async function(t,r){return await e(t,r),P}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&f(r,"options"),null!=(null==r?void 0:r.signal)&&c(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new l(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(e)),e}const a=new n,u=a.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this,[d]:!0};r.signal.addEventListener("abort",(()=>a.abort()),e)}let b=!1;try{for await(const n of this){var _;if(b=!0,null!=r&&null!==(_=r.signal)&&void 0!==_&&_.aborted)throw new l;s?t=await e(t,n,{signal:u}):(t=n,s=!0)}if(!b&&!s)throw new D}finally{a.abort()}return t},toArray:async function(e){null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l(void 0,{cause:e.signal.reason});w(t,n)}return t},some:C,find:async function(e,t){for await(const r of I.call(this,e,t))return r}}},(e,t,r)=>{const n=globalThis.AbortController||r(8).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:l}=r(14),{validateAbortSignal:c,validateInteger:u,validateObject:f}=r(49),h=r(6).Symbol("kWeak"),d=r(6).Symbol("kResistStopPropagation"),{finished:p}=r(30),b=r(166),{addAbortSignalNoValidate:_}=r(72),{isWritable:y,isNodeStream:m}=r(26),{deprecate:g}=r(19),{ArrayPrototypePush:w,Boolean:v,MathFloor:S,Number:E,NumberIsNaN:x,Promise:R,PromiseReject:A,PromiseResolve:O,PromisePrototypeThen:k,Symbol:T}=r(6),P=T("kEmpty"),M=T("kEof");function L(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=S(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=S(t.highWaterMark)),u(n,"options.concurrency",1),u(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(19).AbortSignalAny([null==t?void 0:t.signal].filter(v)),s=this,a=[],c={signal:o};let u,f,h=!1,d=0;function p(){h=!0,b()}function b(){d-=1,_()}function _(){f&&!h&&d<n&&a.length<i&&(f(),f=null)}!async function(){try{for await(let t of s){if(h)return;if(o.aborted)throw new l;try{if(t=e(t,c),t===P)continue;t=O(t)}catch(e){t=A(e)}d+=1,k(t,b,p),a.push(t),u&&(u(),u=null),!h&&(a.length>=i||d>=n)&&await new R((e=>{f=e}))}a.push(M)}catch(e){const t=A(e);k(t,b,p),a.push(t)}finally{h=!0,u&&(u(),u=null)}}();try{for(;;){for(;a.length>0;){const e=await a[0];if(e===M)return;if(o.aborted)throw new l;e!==P&&(yield e),a.shift(),_()}await new R((e=>{u=e}))}}finally{h=!0,f&&(f(),f=null)}}.call(this)}async function C(e,t=void 0){for await(const r of I.call(this,e,t))return!0;return!1}function I(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return L.call(this,(async function(t,r){return await e(t,r)?t:P}),t)}class D extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function N(e){if(e=E(e),x(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:g((function(e=void 0){return null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=N(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;e--<=0&&(yield r)}}.call(this)},filter:I,flatMap:function(e,t){const r=L.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:L,take:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=N(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),m(e)&&!y(e))throw new i("stream",e,"must be writable");const r=b(this,e);return null!=t&&t.signal&&_(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await C.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of L.call(this,(async function(t,r){return await e(t,r),P}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&f(r,"options"),null!=(null==r?void 0:r.signal)&&c(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new l(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(e)),e}const a=new n,u=a.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this,[d]:!0};r.signal.addEventListener("abort",(()=>a.abort()),e)}let b=!1;try{for await(const n of this){var _;if(b=!0,null!=r&&null!==(_=r.signal)&&void 0!==_&&_.aborted)throw new l;s?t=await e(t,n,{signal:u}):(t=n,s=!0)}if(!b&&!s)throw new D}finally{a.abort()}return t},toArray:async function(e){null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l(void 0,{cause:e.signal.reason});w(t,n)}return t},some:C,find:async function(e,t){for await(const r of I.call(this,e,t))return r}}},(e,t,r)=>{const n=globalThis.AbortController||r(8).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:o,ERR_MISSING_ARGS:s,ERR_OUT_OF_RANGE:a},AbortError:l}=r(15),{validateAbortSignal:c,validateInteger:u,validateObject:f}=r(50),h=r(7).Symbol("kWeak"),d=r(7).Symbol("kResistStopPropagation"),{finished:p}=r(31),b=r(172),{addAbortSignalNoValidate:_}=r(75),{isWritable:y,isNodeStream:m}=r(27),{deprecate:g}=r(20),{ArrayPrototypePush:w,Boolean:v,MathFloor:S,Number:E,NumberIsNaN:x,Promise:R,PromiseReject:A,PromiseResolve:O,PromisePrototypeThen:k,Symbol:T}=r(7),P=T("kEmpty"),M=T("kEof");function L(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=S(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=S(t.highWaterMark)),u(n,"options.concurrency",1),u(i,"options.highWaterMark",0),i+=n,async function*(){const o=r(20).AbortSignalAny([null==t?void 0:t.signal].filter(v)),s=this,a=[],c={signal:o};let u,f,h=!1,d=0;function p(){h=!0,b()}function b(){d-=1,_()}function _(){f&&!h&&d<n&&a.length<i&&(f(),f=null)}!async function(){try{for await(let t of s){if(h)return;if(o.aborted)throw new l;try{if(t=e(t,c),t===P)continue;t=O(t)}catch(e){t=A(e)}d+=1,k(t,b,p),a.push(t),u&&(u(),u=null),!h&&(a.length>=i||d>=n)&&await new R((e=>{f=e}))}a.push(M)}catch(e){const t=A(e);k(t,b,p),a.push(t)}finally{h=!0,u&&(u(),u=null)}}();try{for(;;){for(;a.length>0;){const e=await a[0];if(e===M)return;if(o.aborted)throw new l;e!==P&&(yield e),a.shift(),_()}await new R((e=>{u=e}))}}finally{h=!0,f&&(f(),f=null)}}.call(this)}async function C(e,t=void 0){for await(const r of I.call(this,e,t))return!0;return!1}function I(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return L.call(this,(async function(t,r){return await e(t,r)?t:P}),t)}class D extends s{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function N(e){if(e=E(e),x(e))return 0;if(e<0)throw new a("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:g((function(e=void 0){return null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=N(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;e--<=0&&(yield r)}}.call(this)},filter:I,flatMap:function(e,t){const r=L.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:L,take:function(e,t=void 0){return null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),e=N(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new l;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new l;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&f(t,"options"),null!=(null==t?void 0:t.signal)&&c(t.signal,"options.signal"),m(e)&&!y(e))throw new i("stream",e,"must be writable");const r=b(this,e);return null!=t&&t.signal&&_(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);return!await C.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new o("fn",["Function","AsyncFunction"],e);for await(const r of L.call(this,(async function(t,r){return await e(t,r),P}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new o("reducer",["Function","AsyncFunction"],e);null!=r&&f(r,"options"),null!=(null==r?void 0:r.signal)&&c(r.signal,"options.signal");let s=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new l(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await p(this.destroy(e)),e}const a=new n,u=a.signal;if(null!=r&&r.signal){const e={once:!0,[h]:this,[d]:!0};r.signal.addEventListener("abort",(()=>a.abort()),e)}let b=!1;try{for await(const n of this){var _;if(b=!0,null!=r&&null!==(_=r.signal)&&void 0!==_&&_.aborted)throw new l;s?t=await e(t,n,{signal:u}):(t=n,s=!0)}if(!b&&!s)throw new D}finally{a.abort()}return t},toArray:async function(e){null!=e&&f(e,"options"),null!=(null==e?void 0:e.signal)&&c(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new l(void 0,{cause:e.signal.reason});w(t,n)}return t},some:C,find:async function(e,t){for await(const r of I.call(this,e,t))return r}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assertValidPattern=void 0;t.assertValidPattern=e=>{if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseClass=void 0;const r={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},n=e=>e.replace(/[[\]\\-]/g,"\\$&"),i=e=>e.join("");t.parseClass=(e,t)=>{const o=t;if("["!==e.charAt(o))throw new Error("not in a brace expression");const s=[],a=[];let l=o+1,c=!1,u=!1,f=!1,h=!1,d=o,p="";e:for(;l<e.length;){const t=e.charAt(l);if("!"!==t&&"^"!==t||l!==o+1){if("]"===t&&c&&!f){d=l+1;break}if(c=!0,"\\"!==t||f){if("["===t&&!f)for(const[t,[n,i,c]]of Object.entries(r))if(e.startsWith(t,l)){if(p)return["$.",!1,e.length-o,!0];l+=t.length,c?a.push(n):s.push(n),u=u||i;continue e}f=!1,p?(t>p?s.push(n(p)+"-"+n(t)):t===p&&s.push(n(t)),p="",l++):e.startsWith("-]",l+1)?(s.push(n(t+"-")),l+=2):e.startsWith("-",l+1)?(p=t,l+=2):(s.push(n(t)),l++)}else f=!0,l++}else h=!0,l++}if(d<l)return["",!1,0,!1];if(!s.length&&!a.length)return["$.",!1,e.length-o,!0];if(0===a.length&&1===s.length&&/^\\?.$/.test(s[0])&&!h){const e=2===s[0].length?s[0].slice(-1):s[0];return[(b=e,b.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,d-o,!1]}var b;const _="["+(h?"^":"")+i(s)+"]",y="["+(h?"":"^")+i(a)+"]";return[s.length&&a.length?"("+_+"|"+y+")":s.length?_:y,u,d-o,!0]}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobStream=t.GlobWalker=t.GlobUtil=void 0;const n=r(79),i=r(381),o=r(382);class s{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#ot=[];#st;#at;signal;maxDepth;constructor(e,t,r){this.patterns=e,this.path=t,this.opts=r,this.#at=r.posix||"win32"!==r.platform?"/":"\\",r.ignore&&(this.#st=((e,t)=>"string"==typeof e?new i.Ignore([e],t):Array.isArray(e)?new i.Ignore(e,t):e)(r.ignore,r)),this.maxDepth=r.maxDepth||1/0,r.signal&&(this.signal=r.signal,this.signal.addEventListener("abort",(()=>{this.#ot.length=0})))}#lt(e){return this.seen.has(e)||!!this.#st?.ignored?.(e)}#ct(e){return!!this.#st?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;let e;for(this.paused=!1;!this.paused&&(e=this.#ot.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#ot.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||await e.realpath(),!r)return;e=r}const n=e.isUnknown()||this.opts.stat;return this.matchCheckTest(n?await e.lstat():e,t)}matchCheckTest(e,t){return!e||!(this.maxDepth===1/0||e.depth()<=this.maxDepth)||t&&!e.canReaddir()||this.opts.nodir&&e.isDirectory()||this.#lt(e)?void 0:e}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let r;if(this.opts.realpath){if(r=e.realpathCached()||e.realpathSync(),!r)return;e=r}const n=e.isUnknown()||this.opts.stat;return this.matchCheckTest(n?e.lstatSync():e,t)}matchFinish(e,t){if(this.#lt(e))return;const r=void 0===this.opts.absolute?t:this.opts.absolute;this.seen.add(e);const n=this.opts.mark&&e.isDirectory()?this.#at:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(r){const t=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(t+n)}else{const t=this.opts.posix?e.relativePosix():e.relative(),r=this.opts.dotRelative&&!t.startsWith(".."+this.#at)?"."+this.#at:"";this.matchEmit(t?r+t+n:"."+n)}}async match(e,t,r){const n=await this.matchCheck(e,r);n&&this.matchFinish(n,t)}matchSync(e,t,r){const n=this.matchCheckSync(e,r);n&&this.matchFinish(n,t)}walkCB(e,t,r){this.signal?.aborted&&r(),this.walkCB2(e,t,new o.Processor(this.opts),r)}walkCB2(e,t,r,n){if(this.#ct(e))return n();if(this.signal?.aborted&&n(),this.paused)return void this.onResume((()=>this.walkCB2(e,t,r,n)));r.processPatterns(e,t);let i=1;const o=()=>{0==--i&&n()};for(const[e,t,n]of r.matches.entries())this.#lt(e)||(i++,this.match(e,t,n).then((()=>o())));for(const e of r.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;const t=e.readdirCached();e.calledReaddir()?this.walkCB3(e,t,r,o):e.readdirCB(((t,n)=>this.walkCB3(e,n,r,o)),!0)}o()}walkCB3(e,t,r,n){r=r.filterEntries(e,t);let i=1;const o=()=>{0==--i&&n()};for(const[e,t,n]of r.matches.entries())this.#lt(e)||(i++,this.match(e,t,n).then((()=>o())));for(const[e,t]of r.subwalks.entries())i++,this.walkCB2(e,t,r.child(),o);o()}walkCBSync(e,t,r){this.signal?.aborted&&r(),this.walkCB2Sync(e,t,new o.Processor(this.opts),r)}walkCB2Sync(e,t,r,n){if(this.#ct(e))return n();if(this.signal?.aborted&&n(),this.paused)return void this.onResume((()=>this.walkCB2Sync(e,t,r,n)));r.processPatterns(e,t);let i=1;const o=()=>{0==--i&&n()};for(const[e,t,n]of r.matches.entries())this.#lt(e)||this.matchSync(e,t,n);for(const e of r.subwalkTargets()){if(this.maxDepth!==1/0&&e.depth()>=this.maxDepth)continue;i++;const t=e.readdirSync();this.walkCB3Sync(e,t,r,o)}o()}walkCB3Sync(e,t,r,n){r=r.filterEntries(e,t);let i=1;const o=()=>{0==--i&&n()};for(const[e,t,n]of r.matches.entries())this.#lt(e)||this.matchSync(e,t,n);for(const[e,t]of r.subwalks.entries())i++,this.walkCB2Sync(e,t,r.child(),o);o()}}t.GlobUtil=s;t.GlobWalker=class extends s{matches;constructor(e,t,r){super(e,t,r),this.matches=new Set}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise(((e,t)=>{this.walkCB(this.path,this.patterns,(()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)}))})),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,(()=>{if(this.signal?.aborted)throw this.signal.reason})),this.matches}};t.GlobStream=class extends s{results;constructor(e,t,r){super(e,t,r),this.results=new n.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",(()=>this.resume())),this.results.on("resume",(()=>this.resume()))}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){const e=this.path;return e.isUnknown()?e.lstat().then((()=>{this.walkCB(e,this.patterns,(()=>this.results.end()))})):this.walkCB(e,this.patterns,(()=>this.results.end())),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,(()=>this.results.end())),this.results}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Ignore=void 0;const n=r(38),i=r(313),o="object"==typeof process&&process&&"string"==typeof process.platform?process.platform:"linux";t.Ignore=class{relative;relativeChildren;absolute;absoluteChildren;constructor(e,{nobrace:t,nocase:r,noext:s,noglobstar:a,platform:l=o}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[];const c={dot:!0,nobrace:t,nocase:r,noext:s,noglobstar:a,optimizationLevel:2,platform:l,nocomment:!0,nonegate:!0};for(const t of e){const e=new n.Minimatch(t,c);for(let t=0;t<e.set.length;t++){const r=e.set[t],o=e.globParts[t];if(!r||!o)throw new Error("invalid pattern object");const s=new i.Pattern(r,o,0,l),a=new n.Minimatch(s.globString(),c),u="**"===o[o.length-1],f=s.isAbsolute();f?this.absolute.push(a):this.relative.push(a),u&&(f?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}}ignored(e){const t=e.fullpath(),r=`${t}/`,n=e.relative()||".",i=`${n}/`;for(const e of this.relative)if(e.match(n)||e.match(i))return!0;for(const e of this.absolute)if(e.match(t)||e.match(r))return!0;return!1}childrenIgnored(e){const t=e.fullpath()+"/",r=(e.relative()||".")+"/";for(const e of this.relativeChildren)if(e.match(r))return!0;for(const e of this.absoluteChildren)if(e.match(t))return!0;return!1}}},(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Processor=t.SubWalks=t.MatchRecord=t.HasWalkedCache=void 0;const n=r(38);class i{store;constructor(e=new Map){this.store=e}copy(){return new i(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){const r=e.fullpath(),n=this.store.get(r);n?n.add(t.globString()):this.store.set(r,new Set([t.globString()]))}}t.HasWalkedCache=i;class o{store=new Map;add(e,t,r){const n=(t?2:0)|(r?1:0),i=this.store.get(e);this.store.set(e,void 0===i?n:n&i)}entries(){return[...this.store.entries()].map((([e,t])=>[e,!!(2&t),!!(1&t)]))}}t.MatchRecord=o;class s{store=new Map;add(e,t){if(!e.canReaddir())return;const r=this.store.get(e);r?r.find((e=>e.globString()===t.globString()))||r.push(t):this.store.set(e,[t])}get(e){const t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map((e=>[e,this.store.get(e)]))}keys(){return[...this.store.keys()].filter((e=>e.canReaddir()))}}t.SubWalks=s;class a{hasWalkedCache;matches=new o;subwalks=new s;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new i}processPatterns(e,t){this.patterns=t;const r=t.map((t=>[e,t]));for(let[e,t]of r){this.hasWalkedCache.storeWalked(e,t);const r=t.root(),i=t.isAbsolute()&&!1!==this.opts.absolute;if(r){e=e.resolve("/"===r&&void 0!==this.opts.root?this.opts.root:r);const n=t.rest();if(!n){this.matches.add(e,!0,!1);continue}t=n}if(e.isENOENT())continue;let o,s,a=!1;for(;"string"==typeof(o=t.pattern())&&(s=t.rest());){const r=e.resolve(o);e=r,t=s,a=!0}if(o=t.pattern(),s=t.rest(),a){if(this.hasWalkedCache.hasWalked(e,t))continue;this.hasWalkedCache.storeWalked(e,t)}if("string"!=typeof o)if(o===n.GLOBSTAR){(!e.isSymbolicLink()||this.follow||t.checkFollowGlobstar())&&this.subwalks.add(e,t);const r=s?.pattern(),n=s?.rest();if(s&&(""!==r&&"."!==r||n)){if(".."===r){const t=e.parent||e;n?this.hasWalkedCache.hasWalked(t,n)||this.subwalks.add(t,n):this.matches.add(t,i,!0)}}else this.matches.add(e,i,""===r||"."===r)}else o instanceof RegExp&&this.subwalks.add(e,t);else{const t=".."===o||""===o||"."===o;this.matches.add(e.resolve(o),i,t)}}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new a(this.opts,this.hasWalkedCache)}filterEntries(e,t){const r=this.subwalks.get(e),i=this.child();for(const e of t)for(const t of r){const r=t.isAbsolute(),o=t.pattern(),s=t.rest();o===n.GLOBSTAR?i.testGlobstar(e,t,s,r):o instanceof RegExp?i.testRegExp(e,o,s,r):i.testString(e,o,s,r)}return i}testGlobstar(e,t,r,n){if(!this.dot&&e.name.startsWith(".")||(t.hasMore()||this.matches.add(e,n,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(r&&t.checkFollowGlobstar()?this.subwalks.add(e,r):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),r){const t=r.pattern();if("string"==typeof t&&".."!==t&&""!==t&&"."!==t)this.testString(e,t,r.rest(),n);else if(".."===t){const t=e.parent||e;this.subwalks.add(t,r)}else t instanceof RegExp&&this.testRegExp(e,t,r.rest(),n)}}testRegExp(e,t,r,n){t.test(e.name)&&(r?this.subwalks.add(e,r):this.matches.add(e,n,!1))}testString(e,t,r,n){e.isNamed(t)&&(r?this.subwalks.add(e,r):this.matches.add(e,n,!1))}}t.Processor=a},(e,t,r)=>{t.extract=r(315),t.pack=r(324)},e=>{e.exports=require("child_process")},e=>{e.exports=require("node:os")},(e,t,r)=>{r(107),r(328),t.Extract=r(329),r(347)},(e,t,r)=>{const n=r(11),{checkPath:i}=r(388),o=e=>"number"==typeof e?e:{mode:511,...e}.mode;e.exports.makeDir=async(e,t)=>(i(e),n.mkdir(e,{mode:o(t),recursive:!0})),e.exports.makeDirSync=(e,t)=>(i(e),n.mkdirSync(e,{mode:o(t),recursive:!0}))},(e,t,r)=>{const n=r(3);e.exports.checkPath=function(e){if("win32"===process.platform){if(/[<>:"|?*]/.test(e.replace(n.parse(e).root,""))){const t=new Error(`Path contains invalid characters: ${e}`);throw t.code="EINVAL",t}}}},(e,t,r)=>{r.d(t,{GetObjectCommand:()=>Ti,HeadObjectCommand:()=>Di});class n{static v2026="undefined"!=typeof process&&"true"===process.env?.SMITHY_NEW_RETRIES_2026;static delay(){return n.v2026?50:100}static throttlingDelay(){return n.v2026?1e3:500}static cost(){return n.v2026?14:5}static throttlingCost(){return n.v2026?5:10}static modifiedCostType(){return n.v2026?"THROTTLING":"TRANSIENT"}}function i(e,t,r){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=r}n.v2026||="object"==typeof process&&"true"===process.env?.AWS_NEW_RETRIES_2026;const o="WHEN_SUPPORTED",s="WHEN_REQUIRED",a="WHEN_SUPPORTED",l="WHEN_REQUIRED";var c,u;!function(e){e.MD5="MD5",e.CRC32="CRC32",e.CRC32C="CRC32C",e.CRC64NVME="CRC64NVME",e.SHA1="SHA1",e.SHA256="SHA256"}(c||(c={})),function(e){e.HEADER="header",e.TRAILER="trailer"}(u||(u={}));const f=c.CRC32,h={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0};class d{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new d({...e,headers:{...e.headers}});var r;return t.query&&(t.query=(r=t.query,Object.keys(r).reduce(((e,t)=>{const n=r[t];return{...e,[t]:Array.isArray(n)?[...n]:n}}),{}))),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){return d.clone(this)}}class p{allocByteArray;byteLength=0;byteArrays=[];constructor(e){this.allocByteArray=e}push(e){this.byteArrays.push(e),this.byteLength+=e.byteLength}flush(){if(1===this.byteArrays.length){const e=this.byteArrays[0];return this.reset(),e}const e=this.allocByteArray(this.byteLength);let t=0;for(let r=0;r<this.byteArrays.length;++r){const n=this.byteArrays[r];e.set(n,t),t+=n.byteLength}return this.reset(),e}reset(){this.byteArrays=[],this.byteLength=0}}const b=function(e,t,r){const n=e.getReader();let i=!1,o=0;const s=["",new p((e=>new Uint8Array(e)))];let a=-1;const l=async e=>{const{value:c,done:u}=await n.read(),f=c;if(u){if(-1!==a){const t=_(s,a);y(t)>0&&e.enqueue(t)}e.close()}else{const n=function(e,t=!0){if(t&&"undefined"!=typeof Buffer&&e instanceof Buffer)return 2;if(e instanceof Uint8Array)return 1;if("string"==typeof e)return 0;return-1}(f,!1);if(a!==n&&(a>=0&&e.enqueue(_(s,a)),a=n),-1===a)return void e.enqueue(f);const c=y(f);o+=c;const u=y(s[a]);if(c>=t&&0===u)e.enqueue(f);else{const n=function(e,t,r){switch(t){case 0:return e[0]+=r,y(e[0]);case 1:case 2:return e[t].push(r),y(e[t])}}(s,a,f);!i&&o>2*t&&(i=!0,r?.warn(`@smithy/util-stream - stream chunk size ${c} is below threshold of ${t}, automatically buffering.`)),n>=t?e.enqueue(_(s,a)):await l(e)}}};return new ReadableStream({pull:l})};function _(e,t){switch(t){case 0:const r=e[0];return e[0]="",r;case 1:case 2:return e[t].flush()}throw new Error(`@smithy/util-stream - invalid index ${t} given to flush()`)}function y(e){return e?.byteLength??e?.length??0}const m=e=>e===c.MD5?"content-md5":`x-amz-checksum-${e.toLowerCase()}`,g=e=>{return!(void 0===e||"string"==typeof e||ArrayBuffer.isView(e)||(t=e,"function"==typeof ArrayBuffer&&t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)));var t};function w(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))}function v(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}Object.create;function S(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}Object.create;"function"==typeof SuppressedError&&SuppressedError;var E="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:e=>(new TextEncoder).encode(e);function x(e){return e instanceof Uint8Array?e:"string"==typeof e?E(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}function R(e){return"string"==typeof e?0===e.length:0===e.byteLength}function A(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}function O(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),r=0;r<e.length;)t[r]=e[r],r+=1;return t}return Uint32Array.from(e)}var k=function(){function e(){this.crc32c=new T}return e.prototype.update=function(e){R(e)||this.crc32c.update(x(e))},e.prototype.digest=function(){return w(this,void 0,void 0,(function(){return v(this,(function(e){return[2,A(this.crc32c.digest())]}))}))},e.prototype.reset=function(){this.crc32c=new T},e}();var T=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,r;try{for(var n=S(e),i=n.next();!i.done;i=n.next()){var o=i.value;this.checksum=this.checksum>>>8^P[255&(this.checksum^o)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),P=O([0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697]);let M,L,C,I,D,N,j,F,W;const B=()=>{M||(M=(()=>{const e=new Array(8);for(let t=0;t<8;t++){const r=new Array(512);for(let e=0;e<256;e++){let n=BigInt(e);for(let e=0;e<8*(t+1);e++)1n&n?n=n>>1n^0x9a6c9329ac4bc9b5n:n>>=1n;r[2*e]=Number(n>>32n&0xffffffffn),r[2*e+1]=Number(0xffffffffn&n)}e[t]=new Uint32Array(r)}return e})(),[L,C,I,D,N,j,F,W]=M)};class U{c1=0;c2=0;constructor(){B(),this.reset()}update(e){const t=e.length;let r=0,n=this.c1,i=this.c2;for(;r+8<=t;){const t=(255&(i^e[r++]))<<1,o=(255&(i>>>8^e[r++]))<<1,s=(255&(i>>>16^e[r++]))<<1,a=(255&(i>>>24^e[r++]))<<1,l=(255&(n^e[r++]))<<1,c=(255&(n>>>8^e[r++]))<<1,u=(255&(n>>>16^e[r++]))<<1,f=(255&(n>>>24^e[r++]))<<1;n=W[t]^F[o]^j[s]^N[a]^D[l]^I[c]^C[u]^L[f],i=W[t+1]^F[o+1]^j[s+1]^N[a+1]^D[l+1]^I[c+1]^C[u+1]^L[f+1]}for(;r<t;){const t=(255&(i^e[r]))<<1;i=(i>>>8|(255&n)<<24)>>>0,n=n>>>8^L[t],i^=L[t+1],r++}this.c1=n,this.c2=i}async digest(){const e=4294967295^this.c1,t=4294967295^this.c2;return new Uint8Array([e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t])}reset(){this.c1=4294967295,this.c2=4294967295}}const $=null;var z=function(){function e(){this.crc32=new G}return e.prototype.update=function(e){R(e)||this.crc32.update(x(e))},e.prototype.digest=function(){return w(this,void 0,void 0,(function(){return v(this,(function(e){return[2,A(this.crc32.digest())]}))}))},e.prototype.reset=function(){this.crc32=new G},e}();var G=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,r;try{for(var n=S(e),i=n.next();!i.done;i=n.next()){var o=i.value;this.checksum=this.checksum>>>8^H[255&(this.checksum^o)]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}(),H=O([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);const V=[c.CRC32,c.CRC32C,c.CRC64NVME,c.SHA1,c.SHA256],q=[c.SHA256,c.SHA1,c.CRC32,c.CRC32C,c.CRC64NVME],K=(e,t)=>{const{checksumAlgorithms:r={}}=t;switch(e){case c.MD5:return r?.MD5??t.md5;case c.CRC32:return r?.CRC32??z;case c.CRC32C:return r?.CRC32C??k;case c.CRC64NVME:return"function"!=typeof $?r?.CRC64NVME??U:r?.CRC64NVME??$;case c.SHA1:return r?.SHA1??t.sha1;case c.SHA256:return r?.SHA256??t.sha256;default:if(r?.[e])return r[e];throw new Error(`The checksum algorithm "${e}" is not supported by the client. Select one of ${V}, or provide an implementation to the client constructor checksums field.`)}},Y=e=>(new TextEncoder).encode(e),Z=(e,t)=>{const r=new e;var n;return r.update("string"==typeof(n=t||"")?Y(n):ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(n)),r.digest()},Q={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},X=(e,t)=>(r,n)=>async s=>{if(!d.isInstance(s.request))return r(s);if(((e,t)=>{const r=e.toLowerCase();for(const e of Object.keys(t))if(e.toLowerCase().startsWith(r))return!0;return!1})("x-amz-checksum-",s.request.headers))return r(s);const{request:a,input:l}=s,{body:u,headers:h}=a,{base64Encoder:p,streamHasher:_}=e,{requestChecksumRequired:y,requestAlgorithmMember:w}=t,v=await e.requestChecksumCalculation(),S=w?.name,E=w?.httpHeader;S&&!l[S]&&(v===o||y)&&(l[S]=f,E&&(h[E]=f));const x=((e,{requestChecksumRequired:t,requestAlgorithmMember:r,requestChecksumCalculation:n})=>{if(!r)return n===o||t?f:void 0;if(!e[r])return;return e[r]})(l,{requestChecksumRequired:y,requestAlgorithmMember:w?.name,requestChecksumCalculation:v});let R=u,A=h;if(x){switch(x){case c.CRC32:i(n,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case c.CRC32C:i(n,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case c.CRC64NVME:i(n,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case c.SHA1:i(n,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case c.SHA256:i(n,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y")}const t=m(x),r=K(x,e);if(g(u)){const{getAwsChunkedEncodingStream:i,bodyLengthChecker:o}=e;R=i("number"==typeof e.requestStreamBufferSize&&e.requestStreamBufferSize>=8192?b(u,e.requestStreamBufferSize,n.logger):u,{base64Encoder:p,bodyLengthChecker:o,checksumLocationName:t,checksumAlgorithmFn:r,streamHasher:_}),A={...h,"content-encoding":h["content-encoding"]?`${h["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":h["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":t},delete A["content-length"]}else if(!((e,t)=>{const r=e.toLowerCase();for(const e of Object.keys(t))if(r===e.toLowerCase())return!0;return!1})(t,h)){const e=await Z(r,u);A={...h,[t]:p(e)}}}try{return await r({...s,request:{...a,headers:A,body:R}})}catch(e){if(e instanceof Error&&"InvalidChunkSizeError"===e.name)try{e.message.endsWith(".")||(e.message+="."),e.message+=" Set [requestStreamBufferSize=number e.g. 65_536] in client constructor to instruct AWS SDK to buffer your input stream."}catch(e){}throw e}},J=(e=[])=>{const t=[];let r=q.length;for(const n of e){const e=q.indexOf(n);-1!==e?t[e]=n:t[r++]=n}return t.filter(Boolean)},ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",te=(Object.entries(ee).reduce(((e,[t,r])=>(e[r]=Number(t),e)),{}),ee.split(""));function re(e){let t;t="string"==typeof e?Y(e):e;const r="object"==typeof t&&"number"==typeof t.length,n="object"==typeof t&&"number"==typeof t.byteOffset&&"number"==typeof t.byteLength;if(!r&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let e=0;e<t.length;e+=3){let r=0,n=0;for(let i=e,o=Math.min(e+3,t.length);i<o;i++)r|=t[i]<<8*(o-i-1),n+=8;const o=Math.ceil(n/6);r<<=6*o-n;for(let e=1;e<=o;e++){const t=6*(o-e);i+=te[(r&63<<t)>>t]}i+="==".slice(0,4-o)}return i}const ne="function"==typeof ReadableStream?ReadableStream:function(){};class ie extends ne{}const oe=({expectedChecksum:e,checksum:t,source:r,checksumSourceLocation:n,base64Encoder:i})=>{if(o=r,"function"!=typeof ReadableStream||!(o?.constructor?.name===ReadableStream.name||o instanceof ReadableStream))throw new Error(`@smithy/util-stream: unsupported source type ${r?.constructor?.name??r} in ChecksumStream.`);var o;const s=i??re;if("function"!=typeof TransformStream)throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const a=new TransformStream({start(){},async transform(e,r){t.update(e),r.enqueue(e)},async flush(r){const i=await t.digest(),o=s(i);if(e!==o){const t=new Error(`Checksum mismatch: expected "${e}" but received "${o}" in response header "${n}".`);r.error(t)}else r.terminate()}});r.pipeThrough(a);const l=a.readable;return Object.setPrototypeOf(l,ie.prototype),l},se=async(e,{checksumAlgorithmFn:t,base64Encoder:r})=>r(await Z(t,e)),ae={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},le=(e,t)=>(r,n)=>async i=>{if(!d.isInstance(i.request))return r(i);const o=i.input,s=await r(i),a=s.response,{requestValidationModeMember:l,responseAlgorithms:u}=t;if(l&&"ENABLED"===o[l]){const{clientName:t,commandName:r}=n,i=Object.keys(e.checksumAlgorithms??{}).filter((e=>{const t=m(e);return void 0!==a.headers[t]})),o=J([...u??[],...i]);if("S3Client"===t&&"GetObjectCommand"===r&&o.every((e=>{const t=m(e),r=a.headers[t];return!r||(e=>{const t=e.lastIndexOf("-");if(-1!==t){const r=e.slice(t+1);if(!r.startsWith("0")){const e=parseInt(r,10);if(!isNaN(e)&&e>=1&&e<=1e4)return!0}}return!1})(r)})))return s;await(async(e,{config:t,responseAlgorithms:r,logger:n})=>{const i=J(r),{body:o,headers:s}=e;for(const r of i){const i=m(r),a=s[i];if(a){let s;try{s=K(r,t)}catch(e){if(r===c.CRC64NVME){n?.warn(`Skipping ${c.CRC64NVME} checksum validation: ${e.message}`);continue}throw e}const{base64Encoder:l}=t;if(g(o))return void(e.body=oe({expectedChecksum:a,checksumSourceLocation:i,checksum:new s,source:o,base64Encoder:l}));const u=await se(o,{checksumAlgorithmFn:s,base64Encoder:l});if(u===a)break;throw new Error(`Checksum mismatch: expected "${u}" but received "${a}" in response header "${i}".`)}}})(a,{config:e,responseAlgorithms:o,logger:n.logger})}return s},ce=(e,t)=>({applyToStack:r=>{r.add(X(e,t),Q),r.addRelativeTo(((e,t)=>(r,n)=>async c=>{const u=c.input,{requestValidationModeMember:f}=t,h=await e.requestChecksumCalculation(),d=await e.responseChecksumValidation();switch(h){case s:i(n,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case o:i(n,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z")}switch(d){case l:i(n,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case a:i(n,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b")}return f&&!u[f]&&d===a&&(u[f]="ENABLED"),r(c)})(e,t),h),r.addRelativeTo(le(e,t),ae)}});class ue{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const fe=e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&Ee.warn(Se(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}},he=Math.ceil(2**127*(2-2**-23)),de=e=>{const t=fe(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>he)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},pe=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},be=e=>ye(e,16),_e=e=>ye(e,8),ye=(e,t)=>{const r=pe(e);if(void 0!==r&&me(r,t)!==r)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return r},me=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},ge=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,we=e=>{const t=e.match(ge);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},ve=e=>be("string"==typeof e?we(e):e),Se=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),Ee={warn:console.warn};const xe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];const Re=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Ae=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Oe=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),ke=(e,t,r,n)=>{const i=t-1;return Ce(e,i,r),new Date(Date.UTC(e,i,r,De(n.hours,"hour",0,23),De(n.minutes,"minute",0,59),De(n.seconds,"seconds",0,60),Ne(n.fractionalMilliseconds)))},Te=e=>{const t=(new Date).getUTCFullYear(),r=100*Math.floor(t/100)+ve(je(e));return r<t?r+100:r},Pe=e=>e.getTime()-(new Date).getTime()>15768e8?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,Me=e=>{const t=xe.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},Le=[31,28,31,30,31,30,31,31,30,31,30,31],Ce=(e,t,r)=>{let n=Le[t];if(1===t&&Ie(e)&&(n=29),r>n)throw new TypeError(`Invalid day for ${xe[t]} in ${e}: ${r}`)},Ie=e=>e%4==0&&(e%100!=0||e%400==0),De=(e,t,r,n)=>{const i=(e=>_e("string"==typeof e?we(e):e))(je(e));if(i<r||i>n)throw new TypeError(`${t} must be between ${r} and ${n}, inclusive`);return i},Ne=e=>null==e?0:1e3*(e=>de("string"==typeof e?we(e):e))("0."+e),je=e=>{let t=0;for(;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)},Fe=e=>(e,t)=>async r=>{const n=await e(r),{response:i}=n;if(ue.isInstance(i)&&i.headers.expires){i.headers.expiresstring=i.headers.expires;try{(e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=Re.exec(e);if(t){const[e,r,n,i,o,s,a,l]=t;return ke(ve(je(i)),Me(n),De(r,"day",1,31),{hours:o,minutes:s,seconds:a,fractionalMilliseconds:l})}if(t=Ae.exec(e),t){const[e,r,n,i,o,s,a,l]=t;return Pe(ke(Te(i),Me(n),De(r,"day",1,31),{hours:o,minutes:s,seconds:a,fractionalMilliseconds:l}))}if(t=Oe.exec(e),t){const[e,r,n,i,o,s,a,l]=t;return ke(ve(je(l)),Me(r),De(n.trimLeft(),"day",1,31),{hours:i,minutes:o,seconds:s,fractionalMilliseconds:a})}throw new TypeError("Invalid RFC-7231 date-time value")})(i.headers.expires)}catch(e){t.logger?.warn(`AWS SDK Warning for ${t.clientName}::${t.commandName} response parsing (${i.headers.expires}): ${e}`),delete i.headers.expires}}return n},We={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},Be=e=>({applyToStack:e=>{e.addRelativeTo(Fe(),We)}});const Ue={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},$e=e=>({applyToStack:t=>{var r;t.add((r=e,e=>async t=>{const n={...t.input},i=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const e of i){const t=n[e.target];if(t){let i;"string"==typeof t?ze(t,r)?i=r.base64Decoder(t):(i=r.utf8Decoder(t),n[e.target]=r.base64Encoder(i)):(i=ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t),n[e.target]=r.base64Encoder(i));const o=new r.md5;o.update(i),n[e.hash]=r.base64Encoder(await o.digest())}}return e({...t,input:n})}),Ue)}});function ze(e,t){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e))return!1;try{return 32===t.base64Decoder(e).length}catch{return!1}}const Ge={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};const He="__smithy_context",Ve=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,qe=/(\d+\.){3}\d+/,Ke=/\.\./,Ye=e=>Ve.test(e)&&!qe.test(e)&&!Ke.test(e),Ze=e=>{const[t,r,n,,,i]=e.split(":"),o="arn"===t&&e.split(":").length>=6,s=Boolean(o&&r&&n&&i);if(o&&!s)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return s},Qe=(e,t,r,n=!1)=>{const i=async()=>{let i;if(n){const n=r.clientContextParams,o=n?.[e];i=o??r[e]??r[t]}else i=r[e]??r[t];return"function"==typeof i?i():i};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof r.credentials?await r.credentials():r.credentials;return e?.credentialScope??e?.CredentialScope}:"accountId"===e||"AccountId"===t?async()=>{const e="function"==typeof r.credentials?await r.credentials():r.credentials;return e?.accountId??e?.AccountId}:"endpoint"===e||"endpoint"===t?async()=>{if(!1===r.isCustomEndpoint)return;const e=await i();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:r,port:n,path:i}=e;return`${t}//${r}${n?":"+n:""}${i}`}}return e}:i};const Xe=e=>{if("string"==typeof e)return Xe(new URL(e));const{hostname:t,pathname:r,port:n,protocol:i,search:o}=e;let s;return o&&(s=function(e){const t={};if(e=e.replace(/^\?/,""))for(const r of e.split("&")){let[e,n=null]=r.split("=");e=decodeURIComponent(e),n&&(n=decodeURIComponent(n)),e in t?Array.isArray(t[e])?t[e].push(n):t[e]=[t[e],n]:t[e]=n}return t}(o)),{hostname:t,port:n?parseInt(n):void 0,protocol:i,path:r,query:s}},Je=async(e,t,r,n)=>{if(!r.isCustomEndpoint){let e;e=r.serviceConfiguredEndpoint?await r.serviceConfiguredEndpoint():await(async()=>{})(r.serviceId),e&&(r.endpoint=()=>Promise.resolve((e=>{if("object"==typeof e){if("url"in e){const t=Xe(e.url);if(e.headers){t.headers={};for(const[r,n]of Object.entries(e.headers))t.headers[r.toLowerCase()]=n.join(", ")}return t}return e}return Xe(e)})(e)),r.isCustomEndpoint=!0)}const i=await et(e,t,r);if("function"!=typeof r.endpointProvider)throw new Error("config.endpointProvider is not set.");const o=r.endpointProvider(i,n);if(r.isCustomEndpoint&&r.endpoint){const e=await r.endpoint();if(e?.headers){o.headers??={};for(const[t,r]of Object.entries(e.headers))o.headers[t]=Array.isArray(r)?r:[r]}}return o},et=async(e,t,r)=>{const n={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,o]of Object.entries(i))switch(o.type){case"staticContextParams":n[t]=o.value;break;case"contextParams":n[t]=e[o.name];break;case"clientContextParams":case"builtInParams":n[t]=await Qe(o.name,t,r,"builtInParams"!==o.type)();break;case"operationContextParams":n[t]=o.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return 0===Object.keys(i).length&&Object.assign(n,r),"s3"===String(r.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Ze(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!Ye(t)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(n),n},tt=({config:e,instructions:t})=>(r,n)=>async i=>{e.isCustomEndpoint&&function(e,t,r){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=r}(n,"ENDPOINT_OVERRIDE","N");const o=await Je(i.input,{getEndpointParameterInstructions:()=>t},{...e},n);n.endpointV2=o,n.authSchemes=o.properties?.authSchemes;const s=n.authSchemes?.[0];if(s){n.signing_region=s.signingRegion,n.signing_service=s.signingName;const e=(e=>e[He]||(e[He]={}))(n),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return r({...i})},rt={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Ge.name},nt=(e,t)=>({applyToStack:r=>{r.addRelativeTo(tt({config:e,instructions:t}),rt)}}),it=(e,t)=>{const r=[];if(e&&r.push(e),t)for(const e of t)r.push(e);return r},ot=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,st=()=>{let e=[],t=[],r=!1;const n=new Set,i=r=>(e.forEach((e=>{r.add(e.middleware,{...e})})),t.forEach((e=>{r.addRelativeTo(e.middleware,{...e})})),r.identifyOnResolve?.(a.identifyOnResolve()),r),o=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))})),t},s=(r=!1)=>{const n=[],i=[],s={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of it(t.name,t.aliases))s[e]=t;n.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of it(t.name,t.aliases))s[e]=t;i.push(t)})),i.forEach((e=>{if(e.toMiddleware){const t=s[e.toMiddleware];if(void 0===t){if(r)return;throw new Error(`${e.toMiddleware} is not found when adding ${ot(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}));var a;return(a=n,a.sort(((e,t)=>at[t.step]-at[e.step]||lt[t.priority||"normal"]-lt[e.priority||"normal"]))).map(o).reduce(((e,t)=>(e.push(...t),e)),[])},a={add:(t,r={})=>{const{name:i,override:o,aliases:s}=r,a={step:"initialize",priority:"normal",middleware:t,...r},l=it(i,s);if(l.length>0){if(l.some((e=>n.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${ot(i,s)}'`);for(const t of l){const r=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===r)continue;const n=e[r];if(n.step!==a.step||a.priority!==n.priority)throw new Error(`"${ot(n.name,n.aliases)}" middleware with ${n.priority} priority in ${n.step} step cannot be overridden by "${ot(i,s)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(r,1)}}for(const e of l)n.add(e)}e.push(a)},addRelativeTo:(e,r)=>{const{name:i,override:o,aliases:s}=r,a={middleware:e,...r},l=it(i,s);if(l.length>0){if(l.some((e=>n.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${ot(i,s)}'`);for(const e of l){const r=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===r)continue;const n=t[r];if(n.toMiddleware!==a.toMiddleware||n.relation!==a.relation)throw new Error(`"${ot(n.name,n.aliases)}" middleware ${n.relation} "${n.toMiddleware}" middleware cannot be overridden by "${ot(i,s)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(r,1)}}for(const e of l)n.add(e)}t.push(a)},clone:()=>i(st()),use:e=>{e.applyToStack(a)},remove:r=>"string"==typeof r?(r=>{let i=!1;const o=e=>{const t=it(e.name,e.aliases);if(t.includes(r)){i=!0;for(const e of t)n.delete(e);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(r):(r=>{let i=!1;const o=e=>{if(e.middleware===r){i=!0;for(const t of it(e.name,e.aliases))n.delete(t);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(r),removeByTag:r=>{let i=!1;const o=e=>{const{tags:t,name:o,aliases:s}=e;if(t&&t.includes(r)){const e=it(o,s);for(const t of e)n.delete(t);return i=!0,!1}return!0};return e=e.filter(o),t=t.filter(o),i},concat:e=>{const t=i(st());return t.use(e),t.identifyOnResolve(r||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>s(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return ot(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(r=e),r),resolve:(e,t)=>{for(const r of s().map((e=>e.middleware)).reverse())e=r(e,t);return r&&console.log(a.identify()),e}};return a},at={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},lt={high:3,normal:2,low:1},ct=e=>"function"==typeof e?e():e,ut=[];function ft(e){if("object"==typeof e)return e;if(ut[e|=0])return ut[e];const t={};let r=0;for(const n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])1==(e>>r++&1)&&(t[n]=1);return ut[e]=t}const ht=Symbol.for("@smithy/nor-struct-it"),dt=Symbol.for("@smithy/ns"),pt=[],bt={};class _t{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=_t.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,t){this.ref=e,this.memberName=t;const r=[];let n=e,i=e;for(this._isMemberSchema=!1;mt(n);)r.push(n[1]),n=n[0],i=ct(n),this._isMemberSchema=!0;if(r.length>0){this.memberTraits={};for(let e=r.length-1;e>=0;--e){const t=r[e];Object.assign(this.memberTraits,ft(t))}}else this.memberTraits=0;if(i instanceof _t){const e=this.memberTraits;return Object.assign(this,i),this.memberTraits=Object.assign({},e,i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,void(this.memberName=t??i.memberName)}if(this.schema=ct(i),gt(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(i),this.traits=0),this._isMemberSchema&&!t)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){const t=this.prototype.isPrototypeOf(e);if(!t&&"object"==typeof e&&null!==e){return e.symbol===this.symbol}return t}static of(e){const t="function"==typeof e||"object"==typeof e&&null!==e;if("number"==typeof e){if(pt[e])return pt[e]}else if("string"==typeof e){if(bt[e])return bt[e]}else if(t&&e[dt])return e[dt];const r=ct(e);if(r instanceof _t)return r;if(mt(r)){const[t,n]=r;if(t instanceof _t)return Object.assign(t.getMergedTraits(),ft(n)),t;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}const n=new _t(r);return t?e[dt]=n:"string"==typeof r?bt[r]=n:"number"==typeof r?pt[r]=n:n}getSchema(){const e=this.schema;return Array.isArray(e)&&0===e[0]?e[4]:e}getName(e=!1){const{name:t}=this;return!e&&t&&t.includes("#")?t.split("#")[1]:t||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const e=this.getSchema();return"number"==typeof e?e>=64&&e<128:1===e[0]}isMapSchema(){const e=this.getSchema();return"number"==typeof e?e>=128&&e<=255:2===e[0]}isStructSchema(){const e=this.getSchema();if("object"!=typeof e)return!1;const t=e[0];return 3===t||-3===t||4===t}isUnionSchema(){const e=this.getSchema();return"object"==typeof e&&4===e[0]}isBlobSchema(){const e=this.getSchema();return 21===e||42===e}isTimestampSchema(){const e=this.getSchema();return"number"==typeof e&&e>=4&&e<=7}isUnitSchema(){return"unit"===this.getSchema()}isDocumentSchema(){return 15===this.getSchema()}isStringSchema(){return 0===this.getSchema()}isBooleanSchema(){return 2===this.getSchema()}isNumericSchema(){return 1===this.getSchema()}isBigIntegerSchema(){return 17===this.getSchema()}isBigDecimalSchema(){return 19===this.getSchema()}isStreaming(){const{streaming:e}=this.getMergedTraits();return!!e||42===this.getSchema()}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return ft(this.memberTraits)}getOwnTraits(){return ft(this.traits)}getKeySchema(){const[e,t]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!t)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const r=this.getSchema();return yt([e?15:r[4]??0,0],"key")}getValueSchema(){const e=this.getSchema(),[t,r,n]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],i="number"==typeof e?63&e:e&&"object"==typeof e&&(r||n)?e[3+e[0]]:t?15:void 0;if(null!=i)return yt([i,0],r?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){const t=this.getSchema();if(this.isStructSchema()&&t[4].includes(e)){const r=t[4].indexOf(e),n=t[5][r];return yt(mt(n)?n:[n,0],e)}if(this.isDocumentSchema())return yt([15,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${e}.`)}getMemberSchemas(){const e={};try{for(const[t,r]of this.structIterator())e[t]=r}catch(e){}return e}getEventStreamMember(){if(this.isStructSchema())for(const[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e;return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const e=this.getSchema(),t=e[4].length;let r=e[ht];if(r&&t===r.length)yield*r;else{r=Array(t);for(let n=0;n<t;++n){const t=e[4][n],i=yt([e[5][n],0],t);yield r[n]=[t,i]}e[ht]=r}}}function yt(e,t){if(e instanceof _t)return Object.assign(e,{memberName:t,_isMemberSchema:!0});return new _t(e,t)}const mt=e=>Array.isArray(e)&&2===e.length,gt=e=>Array.isArray(e)&&e.length>=5,wt="***SensitiveInformation***";function vt(e,t){if(null==t)return t;const r=_t.of(e);if(r.getMergedTraits().sensitive)return wt;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return wt}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return wt}else if(r.isStructSchema()&&"object"==typeof t){const e=t,n={};for(const[t,i]of r.structIterator())null!=e[t]&&(n[t]=vt(i,e[t]));return n}return t}class St{middlewareStack=st();schema;static classBuilder(){return new Et}resolveMiddlewareWithContext(e,t,r,{middlewareFn:n,clientName:i,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,smithyContext:l,additionalContext:c,CommandCtor:u}){for(const i of n.bind(this)(u,e,t,r))this.middlewareStack.use(i);const f=e.concat(this.middlewareStack),{logger:h}=t,d={logger:h,clientName:i,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,[He]:{commandInstance:this,...l},...c},{requestHandler:p}=t;let b=r??{};return l.eventStream&&(b={isEventStream:!0,...b}),f.resolve((e=>p.handle(e.request,b)),d)}}class Et{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,r={}){return this._smithyContext={service:e,operation:t,...r},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends St{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[t]){super(),this.input=t??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(r,n,i){const o=e._operationSchema,s=o?.[4]??o?.input,a=o?.[5]??o?.output;return this.resolveMiddlewareWithContext(r,n,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(o?vt.bind(null,s):e=>e),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(o?vt.bind(null,a):e=>e),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}const xt={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class Rt{namespace;schemas;exceptions;static registries=new Map;constructor(e,t=new Map,r=new Map){this.namespace=e,this.schemas=t,this.exceptions=r}static for(e){return Rt.registries.has(e)||Rt.registries.set(e,new Rt(e)),Rt.registries.get(e)}copyFrom(e){const{schemas:t,exceptions:r}=this;for(const[r,n]of e.schemas)t.has(r)||t.set(r,n);for(const[t,n]of e.exceptions)r.has(t)||r.set(t,n)}register(e,t){const r=this.normalizeShapeId(e);for(const e of[this,Rt.for(r.split("#")[0])])e.schemas.set(r,t)}getSchema(e){const t=this.normalizeShapeId(e);if(!this.schemas.has(t))throw new Error(`@smithy/core/schema - schema not found for ${t}`);return this.schemas.get(t)}registerError(e,t){const r=e,n=r[1];for(const e of[this,Rt.for(n)])e.schemas.set(n+"#"+r[2],r),e.exceptions.set(r,t)}getErrorCtor(e){const t=e;if(this.exceptions.has(t))return this.exceptions.get(t);return Rt.for(t[1]).exceptions.get(t)}getBaseException(){for(const e of this.exceptions.keys())if(Array.isArray(e)){const[,t,r]=e,n=t+"#"+r;if(n.startsWith("smithy.ts.sdk.synthetic.")&&n.endsWith("ServiceException"))return e}}find(e){for(const t of this.schemas.values())if(e(t))return t}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}}class At extends Error{$fault;$response;$retryable;$metadata;constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return At.prototype.isPrototypeOf(t)||Boolean(t.$fault)&&Boolean(t.$metadata)&&("client"===t.$fault||"server"===t.$fault)}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===At?At.isInstance(e):!!At.isInstance(e)&&(t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e))}}class Ot extends At{constructor(e){super(e),Object.setPrototypeOf(this,Ot.prototype)}}class kt extends Ot{name="NoSuchUpload";$fault="client";constructor(e){super({name:"NoSuchUpload",$fault:"client",...e}),Object.setPrototypeOf(this,kt.prototype)}}class Tt extends Ot{name="AccessDenied";$fault="client";constructor(e){super({name:"AccessDenied",$fault:"client",...e}),Object.setPrototypeOf(this,Tt.prototype)}}class Pt extends Ot{name="ObjectNotInActiveTierError";$fault="client";constructor(e){super({name:"ObjectNotInActiveTierError",$fault:"client",...e}),Object.setPrototypeOf(this,Pt.prototype)}}class Mt extends Ot{name="BucketAlreadyExists";$fault="client";constructor(e){super({name:"BucketAlreadyExists",$fault:"client",...e}),Object.setPrototypeOf(this,Mt.prototype)}}class Lt extends Ot{name="BucketAlreadyOwnedByYou";$fault="client";constructor(e){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...e}),Object.setPrototypeOf(this,Lt.prototype)}}class Ct extends Ot{name="NoSuchBucket";$fault="client";constructor(e){super({name:"NoSuchBucket",$fault:"client",...e}),Object.setPrototypeOf(this,Ct.prototype)}}class It extends Ot{name="InvalidObjectState";$fault="client";StorageClass;AccessTier;constructor(e){super({name:"InvalidObjectState",$fault:"client",...e}),Object.setPrototypeOf(this,It.prototype),this.StorageClass=e.StorageClass,this.AccessTier=e.AccessTier}}class Dt extends Ot{name="NoSuchKey";$fault="client";constructor(e){super({name:"NoSuchKey",$fault:"client",...e}),Object.setPrototypeOf(this,Dt.prototype)}}class Nt extends Ot{name="NotFound";$fault="client";constructor(e){super({name:"NotFound",$fault:"client",...e}),Object.setPrototypeOf(this,Nt.prototype)}}class jt extends Ot{name="EncryptionTypeMismatch";$fault="client";constructor(e){super({name:"EncryptionTypeMismatch",$fault:"client",...e}),Object.setPrototypeOf(this,jt.prototype)}}class Ft extends Ot{name="InvalidRequest";$fault="client";constructor(e){super({name:"InvalidRequest",$fault:"client",...e}),Object.setPrototypeOf(this,Ft.prototype)}}class Wt extends Ot{name="InvalidWriteOffset";$fault="client";constructor(e){super({name:"InvalidWriteOffset",$fault:"client",...e}),Object.setPrototypeOf(this,Wt.prototype)}}class Bt extends Ot{name="TooManyParts";$fault="client";constructor(e){super({name:"TooManyParts",$fault:"client",...e}),Object.setPrototypeOf(this,Bt.prototype)}}class Ut extends Ot{name="IdempotencyParameterMismatch";$fault="client";constructor(e){super({name:"IdempotencyParameterMismatch",$fault:"client",...e}),Object.setPrototypeOf(this,Ut.prototype)}}class $t extends Ot{name="ObjectAlreadyInActiveTierError";$fault="client";constructor(e){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...e}),Object.setPrototypeOf(this,$t.prototype)}}const zt="AcceptRanges",Gt="AccessTier",Ht="Bucket",Vt="BucketKeyEnabled",qt="Body",Kt="CacheControl",Yt="ChecksumCRC32",Zt="ChecksumCRC32C",Qt="ChecksumCRC64NVME",Xt="Cache-Control",Jt="Content-Disposition",er="ContentDisposition",tr="Content-Encoding",rr="ContentEncoding",nr="ContentLanguage",ir="Content-Language",or="Content-Length",sr="ContentLength",ar="ChecksumMode",lr="ContentRange",cr="Content-Range",ur="ChecksumSHA1",fr="ChecksumSHA256",hr="ChecksumType",dr="Content-Type",pr="ContentType",br="DeleteMarker",_r="Expiration",yr="ExpectedBucketOwner",mr="ExpiresString",gr="ETag",wr="Expires",vr="IfMatch",Sr="If-Modified-Since",Er="IfModifiedSince",xr="If-Match",Rr="IfNoneMatch",Ar="If-None-Match",Or="IfUnmodifiedSince",kr="If-Unmodified-Since",Tr="Key",Pr="LastModified",Mr="Last-Modified",Lr="Metadata",Cr="MissingMeta",Ir="ObjectLockLegalHoldStatus",Dr="ObjectLockMode",Nr="ObjectLockRetainUntilDate",jr="PartsCount",Fr="PartNumber",Wr="RequestCharged",Br="ResponseCacheControl",Ur="ResponseContentDisposition",$r="ResponseContentEncoding",zr="ResponseContentLanguage",Gr="ResponseContentType",Hr="ResponseExpires",Vr="RequestPayer",qr="ReplicationStatus",Kr="Range",Yr="Restore",Zr="StorageClass",Qr="ServerSideEncryption",Xr="SSECustomerAlgorithm",Jr="SSECustomerKey",en="SSECustomerKeyMD5",tn="SSEKMSKeyId",rn="TagCount",nn="VersionId",on="WebsiteRedirectLocation",sn="accept-ranges",an="client",ln="error",cn="http",un="httpChecksum",fn="httpError",hn="httpHeader",dn="httpPrefixHeaders",pn="httpQuery",bn="partNumber",_n="response-cache-control",yn="response-content-disposition",mn="response-content-encoding",gn="response-content-language",wn="response-content-type",vn="response-expires",Sn="smithy.ts.sdk.synthetic.com.amazonaws.s3",En="streaming",xn="versionId",Rn="x-amz-checksum-crc32",An="x-amz-checksum-crc32c",On="x-amz-checksum-crc64nvme",kn="x-amz-checksum-mode",Tn="x-amz-checksum-sha1",Pn="x-amz-checksum-sha256",Mn="x-amz-checksum-type",Ln="x-amz-delete-marker",Cn="x-amz-expiration",In="x-amz-expected-bucket-owner",Dn="x-amz-meta-",Nn="x-amz-missing-meta",jn="x-amz-mp-parts-count",Fn="x-amz-object-lock-legal-hold",Wn="x-amz-object-lock-mode",Bn="x-amz-object-lock-retain-until-date",Un="x-amz-restore",$n="x-amz-request-charged",zn="x-amz-request-payer",Gn="x-amz-replication-status",Hn="x-amz-storage-class",Vn="x-amz-server-side-encryption",qn="x-amz-server-side-encryption-aws-kms-key-id",Kn="x-amz-server-side-encryption-bucket-key-enabled",Yn="x-amz-server-side-encryption-customer-algorithm",Zn="x-amz-server-side-encryption-customer-key",Qn="x-amz-server-side-encryption-customer-key-MD5",Xn="x-amz-tagging-count",Jn="x-amz-version-id",ei="x-amz-website-redirect-location",ti="com.amazonaws.s3",ri=Rt.for(Sn);var ni=[-3,Sn,"S3ServiceException",0,[],[]];ri.registerError(ni,Ot);const ii=Rt.for(ti);var oi=[-3,ti,"AccessDenied",{[ln]:an,[fn]:403},[],[]];ii.registerError(oi,Tt);var si=[-3,ti,"BucketAlreadyExists",{[ln]:an,[fn]:409},[],[]];ii.registerError(si,Mt);var ai=[-3,ti,"BucketAlreadyOwnedByYou",{[ln]:an,[fn]:409},[],[]];ii.registerError(ai,Lt);var li=[-3,ti,"EncryptionTypeMismatch",{[ln]:an,[fn]:400},[],[]];ii.registerError(li,jt);var ci=[-3,ti,"IdempotencyParameterMismatch",{[ln]:an,[fn]:400},[],[]];ii.registerError(ci,Ut);var ui=[-3,ti,"InvalidObjectState",{[ln]:an,[fn]:403},[Zr,Gt],[0,0]];ii.registerError(ui,It);var fi=[-3,ti,"InvalidRequest",{[ln]:an,[fn]:400},[],[]];ii.registerError(fi,Ft);var hi=[-3,ti,"InvalidWriteOffset",{[ln]:an,[fn]:400},[],[]];ii.registerError(hi,Wt);var di=[-3,ti,"NoSuchBucket",{[ln]:an,[fn]:404},[],[]];ii.registerError(di,Ct);var pi=[-3,ti,"NoSuchKey",{[ln]:an,[fn]:404},[],[]];ii.registerError(pi,Dt);var bi=[-3,ti,"NoSuchUpload",{[ln]:an,[fn]:404},[],[]];ii.registerError(bi,kt);var _i=[-3,ti,"NotFound",{[ln]:an},[],[]];ii.registerError(_i,Nt);var yi=[-3,ti,"ObjectAlreadyInActiveTierError",{[ln]:an,[fn]:403},[],[]];ii.registerError(yi,$t);var mi=[-3,ti,"ObjectNotInActiveTierError",{[ln]:an,[fn]:403},[],[]];ii.registerError(mi,Pt);var gi=[-3,ti,"TooManyParts",{[ln]:an,[fn]:400},[],[]];ii.registerError(gi,Bt);var wi=[0,ti,Jr,8,0],vi=[0,ti,tn,8,0],Si=[0,ti,"StreamingBlob",{[En]:1},42],Ei=[3,ti,"GetObjectOutput",0,[qt,br,zt,_r,Yr,Pr,sr,gr,Yt,Zt,Qt,ur,fr,hr,Cr,nn,Kt,er,rr,nr,lr,pr,wr,mr,on,Qr,Lr,Xr,en,tn,Vt,Zr,Wr,qr,jr,rn,Dr,Nr,Ir],[[()=>Si,16],[2,{[hn]:Ln}],[0,{[hn]:sn}],[0,{[hn]:Cn}],[0,{[hn]:Un}],[4,{[hn]:Mr}],[1,{[hn]:or}],[0,{[hn]:gr}],[0,{[hn]:Rn}],[0,{[hn]:An}],[0,{[hn]:On}],[0,{[hn]:Tn}],[0,{[hn]:Pn}],[0,{[hn]:Mn}],[1,{[hn]:Nn}],[0,{[hn]:Jn}],[0,{[hn]:Xt}],[0,{[hn]:Jt}],[0,{[hn]:tr}],[0,{[hn]:ir}],[0,{[hn]:cr}],[0,{[hn]:dr}],[4,{[hn]:wr}],[0,{[hn]:mr}],[0,{[hn]:ei}],[0,{[hn]:Vn}],[128,{[dn]:Dn}],[0,{[hn]:Yn}],[0,{[hn]:Qn}],[()=>vi,{[hn]:qn}],[2,{[hn]:Kn}],[0,{[hn]:Hn}],[0,{[hn]:$n}],[0,{[hn]:Gn}],[1,{[hn]:jn}],[1,{[hn]:Xn}],[0,{[hn]:Wn}],[5,{[hn]:Bn}],[0,{[hn]:Fn}]]],xi=[3,ti,"GetObjectRequest",0,[Ht,Tr,vr,Er,Rr,Or,Kr,Br,Ur,$r,zr,Gr,Hr,nn,Xr,Jr,en,Vr,Fr,yr,ar],[[0,1],[0,1],[0,{[hn]:xr}],[4,{[hn]:Sr}],[0,{[hn]:Ar}],[4,{[hn]:kr}],[0,{[hn]:Kr}],[0,{[pn]:_n}],[0,{[pn]:yn}],[0,{[pn]:mn}],[0,{[pn]:gn}],[0,{[pn]:wn}],[6,{[pn]:vn}],[0,{[pn]:xn}],[0,{[hn]:Yn}],[()=>wi,{[hn]:Zn}],[0,{[hn]:Qn}],[0,{[hn]:zn}],[1,{[pn]:bn}],[0,{[hn]:In}],[0,{[hn]:kn}]],2],Ri=[3,ti,"HeadObjectOutput",0,[br,zt,_r,Yr,"ArchiveStatus",Pr,sr,Yt,Zt,Qt,ur,fr,hr,gr,Cr,nn,Kt,er,rr,nr,pr,lr,wr,mr,on,Qr,Lr,Xr,en,tn,Vt,Zr,Wr,qr,jr,rn,Dr,Nr,Ir],[[2,{[hn]:Ln}],[0,{[hn]:sn}],[0,{[hn]:Cn}],[0,{[hn]:Un}],[0,{[hn]:"x-amz-archive-status"}],[4,{[hn]:Mr}],[1,{[hn]:or}],[0,{[hn]:Rn}],[0,{[hn]:An}],[0,{[hn]:On}],[0,{[hn]:Tn}],[0,{[hn]:Pn}],[0,{[hn]:Mn}],[0,{[hn]:gr}],[1,{[hn]:Nn}],[0,{[hn]:Jn}],[0,{[hn]:Xt}],[0,{[hn]:Jt}],[0,{[hn]:tr}],[0,{[hn]:ir}],[0,{[hn]:dr}],[0,{[hn]:cr}],[4,{[hn]:wr}],[0,{[hn]:mr}],[0,{[hn]:ei}],[0,{[hn]:Vn}],[128,{[dn]:Dn}],[0,{[hn]:Yn}],[0,{[hn]:Qn}],[()=>vi,{[hn]:qn}],[2,{[hn]:Kn}],[0,{[hn]:Hn}],[0,{[hn]:$n}],[0,{[hn]:Gn}],[1,{[hn]:jn}],[1,{[hn]:Xn}],[0,{[hn]:Wn}],[5,{[hn]:Bn}],[0,{[hn]:Fn}]]],Ai=[3,ti,"HeadObjectRequest",0,[Ht,Tr,vr,Er,Rr,Or,Kr,Br,Ur,$r,zr,Gr,Hr,nn,Xr,Jr,en,Vr,Fr,yr,ar],[[0,1],[0,1],[0,{[hn]:xr}],[4,{[hn]:Sr}],[0,{[hn]:Ar}],[4,{[hn]:kr}],[0,{[hn]:Kr}],[0,{[pn]:_n}],[0,{[pn]:yn}],[0,{[pn]:mn}],[0,{[pn]:gn}],[0,{[pn]:wn}],[6,{[pn]:vn}],[0,{[pn]:xn}],[0,{[hn]:Yn}],[()=>wi,{[hn]:Zn}],[0,{[hn]:Qn}],[0,{[hn]:zn}],[1,{[pn]:bn}],[0,{[hn]:In}],[0,{[hn]:kn}]],2],Oi=[9,ti,"GetObject",{[un]:"-",[cn]:["GET","/{Key+}?x-id=GetObject",200]},()=>xi,()=>Ei],ki=[9,ti,"HeadObject",{[cn]:["HEAD","/{Key+}",200]},()=>Ai,()=>Ri];class Ti extends(St.classBuilder().ep({...xt,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,r,n){return[nt(r,e.getEndpointParameterInstructions()),ce(r,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),$e(r),Be()]})).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").sc(Oi).build()){}const Pi={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},Mi=e=>(t,r)=>async n=>{const i=await t(n),{response:o}=i;if(!ue.isInstance(o))return i;const{statusCode:s,body:a}=o;if(s<200||s>=300)return i;if(!("function"==typeof a?.stream||"function"==typeof a?.pipe||"function"==typeof a?.tee))return i;let l=a,c=a;!a||"object"!=typeof a||a instanceof Uint8Array||([l,c]=await async function(e){return"function"==typeof e.stream&&(e=e.stream()),e.tee()}(a)),o.body=c;const u=await Li(l,{streamCollector:async e=>async function(e,t){let r=0;const n=[],i=e.getReader();let o=!1;for(;!o;){const{done:e,value:s}=await i.read();if(s&&(n.push(s),r+=s?.byteLength??0),r>=t)break;o=e}i.releaseLock();const s=new Uint8Array(Math.min(t,r));let a=0;for(const e of n){if(e.byteLength>s.byteLength-a){s.set(e.subarray(0,s.byteLength-a),a);break}s.set(e,a),a+=e.length}return s}(e,3e3)});"function"==typeof l?.destroy&&l.destroy();const f=e.utf8Encoder(u.subarray(u.length-16));if(0===u.length&&Pi[r.commandName]){const e=new Error("S3 aborted request");throw e.name="InternalError",e}return f&&f.endsWith("</Error>")&&(o.statusCode=400),i},Li=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),Ci={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},Ii=e=>({applyToStack:t=>{t.addRelativeTo(Mi(e),Ci)}});class Di extends(St.classBuilder().ep({...xt,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,r,n){return[nt(r,e.getEndpointParameterInstructions()),Ii(r),$e(r),Be()]})).s("AmazonS3","HeadObject",{}).n("S3Client","HeadObjectCommand").sc(ki).build()){}}],__webpack_module_cache__={},hasSymbol,webpackQueues,webpackExports,webpackError,resolveQueue;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}hasSymbol="function"==typeof Symbol,webpackQueues=hasSymbol?Symbol("webpack queues"):"__webpack_queues__",webpackExports=hasSymbol?Symbol("webpack exports"):"__webpack_exports__",webpackError=hasSymbol?Symbol("webpack error"):"__webpack_error__",resolveQueue=e=>{e&&e.d<1&&(e.d=1,e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))},__webpack_require__.a=(e,t,r)=>{var n;r&&((n=[]).d=-1);var i,o,s,a=new Set,l=e.exports,c=new Promise(((e,t)=>{s=t,o=e}));c[webpackExports]=l,c[webpackQueues]=e=>(n&&e(n),a.forEach(e),c.catch((e=>{}))),e.exports=c,t((e=>{var t;i=(e=>e.map((e=>{if(null!==e&&"object"==typeof e){if(e[webpackQueues])return e;if(e.then){var t=[];t.d=0,e.then((e=>{r[webpackExports]=e,resolveQueue(t)}),(e=>{r[webpackError]=e,resolveQueue(t)}));var r={};return r[webpackQueues]=e=>e(t),r}}var n={};return n[webpackQueues]=e=>{},n[webpackExports]=e,n})))(e);var r=()=>i.map((e=>{if(e[webpackError])throw e[webpackError];return e[webpackExports]})),o=new Promise((e=>{(t=()=>e(r)).r=0;var o=e=>e!==n&&!a.has(e)&&(a.add(e),e&&!e.d&&(t.r++,e.push(t)));i.map((e=>e[webpackQueues](o)))}));return t.r?o:r()}),(e=>(e?s(c[webpackError]=e):o(l),resolveQueue(n)))),n&&n.d<0&&(n.d=0)},__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__=__webpack_require__(363);module.exports["web-documentation"]=__webpack_exports__})();