diff --git a/dist/package/index.js b/dist/package/index.js index e970463..29fd086 100644 --- a/dist/package/index.js +++ b/dist/package/index.js @@ -1,4 +1,4 @@ -(()=>{var __webpack_modules__={1990:(e,a,r)=>{const i=r(1184);const n=r(467);const p=r(5008);const o=r(1066);const d=`${workspaceDir}/mac/Audacity.entitlements`;async function signFile(e,a,r){r=r||[];return p.execWithLog("xcrun",["codesign","--verbose=3","--timestamp","--sign",a,"--options","runtime","--entitlements",d,"--force",...r,e])}async function fixupRPath(e){const a=(await p.getExecOutput("otool",["-L",e])).stdout;const r=a.split("\n").filter((e=>e.indexOf("@rpath")!=-1)).map((e=>e.match(/@rpath\/.+\.dylib/)[0]));if(r.length==0){return}const i=(await p.getExecOutput("otool",["-l",e])).stdout.split("\n").map((e=>e.trim())).filter((e=>e.search(/path\s+@(?:executable|loader)_path/)!=-1)).map((e=>e.match(/path\s+(@(?:executable|loader)_path.*)\s+\(/)[1])).map((e=>["-delete_rpath",e])).flat(Infinity);const n=r.map((e=>["-change",e,e.replace("@rpath","@executable_path/../Frameworks")])).flat(Infinity);p.log(`Fixing rpath for ${e}`);return p.execWithLog("install_name_tool",[...n,...i,e])}async function singApp(e,a){if(!a){p.log("Skipping code signings, as there is no codesign identity provided");return}const r=await o.getAudacityMacOSBundleFiles(e);exeFiles=r.MacOS;modules=r.modules;frameworks=r.Frameworks.dylib;binaries=[...exeFiles,...modules,...frameworks];for(const e of binaries){await fixupRPath(e)}for(const e of[...modules]){await signFile(e,a)}await signFile(e,a,["--deep"]);await p.execWithLog("codesign",["--verify","--deep","--verbose=4","--strict",e])}async function signDMG(e,a,r){if(!r){p.log("Skipping code signings, as there is no codesign identity provided");return}await p.execWithLog("xcrun",["codesign","--verbose","--timestamp","--identifier",a,"--sign",r,e])}async function notarizeDMG(e,a,r,i){if(!a||!a||!i){p.log("Skipping notarization, as there are no credentials provided");return}p.log(`Notarizing DMG: ${e}`);const n=await p.getExecOutput("xcrun",["notarytool","submit","--apple-id",a,"--team-id",i,"--password",r,"--output-format","json","--wait",e]);const o=JSON.parse(n.stdout);const d=await p.getExecOutput("xcrun",["notarytool","log","--apple-id",a,"--team-id",i,"--password",r,o["id"]]);p.log(d.stdout);if(o["status"]!="Accepted"){throw Error(`Notarization failed: ${o["status"]}`)}await p.execWithLog("xcrun",["stapler","staple",e]);p.log(`Notarizing was successful: ${e}`)}e.exports={singApp:singApp,signDMG:signDMG,notarizeDMG:notarizeDMG}},4523:(e,a,r)=>{const i=r(2186);e.exports={Alpha:0,Beta:1,Release:2,getBuildLevel:()=>{const e=i.getInput("build_level");const a=e.length>0?e:process.env["AUDACITY_BUILD_LEVEL"];if(a==="beta"){return 1}else if(a==="release"){return 2}else{const e=Number(a);if(Number.isInteger(e)&&e>=0&&e<=2){return e}return 0}},getBuildSuffix:e=>{if(e==1){return"beta"}else if(e==2){return""}else{return"alpha"}}}},3202:(e,a,r)=>{const i=r(5747);const n=r(1371);const p=r(5622);const o=r(1349);const d=r(5008);const s=r(1066);const l=p.join(workspaceDir,"mac","Resources","Audacity-DMG-background.png");async function estimateBundleSize(e){let a=0;for(const r of e){a+=(await i.promises.lstat(r)).size}return a*1.5}async function createTempImage(e,a,r,o){const s=n.template("%s.dmg").writeFileSync("");d.log(s);o.push((async()=>{if(i.existsSync(s)){d.log(`Removing image ${s}`);await i.promises.rm(s)}}));await d.execWithLog("hdiutil",["create",s,"-ov","-format","UDRW","-fs","HFS+","-size",r,"-srcdir",p.dirname(e),"-volname",a]);return s}async function detachImage(e){const a=10;for(let r=1;r{if(i.existsSync(p)){d.log(`Detaching image ${e} mounted at ${p}`);await detachImage(p)}}));return p}async function copyFiles(e,a,r){a=p.dirname(a);const n=p.join(e,".background");const o=p.join(n,"bg.png");if(!i.existsSync(n)){i.mkdirSync(n)}await i.promises.copyFile(l,o)}async function createLinks(e){await i.promises.symlink("/Applications",p.join(e,"Applications"))}async function createDSStore(e,a){const r=new o;r.vSrn(1);r.setIconSize(72);r.setBackgroundPath(p.join(e,".background","bg.png"));r.setWindowPos(400,100);r.setWindowSize(600,450);r.setIconPos(a,170,350);r.setIconPos("Applications",430,350);await new Promise(((a,i)=>{r.write(p.join(e,".DS_Store"),(e=>{if(e){i(e)}else{a()}}))}))}async function convertDMG(e,a){if(i.existsSync(a)){i.rmSync(a)}await d.execWithLog("hdiutil",["convert",e,"-format","UDZO","-imagekey","zlib-level=9","-o",a])}async function packageDMG(e,a){finalizers=[];const r=p.basename(a,".app");try{const i=await s.listDirectory(a);const n=await estimateBundleSize([...i,l]);const o=await createTempImage(a,r,n,finalizers);const d=await attachImage(o,finalizers);await copyFiles(d,a,i);await createLinks(d);await createDSStore(d,p.basename(a));await detachImage(d);await convertDMG(o,e)}finally{Promise.all(finalizers.slice(0).reverse().map((async e=>e())))}}e.exports={packageDMG:packageDMG}},1066:(e,a,r)=>{const i=r(5747);const n=r(5622);const p=r(8090);helpers=r(5008);const getFilesFromDirectoryRecursive=async e=>{const a=await i.promises.readdir(e);const r=await Promise.all(a.map((async a=>{const r=n.join(e,a);const p=await i.promises.stat(r);if(p.isDirectory()){return getFilesFromDirectoryRecursive(r)}else{return r}})));return r.filter((e=>e.length))};async function globFiles(e){const a=await p.create(Array.isArray(e)?e.join("\n"):e);let r=[];for await(const e of a.globGenerator()){const a=await i.promises.lstat(e);if(a.isSymbolicLink()){continue}r.push(e)}return r}async function listMacosAppsRecursive(e,a){const r=await i.promises.readdir(e);await Promise.all(r.map((async r=>{const p=n.join(e,r);const o=await i.promises.stat(p);if(o.isDirectory()){if(n.extname(r)==".app"){a.push(p)}else{return listMacosAppsRecursive(p,a)}}})))}async function getAudacityMacOSBundleFiles(e){bundle={MacOS:[],Frameworks:{dylib:[]},modules:[],misc:[]};const a=(await getFilesFromDirectoryRecursive(e)).flat(Infinity);a.forEach((e=>{if(e.indexOf("Contents/MacOS")!=-1){bundle.MacOS.push(e)}else if(e.indexOf("Contents/Frameworks")!=-1){const a=i.statSync(e);if(a.isSymbolicLink()){bundle.misc.push(e)}else if(a.isFile()){bundle.Frameworks.dylib.push(e)}else{throw Error("Bundled frameworks are not supported")}}else if(e.indexOf("Contents/modules")!=-1){bundle.modules.push(e)}else{bundle.misc.push(e)}}));return bundle}async function copyFile(e,a){const r=n.dirname(a);if(!i.existsSync(r)){i.mkdirSync(r,{recursive:true})}return i.promises.copyFile(e,a)}async function copyFiles(e,a,r){return helpers.awaitAll(a,(async a=>{const i=n.relative(e,a);return copyFile(a,n.join(r,i))}))}async function listMacosApps(e){apps=[];await listMacosAppsRecursive(e,apps);return apps}e.exports={listDirectory:async e=>(await getFilesFromDirectoryRecursive(e)).flat(Infinity),globFiles:globFiles,listMacosApps:listMacosApps,getAudacityMacOSBundleFiles:getAudacityMacOSBundleFiles,copyFile:copyFile,copyFiles:copyFiles}},5008:(e,a,r)=>{const i=r(2186);const n=r(1514);const p=r(5622);const o=r(1711);const d=r(5747);const s=process.env["CI"];global.workspaceDir=process.env["GITHUB_WORKSPACE"];global.conanCachePath=p.join(workspaceDir,".conan");function log(e){if(s){i.info(e)}else{console.log(e)}}function error(e){if(s){i.error(e)}else{console.error(e)}}async function execWithLog(e,arguments){if(s){return n.exec(e,arguments)}else{return n.exec(e,arguments,{listeners:{stdout:e=>{log(e.toString())},stderr:e=>{error(e.toString())}}})}}async function getExecOutput(e,arguments){if(s){return n.getExecOutput(e,arguments)}else{return n.getExecOutput(e,arguments,{listeners:{stdout:e=>{log(e.toString())},stderr:e=>{error(e.toString())}}})}}async function awaitAll(e,a){return await Promise.all(e.map((async e=>a(e))))}async function getMD5(e){const a=await d.promises.readFile(e);return o(a)}function getDateString(){const e=new Date;return[e.getFullYear(),("0"+(e.getMonth()+1)).slice(-2),("0"+e.getDate()).slice(-2)].join("")}const sleep=e=>new Promise((a=>setTimeout(a,e)));process.on("unhandledRejection",((e,a)=>{error(e);i.setFailed(e);process.exit(1)})).on("uncaughtException",(e=>{error(e);i.setFailed(e);process.exit(1)}));e.exports={log:log,error:error,execWithLog:execWithLog,getExecOutput:getExecOutput,sleep:sleep,awaitAll:awaitAll,getMD5:getMD5,getDateString:getDateString}},9070:(e,a,r)=>{const i=r(5622);const n=r(5008);const p=r(1066);const o=r(5747);async function create(e,a){firstBundle=await p.getAudacityMacOSBundleFiles(a[0]);await p.copyFiles(a[0],firstBundle.misc,e);enlprojPath=i.join(e,"Contents","Resources","en.lproj");if(!o.existsSync(enlprojPath)){o.mkdirSync(enlprojPath,{recursive:true})}const r=[...firstBundle.MacOS,...firstBundle.Frameworks.dylib,...firstBundle.modules];return n.awaitAll(r,(r=>{const p=i.relative(a[0],r);const d=a.map((e=>i.join(e,p)));const s=i.join(e,p);const l=i.dirname(s);if(!o.existsSync(l)){o.mkdirSync(l,{recursive:true})}return n.execWithLog("lipo",["-create","-output",s,...d])}))}async function archs(e){const a=i.join(e,"Contents","MacOS");const r=i.join(a,o.readdirSync(a)[0]);return(await n.getExecOutput("lipo",["-archs",r])).stdout.split(/\s+/).map((e=>e.trim())).filter((e=>e.length>0))}async function archSuffix(e){const a=await archs(e);if(a.length==1){return a[0]}else{return"universal"}}e.exports={create:create,archs:archs,archs:archs,archSuffix:archSuffix}},2605:(e,a,r)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});const i=r(8802);function create(){return i.DefaultArtifactClient.create()}a.create=create},8802:function(e,a,r){"use strict";var i=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))a[r]=e[r];a["default"]=e;return a};Object.defineProperty(a,"__esModule",{value:true});const p=n(r(2186));const o=r(183);const d=r(4354);const s=r(6327);const l=r(8538);const u=r(5686);const m=r(2222);const c=r(5622);class DefaultArtifactClient{static create(){return new DefaultArtifactClient}uploadArtifact(e,a,r,n){return i(this,void 0,void 0,(function*(){s.checkArtifactName(e);const i=o.getUploadSpecification(e,r,a);const l={artifactName:e,artifactItems:[],size:0,failedItems:[]};const u=new d.UploadHttpClient;if(i.length===0){p.warning(`No files found that can be uploaded`)}else{const a=yield u.createArtifactInFileContainer(e,n);if(!a.fileContainerResourceUrl){p.debug(a.toString());throw new Error("No URL provided by the Artifact Service to upload an artifact to")}p.debug(`Upload Resource URL: ${a.fileContainerResourceUrl}`);const r=yield u.uploadArtifactToFileContainer(a.fileContainerResourceUrl,i,n);yield u.patchArtifactSize(r.totalSize,e);p.info(`Finished uploading artifact ${e}. Reported size is ${r.uploadSize} bytes. There were ${r.failedItems.length} items that failed to upload`);l.artifactItems=i.map((e=>e.absoluteFilePath));l.size=r.uploadSize;l.failedItems=r.failedItems}return l}))}downloadArtifact(e,a,r){return i(this,void 0,void 0,(function*(){const i=new l.DownloadHttpClient;const n=yield i.listArtifacts();if(n.count===0){throw new Error(`Unable to find any artifacts for the associated workflow`)}const o=n.value.find((a=>a.name===e));if(!o){throw new Error(`Unable to find an artifact with the name: ${e}`)}const d=yield i.getContainerItems(o.name,o.fileContainerResourceUrl);if(!a){a=m.getWorkSpaceDirectory()}a=c.normalize(a);a=c.resolve(a);const h=u.getDownloadSpecification(e,d.value,a,(r===null||r===void 0?void 0:r.createArtifactFolder)||false);if(h.filesToDownload.length===0){p.info(`No downloadable files were found for the artifact: ${o.name}`)}else{yield s.createDirectoriesForArtifact(h.directoryStructure);p.info("Directory structure has been setup for the artifact");yield s.createEmptyFilesForArtifact(h.emptyFilesToCreate);yield i.downloadSingleArtifact(h.filesToDownload)}return{artifactName:e,downloadPath:h.rootDownloadLocation}}))}downloadAllArtifacts(e){return i(this,void 0,void 0,(function*(){const a=new l.DownloadHttpClient;const r=[];const i=yield a.listArtifacts();if(i.count===0){p.info("Unable to find any artifacts for the associated workflow");return r}if(!e){e=m.getWorkSpaceDirectory()}e=c.normalize(e);e=c.resolve(e);let n=0;while(n{"use strict";Object.defineProperty(a,"__esModule",{value:true});function getUploadFileConcurrency(){return 2}a.getUploadFileConcurrency=getUploadFileConcurrency;function getUploadChunkSize(){return 8*1024*1024}a.getUploadChunkSize=getUploadChunkSize;function getRetryLimit(){return 5}a.getRetryLimit=getRetryLimit;function getRetryMultiplier(){return 1.5}a.getRetryMultiplier=getRetryMultiplier;function getInitialRetryIntervalInMilliseconds(){return 3e3}a.getInitialRetryIntervalInMilliseconds=getInitialRetryIntervalInMilliseconds;function getDownloadFileConcurrency(){return 2}a.getDownloadFileConcurrency=getDownloadFileConcurrency;function getRuntimeToken(){const e=process.env["ACTIONS_RUNTIME_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_RUNTIME_TOKEN env variable")}return e}a.getRuntimeToken=getRuntimeToken;function getRuntimeUrl(){const e=process.env["ACTIONS_RUNTIME_URL"];if(!e){throw new Error("Unable to get ACTIONS_RUNTIME_URL env variable")}return e}a.getRuntimeUrl=getRuntimeUrl;function getWorkFlowRunId(){const e=process.env["GITHUB_RUN_ID"];if(!e){throw new Error("Unable to get GITHUB_RUN_ID env variable")}return e}a.getWorkFlowRunId=getWorkFlowRunId;function getWorkSpaceDirectory(){const e=process.env["GITHUB_WORKSPACE"];if(!e){throw new Error("Unable to get GITHUB_WORKSPACE env variable")}return e}a.getWorkSpaceDirectory=getWorkSpaceDirectory;function getRetentionDays(){return process.env["GITHUB_RETENTION_DAYS"]}a.getRetentionDays=getRetentionDays},8538:function(e,a,r){"use strict";var i=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))a[r]=e[r];a["default"]=e;return a};Object.defineProperty(a,"__esModule",{value:true});const p=n(r(5747));const o=n(r(2186));const d=n(r(8761));const s=r(6327);const l=r(8835);const u=r(9081);const m=r(630);const c=r(6527);const h=r(2222);const v=r(755);class DownloadHttpClient{constructor(){this.downloadHttpManager=new c.HttpManager(h.getDownloadFileConcurrency(),"@actions/artifact-download");this.statusReporter=new u.StatusReporter(1e3)}listArtifacts(){return i(this,void 0,void 0,(function*(){const e=s.getArtifactUrl();const a=this.downloadHttpManager.getClient(0);const r=s.getDownloadHeaders("application/json");const n=yield v.retryHttpClientRequest("List Artifacts",(()=>i(this,void 0,void 0,(function*(){return a.get(e,r)}))));const p=yield n.readBody();return JSON.parse(p)}))}getContainerItems(e,a){return i(this,void 0,void 0,(function*(){const r=new l.URL(a);r.searchParams.append("itemPath",e);const n=this.downloadHttpManager.getClient(0);const p=s.getDownloadHeaders("application/json");const o=yield v.retryHttpClientRequest("Get Container Items",(()=>i(this,void 0,void 0,(function*(){return n.get(r.toString(),p)}))));const d=yield o.readBody();return JSON.parse(d)}))}downloadSingleArtifact(e){return i(this,void 0,void 0,(function*(){const a=h.getDownloadFileConcurrency();o.debug(`Download file concurrency is set to ${a}`);const r=[...new Array(a).keys()];let n=0;let p=0;o.info(`Total number of files that will be downloaded: ${e.length}`);this.statusReporter.setTotalNumberOfFilesToProcess(e.length);this.statusReporter.start();yield Promise.all(r.map((a=>i(this,void 0,void 0,(function*(){while(n{throw new Error(`Unable to download the artifact: ${e}`)})).finally((()=>{this.statusReporter.stop();this.downloadHttpManager.disposeAndReplaceAllClients()}))}))}downloadIndividualFile(e,a,r){return i(this,void 0,void 0,(function*(){let n=0;const d=h.getRetryLimit();let l=p.createWriteStream(r);const u=s.getDownloadHeaders("application/json",true,true);const makeDownloadRequest=()=>i(this,void 0,void 0,(function*(){const r=this.downloadHttpManager.getClient(e);return yield r.get(a,u)}));const isGzip=e=>"content-encoding"in e&&e["content-encoding"]==="gzip";const backOff=r=>i(this,void 0,void 0,(function*(){n++;if(n>d){return Promise.reject(new Error(`Retry limit has been reached. Unable to download ${a}`))}else{this.downloadHttpManager.disposeAndReplaceClient(e);if(r){o.info(`Backoff due to too many requests, retry #${n}. Waiting for ${r} milliseconds before continuing the download`);yield s.sleep(r)}else{const e=s.getExponentialRetryTimeInMilliseconds(n);o.info(`Exponential backoff for retry #${n}. Waiting for ${e} milliseconds before continuing the download`);yield s.sleep(e)}o.info(`Finished backoff for retry #${n}, continuing with download`)}}));const isAllBytesReceived=(e,a)=>{if(!e||!a||process.env["ACTIONS_ARTIFACT_SKIP_DOWNLOAD_VALIDATION"]){o.info("Skipping download validation.");return true}return parseInt(e)===a};const resetDestinationStream=e=>i(this,void 0,void 0,(function*(){l.close();yield s.rmFile(e);l=p.createWriteStream(e)}));while(n<=d){let e;try{e=yield makeDownloadRequest();if(o.isDebug()){s.displayHttpDiagnostics(e)}}catch(e){o.info("An error occurred while attempting to download a file");console.log(e);yield backOff();continue}let i=false;if(s.isSuccessStatusCode(e.message.statusCode)){try{const a=isGzip(e.message.headers);yield this.pipeResponseToFile(e,l,a);if(a||isAllBytesReceived(e.message.headers["content-length"],yield s.getFileSize(r))){return}else{i=true}}catch(e){i=true}}if(i||s.isRetryableStatusCode(e.message.statusCode)){o.info(`A ${e.message.statusCode} response code has been received while attempting to download an artifact`);resetDestinationStream(r);s.isThrottledStatusCode(e.message.statusCode)?yield backOff(s.tryGetRetryAfterValueTimeInMilliseconds(e.message.headers)):yield backOff()}else{s.displayHttpDiagnostics(e);return Promise.reject(new Error(`Unexpected http ${e.message.statusCode} during download for ${a}`))}}}))}pipeResponseToFile(e,a,r){return i(this,void 0,void 0,(function*(){yield new Promise(((i,n)=>{if(r){const r=d.createGunzip();e.message.on("error",(e=>{o.error(`An error occurred while attempting to read the response stream`);r.close();a.close();n(e)})).pipe(r).on("error",(e=>{o.error(`An error occurred while attempting to decompress the response stream`);a.close();n(e)})).pipe(a).on("close",(()=>{i()})).on("error",(e=>{o.error(`An error occurred while writing a downloaded file to ${a.path}`);n(e)}))}else{e.message.on("error",(e=>{o.error(`An error occurred while attempting to read the response stream`);a.close();n(e)})).pipe(a).on("close",(()=>{i()})).on("error",(e=>{o.error(`An error occurred while writing a downloaded file to ${a.path}`);n(e)}))}}));return}))}}a.DownloadHttpClient=DownloadHttpClient},5686:function(e,a,r){"use strict";var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))a[r]=e[r];a["default"]=e;return a};Object.defineProperty(a,"__esModule",{value:true});const n=i(r(5622));function getDownloadSpecification(e,a,r,i){const p=new Set;const o={rootDownloadLocation:i?n.join(r,e):r,directoryStructure:[],emptyFilesToCreate:[],filesToDownload:[]};for(const d of a){if(d.path.startsWith(`${e}/`)||d.path.startsWith(`${e}\\`)){const a=n.normalize(d.path);const s=n.join(r,i?a:a.replace(e,""));if(d.itemType==="file"){p.add(n.dirname(s));if(d.fileLength===0){o.emptyFilesToCreate.push(s)}else{o.filesToDownload.push({sourceLocation:d.contentLocation,targetPath:s})}}}}o.directoryStructure=Array.from(p);return o}a.getDownloadSpecification=getDownloadSpecification},6527:(e,a,r)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});const i=r(6327);class HttpManager{constructor(e,a){if(e<1){throw new Error("There must be at least one client")}this.userAgent=a;this.clients=new Array(e).fill(i.createHttpClient(a))}getClient(e){return this.clients[e]}disposeAndReplaceClient(e){this.clients[e].dispose();this.clients[e]=i.createHttpClient(this.userAgent)}disposeAndReplaceAllClients(){for(const[e]of this.clients.entries()){this.disposeAndReplaceClient(e)}}}a.HttpManager=HttpManager},755:function(e,a,r){"use strict";var i=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))a[r]=e[r];a["default"]=e;return a};Object.defineProperty(a,"__esModule",{value:true});const p=r(6327);const o=n(r(2186));const d=r(2222);function retry(e,a,r,n){return i(this,void 0,void 0,(function*(){let i=undefined;let d=undefined;let s=false;let l="";let u=undefined;let m=1;while(m<=n){try{i=yield a();d=i.message.statusCode;if(p.isSuccessStatusCode(d)){return i}if(d){u=r.get(d)}s=p.isRetryableStatusCode(d);l=`Artifact service responded with ${d}`}catch(e){s=true;l=e.message}if(!s){o.info(`${e} - Error is not retryable`);if(i){p.displayHttpDiagnostics(i)}break}o.info(`${e} - Attempt ${m} of ${n} failed with error: ${l}`);yield p.sleep(p.getExponentialRetryTimeInMilliseconds(m));m++}if(i){p.displayHttpDiagnostics(i)}if(u){throw Error(`${e} failed: ${u}`)}throw Error(`${e} failed: ${l}`)}))}a.retry=retry;function retryHttpClientRequest(e,a,r=new Map,n=d.getRetryLimit()){return i(this,void 0,void 0,(function*(){return yield retry(e,a,r,n)}))}a.retryHttpClientRequest=retryHttpClientRequest},9081:(e,a,r)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});const i=r(2186);class StatusReporter{constructor(e){this.totalNumberOfFilesToProcess=0;this.processedCount=0;this.largeFiles=new Map;this.totalFileStatus=undefined;this.largeFileStatus=undefined;this.displayFrequencyInMilliseconds=e}setTotalNumberOfFilesToProcess(e){this.totalNumberOfFilesToProcess=e}start(){this.totalFileStatus=setInterval((()=>{const e=this.formatPercentage(this.processedCount,this.totalNumberOfFilesToProcess);i.info(`Total file count: ${this.totalNumberOfFilesToProcess} ---- Processed file #${this.processedCount} (${e.slice(0,e.indexOf(".")+2)}%)`)}),this.displayFrequencyInMilliseconds);this.largeFileStatus=setInterval((()=>{for(const e of Array.from(this.largeFiles.values())){i.info(e)}this.largeFiles.clear()}),1e3)}updateLargeFileStatus(e,a,r){const i=this.formatPercentage(a,r);const n=`Uploading ${e} (${i.slice(0,i.indexOf(".")+2)}%)`;this.largeFiles.set(e,n)}stop(){if(this.totalFileStatus){clearInterval(this.totalFileStatus)}if(this.largeFileStatus){clearInterval(this.largeFileStatus)}}incrementProcessedCount(){this.processedCount++}formatPercentage(e,a){return(e/a*100).toFixed(4).toString()}}a.StatusReporter=StatusReporter},606:function(e,a,r){"use strict";var i=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};var n=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=e[Symbol.asyncIterator],r;return a?a.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),r={},verb("next"),verb("throw"),verb("return"),r[Symbol.asyncIterator]=function(){return this},r);function verb(a){r[a]=e[a]&&function(r){return new Promise((function(i,n){r=e[a](r),settle(i,n,r.done,r.value)}))}}function settle(e,a,r,i){Promise.resolve(i).then((function(a){e({value:a,done:r})}),a)}};var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))a[r]=e[r];a["default"]=e;return a};Object.defineProperty(a,"__esModule",{value:true});const o=p(r(5747));const d=p(r(8761));const s=r(1669);const l=s.promisify(o.stat);function createGZipFileOnDisk(e,a){return i(this,void 0,void 0,(function*(){return new Promise(((r,n)=>{const p=o.createReadStream(e);const s=d.createGzip();const u=o.createWriteStream(a);p.pipe(s).pipe(u);u.on("finish",(()=>i(this,void 0,void 0,(function*(){const e=(yield l(a)).size;r(e)}))));u.on("error",(e=>{console.log(e);n}))}))}))}a.createGZipFileOnDisk=createGZipFileOnDisk;function createGZipFileInBuffer(e){return i(this,void 0,void 0,(function*(){return new Promise((a=>i(this,void 0,void 0,(function*(){var r,i;const p=o.createReadStream(e);const s=d.createGzip();p.pipe(s);const l=[];try{for(var u=n(s),m;m=yield u.next(),!m.done;){const e=m.value;l.push(e)}}catch(e){r={error:e}}finally{try{if(m&&!m.done&&(i=u.return))yield i.call(u)}finally{if(r)throw r.error}}a(Buffer.concat(l))}))))}))}a.createGZipFileInBuffer=createGZipFileInBuffer},4354:function(e,a,r){"use strict";var i=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))a[r]=e[r];a["default"]=e;return a};Object.defineProperty(a,"__esModule",{value:true});const p=n(r(5747));const o=n(r(2186));const d=n(r(8065));const s=n(r(2413));const l=r(6327);const u=r(2222);const m=r(1669);const c=r(8835);const h=r(630);const v=r(9081);const g=r(9925);const y=r(6527);const w=r(606);const b=r(755);const S=m.promisify(p.stat);class UploadHttpClient{constructor(){this.uploadHttpManager=new y.HttpManager(u.getUploadFileConcurrency(),"@actions/artifact-upload");this.statusReporter=new v.StatusReporter(1e4)}createArtifactInFileContainer(e,a){return i(this,void 0,void 0,(function*(){const r={Type:"actions_storage",Name:e};if(a&&a.retentionDays){const e=u.getRetentionDays();r.RetentionDays=l.getProperRetention(a.retentionDays,e)}const n=JSON.stringify(r,null,2);const p=l.getArtifactUrl();const o=this.uploadHttpManager.getClient(0);const d=l.getUploadHeaders("application/json",false);const s=new Map([[g.HttpCodes.Forbidden,"Artifact storage quota has been hit. Unable to upload any new artifacts"],[g.HttpCodes.BadRequest,`The artifact name ${e} is not valid. Request URL ${p}`]]);const m=yield b.retryHttpClientRequest("Create Artifact Container",(()=>i(this,void 0,void 0,(function*(){return o.post(p,n,d)}))),s);const c=yield m.readBody();return JSON.parse(c)}))}uploadArtifactToFileContainer(e,a,r){return i(this,void 0,void 0,(function*(){const n=u.getUploadFileConcurrency();const p=u.getUploadChunkSize();o.debug(`File Concurrency: ${n}, and Chunk Size: ${p}`);const d=[];let s=true;if(r){if(r.continueOnError===false){s=false}}for(const r of a){const a=new c.URL(e);a.searchParams.append("itemPath",r.uploadFilePath);d.push({file:r.absoluteFilePath,resourceUrl:a.toString(),maxChunkSize:p,continueOnError:s})}const l=[...new Array(n).keys()];const m=[];let v=0;let g=0;let y=0;let w=0;let b=false;this.statusReporter.setTotalNumberOfFilesToProcess(a.length);this.statusReporter.start();yield Promise.all(l.map((e=>i(this,void 0,void 0,(function*(){while(vp.createReadStream(a.file);m=false;u=r}else{d=()=>{const e=new s.PassThrough;e.end(i);return e};u=i.byteLength}const c=yield this.uploadChunk(e,a.resourceUrl,d,0,u-1,u,m,r);if(!c){n=false;l+=u;o.warning(`Aborting upload for ${a.file} due to failure`)}return{isSuccess:n,successfulUploadSize:u-l,totalSize:r}}else{const s=yield d.file();u=yield w.createGZipFileOnDisk(a.file,s.path);let c=s.path;if(r104857600){this.statusReporter.updateLargeFileStatus(a.file,i,u)}const s=i;const v=i+d-1;i+=a.maxChunkSize;if(h){l+=d;continue}const g=yield this.uploadChunk(e,a.resourceUrl,(()=>p.createReadStream(c,{start:s,end:v,autoClose:false})),s,v,u,m,r);if(!g){n=false;l+=d;o.warning(`Aborting upload for ${a.file} due to failure`);h=true}}yield s.cleanup();return{isSuccess:n,successfulUploadSize:u-l,totalSize:r}}}))}uploadChunk(e,a,r,n,p,d,s,m){return i(this,void 0,void 0,(function*(){const c=l.getUploadHeaders("application/octet-stream",true,s,m,p-n+1,l.getContentRange(n,p,d));const uploadChunkRequest=()=>i(this,void 0,void 0,(function*(){const i=this.uploadHttpManager.getClient(e);return yield i.sendStream("PUT",a,r(),c)}));let h=0;const v=u.getRetryLimit();const incrementAndCheckRetryLimit=e=>{h++;if(h>v){if(e){l.displayHttpDiagnostics(e)}o.info(`Retry limit has been reached for chunk at offset ${n} to ${a}`);return true}return false};const backOff=a=>i(this,void 0,void 0,(function*(){this.uploadHttpManager.disposeAndReplaceClient(e);if(a){o.info(`Backoff due to too many requests, retry #${h}. Waiting for ${a} milliseconds before continuing the upload`);yield l.sleep(a)}else{const e=l.getExponentialRetryTimeInMilliseconds(h);o.info(`Exponential backoff for retry #${h}. Waiting for ${e} milliseconds before continuing the upload at offset ${n}`);yield l.sleep(e)}o.info(`Finished backoff for retry #${h}, continuing with upload`);return}));while(h<=v){let r;try{r=yield uploadChunkRequest()}catch(a){o.info(`An error has been caught http-client index ${e}, retrying the upload`);console.log(a);if(incrementAndCheckRetryLimit()){return false}yield backOff();continue}yield r.readBody();if(l.isSuccessStatusCode(r.message.statusCode)){return true}else if(l.isRetryableStatusCode(r.message.statusCode)){o.info(`A ${r.message.statusCode} status code has been received, will attempt to retry the upload`);if(incrementAndCheckRetryLimit(r)){return false}l.isThrottledStatusCode(r.message.statusCode)?yield backOff(l.tryGetRetryAfterValueTimeInMilliseconds(r.message.headers)):yield backOff()}else{o.error(`Unexpected response. Unable to upload chunk to ${a}`);l.displayHttpDiagnostics(r);return false}}return false}))}patchArtifactSize(e,a){return i(this,void 0,void 0,(function*(){const r=new c.URL(l.getArtifactUrl());r.searchParams.append("artifactName",a);const n={Size:e};const p=JSON.stringify(n,null,2);o.debug(`URL is ${r.toString()}`);const d=this.uploadHttpManager.getClient(0);const s=l.getUploadHeaders("application/json",false);const u=new Map([[g.HttpCodes.NotFound,`An Artifact with the name ${a} was not found`]]);const m=yield b.retryHttpClientRequest("Finalize artifact upload",(()=>i(this,void 0,void 0,(function*(){return d.patch(r.toString(),p,s)}))),u);yield m.readBody();o.debug(`Artifact ${a} has been successfully uploaded, total size in bytes: ${e}`)}))}}a.UploadHttpClient=UploadHttpClient},183:function(e,a,r){"use strict";var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))a[r]=e[r];a["default"]=e;return a};Object.defineProperty(a,"__esModule",{value:true});const n=i(r(5747));const p=r(2186);const o=r(5622);const d=r(6327);function getUploadSpecification(e,a,r){d.checkArtifactName(e);const i=[];if(!n.existsSync(a)){throw new Error(`Provided rootDirectory ${a} does not exist`)}if(!n.lstatSync(a).isDirectory()){throw new Error(`Provided rootDirectory ${a} is not a valid directory`)}a=o.normalize(a);a=o.resolve(a);for(let s of r){if(!n.existsSync(s)){throw new Error(`File ${s} does not exist`)}if(!n.lstatSync(s).isDirectory()){s=o.normalize(s);s=o.resolve(s);if(!s.startsWith(a)){throw new Error(`The rootDirectory: ${a} is not a parent directory of the file: ${s}`)}const r=s.replace(a,"");d.checkArtifactFilePath(r);i.push({absoluteFilePath:s,uploadFilePath:o.join(e,r)})}else{p.debug(`Removing ${s} from rawSearchResults because it is a directory`)}}return i}a.getUploadSpecification=getUploadSpecification},6327:function(e,a,r){"use strict";var i=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};Object.defineProperty(a,"__esModule",{value:true});const n=r(2186);const p=r(5747);const o=r(9925);const d=r(3702);const s=r(2222);function getExponentialRetryTimeInMilliseconds(e){if(e<0){throw new Error("RetryCount should not be negative")}else if(e===0){return s.getInitialRetryIntervalInMilliseconds()}const a=s.getInitialRetryIntervalInMilliseconds()*s.getRetryMultiplier()*e;const r=a*s.getRetryMultiplier();return Math.random()*(r-a)+a}a.getExponentialRetryTimeInMilliseconds=getExponentialRetryTimeInMilliseconds;function parseEnvNumber(e){const a=Number(process.env[e]);if(Number.isNaN(a)||a<0){return undefined}return a}a.parseEnvNumber=parseEnvNumber;function getApiVersion(){return"6.0-preview"}a.getApiVersion=getApiVersion;function isSuccessStatusCode(e){if(!e){return false}return e>=200&&e<300}a.isSuccessStatusCode=isSuccessStatusCode;function isForbiddenStatusCode(e){if(!e){return false}return e===o.HttpCodes.Forbidden}a.isForbiddenStatusCode=isForbiddenStatusCode;function isRetryableStatusCode(e){if(!e){return false}const a=[o.HttpCodes.BadGateway,o.HttpCodes.GatewayTimeout,o.HttpCodes.InternalServerError,o.HttpCodes.ServiceUnavailable,o.HttpCodes.TooManyRequests,413];return a.includes(e)}a.isRetryableStatusCode=isRetryableStatusCode;function isThrottledStatusCode(e){if(!e){return false}return e===o.HttpCodes.TooManyRequests}a.isThrottledStatusCode=isThrottledStatusCode;function tryGetRetryAfterValueTimeInMilliseconds(e){if(e["retry-after"]){const a=Number(e["retry-after"]);if(!isNaN(a)){n.info(`Retry-After header is present with a value of ${a}`);return a*1e3}n.info(`Returned retry-after header value: ${a} is non-numeric and cannot be used`);return undefined}n.info(`No retry-after header was found. Dumping all headers for diagnostic purposes`);console.log(e);return undefined}a.tryGetRetryAfterValueTimeInMilliseconds=tryGetRetryAfterValueTimeInMilliseconds;function getContentRange(e,a,r){return`bytes ${e}-${a}/${r}`}a.getContentRange=getContentRange;function getDownloadHeaders(e,a,r){const i={};if(e){i["Content-Type"]=e}if(a){i["Connection"]="Keep-Alive";i["Keep-Alive"]="10"}if(r){i["Accept-Encoding"]="gzip";i["Accept"]=`application/octet-stream;api-version=${getApiVersion()}`}else{i["Accept"]=`application/json;api-version=${getApiVersion()}`}return i}a.getDownloadHeaders=getDownloadHeaders;function getUploadHeaders(e,a,r,i,n,p){const o={};o["Accept"]=`application/json;api-version=${getApiVersion()}`;if(e){o["Content-Type"]=e}if(a){o["Connection"]="Keep-Alive";o["Keep-Alive"]="10"}if(r){o["Content-Encoding"]="gzip";o["x-tfs-filelength"]=i}if(n){o["Content-Length"]=n}if(p){o["Content-Range"]=p}return o}a.getUploadHeaders=getUploadHeaders;function createHttpClient(e){return new o.HttpClient(e,[new d.BearerCredentialHandler(s.getRuntimeToken())])}a.createHttpClient=createHttpClient;function getArtifactUrl(){const e=`${s.getRuntimeUrl()}_apis/pipelines/workflows/${s.getWorkFlowRunId()}/artifacts?api-version=${getApiVersion()}`;n.debug(`Artifact Url: ${e}`);return e}a.getArtifactUrl=getArtifactUrl;function displayHttpDiagnostics(e){n.info(`##### Begin Diagnostic HTTP information #####\nStatus Code: ${e.message.statusCode}\nStatus Message: ${e.message.statusMessage}\nHeader Information: ${JSON.stringify(e.message.headers,undefined,2)}\n###### End Diagnostic HTTP information ######`)}a.displayHttpDiagnostics=displayHttpDiagnostics;const l=['"',":","<",">","|","*","?"];const u=[...l,"\\","/"];function checkArtifactName(e){if(!e){throw new Error(`Artifact name: ${e}, is incorrectly provided`)}for(const a of u){if(e.includes(a)){throw new Error(`Artifact name is not valid: ${e}. Contains character: "${a}". Invalid artifact name characters include: ${u.toString()}.`)}}}a.checkArtifactName=checkArtifactName;function checkArtifactFilePath(e){if(!e){throw new Error(`Artifact path: ${e}, is incorrectly provided`)}for(const a of l){if(e.includes(a)){throw new Error(`Artifact path is not valid: ${e}. Contains character: "${a}". Invalid characters include: ${l.toString()}.`)}}}a.checkArtifactFilePath=checkArtifactFilePath;function createDirectoriesForArtifact(e){return i(this,void 0,void 0,(function*(){for(const a of e){yield p.promises.mkdir(a,{recursive:true})}}))}a.createDirectoriesForArtifact=createDirectoriesForArtifact;function createEmptyFilesForArtifact(e){return i(this,void 0,void 0,(function*(){for(const a of e){yield(yield p.promises.open(a,"w")).close()}}))}a.createEmptyFilesForArtifact=createEmptyFilesForArtifact;function getFileSize(e){return i(this,void 0,void 0,(function*(){const a=yield p.promises.stat(e);n.debug(`${e} size:(${a.size}) blksize:(${a.blksize}) blocks:(${a.blocks})`);return a.size}))}a.getFileSize=getFileSize;function rmFile(e){return i(this,void 0,void 0,(function*(){yield p.promises.unlink(e)}))}a.rmFile=rmFile;function getProperRetention(e,a){if(e<0){throw new Error("Invalid retention, minimum value is 1.")}let r=e;if(a){const e=parseInt(a);if(!isNaN(e)&&esetTimeout(a,e)))}))}a.sleep=sleep},7351:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};Object.defineProperty(a,"__esModule",{value:true});a.issue=a.issueCommand=void 0;const o=p(r(2087));const d=r(5278);function issueCommand(e,a,r){const i=new Command(e,a,r);process.stdout.write(i.toString()+o.EOL)}a.issueCommand=issueCommand;function issue(e,a=""){issueCommand(e,{},a)}a.issue=issue;const s="::";class Command{constructor(e,a,r){if(!e){e="missing.command"}this.command=e;this.properties=a;this.message=r}toString(){let e=s+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let a=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const i=this.properties[r];if(i){if(a){a=false}else{e+=","}e+=`${r}=${escapeProperty(i)}`}}}}e+=`${s}${escapeData(this.message)}`;return e}}function escapeData(e){return d.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return d.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};Object.defineProperty(a,"__esModule",{value:true});a.getIDToken=a.getState=a.saveState=a.group=a.endGroup=a.startGroup=a.info=a.notice=a.warning=a.error=a.debug=a.isDebug=a.setFailed=a.setCommandEcho=a.setOutput=a.getBooleanInput=a.getMultilineInput=a.getInput=a.addPath=a.setSecret=a.exportVariable=a.ExitCode=void 0;const d=r(7351);const s=r(717);const l=r(5278);const u=p(r(2087));const m=p(r(5622));const c=r(8041);var h;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(h=a.ExitCode||(a.ExitCode={}));function exportVariable(e,a){const r=l.toCommandValue(a);process.env[e]=r;const i=process.env["GITHUB_ENV"]||"";if(i){const a="_GitHubActionsFileCommandDelimeter_";const i=`${e}<<${a}${u.EOL}${r}${u.EOL}${a}`;s.issueCommand("ENV",i)}else{d.issueCommand("set-env",{name:e},r)}}a.exportVariable=exportVariable;function setSecret(e){d.issueCommand("add-mask",{},e)}a.setSecret=setSecret;function addPath(e){const a=process.env["GITHUB_PATH"]||"";if(a){s.issueCommand("PATH",e)}else{d.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${m.delimiter}${process.env["PATH"]}`}a.addPath=addPath;function getInput(e,a){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(a&&a.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(a&&a.trimWhitespace===false){return r}return r.trim()}a.getInput=getInput;function getMultilineInput(e,a){const r=getInput(e,a).split("\n").filter((e=>e!==""));return r}a.getMultilineInput=getMultilineInput;function getBooleanInput(e,a){const r=["true","True","TRUE"];const i=["false","False","FALSE"];const n=getInput(e,a);if(r.includes(n))return true;if(i.includes(n))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}a.getBooleanInput=getBooleanInput;function setOutput(e,a){process.stdout.write(u.EOL);d.issueCommand("set-output",{name:e},a)}a.setOutput=setOutput;function setCommandEcho(e){d.issue("echo",e?"on":"off")}a.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=h.Failure;error(e)}a.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}a.isDebug=isDebug;function debug(e){d.issueCommand("debug",{},e)}a.debug=debug;function error(e,a={}){d.issueCommand("error",l.toCommandProperties(a),e instanceof Error?e.toString():e)}a.error=error;function warning(e,a={}){d.issueCommand("warning",l.toCommandProperties(a),e instanceof Error?e.toString():e)}a.warning=warning;function notice(e,a={}){d.issueCommand("notice",l.toCommandProperties(a),e instanceof Error?e.toString():e)}a.notice=notice;function info(e){process.stdout.write(e+u.EOL)}a.info=info;function startGroup(e){d.issue("group",e)}a.startGroup=startGroup;function endGroup(){d.issue("endgroup")}a.endGroup=endGroup;function group(e,a){return o(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield a()}finally{endGroup()}return r}))}a.group=group;function saveState(e,a){d.issueCommand("save-state",{name:e},a)}a.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}a.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield c.OidcClient.getIDToken(e)}))}a.getIDToken=getIDToken},717:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};Object.defineProperty(a,"__esModule",{value:true});a.issueCommand=void 0;const o=p(r(5747));const d=p(r(2087));const s=r(5278);function issueCommand(e,a){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!o.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}o.appendFileSync(r,`${s.toCommandValue(a)}${d.EOL}`,{encoding:"utf8"})}a.issueCommand=issueCommand},8041:function(e,a,r){"use strict";var i=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};Object.defineProperty(a,"__esModule",{value:true});a.OidcClient=void 0;const n=r(9925);const p=r(3702);const o=r(2186);class OidcClient{static createHttpClient(e=true,a=10){const r={allowRetries:e,maxRetries:a};return new n.HttpClient("actions/oidc-client",[new p.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var a;return i(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const i=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.result.message}`)}));const n=(a=i.result)===null||a===void 0?void 0:a.value;if(!n){throw new Error("Response json body do not have ID Token field")}return n}))}static getIDToken(e){return i(this,void 0,void 0,(function*(){try{let a=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);a=`${a}&audience=${r}`}o.debug(`ID token url is ${a}`);const r=yield OidcClient.getCall(a);o.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}a.OidcClient=OidcClient},5278:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});a.toCommandProperties=a.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}a.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}a.toCommandProperties=toCommandProperties},1514:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};Object.defineProperty(a,"__esModule",{value:true});a.getExecOutput=a.exec=void 0;const d=r(4304);const s=p(r(8159));function exec(e,a,r){return o(this,void 0,void 0,(function*(){const i=s.argStringToArray(e);if(i.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const n=i[0];a=i.slice(1).concat(a||[]);const p=new s.ToolRunner(n,a,r);return p.exec()}))}a.exec=exec;function getExecOutput(e,a,r){var i,n;return o(this,void 0,void 0,(function*(){let p="";let o="";const s=new d.StringDecoder("utf8");const l=new d.StringDecoder("utf8");const u=(i=r===null||r===void 0?void 0:r.listeners)===null||i===void 0?void 0:i.stdout;const m=(n=r===null||r===void 0?void 0:r.listeners)===null||n===void 0?void 0:n.stderr;const stdErrListener=e=>{o+=l.write(e);if(m){m(e)}};const stdOutListener=e=>{p+=s.write(e);if(u){u(e)}};const c=Object.assign(Object.assign({},r===null||r===void 0?void 0:r.listeners),{stdout:stdOutListener,stderr:stdErrListener});const h=yield exec(e,a,Object.assign(Object.assign({},r),{listeners:c}));p+=s.end();o+=l.end();return{exitCode:h,stdout:p,stderr:o}}))}a.getExecOutput=getExecOutput},8159:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};Object.defineProperty(a,"__esModule",{value:true});a.argStringToArray=a.ToolRunner=void 0;const d=p(r(2087));const s=p(r(8614));const l=p(r(3129));const u=p(r(5622));const m=p(r(7436));const c=p(r(1962));const h=r(8213);const v=process.platform==="win32";class ToolRunner extends s.EventEmitter{constructor(e,a,r){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=a||[];this.options=r||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,a){const r=this._getSpawnFileName();const i=this._getSpawnArgs(e);let n=a?"":"[command]";if(v){if(this._isCmdFile()){n+=r;for(const e of i){n+=` ${e}`}}else if(e.windowsVerbatimArguments){n+=`"${r}"`;for(const e of i){n+=` ${e}`}}else{n+=this._windowsQuoteCmdArg(r);for(const e of i){n+=` ${this._windowsQuoteCmdArg(e)}`}}}else{n+=r;for(const e of i){n+=` ${e}`}}return n}_processLineBuffer(e,a,r){try{let i=a+e.toString();let n=i.indexOf(d.EOL);while(n>-1){const e=i.substring(0,n);r(e);i=i.substring(n+d.EOL.length);n=i.indexOf(d.EOL)}return i}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(v){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(v){if(this._isCmdFile()){let a=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const r of this.args){a+=" ";a+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r)}a+='"';return[a]}}return this.args}_endsWith(e,a){return e.endsWith(a)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const a=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=false;for(const i of e){if(a.some((e=>e===i))){r=true;break}}if(!r){return e}let i='"';let n=true;for(let a=e.length;a>0;a--){i+=e[a-1];if(n&&e[a-1]==="\\"){i+="\\"}else if(e[a-1]==='"'){n=true;i+='"'}else{n=false}}i+='"';return i.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let a='"';let r=true;for(let i=e.length;i>0;i--){a+=e[i-1];if(r&&e[i-1]==="\\"){a+="\\"}else if(e[i-1]==='"'){r=true;a+="\\"}else{r=false}}a+='"';return a.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const a={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};a.outStream=e.outStream||process.stdout;a.errStream=e.errStream||process.stderr;return a}_getSpawnOptions(e,a){e=e||{};const r={};r.cwd=e.cwd;r.env=e.env;r["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){r.argv0=`"${a}"`}return r}exec(){return o(this,void 0,void 0,(function*(){if(!c.isRooted(this.toolPath)&&(this.toolPath.includes("/")||v&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield m.which(this.toolPath,true);return new Promise(((e,a)=>o(this,void 0,void 0,(function*(){this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const r=this._cloneExecOptions(this.options);if(!r.silent&&r.outStream){r.outStream.write(this._getCommandString(r)+d.EOL)}const i=new ExecState(r,this.toolPath);i.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield c.exists(this.options.cwd))){return a(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const n=this._getSpawnFileName();const p=l.spawn(n,this._getSpawnArgs(r),this._getSpawnOptions(this.options,n));let o="";if(p.stdout){p.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!r.silent&&r.outStream){r.outStream.write(e)}o=this._processLineBuffer(e,o,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let s="";if(p.stderr){p.stderr.on("data",(e=>{i.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!r.silent&&r.errStream&&r.outStream){const a=r.failOnStdErr?r.errStream:r.outStream;a.write(e)}s=this._processLineBuffer(e,s,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}p.on("error",(e=>{i.processError=e.message;i.processExited=true;i.processClosed=true;i.CheckComplete()}));p.on("exit",(e=>{i.processExitCode=e;i.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);i.CheckComplete()}));p.on("close",(e=>{i.processExitCode=e;i.processExited=true;i.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);i.CheckComplete()}));i.on("done",((r,i)=>{if(o.length>0){this.emit("stdline",o)}if(s.length>0){this.emit("errline",s)}p.removeAllListeners();if(r){a(r)}else{e(i)}}));if(this.options.input){if(!p.stdin){throw new Error("child process missing stdin")}p.stdin.end(this.options.input)}}))))}))}}a.ToolRunner=ToolRunner;function argStringToArray(e){const a=[];let r=false;let i=false;let n="";function append(e){if(i&&e!=='"'){n+="\\"}n+=e;i=false}for(let p=0;p0){a.push(n);n=""}continue}append(o)}if(n.length>0){a.push(n.trim())}return a}a.argStringToArray=argStringToArray;class ExecState extends s.EventEmitter{constructor(e,a){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!a){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=a;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=h.setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const a=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(a)}e._setResult()}}},8090:function(e,a,r){"use strict";var i=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};Object.defineProperty(a,"__esModule",{value:true});a.hashFiles=a.create=void 0;const n=r(8298);const p=r(2448);function create(e,a){return i(this,void 0,void 0,(function*(){return yield n.DefaultGlobber.create(e,a)}))}a.create=create;function hashFiles(e,a){return i(this,void 0,void 0,(function*(){let r=true;if(a&&typeof a.followSymbolicLinks==="boolean"){r=a.followSymbolicLinks}const i=yield create(e,{followSymbolicLinks:r});return p.hashFiles(i)}))}a.hashFiles=hashFiles},1026:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};Object.defineProperty(a,"__esModule",{value:true});a.getOptions=void 0;const o=p(r(2186));function getOptions(e){const a={followSymbolicLinks:true,implicitDescendants:true,matchDirectories:true,omitBrokenSymbolicLinks:true};if(e){if(typeof e.followSymbolicLinks==="boolean"){a.followSymbolicLinks=e.followSymbolicLinks;o.debug(`followSymbolicLinks '${a.followSymbolicLinks}'`)}if(typeof e.implicitDescendants==="boolean"){a.implicitDescendants=e.implicitDescendants;o.debug(`implicitDescendants '${a.implicitDescendants}'`)}if(typeof e.matchDirectories==="boolean"){a.matchDirectories=e.matchDirectories;o.debug(`matchDirectories '${a.matchDirectories}'`)}if(typeof e.omitBrokenSymbolicLinks==="boolean"){a.omitBrokenSymbolicLinks=e.omitBrokenSymbolicLinks;o.debug(`omitBrokenSymbolicLinks '${a.omitBrokenSymbolicLinks}'`)}}return a}a.getOptions=getOptions},8298:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};var d=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=e[Symbol.asyncIterator],r;return a?a.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),r={},verb("next"),verb("throw"),verb("return"),r[Symbol.asyncIterator]=function(){return this},r);function verb(a){r[a]=e[a]&&function(r){return new Promise((function(i,n){r=e[a](r),settle(i,n,r.done,r.value)}))}}function settle(e,a,r,i){Promise.resolve(i).then((function(a){e({value:a,done:r})}),a)}};var s=this&&this.__await||function(e){return this instanceof s?(this.v=e,this):new s(e)};var l=this&&this.__asyncGenerator||function(e,a,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r.apply(e,a||[]),n,p=[];return n={},verb("next"),verb("throw"),verb("return"),n[Symbol.asyncIterator]=function(){return this},n;function verb(e){if(i[e])n[e]=function(a){return new Promise((function(r,i){p.push([e,a,r,i])>1||resume(e,a)}))}}function resume(e,a){try{step(i[e](a))}catch(e){settle(p[0][3],e)}}function step(e){e.value instanceof s?Promise.resolve(e.value.v).then(fulfill,reject):settle(p[0][2],e)}function fulfill(e){resume("next",e)}function reject(e){resume("throw",e)}function settle(e,a){if(e(a),p.shift(),p.length)resume(p[0][0],p[0][1])}};Object.defineProperty(a,"__esModule",{value:true});a.DefaultGlobber=void 0;const u=p(r(2186));const m=p(r(5747));const c=p(r(1026));const h=p(r(5622));const v=p(r(9005));const g=r(1063);const y=r(4536);const w=r(9117);const b=process.platform==="win32";class DefaultGlobber{constructor(e){this.patterns=[];this.searchPaths=[];this.options=c.getOptions(e)}getSearchPaths(){return this.searchPaths.slice()}glob(){var e,a;return o(this,void 0,void 0,(function*(){const r=[];try{for(var i=d(this.globGenerator()),n;n=yield i.next(),!n.done;){const e=n.value;r.push(e)}}catch(a){e={error:a}}finally{try{if(n&&!n.done&&(a=i.return))yield a.call(i)}finally{if(e)throw e.error}}return r}))}globGenerator(){return l(this,arguments,(function*globGenerator_1(){const e=c.getOptions(this.options);const a=[];for(const r of this.patterns){a.push(r);if(e.implicitDescendants&&(r.trailingSeparator||r.segments[r.segments.length-1]!=="**")){a.push(new y.Pattern(r.negate,true,r.segments.concat("**")))}}const r=[];for(const e of v.getSearchPaths(a)){u.debug(`Search path '${e}'`);try{yield s(m.promises.lstat(e))}catch(e){if(e.code==="ENOENT"){continue}throw e}r.unshift(new w.SearchState(e,1))}const i=[];while(r.length){const n=r.pop();const p=v.match(a,n.path);const o=!!p||v.partialMatch(a,n.path);if(!p&&!o){continue}const d=yield s(DefaultGlobber.stat(n,e,i));if(!d){continue}if(d.isDirectory()){if(p&g.MatchKind.Directory&&e.matchDirectories){yield yield s(n.path)}else if(!o){continue}const a=n.level+1;const i=(yield s(m.promises.readdir(n.path))).map((e=>new w.SearchState(h.join(n.path,e),a)));r.push(...i.reverse())}else if(p&g.MatchKind.File){yield yield s(n.path)}}}))}static create(e,a){return o(this,void 0,void 0,(function*(){const r=new DefaultGlobber(a);if(b){e=e.replace(/\r\n/g,"\n");e=e.replace(/\r/g,"\n")}const i=e.split("\n").map((e=>e.trim()));for(const e of i){if(!e||e.startsWith("#")){continue}else{r.patterns.push(new y.Pattern(e))}}r.searchPaths.push(...v.getSearchPaths(r.patterns));return r}))}static stat(e,a,r){return o(this,void 0,void 0,(function*(){let i;if(a.followSymbolicLinks){try{i=yield m.promises.stat(e.path)}catch(r){if(r.code==="ENOENT"){if(a.omitBrokenSymbolicLinks){u.debug(`Broken symlink '${e.path}'`);return undefined}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw r}}else{i=yield m.promises.lstat(e.path)}if(i.isDirectory()&&a.followSymbolicLinks){const a=yield m.promises.realpath(e.path);while(r.length>=e.level){r.pop()}if(r.some((e=>e===a))){u.debug(`Symlink cycle detected for path '${e.path}' and realpath '${a}'`);return undefined}r.push(a)}return i}))}}a.DefaultGlobber=DefaultGlobber},2448:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};var d=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=e[Symbol.asyncIterator],r;return a?a.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),r={},verb("next"),verb("throw"),verb("return"),r[Symbol.asyncIterator]=function(){return this},r);function verb(a){r[a]=e[a]&&function(r){return new Promise((function(i,n){r=e[a](r),settle(i,n,r.done,r.value)}))}}function settle(e,a,r,i){Promise.resolve(i).then((function(a){e({value:a,done:r})}),a)}};Object.defineProperty(a,"__esModule",{value:true});a.hashFiles=void 0;const s=p(r(6417));const l=p(r(2186));const u=p(r(5747));const m=p(r(2413));const c=p(r(1669));const h=p(r(5622));function hashFiles(e){var a,r;var i;return o(this,void 0,void 0,(function*(){let n=false;const p=(i=process.env["GITHUB_WORKSPACE"])!==null&&i!==void 0?i:process.cwd();const o=s.createHash("sha256");let v=0;try{for(var g=d(e.globGenerator()),y;y=yield g.next(),!y.done;){const e=y.value;l.debug(e);if(!e.startsWith(`${p}${h.sep}`)){l.debug(`Ignore '${e}' since it is not under GITHUB_WORKSPACE.`);continue}if(u.statSync(e).isDirectory()){l.debug(`Skip directory '${e}'.`);continue}const a=s.createHash("sha256");const r=c.promisify(m.pipeline);yield r(u.createReadStream(e),a);o.write(a.digest());v++;if(!n){n=true}}}catch(e){a={error:e}}finally{try{if(y&&!y.done&&(r=g.return))yield r.call(g)}finally{if(a)throw a.error}}o.end();if(n){l.debug(`Found ${v} files to hash.`);return o.digest("hex")}else{l.debug(`No matches found for glob`);return""}}))}a.hashFiles=hashFiles},1063:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});a.MatchKind=void 0;var r;(function(e){e[e["None"]=0]="None";e[e["Directory"]=1]="Directory";e[e["File"]=2]="File";e[e["All"]=3]="All"})(r=a.MatchKind||(a.MatchKind={}))},1849:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:true});a.safeTrimTrailingSeparator=a.normalizeSeparators=a.hasRoot=a.hasAbsoluteRoot=a.ensureAbsoluteRoot=a.dirname=void 0;const d=p(r(5622));const s=o(r(2357));const l=process.platform==="win32";function dirname(e){e=safeTrimTrailingSeparator(e);if(l&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(e)){return e}let a=d.dirname(e);if(l&&/^\\\\[^\\]+\\[^\\]+\\$/.test(a)){a=safeTrimTrailingSeparator(a)}return a}a.dirname=dirname;function ensureAbsoluteRoot(e,a){s.default(e,`ensureAbsoluteRoot parameter 'root' must not be empty`);s.default(a,`ensureAbsoluteRoot parameter 'itemPath' must not be empty`);if(hasAbsoluteRoot(a)){return a}if(l){if(a.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let e=process.cwd();s.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`);if(a[0].toUpperCase()===e[0].toUpperCase()){if(a.length===2){return`${a[0]}:\\${e.substr(3)}`}else{if(!e.endsWith("\\")){e+="\\"}return`${a[0]}:\\${e.substr(3)}${a.substr(2)}`}}else{return`${a[0]}:\\${a.substr(2)}`}}else if(normalizeSeparators(a).match(/^\\$|^\\[^\\]/)){const e=process.cwd();s.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`);return`${e[0]}:\\${a.substr(1)}`}}s.default(hasAbsoluteRoot(e),`ensureAbsoluteRoot parameter 'root' must have an absolute root`);if(e.endsWith("/")||l&&e.endsWith("\\")){}else{e+=d.sep}return e+a}a.ensureAbsoluteRoot=ensureAbsoluteRoot;function hasAbsoluteRoot(e){s.default(e,`hasAbsoluteRoot parameter 'itemPath' must not be empty`);e=normalizeSeparators(e);if(l){return e.startsWith("\\\\")||/^[A-Z]:\\/i.test(e)}return e.startsWith("/")}a.hasAbsoluteRoot=hasAbsoluteRoot;function hasRoot(e){s.default(e,`isRooted parameter 'itemPath' must not be empty`);e=normalizeSeparators(e);if(l){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}a.hasRoot=hasRoot;function normalizeSeparators(e){e=e||"";if(l){e=e.replace(/\//g,"\\");const a=/^\\\\+[^\\]/.test(e);return(a?"\\":"")+e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}a.normalizeSeparators=normalizeSeparators;function safeTrimTrailingSeparator(e){if(!e){return""}e=normalizeSeparators(e);if(!e.endsWith(d.sep)){return e}if(e===d.sep){return e}if(l&&/^[A-Z]:\\$/i.test(e)){return e}return e.substr(0,e.length-1)}a.safeTrimTrailingSeparator=safeTrimTrailingSeparator},6836:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:true});a.Path=void 0;const d=p(r(5622));const s=p(r(1849));const l=o(r(2357));const u=process.platform==="win32";class Path{constructor(e){this.segments=[];if(typeof e==="string"){l.default(e,`Parameter 'itemPath' must not be empty`);e=s.safeTrimTrailingSeparator(e);if(!s.hasRoot(e)){this.segments=e.split(d.sep)}else{let a=e;let r=s.dirname(a);while(r!==a){const e=d.basename(a);this.segments.unshift(e);a=r;r=s.dirname(a)}this.segments.unshift(a)}}else{l.default(e.length>0,`Parameter 'itemPath' must not be an empty array`);for(let a=0;a!e.negate));const a={};for(const r of e){const e=s?r.searchPath.toUpperCase():r.searchPath;a[e]="candidate"}const r=[];for(const i of e){const e=s?i.searchPath.toUpperCase():i.searchPath;if(a[e]==="included"){continue}let n=false;let p=e;let d=o.dirname(p);while(d!==p){if(a[d]){n=true;break}p=d;d=o.dirname(p)}if(!n){r.push(i.searchPath);a[e]="included"}}return r}a.getSearchPaths=getSearchPaths;function match(e,a){let r=d.MatchKind.None;for(const i of e){if(i.negate){r&=~i.match(a)}else{r|=i.match(a)}}return r}a.match=match;function partialMatch(e,a){return e.some((e=>!e.negate&&e.partialMatch(a)))}a.partialMatch=partialMatch},4536:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:true});a.Pattern=void 0;const d=p(r(2087));const s=p(r(5622));const l=p(r(1849));const u=o(r(2357));const m=r(3973);const c=r(1063);const h=r(6836);const v=process.platform==="win32";class Pattern{constructor(e,a=false,r,i){this.negate=false;let n;if(typeof e==="string"){n=e.trim()}else{r=r||[];u.default(r.length,`Parameter 'segments' must not empty`);const a=Pattern.getLiteral(r[0]);u.default(a&&l.hasAbsoluteRoot(a),`Parameter 'segments' first element must be a root path`);n=new h.Path(r).toString().trim();if(e){n=`!${n}`}}while(n.startsWith("!")){this.negate=!this.negate;n=n.substr(1).trim()}n=Pattern.fixupPattern(n,i);this.segments=new h.Path(n).segments;this.trailingSeparator=l.normalizeSeparators(n).endsWith(s.sep);n=l.safeTrimTrailingSeparator(n);let p=false;const o=this.segments.map((e=>Pattern.getLiteral(e))).filter((e=>!p&&!(p=e==="")));this.searchPath=new h.Path(o).toString();this.rootRegExp=new RegExp(Pattern.regExpEscape(o[0]),v?"i":"");this.isImplicitPattern=a;const d={dot:true,nobrace:true,nocase:v,nocomment:true,noext:true,nonegate:true};n=v?n.replace(/\\/g,"/"):n;this.minimatch=new m.Minimatch(n,d)}match(e){if(this.segments[this.segments.length-1]==="**"){e=l.normalizeSeparators(e);if(!e.endsWith(s.sep)&&this.isImplicitPattern===false){e=`${e}${s.sep}`}}else{e=l.safeTrimTrailingSeparator(e)}if(this.minimatch.match(e)){return this.trailingSeparator?c.MatchKind.Directory:c.MatchKind.All}return c.MatchKind.None}partialMatch(e){e=l.safeTrimTrailingSeparator(e);if(l.dirname(e)===e){return this.rootRegExp.test(e)}return this.minimatch.matchOne(e.split(v?/\\+/:/\/+/),this.minimatch.set[0],true)}static globEscape(e){return(v?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,a){u.default(e,"pattern cannot be empty");const r=new h.Path(e).segments.map((e=>Pattern.getLiteral(e)));u.default(r.every(((e,a)=>(e!=="."||a===0)&&e!=="..")),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`);u.default(!l.hasRoot(e)||r[0],`Invalid pattern '${e}'. Root segment must not contain globs.`);e=l.normalizeSeparators(e);if(e==="."||e.startsWith(`.${s.sep}`)){e=Pattern.globEscape(process.cwd())+e.substr(1)}else if(e==="~"||e.startsWith(`~${s.sep}`)){a=a||d.homedir();u.default(a,"Unable to determine HOME directory");u.default(l.hasAbsoluteRoot(a),`Expected HOME directory to be a rooted path. Actual '${a}'`);e=Pattern.globEscape(a)+e.substr(1)}else if(v&&(e.match(/^[A-Z]:$/i)||e.match(/^[A-Z]:[^\\]/i))){let a=l.ensureAbsoluteRoot("C:\\dummy-root",e.substr(0,2));if(e.length>2&&!a.endsWith("\\")){a+="\\"}e=Pattern.globEscape(a)+e.substr(2)}else if(v&&(e==="\\"||e.match(/^\\[^\\]/))){let a=l.ensureAbsoluteRoot("C:\\dummy-root","\\");if(!a.endsWith("\\")){a+="\\"}e=Pattern.globEscape(a)+e.substr(1)}else{e=l.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()),e)}return l.normalizeSeparators(e)}static getLiteral(e){let a="";for(let r=0;r=0){if(i.length>1){return""}if(i){a+=i;r=n;continue}}}a+=i}return a}static regExpEscape(e){return e.replace(/[[\\^$.|?*+()]/g,"\\$&")}}a.Pattern=Pattern},9117:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});a.SearchState=void 0;class SearchState{constructor(e,a){this.path=e;this.level=a}}a.SearchState=SearchState},3702:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});class BasicCredentialHandler{constructor(e,a){this.username=e;this.password=a}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from(this.username+":"+this.password).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,a,r){return null}}a.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Bearer "+this.token}canHandleAuthentication(e){return false}handleAuthentication(e,a,r){return null}}a.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from("PAT:"+this.token).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,a,r){return null}}a.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},9925:(e,a,r)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});const i=r(8605);const n=r(7211);const p=r(6443);let o;var d;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(d=a.HttpCodes||(a.HttpCodes={}));var s;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(s=a.Headers||(a.Headers={}));var l;(function(e){e["ApplicationJson"]="application/json"})(l=a.MediaTypes||(a.MediaTypes={}));function getProxyUrl(e){let a=p.getProxyUrl(new URL(e));return a?a.href:""}a.getProxyUrl=getProxyUrl;const u=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const m=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const c=["OPTIONS","GET","DELETE","HEAD"];const h=10;const v=5;class HttpClientError extends Error{constructor(e,a){super(e);this.name="HttpClientError";this.statusCode=a;Object.setPrototypeOf(this,HttpClientError.prototype)}}a.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise((async(e,a)=>{let r=Buffer.alloc(0);this.message.on("data",(e=>{r=Buffer.concat([r,e])}));this.message.on("end",(()=>{e(r.toString())}))}))}}a.HttpClientResponse=HttpClientResponse;function isHttps(e){let a=new URL(e);return a.protocol==="https:"}a.isHttps=isHttps;class HttpClient{constructor(e,a,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=a||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,a){return this.request("OPTIONS",e,null,a||{})}get(e,a){return this.request("GET",e,null,a||{})}del(e,a){return this.request("DELETE",e,null,a||{})}post(e,a,r){return this.request("POST",e,a,r||{})}patch(e,a,r){return this.request("PATCH",e,a,r||{})}put(e,a,r){return this.request("PUT",e,a,r||{})}head(e,a){return this.request("HEAD",e,null,a||{})}sendStream(e,a,r,i){return this.request(e,a,r,i)}async getJson(e,a={}){a[s.Accept]=this._getExistingOrDefaultHeader(a,s.Accept,l.ApplicationJson);let r=await this.get(e,a);return this._processResponse(r,this.requestOptions)}async postJson(e,a,r={}){let i=JSON.stringify(a,null,2);r[s.Accept]=this._getExistingOrDefaultHeader(r,s.Accept,l.ApplicationJson);r[s.ContentType]=this._getExistingOrDefaultHeader(r,s.ContentType,l.ApplicationJson);let n=await this.post(e,i,r);return this._processResponse(n,this.requestOptions)}async putJson(e,a,r={}){let i=JSON.stringify(a,null,2);r[s.Accept]=this._getExistingOrDefaultHeader(r,s.Accept,l.ApplicationJson);r[s.ContentType]=this._getExistingOrDefaultHeader(r,s.ContentType,l.ApplicationJson);let n=await this.put(e,i,r);return this._processResponse(n,this.requestOptions)}async patchJson(e,a,r={}){let i=JSON.stringify(a,null,2);r[s.Accept]=this._getExistingOrDefaultHeader(r,s.Accept,l.ApplicationJson);r[s.ContentType]=this._getExistingOrDefaultHeader(r,s.ContentType,l.ApplicationJson);let n=await this.patch(e,i,r);return this._processResponse(n,this.requestOptions)}async request(e,a,r,i){if(this._disposed){throw new Error("Client has already been disposed.")}let n=new URL(a);let p=this._prepareRequest(e,n,i);let o=this._allowRetries&&c.indexOf(e)!=-1?this._maxRetries+1:1;let s=0;let l;while(s0){const o=l.message.headers["location"];if(!o){break}let d=new URL(o);if(n.protocol=="https:"&&n.protocol!=d.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}await l.readBody();if(d.hostname!==n.hostname){for(let e in i){if(e.toLowerCase()==="authorization"){delete i[e]}}}p=this._prepareRequest(e,d,i);l=await this.requestRaw(p,r);a--}if(m.indexOf(l.message.statusCode)==-1){return l}s+=1;if(s{let callbackForResult=function(e,a){if(e){i(e)}r(a)};this.requestRawWithCallback(e,a,callbackForResult)}))}requestRawWithCallback(e,a,r){let i;if(typeof a==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(a,"utf8")}let n=false;let handleResult=(e,a)=>{if(!n){n=true;r(e,a)}};let p=e.httpModule.request(e.options,(e=>{let a=new HttpClientResponse(e);handleResult(null,a)}));p.on("socket",(e=>{i=e}));p.setTimeout(this._socketTimeout||3*6e4,(()=>{if(i){i.end()}handleResult(new Error("Request timeout: "+e.options.path),null)}));p.on("error",(function(e){handleResult(e,null)}));if(a&&typeof a==="string"){p.write(a,"utf8")}if(a&&typeof a!=="string"){a.on("close",(function(){p.end()}));a.pipe(p)}else{p.end()}}getAgent(e){let a=new URL(e);return this._getAgent(a)}_prepareRequest(e,a,r){const p={};p.parsedUrl=a;const o=p.parsedUrl.protocol==="https:";p.httpModule=o?n:i;const d=o?443:80;p.options={};p.options.host=p.parsedUrl.hostname;p.options.port=p.parsedUrl.port?parseInt(p.parsedUrl.port):d;p.options.path=(p.parsedUrl.pathname||"")+(p.parsedUrl.search||"");p.options.method=e;p.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){p.options.headers["user-agent"]=this.userAgent}p.options.agent=this._getAgent(p.parsedUrl);if(this.handlers){this.handlers.forEach((e=>{e.prepareRequest(p.options)}))}return p}_mergeHeaders(e){const lowercaseKeys=e=>Object.keys(e).reduce(((a,r)=>(a[r.toLowerCase()]=e[r],a)),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,a,r){const lowercaseKeys=e=>Object.keys(e).reduce(((a,r)=>(a[r.toLowerCase()]=e[r],a)),{});let i;if(this.requestOptions&&this.requestOptions.headers){i=lowercaseKeys(this.requestOptions.headers)[a]}return e[a]||i||r}_getAgent(e){let a;let d=p.getProxyUrl(e);let s=d&&d.hostname;if(this._keepAlive&&s){a=this._proxyAgent}if(this._keepAlive&&!s){a=this._agent}if(!!a){return a}const l=e.protocol==="https:";let u=100;if(!!this.requestOptions){u=this.requestOptions.maxSockets||i.globalAgent.maxSockets}if(s){if(!o){o=r(4294)}const e={maxSockets:u,keepAlive:this._keepAlive,proxy:{...(d.username||d.password)&&{proxyAuth:`${d.username}:${d.password}`},host:d.hostname,port:d.port}};let i;const n=d.protocol==="https:";if(l){i=n?o.httpsOverHttps:o.httpsOverHttp}else{i=n?o.httpOverHttps:o.httpOverHttp}a=i(e);this._proxyAgent=a}if(this._keepAlive&&!a){const e={keepAlive:this._keepAlive,maxSockets:u};a=l?new n.Agent(e):new i.Agent(e);this._agent=a}if(!a){a=l?n.globalAgent:i.globalAgent}if(l&&this._ignoreSslError){a.options=Object.assign(a.options||{},{rejectUnauthorized:false})}return a}_performExponentialBackoff(e){e=Math.min(h,e);const a=v*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),a)))}static dateTimeDeserializer(e,a){if(typeof a==="string"){let e=new Date(a);if(!isNaN(e.valueOf())){return e}}return a}async _processResponse(e,a){return new Promise((async(r,i)=>{const n=e.message.statusCode;const p={statusCode:n,result:null,headers:{}};if(n==d.NotFound){r(p)}let o;let s;try{s=await e.readBody();if(s&&s.length>0){if(a&&a.deserializeDates){o=JSON.parse(s,HttpClient.dateTimeDeserializer)}else{o=JSON.parse(s)}p.result=o}p.headers=e.message.headers}catch(e){}if(n>299){let e;if(o&&o.message){e=o.message}else if(s&&s.length>0){e=s}else{e="Failed request: ("+n+")"}let a=new HttpClientError(e,n);a.result=p.result;i(a)}else{r(p)}}))}}a.HttpClient=HttpClient},6443:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});function getProxyUrl(e){let a=e.protocol==="https:";let r;if(checkBypass(e)){return r}let i;if(a){i=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{i=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(i){r=new URL(i)}return r}a.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}let a=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!a){return false}let r;if(e.port){r=Number(e.port)}else if(e.protocol==="http:"){r=80}else if(e.protocol==="https:"){r=443}let i=[e.hostname.toUpperCase()];if(typeof r==="number"){i.push(`${i[0]}:${r}`)}for(let e of a.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(i.some((a=>a===e))){return true}}return false}a.checkBypass=checkBypass},1962:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};var d;Object.defineProperty(a,"__esModule",{value:true});a.getCmdPath=a.tryGetExecutablePath=a.isRooted=a.isDirectory=a.exists=a.IS_WINDOWS=a.unlink=a.symlink=a.stat=a.rmdir=a.rename=a.readlink=a.readdir=a.mkdir=a.lstat=a.copyFile=a.chmod=void 0;const s=p(r(5747));const l=p(r(5622));d=s.promises,a.chmod=d.chmod,a.copyFile=d.copyFile,a.lstat=d.lstat,a.mkdir=d.mkdir,a.readdir=d.readdir,a.readlink=d.readlink,a.rename=d.rename,a.rmdir=d.rmdir,a.stat=d.stat,a.symlink=d.symlink,a.unlink=d.unlink;a.IS_WINDOWS=process.platform==="win32";function exists(e){return o(this,void 0,void 0,(function*(){try{yield a.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true}))}a.exists=exists;function isDirectory(e,r=false){return o(this,void 0,void 0,(function*(){const i=r?yield a.stat(e):yield a.lstat(e);return i.isDirectory()}))}a.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(a.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}a.isRooted=isRooted;function tryGetExecutablePath(e,r){return o(this,void 0,void 0,(function*(){let i=undefined;try{i=yield a.stat(e)}catch(a){if(a.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${a}`)}}if(i&&i.isFile()){if(a.IS_WINDOWS){const a=l.extname(e).toUpperCase();if(r.some((e=>e.toUpperCase()===a))){return e}}else{if(isUnixExecutable(i)){return e}}}const n=e;for(const p of r){e=n+p;i=undefined;try{i=yield a.stat(e)}catch(a){if(a.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${a}`)}}if(i&&i.isFile()){if(a.IS_WINDOWS){try{const r=l.dirname(e);const i=l.basename(e).toUpperCase();for(const n of yield a.readdir(r)){if(i===n.toUpperCase()){e=l.join(r,n);break}}}catch(a){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${a}`)}return e}else{if(isUnixExecutable(i)){return e}}}}return""}))}a.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(a.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}a.getCmdPath=getCmdPath},7436:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};Object.defineProperty(a,"__esModule",{value:true});a.findInPath=a.which=a.mkdirP=a.rmRF=a.mv=a.cp=void 0;const d=r(2357);const s=p(r(3129));const l=p(r(5622));const u=r(1669);const m=p(r(1962));const c=u.promisify(s.exec);const h=u.promisify(s.execFile);function cp(e,a,r={}){return o(this,void 0,void 0,(function*(){const{force:i,recursive:n,copySourceDirectory:p}=readCopyOptions(r);const o=(yield m.exists(a))?yield m.stat(a):null;if(o&&o.isFile()&&!i){return}const d=o&&o.isDirectory()&&p?l.join(a,l.basename(e)):a;if(!(yield m.exists(e))){throw new Error(`no such file or directory: ${e}`)}const s=yield m.stat(e);if(s.isDirectory()){if(!n){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,d,0,i)}}else{if(l.relative(e,d)===""){throw new Error(`'${d}' and '${e}' are the same file`)}yield copyFile(e,d,i)}}))}a.cp=cp;function mv(e,a,r={}){return o(this,void 0,void 0,(function*(){if(yield m.exists(a)){let i=true;if(yield m.isDirectory(a)){a=l.join(a,l.basename(e));i=yield m.exists(a)}if(i){if(r.force==null||r.force){yield rmRF(a)}else{throw new Error("Destination already exists")}}}yield mkdirP(l.dirname(a));yield m.rename(e,a)}))}a.mv=mv;function rmRF(e){return o(this,void 0,void 0,(function*(){if(m.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}try{const a=m.getCmdPath();if(yield m.isDirectory(e,true)){yield c(`${a} /s /c "rd /s /q "%inputPath%""`,{env:{inputPath:e}})}else{yield c(`${a} /s /c "del /f /a "%inputPath%""`,{env:{inputPath:e}})}}catch(e){if(e.code!=="ENOENT")throw e}try{yield m.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let a=false;try{a=yield m.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(a){yield h(`rm`,[`-rf`,`${e}`])}else{yield m.unlink(e)}}}))}a.rmRF=rmRF;function mkdirP(e){return o(this,void 0,void 0,(function*(){d.ok(e,"a path argument must be provided");yield m.mkdir(e,{recursive:true})}))}a.mkdirP=mkdirP;function which(e,a){return o(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(a){const a=yield which(e,false);if(!a){if(m.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}return a}const r=yield findInPath(e);if(r&&r.length>0){return r[0]}return""}))}a.which=which;function findInPath(e){return o(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const a=[];if(m.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(l.delimiter)){if(e){a.push(e)}}}if(m.isRooted(e)){const r=yield m.tryGetExecutablePath(e,a);if(r){return[r]}return[]}if(e.includes(l.sep)){return[]}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(l.delimiter)){if(e){r.push(e)}}}const i=[];for(const n of r){const r=yield m.tryGetExecutablePath(l.join(n,e),a);if(r){i.push(r)}}return i}))}a.findInPath=findInPath;function readCopyOptions(e){const a=e.force==null?true:e.force;const r=Boolean(e.recursive);const i=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:a,recursive:r,copySourceDirectory:i}}function cpDirRecursive(e,a,r,i){return o(this,void 0,void 0,(function*(){if(r>=255)return;r++;yield mkdirP(a);const n=yield m.readdir(e);for(const p of n){const n=`${e}/${p}`;const o=`${a}/${p}`;const d=yield m.lstat(n);if(d.isDirectory()){yield cpDirRecursive(n,o,r,i)}else{yield copyFile(n,o,i)}}yield m.chmod(a,(yield m.stat(e)).mode)}))}function copyFile(e,a,r){return o(this,void 0,void 0,(function*(){if((yield m.lstat(e)).isSymbolicLink()){try{yield m.lstat(a);yield m.unlink(a)}catch(e){if(e.code==="EPERM"){yield m.chmod(a,"0666");yield m.unlink(a)}}const r=yield m.readlink(e);yield m.symlink(r,a,m.IS_WINDOWS?"junction":null)}else if(!(yield m.exists(a))||r){yield m.copyFile(e,a)}}))}},9417:e=>{"use strict";e.exports=balanced;function balanced(e,a,r){if(e instanceof RegExp)e=maybeMatch(e,r);if(a instanceof RegExp)a=maybeMatch(a,r);var i=range(e,a,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+e.length,i[1]),post:r.slice(i[1]+a.length)}}function maybeMatch(e,a){var r=a.match(e);return r?r[0]:null}balanced.range=range;function range(e,a,r){var i,n,p,o,d;var s=r.indexOf(e);var l=r.indexOf(a,s+1);var u=s;if(s>=0&&l>0){if(e===a){return[s,l]}i=[];p=r.length;while(u>=0&&!d){if(u==s){i.push(u);s=r.indexOf(e,u+1)}else if(i.length==1){d=[i.pop(),l]}else{n=i.pop();if(n=0?s:l}if(i.length){d=[p,o]}}return d}},7817:(e,a,r)=>{var i=r(5026);var n="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";var p="0123456789ABCDEFGHIJKLMNOPQRSTUV";var o="0123456789ABCDEFGHJKMNPQRSTVWXYZ";e.exports=function base32Encode(e,a,r){r=r||{};var d,s;switch(a){case"RFC3548":case"RFC4648":d=n;s=true;break;case"RFC4648-HEX":d=p;s=true;break;case"Crockford":d=o;s=false;break;default:throw new Error("Unknown base32 variant: "+a)}var l=r.padding!==undefined?r.padding:s;var u=i(e);var m=0;var c=0;var h="";for(var v=0;v=5){h+=d[c>>>m-5&31];m-=5}}if(m>0){h+=d[c<<5-m&31]}if(l){while(h.length%8!==0){h+="="}}return h}},6463:(e,a)=>{"use strict";a.byteLength=byteLength;a.toByteArray=toByteArray;a.fromByteArray=fromByteArray;var r=[];var i=[];var n=typeof Uint8Array!=="undefined"?Uint8Array:Array;var p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var o=0,d=p.length;o0){throw new Error("Invalid string. Length must be a multiple of 4")}var r=e.indexOf("=");if(r===-1)r=a;var i=r===a?0:4-r%4;return[r,i]}function byteLength(e){var a=getLens(e);var r=a[0];var i=a[1];return(r+i)*3/4-i}function _byteLength(e,a,r){return(a+r)*3/4-r}function toByteArray(e){var a;var r=getLens(e);var p=r[0];var o=r[1];var d=new n(_byteLength(e,p,o));var s=0;var l=o>0?p-4:p;var u;for(u=0;u>16&255;d[s++]=a>>8&255;d[s++]=a&255}if(o===2){a=i[e.charCodeAt(u)]<<2|i[e.charCodeAt(u+1)]>>4;d[s++]=a&255}if(o===1){a=i[e.charCodeAt(u)]<<10|i[e.charCodeAt(u+1)]<<4|i[e.charCodeAt(u+2)]>>2;d[s++]=a>>8&255;d[s++]=a&255}return d}function tripletToBase64(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[e&63]}function encodeChunk(e,a,r){var i;var n=[];for(var p=a;ps?s:d+o))}if(n===1){a=e[i-1];p.push(r[a>>2]+r[a<<4&63]+"==")}else if(n===2){a=(e[i-2]<<8)+e[i-1];p.push(r[a>>10]+r[a>>4&63]+r[a<<2&63]+"=")}return p.join("")}},1575:(e,a,r)=>{e=r.nmd(e);var i=function(e){"use strict";var a=1e7,r=7,n=9007199254740992,p=smallToArray(n),o="0123456789abcdefghijklmnopqrstuvwxyz";var d=typeof BigInt==="function";function Integer(e,a,r,i){if(typeof e==="undefined")return Integer[0];if(typeof a!=="undefined")return+a===10&&!r?parseValue(e):parseBase(e,a,r,i);return parseValue(e)}function BigInteger(e,a){this.value=e;this.sign=a;this.isSmall=false}BigInteger.prototype=Object.create(Integer.prototype);function SmallInteger(e){this.value=e;this.sign=e<0;this.isSmall=true}SmallInteger.prototype=Object.create(Integer.prototype);function NativeBigInt(e){this.value=e}NativeBigInt.prototype=Object.create(Integer.prototype);function isPrecise(e){return-n0)return Math.floor(e);return Math.ceil(e)}function add(e,r){var i=e.length,n=r.length,p=new Array(i),o=0,d=a,s,l;for(l=0;l=d?1:0;p[l]=s-o*d}while(l0)p.push(o);return p}function addAny(e,a){if(e.length>=a.length)return add(e,a);return add(a,e)}function addSmall(e,r){var i=e.length,n=new Array(i),p=a,o,d;for(d=0;d0){n[d++]=r%p;r=Math.floor(r/p)}return n}BigInteger.prototype.add=function(e){var a=parseValue(e);if(this.sign!==a.sign){return this.subtract(a.negate())}var r=this.value,i=a.value;if(a.isSmall){return new BigInteger(addSmall(r,Math.abs(i)),this.sign)}return new BigInteger(addAny(r,i),this.sign)};BigInteger.prototype.plus=BigInteger.prototype.add;SmallInteger.prototype.add=function(e){var a=parseValue(e);var r=this.value;if(r<0!==a.sign){return this.subtract(a.negate())}var i=a.value;if(a.isSmall){if(isPrecise(r+i))return new SmallInteger(r+i);i=smallToArray(Math.abs(i))}return new BigInteger(addSmall(i,Math.abs(r)),r<0)};SmallInteger.prototype.plus=SmallInteger.prototype.add;NativeBigInt.prototype.add=function(e){return new NativeBigInt(this.value+parseValue(e).value)};NativeBigInt.prototype.plus=NativeBigInt.prototype.add;function subtract(e,r){var i=e.length,n=r.length,p=new Array(i),o=0,d=a,s,l;for(s=0;s=0){i=subtract(e,a)}else{i=subtract(a,e);r=!r}i=arrayToSmall(i);if(typeof i==="number"){if(r)i=-i;return new SmallInteger(i)}return new BigInteger(i,r)}function subtractSmall(e,r,i){var n=e.length,p=new Array(n),o=-r,d=a,s,l;for(s=0;s=0)};SmallInteger.prototype.minus=SmallInteger.prototype.subtract;NativeBigInt.prototype.subtract=function(e){return new NativeBigInt(this.value-parseValue(e).value)};NativeBigInt.prototype.minus=NativeBigInt.prototype.subtract;BigInteger.prototype.negate=function(){return new BigInteger(this.value,!this.sign)};SmallInteger.prototype.negate=function(){var e=this.sign;var a=new SmallInteger(-this.value);a.sign=!e;return a};NativeBigInt.prototype.negate=function(){return new NativeBigInt(-this.value)};BigInteger.prototype.abs=function(){return new BigInteger(this.value,false)};SmallInteger.prototype.abs=function(){return new SmallInteger(Math.abs(this.value))};NativeBigInt.prototype.abs=function(){return new NativeBigInt(this.value>=0?this.value:-this.value)};function multiplyLong(e,r){var i=e.length,n=r.length,p=i+n,o=createArray(p),d=a,s,l,u,m,c;for(u=0;u0){n[s++]=o%p;o=Math.floor(o/p)}return n}function shiftLeft(e,a){var r=[];while(a-- >0)r.push(0);return r.concat(e)}function multiplyKaratsuba(e,a){var r=Math.max(e.length,a.length);if(r<=30)return multiplyLong(e,a);r=Math.ceil(r/2);var i=e.slice(r),n=e.slice(0,r),p=a.slice(r),o=a.slice(0,r);var d=multiplyKaratsuba(n,o),s=multiplyKaratsuba(i,p),l=multiplyKaratsuba(addAny(n,i),addAny(o,p));var u=addAny(addAny(d,shiftLeft(subtract(subtract(l,d),s),r)),shiftLeft(s,2*r));trim(u);return u}function useKaratsuba(e,a){return-.012*e-.012*a+15e-6*e*a>0}BigInteger.prototype.multiply=function(e){var r=parseValue(e),i=this.value,n=r.value,p=this.sign!==r.sign,o;if(r.isSmall){if(n===0)return Integer[0];if(n===1)return this;if(n===-1)return this.negate();o=Math.abs(n);if(o=0;c--){m=p-1;if(l[c+n]!==d){m=Math.floor((l[c+n]*p+l[c+n-1])/d)}h=0;v=0;y=u.length;for(g=0;gn){u=(u+1)*d}s=Math.ceil(u/m);do{c=multiplySmall(r,s);if(compareAbs(c,o)<=0)break;s--}while(s);p.push(s);o=subtract(o,c)}p.reverse();return[arrayToSmall(p),arrayToSmall(o)]}function divModSmall(e,r){var i=e.length,n=createArray(i),p=a,o,d,s,l;s=0;for(o=i-1;o>=0;--o){l=s*p+e[o];d=truncate(l/r);s=l-d*r;n[o]=d|0}return[n,s|0]}function divModAny(e,r){var i,n=parseValue(r);if(d){return[new NativeBigInt(e.value/n.value),new NativeBigInt(e.value%n.value)]}var p=e.value,o=n.value;var s;if(o===0)throw new Error("Cannot divide by zero");if(e.isSmall){if(n.isSmall){return[new SmallInteger(truncate(p/o)),new SmallInteger(p%o)]}return[Integer[0],e]}if(n.isSmall){if(o===1)return[e,Integer[0]];if(o==-1)return[e.negate(),Integer[0]];var l=Math.abs(o);if(la.length?1:-1}for(var r=e.length-1;r>=0;r--){if(e[r]!==a[r])return e[r]>a[r]?1:-1}return 0}BigInteger.prototype.compareAbs=function(e){var a=parseValue(e),r=this.value,i=a.value;if(a.isSmall)return 1;return compareAbs(r,i)};SmallInteger.prototype.compareAbs=function(e){var a=parseValue(e),r=Math.abs(this.value),i=a.value;if(a.isSmall){i=Math.abs(i);return r===i?0:r>i?1:-1}return-1};NativeBigInt.prototype.compareAbs=function(e){var a=this.value;var r=parseValue(e).value;a=a>=0?a:-a;r=r>=0?r:-r;return a===r?0:a>r?1:-1};BigInteger.prototype.compare=function(e){if(e===Infinity){return-1}if(e===-Infinity){return 1}var a=parseValue(e),r=this.value,i=a.value;if(this.sign!==a.sign){return a.sign?1:-1}if(a.isSmall){return this.sign?-1:1}return compareAbs(r,i)*(this.sign?-1:1)};BigInteger.prototype.compareTo=BigInteger.prototype.compare;SmallInteger.prototype.compare=function(e){if(e===Infinity){return-1}if(e===-Infinity){return 1}var a=parseValue(e),r=this.value,i=a.value;if(a.isSmall){return r==i?0:r>i?1:-1}if(r<0!==a.sign){return r<0?-1:1}return r<0?1:-1};SmallInteger.prototype.compareTo=SmallInteger.prototype.compare;NativeBigInt.prototype.compare=function(e){if(e===Infinity){return-1}if(e===-Infinity){return 1}var a=this.value;var r=parseValue(e).value;return a===r?0:a>r?1:-1};NativeBigInt.prototype.compareTo=NativeBigInt.prototype.compare;BigInteger.prototype.equals=function(e){return this.compare(e)===0};NativeBigInt.prototype.eq=NativeBigInt.prototype.equals=SmallInteger.prototype.eq=SmallInteger.prototype.equals=BigInteger.prototype.eq=BigInteger.prototype.equals;BigInteger.prototype.notEquals=function(e){return this.compare(e)!==0};NativeBigInt.prototype.neq=NativeBigInt.prototype.notEquals=SmallInteger.prototype.neq=SmallInteger.prototype.notEquals=BigInteger.prototype.neq=BigInteger.prototype.notEquals;BigInteger.prototype.greater=function(e){return this.compare(e)>0};NativeBigInt.prototype.gt=NativeBigInt.prototype.greater=SmallInteger.prototype.gt=SmallInteger.prototype.greater=BigInteger.prototype.gt=BigInteger.prototype.greater;BigInteger.prototype.lesser=function(e){return this.compare(e)<0};NativeBigInt.prototype.lt=NativeBigInt.prototype.lesser=SmallInteger.prototype.lt=SmallInteger.prototype.lesser=BigInteger.prototype.lt=BigInteger.prototype.lesser;BigInteger.prototype.greaterOrEquals=function(e){return this.compare(e)>=0};NativeBigInt.prototype.geq=NativeBigInt.prototype.greaterOrEquals=SmallInteger.prototype.geq=SmallInteger.prototype.greaterOrEquals=BigInteger.prototype.geq=BigInteger.prototype.greaterOrEquals;BigInteger.prototype.lesserOrEquals=function(e){return this.compare(e)<=0};NativeBigInt.prototype.leq=NativeBigInt.prototype.lesserOrEquals=SmallInteger.prototype.leq=SmallInteger.prototype.lesserOrEquals=BigInteger.prototype.leq=BigInteger.prototype.lesserOrEquals;BigInteger.prototype.isEven=function(){return(this.value[0]&1)===0};SmallInteger.prototype.isEven=function(){return(this.value&1)===0};NativeBigInt.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)};BigInteger.prototype.isOdd=function(){return(this.value[0]&1)===1};SmallInteger.prototype.isOdd=function(){return(this.value&1)===1};NativeBigInt.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)};BigInteger.prototype.isPositive=function(){return!this.sign};SmallInteger.prototype.isPositive=function(){return this.value>0};NativeBigInt.prototype.isPositive=SmallInteger.prototype.isPositive;BigInteger.prototype.isNegative=function(){return this.sign};SmallInteger.prototype.isNegative=function(){return this.value<0};NativeBigInt.prototype.isNegative=SmallInteger.prototype.isNegative;BigInteger.prototype.isUnit=function(){return false};SmallInteger.prototype.isUnit=function(){return Math.abs(this.value)===1};NativeBigInt.prototype.isUnit=function(){return this.abs().value===BigInt(1)};BigInteger.prototype.isZero=function(){return false};SmallInteger.prototype.isZero=function(){return this.value===0};NativeBigInt.prototype.isZero=function(){return this.value===BigInt(0)};BigInteger.prototype.isDivisibleBy=function(e){var a=parseValue(e);if(a.isZero())return false;if(a.isUnit())return true;if(a.compareAbs(2)===0)return this.isEven();return this.mod(a).isZero()};NativeBigInt.prototype.isDivisibleBy=SmallInteger.prototype.isDivisibleBy=BigInteger.prototype.isDivisibleBy;function isBasicPrime(e){var a=e.abs();if(a.isUnit())return false;if(a.equals(2)||a.equals(3)||a.equals(5))return true;if(a.isEven()||a.isDivisibleBy(3)||a.isDivisibleBy(5))return false;if(a.lesser(49))return true}function millerRabinTest(e,a){var r=e.prev(),n=r,p=0,o,d,s,l;while(n.isEven())n=n.divide(2),p++;e:for(s=0;s-n)return new SmallInteger(e-1);return new BigInteger(p,true)};NativeBigInt.prototype.prev=function(){return new NativeBigInt(this.value-BigInt(1))};var s=[1];while(2*s[s.length-1]<=a)s.push(2*s[s.length-1]);var l=s.length,u=s[l-1];function shift_isSmall(e){return Math.abs(e)<=a}BigInteger.prototype.shiftLeft=function(e){var a=parseValue(e).toJSNumber();if(!shift_isSmall(a)){throw new Error(String(a)+" is too large for shifting.")}if(a<0)return this.shiftRight(-a);var r=this;if(r.isZero())return r;while(a>=l){r=r.multiply(u);a-=l-1}return r.multiply(s[a])};NativeBigInt.prototype.shiftLeft=SmallInteger.prototype.shiftLeft=BigInteger.prototype.shiftLeft;BigInteger.prototype.shiftRight=function(e){var a;var r=parseValue(e).toJSNumber();if(!shift_isSmall(r)){throw new Error(String(r)+" is too large for shifting.")}if(r<0)return this.shiftLeft(-r);var i=this;while(r>=l){if(i.isZero()||i.isNegative()&&i.isUnit())return i;a=divModAny(i,u);i=a[1].isNegative()?a[0].prev():a[0];r-=l-1}a=divModAny(i,s[r]);return a[1].isNegative()?a[0].prev():a[0]};NativeBigInt.prototype.shiftRight=SmallInteger.prototype.shiftRight=BigInteger.prototype.shiftRight;function bitwise(e,a,r){a=parseValue(a);var n=e.isNegative(),p=a.isNegative();var o=n?e.not():e,d=p?a.not():a;var s=0,l=0;var m=null,c=null;var h=[];while(!o.isZero()||!d.isZero()){m=divModAny(o,u);s=m[1].toJSNumber();if(n){s=u-1-s}c=divModAny(d,u);l=c[1].toJSNumber();if(p){l=u-1-l}o=m[0];d=c[0];h.push(r(s,l))}var v=r(n?1:0,p?1:0)!==0?i(-1):i(0);for(var g=h.length-1;g>=0;g-=1){v=v.multiply(u).add(i(h[g]))}return v}BigInteger.prototype.not=function(){return this.negate().prev()};NativeBigInt.prototype.not=SmallInteger.prototype.not=BigInteger.prototype.not;BigInteger.prototype.and=function(e){return bitwise(this,e,(function(e,a){return e&a}))};NativeBigInt.prototype.and=SmallInteger.prototype.and=BigInteger.prototype.and;BigInteger.prototype.or=function(e){return bitwise(this,e,(function(e,a){return e|a}))};NativeBigInt.prototype.or=SmallInteger.prototype.or=BigInteger.prototype.or;BigInteger.prototype.xor=function(e){return bitwise(this,e,(function(e,a){return e^a}))};NativeBigInt.prototype.xor=SmallInteger.prototype.xor=BigInteger.prototype.xor;var m=1<<30,c=(a&-a)*(a&-a)|m;function roughLOB(e){var r=e.value,i=typeof r==="number"?r|m:typeof r==="bigint"?r|BigInt(m):r[0]+r[1]*a|c;return i&-i}function integerLogarithm(e,a){if(a.compareTo(e)<=0){var r=integerLogarithm(e,a.square(a));var n=r.p;var p=r.e;var o=n.multiply(a);return o.compareTo(e)<=0?{p:o,e:p*2+1}:{p:n,e:p*2}}return{p:i(1),e:0}}BigInteger.prototype.bitLength=function(){var e=this;if(e.compareTo(i(0))<0){e=e.negate().subtract(i(1))}if(e.compareTo(i(0))===0){return i(0)}return i(integerLogarithm(e,i(2)).e).add(i(1))};NativeBigInt.prototype.bitLength=SmallInteger.prototype.bitLength=BigInteger.prototype.bitLength;function max(e,a){e=parseValue(e);a=parseValue(a);return e.greater(a)?e:a}function min(e,a){e=parseValue(e);a=parseValue(a);return e.lesser(a)?e:a}function gcd(e,a){e=parseValue(e).abs();a=parseValue(a).abs();if(e.equals(a))return e;if(e.isZero())return a;if(a.isZero())return e;var r=Integer[1],i,n;while(e.isEven()&&a.isEven()){i=min(roughLOB(e),roughLOB(a));e=e.divide(i);a=a.divide(i);r=r.multiply(i)}while(e.isEven()){e=e.divide(roughLOB(e))}do{while(a.isEven()){a=a.divide(roughLOB(a))}if(e.greater(a)){n=a;a=e;e=n}a=a.subtract(e)}while(!a.isZero());return r.isUnit()?e:e.multiply(r)}function lcm(e,a){e=parseValue(e).abs();a=parseValue(a).abs();return e.divide(gcd(e,a)).multiply(a)}function randBetween(e,r,i){e=parseValue(e);r=parseValue(r);var n=i||Math.random;var p=min(e,r),o=max(e,r);var d=o.subtract(p).add(1);if(d.isSmall)return p.add(Math.floor(n()*d));var s=toBase(d,a).value;var l=[],u=true;for(var m=0;m=d){if(l==="1"&&d===1)continue;throw new Error(l+" is not a valid digit in base "+a+".")}}}a=parseValue(a);var u=[];var m=e[0]==="-";for(p=m?1:0;p"&&p=0;p--){i=i.add(e[p].times(n));n=n.times(a)}return r?i.negate():i}function stringify(e,a){a=a||o;if(e"}function toBase(e,a){a=i(a);if(a.isZero()){if(e.isZero())return{value:[0],isNegative:false};throw new Error("Cannot convert nonzero numbers to base 0.")}if(a.equals(-1)){if(e.isZero())return{value:[0],isNegative:false};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:false};var r=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);r.unshift([1]);return{value:[].concat.apply([],r),isNegative:false}}var n=false;if(e.isNegative()&&a.isPositive()){n=true;e=e.abs()}if(a.isUnit()){if(e.isZero())return{value:[0],isNegative:false};return{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:n}}var p=[];var o=e,d;while(o.isNegative()||o.compareAbs(a)>=0){d=o.divmod(a);o=d.quotient;var s=d.remainder;if(s.isNegative()){s=a.minus(s).abs();o=o.next()}p.push(s.toJSNumber())}p.push(o.toJSNumber());return{value:p.reverse(),isNegative:n}}function toBaseString(e,a,r){var i=toBase(e,a);return(i.isNegative?"-":"")+i.value.map((function(e){return stringify(e,r)})).join("")}BigInteger.prototype.toArray=function(e){return toBase(this,e)};SmallInteger.prototype.toArray=function(e){return toBase(this,e)};NativeBigInt.prototype.toArray=function(e){return toBase(this,e)};BigInteger.prototype.toString=function(a,r){if(a===e)a=10;if(a!==10)return toBaseString(this,a,r);var i=this.value,n=i.length,p=String(i[--n]),o="0000000",d;while(--n>=0){d=String(i[n]);p+=o.slice(d.length)+d}var s=this.sign?"-":"";return s+p};SmallInteger.prototype.toString=function(a,r){if(a===e)a=10;if(a!=10)return toBaseString(this,a,r);return String(this.value)};NativeBigInt.prototype.toString=SmallInteger.prototype.toString;NativeBigInt.prototype.toJSON=BigInteger.prototype.toJSON=SmallInteger.prototype.toJSON=function(){return this.toString()};BigInteger.prototype.valueOf=function(){return parseInt(this.toString(),10)};BigInteger.prototype.toJSNumber=BigInteger.prototype.valueOf;SmallInteger.prototype.valueOf=function(){return this.value};SmallInteger.prototype.toJSNumber=SmallInteger.prototype.valueOf;NativeBigInt.prototype.valueOf=NativeBigInt.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function parseStringValue(e){if(isPrecise(+e)){var a=+e;if(a===truncate(a))return d?new NativeBigInt(BigInt(a)):new SmallInteger(a);throw new Error("Invalid integer: "+e)}var i=e[0]==="-";if(i)e=e.slice(1);var n=e.split(/e/i);if(n.length>2)throw new Error("Invalid integer: "+n.join("e"));if(n.length===2){var p=n[1];if(p[0]==="+")p=p.slice(1);p=+p;if(p!==truncate(p)||!isPrecise(p))throw new Error("Invalid integer: "+p+" is not a valid exponent.");var o=n[0];var s=o.indexOf(".");if(s>=0){p-=o.length-s-1;o=o.slice(0,s)+o.slice(s+1)}if(p<0)throw new Error("Cannot include negative exponent part for integers");o+=new Array(p+1).join("0");e=o}var l=/^([0-9][0-9]*)$/.test(e);if(!l)throw new Error("Invalid integer: "+e);if(d){return new NativeBigInt(BigInt(i?"-"+e:e))}var u=[],m=e.length,c=r,h=m-c;while(m>0){u.push(+e.slice(h,m));h-=c;if(h<0)h=0;m-=c}trim(u);return new BigInteger(u,i)}function parseNumberValue(e){if(d){return new NativeBigInt(BigInt(e))}if(isPrecise(e)){if(e!==truncate(e))throw new Error(e+" is not an integer.");return new SmallInteger(e)}return parseStringValue(e.toString())}function parseValue(e){if(typeof e==="number"){return parseNumberValue(e)}if(typeof e==="string"){return parseStringValue(e)}if(typeof e==="bigint"){return new NativeBigInt(e)}return e}for(var h=0;h<1e3;h++){Integer[h]=parseValue(h);if(h>0)Integer[-h]=parseValue(-h)}Integer.one=Integer[1];Integer.zero=Integer[0];Integer.minusOne=Integer[-1];Integer.max=max;Integer.min=min;Integer.gcd=gcd;Integer.lcm=lcm;Integer.isInstance=function(e){return e instanceof BigInteger||e instanceof SmallInteger||e instanceof NativeBigInt};Integer.randBetween=randBetween;Integer.fromArray=function(e,a,r){return parseBaseFromArray(e.map(parseValue),parseValue(a||10),r)};return Integer}();if(true&&e.hasOwnProperty("exports")){e.exports=i}if(typeof define==="function"&&define.amd){define((function(){return i}))}},4067:(e,a,r)=>{"use strict";var i=r(8168);var n=false;function Real(e){this.value=e}e.exports=function(e){var a=new i.WritableStreamBuffer;a.write(new Buffer("bplist00"));if(n){console.log("create",r(1669).inspect(e,false,10))}if(e instanceof Array&&e.length===1){e=e[0]}var p=toEntries(e);if(n){console.log("entries",p)}var o=computeIdSizeInBytes(p.length);var d=[];var s;var l;updateEntryIds();p.forEach((function(e,r){d[r]=a.size();if(!e){a.write(0)}else{write(e)}}));writeOffsetTable();writeTrailer();return a.getContents();function updateEntryIds(){var e={};var a=0;p.forEach((function(r){if(r.id){return}if(r.type==="string"){if(!r.bplistOverride&&e.hasOwnProperty(r.value)){r.type="stringref";r.id=e[r.value]}else{e[r.value]=r.id=a++}}else{r.id=a++}}));p=p.filter((function(e){return e.type!=="stringref"}))}function writeTrailer(){if(n){console.log("0x"+a.size().toString(16),"writeTrailer")}a.write(new Buffer([0,0,0,0,0,0]));if(n){console.log("0x"+a.size().toString(16),"writeTrailer(offsetSizeInBytes):",s)}writeByte(s);if(n){console.log("0x"+a.size().toString(16),"writeTrailer(offsetSizeInBytes):",o)}writeByte(o);if(n){console.log("0x"+a.size().toString(16),"writeTrailer(number of objects):",p.length)}writeLong(p.length);if(n){console.log("0x"+a.size().toString(16),"writeTrailer(top object)")}writeLong(0);if(n){console.log("0x"+a.size().toString(16),"writeTrailer(offset table offset):",l)}writeLong(l)}function writeOffsetTable(){if(n){console.log("0x"+a.size().toString(16),"writeOffsetTable")}l=a.size();s=computeOffsetSizeInBytes(l);d.forEach((function(e){writeBytes(e,s)}))}function write(e){switch(e.type){case"dict":writeDict(e);break;case"number":case"double":writeNumber(e);break;case"UID":writeUID(e);break;case"array":writeArray(e);break;case"boolean":writeBoolean(e);break;case"string":case"string-utf16":writeString(e);break;case"date":writeDate(e);break;case"data":writeData(e);break;default:throw new Error("unhandled entry type: "+e.type)}}function writeDate(e){writeByte(51);var a=Date.parse(e.value)/1e3-978307200;writeDouble(a)}function writeDict(e){if(n){var r=e.entryKeys.map((function(e){return e.id}));var i=e.entryValues.map((function(e){return e.id}));console.log("0x"+a.size().toString(16),"writeDict","(id: "+e.id+")","(keys: "+r+")","(values: "+i+")")}writeIntHeader(13,e.entryKeys.length);e.entryKeys.forEach((function(e){writeID(e.id)}));e.entryValues.forEach((function(e){writeID(e.id)}))}function writeNumber(e){if(n){console.log("0x"+a.size().toString(16),"writeNumber",e.value," (type: "+e.type+")","(id: "+e.id+")")}if(e.type!=="double"&&parseFloat(e.value.toFixed())==e.value){if(e.value<0){writeByte(19);writeBytes(e.value,8,true)}else if(e.value<=255){writeByte(16);writeBytes(e.value,1)}else if(e.value<=65535){writeByte(17);writeBytes(e.value,2)}else if(e.value<=4294967295){writeByte(18);writeBytes(e.value,4)}else{writeByte(20);writeBytes(e.value,8)}}else{writeByte(35);writeDouble(e.value)}}function writeUID(e){if(n){console.log("0x"+a.size().toString(16),"writeUID",e.value," (type: "+e.type+")","(id: "+e.id+")")}writeIntHeader(8,0);writeID(e.value)}function writeArray(e){if(n){console.log("0x"+a.size().toString(16),"writeArray (length: "+e.entries.length+")","(id: "+e.id+")")}writeIntHeader(10,e.entries.length);e.entries.forEach((function(e){writeID(e.id)}))}function writeBoolean(e){if(n){console.log("0x"+a.size().toString(16),"writeBoolean",e.value,"(id: "+e.id+")")}writeByte(e.value?9:8)}function writeString(e){if(n){console.log("0x"+a.size().toString(16),"writeString",e.value,"(id: "+e.id+")")}if(e.type==="string-utf16"||mustBeUtf16(e.value)){var r=new Buffer(e.value,"ucs2");writeIntHeader(6,r.length/2);for(var i=0;i4){n[p++]=0;r--}}for(var o=r-1;o>=0;o--){n[p++]=e>>8*o}a.write(n)}function mustBeUtf16(e){return Buffer.byteLength(e,"utf8")!=e.length}};function toEntries(e){if(e.bplistOverride){return[e]}if(e instanceof Array){return toEntriesArray(e)}else if(e instanceof Buffer){return[{type:"data",value:e}]}else if(e instanceof Real){return[{type:"double",value:e.value}]}else if(typeof e==="object"){if(e instanceof Date){return[{type:"date",value:e}]}else if(Object.keys(e).length==1&&typeof e.UID==="number"){return[{type:"UID",value:e.UID}]}else{return toEntriesObject(e)}}else if(typeof e==="string"){return[{type:"string",value:e}]}else if(typeof e==="number"){return[{type:"number",value:e}]}else if(typeof e==="boolean"){return[{type:"boolean",value:e}]}else if(typeof e==="bigint"){return[{type:"number",value:Number(BigInt.asIntN(32,e))}]}else{throw new Error("unhandled entry: "+e)}}function toEntriesArray(e){if(n){console.log("toEntriesArray")}var a=[{type:"array",entries:[]}];e.forEach((function(e){var r=toEntries(e);a[0].entries.push(r[0]);a=a.concat(r)}));return a}function toEntriesObject(e){if(n){console.log("toEntriesObject")}var a=[{type:"dict",entryKeys:[],entryValues:[]}];Object.keys(e).forEach((function(e){var r=toEntries(e);a[0].entryKeys.push(r[0]);a=a.concat(r[0])}));Object.keys(e).forEach((function(r){var i=toEntries(e[r]);a[0].entryValues.push(i[0]);a=a.concat(i)}));return a}function computeOffsetSizeInBytes(e){if(e<256){return 1}if(e<65536){return 2}if(e<4294967296){return 4}return 8}function computeIdSizeInBytes(e){if(e<256){return 1}if(e<65536){return 2}return 4}e.exports.Real=Real},8905:(e,a,r)=>{"use strict";const i=r(5747);const n=r(1575);const p=false;a.maxObjectSize=100*1e3*1e3;a.maxObjectCount=32768;const o=9783072e5;const d=a.UID=function(e){this.UID=e};const s=a.parseFile=function(e,a){return new Promise((function(r,n){function tryParseBuffer(e){let i=null;let p;try{p=l(e);r(p)}catch(e){i=e;n(i)}finally{if(a)a(i,p)}}if(Buffer.isBuffer(e)){return tryParseBuffer(e)}i.readFile(e,(function(e,r){if(e){n(e);return a(e)}tryParseBuffer(r)}))}))};const l=a.parseBuffer=function(e){const r=e.slice(0,"bplist".length).toString("utf8");if(r!=="bplist"){throw new Error("Invalid binary plist. Expected 'bplist' at offset 0.")}const i=e.slice(e.length-32,e.length);const s=i.readUInt8(6);if(p){console.log("offsetSize: "+s)}const l=i.readUInt8(7);if(p){console.log("objectRefSize: "+l)}const u=readUInt64BE(i,8);if(p){console.log("numObjects: "+u)}const m=readUInt64BE(i,16);if(p){console.log("topObject: "+m)}const c=readUInt64BE(i,24);if(p){console.log("offsetTableOffset: "+c)}if(u>a.maxObjectCount){throw new Error("maxObjectCount exceeded")}const h=[];for(let a=0;a>4;const m=s&15;switch(u){case 0:return parseSimple();case 1:return parseInteger();case 8:return parseUID();case 2:return parseReal();case 3:return parseDate();case 4:return parseData();case 5:return parsePlistString();case 6:return parsePlistString(true);case 10:return parseArray();case 13:return parseDictionary();default:throw new Error("Unhandled type 0x"+u.toString(16))}function parseSimple(){switch(m){case 0:return null;case 8:return false;case 9:return true;case 15:return null;default:throw new Error("Unhandled simple type 0x"+u.toString(16))}}function bufferToHexString(e){let a="";let r;for(r=0;ra.maxObjectSize){throw new Error("To little heap space available!")}const p=[];for(let a=0;aa.maxObjectSize){throw new Error("To little heap space available!")}if(p){console.log("Parsing dictionary #"+r)}const d={};for(let a=0;a{var i=r(6891);var n=r(9417);e.exports=expandTop;var p="\0SLASH"+Math.random()+"\0";var o="\0OPEN"+Math.random()+"\0";var d="\0CLOSE"+Math.random()+"\0";var s="\0COMMA"+Math.random()+"\0";var l="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(p).split("\\{").join(o).split("\\}").join(d).split("\\,").join(s).split("\\.").join(l)}function unescapeBraces(e){return e.split(p).join("\\").split(o).join("{").split(d).join("}").split(s).join(",").split(l).join(".")}function parseCommaParts(e){if(!e)return[""];var a=[];var r=n("{","}",e);if(!r)return e.split(",");var i=r.pre;var p=r.body;var o=r.post;var d=i.split(",");d[d.length-1]+="{"+p+"}";var s=parseCommaParts(o);if(o.length){d[d.length-1]+=s.shift();d.push.apply(d,s)}a.push.apply(a,d);return a}function expandTop(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return expand(escapeBraces(e),true).map(unescapeBraces)}function identity(e){return e}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,a){return e<=a}function gte(e,a){return e>=a}function expand(e,a){var r=[];var p=n("{","}",e);if(!p||/\$$/.test(p.pre))return[e];var o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(p.body);var s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(p.body);var l=o||s;var u=p.body.indexOf(",")>=0;if(!l&&!u){if(p.post.match(/,.*\}/)){e=p.pre+"{"+p.body+d+p.post;return expand(e)}return[e]}var m;if(l){m=p.body.split(/\.\./)}else{m=parseCommaParts(p.body);if(m.length===1){m=expand(m[0],false).map(embrace);if(m.length===1){var c=p.post.length?expand(p.post,false):[""];return c.map((function(e){return p.pre+m[0]+e}))}}}var h=p.pre;var c=p.post.length?expand(p.post,false):[""];var v;if(l){var g=numeric(m[0]);var y=numeric(m[1]);var w=Math.max(m[0].length,m[1].length);var b=m.length==3?Math.abs(numeric(m[2])):1;var S=lte;var _=y0){var I=new Array(C+1).join("0");if(E<0)D="-"+I+D.slice(1);else D=I+D}}}v.push(D)}}else{v=i(m,(function(e){return expand(e,false)}))}for(var T=0;T{var i=r(4293).Buffer;var n=[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];if(typeof Int32Array!=="undefined"){n=new Int32Array(n)}function ensureBuffer(e){if(i.isBuffer(e)){return e}var a=typeof i.alloc==="function"&&typeof i.from==="function";if(typeof e==="number"){return a?i.alloc(e):new i(e)}else if(typeof e==="string"){return a?i.from(e):new i(e)}else{throw new Error("input must be buffer, number, or string, received "+typeof e)}}function bufferizeInt(e){var a=ensureBuffer(4);a.writeInt32BE(e,0);return a}function _crc32(e,a){e=ensureBuffer(e);if(i.isBuffer(a)){a=a.readUInt32BE(0)}var r=~~a^-1;for(var p=0;p>>8}return r^-1}function crc32(){return bufferizeInt(_crc32.apply(null,arguments))}crc32.signed=function(){return _crc32.apply(null,arguments)};crc32.unsigned=function(){return _crc32.apply(null,arguments)>>>0};e.exports=crc32},421:e=>{var a={utf8:{stringToBytes:function(e){return a.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(a.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var a=[],r=0;r{e.exports=function(e,r){var i=[];for(var n=0;n{(function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,a){return e<>>32-a},rotr:function(e,a){return e<<32-a|e>>>a},endian:function(e){if(e.constructor==Number){return r.rotl(e,8)&16711935|r.rotl(e,24)&4278255360}for(var a=0;a0;e--)a.push(Math.floor(Math.random()*256));return a},bytesToWords:function(e){for(var a=[],r=0,i=0;r>>5]|=e[r]<<24-i%32;return a},wordsToBytes:function(e){for(var a=[],r=0;r>>5]>>>24-r%32&255);return a},bytesToHex:function(e){for(var a=[],r=0;r>>4).toString(16));a.push((e[r]&15).toString(16))}return a.join("")},hexToBytes:function(e){for(var a=[],r=0;r>>6*(3-p)&63));else r.push("=")}return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],i=0,n=0;i>>6-n*2)}return r}};e.exports=r})()},8222:(e,a,r)=>{a.formatArgs=formatArgs;a.save=save;a.load=load;a.useColors=useColors;a.storage=localstorage();a.destroy=(()=>{let e=false;return()=>{if(!e){e=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(a){a[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+a[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const r="color: "+this.color;a.splice(1,0,r,"color: inherit");let i=0;let n=0;a[0].replace(/%[a-zA-Z%]/g,(e=>{if(e==="%%"){return}i++;if(e==="%c"){n=i}}));a.splice(n,0,r)}a.log=console.debug||console.log||(()=>{});function save(e){try{if(e){a.storage.setItem("debug",e)}else{a.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=a.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=r(6243)(a);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},6243:(e,a,r)=>{function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=r(900);createDebug.destroy=destroy;Object.keys(e).forEach((a=>{createDebug[a]=e[a]}));createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let a=0;for(let r=0;r{if(a==="%%"){return"%"}p++;const n=createDebug.formatters[i];if(typeof n==="function"){const i=e[p];a=n.call(r,i);e.splice(p,1);p--}return a}));createDebug.formatArgs.call(r,e);const o=r.log||createDebug.log;o.apply(r,e)}debug.namespace=e;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(e);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(r!==null){return r}if(i!==createDebug.namespaces){i=createDebug.namespaces;n=createDebug.enabled(e)}return n},set:e=>{r=e}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(e,a){const r=createDebug(this.namespace+(typeof a==="undefined"?":":a)+e);r.log=this.log;return r}function enable(e){createDebug.save(e);createDebug.namespaces=e;createDebug.names=[];createDebug.skips=[];let a;const r=(typeof e==="string"?e:"").split(/[\s,]+/);const i=r.length;for(a=0;a"-"+e))].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let a;let r;for(a=0,r=createDebug.skips.length;a{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=r(8222)}else{e.exports=r(5332)}},5332:(e,a,r)=>{const i=r(3867);const n=r(1669);a.init=init;a.log=log;a.formatArgs=formatArgs;a.save=save;a.load=load;a.useColors=useColors;a.destroy=n.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");a.colors=[6,2,3,4,5,1];try{const e=r(9318);if(e&&(e.stderr||e).level>=2){a.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}a.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,a)=>{const r=a.substring(6).toLowerCase().replace(/_([a-z])/g,((e,a)=>a.toUpperCase()));let i=process.env[a];if(/^(yes|on|true|enabled)$/i.test(i)){i=true}else if(/^(no|off|false|disabled)$/i.test(i)){i=false}else if(i==="null"){i=null}else{i=Number(i)}e[r]=i;return e}),{});function useColors(){return"colors"in a.inspectOpts?Boolean(a.inspectOpts.colors):i.isatty(process.stderr.fd)}function formatArgs(a){const{namespace:r,useColors:i}=this;if(i){const i=this.color;const n="[3"+(i<8?i:"8;5;"+i);const p=` ${n};1m${r} `;a[0]=p+a[0].split("\n").join("\n"+p);a.push(n+"m+"+e.exports.humanize(this.diff)+"")}else{a[0]=getDate()+r+" "+a[0]}}function getDate(){if(a.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(n.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const r=Object.keys(a.inspectOpts);for(let i=0;ie.trim())).join(" ")};p.O=function(e){this.inspectOpts.colors=this.useColors;return n.inspect(e,this.inspectOpts)}},1349:(e,a,r)=>{var i=r(2357);var n=r(4223);var p=r(1669);var o=r(3539);var d=r(9414);function Helper(){this.file=new d;this.opts={window:{x:100,y:100}}}Helper.prototype.setBackgroundPath=function(e){this.opts.backgroundPath=e};Helper.prototype.setBackgroundColor=function(e,a,r){this.opts.backgroundColor=[e,a,r]};Helper.prototype.setIconSize=function(e){this.opts.iconSize=e};Helper.prototype.setIconPos=function(e,a,r){this.file.push(o.construct(e,"Iloc",{x:a,y:r}))};Helper.prototype.setWindowPos=function(e,a){this.opts.window.x=e;this.opts.window.y=a};Helper.prototype.setWindowSize=function(e,a){this.opts.window.width=e;this.opts.window.height=a+22};Helper.prototype.vSrn=function(e){i(e===0||e===1);this.file.push(o.construct(".","vSrn",{value:e}))};Helper.prototype.write=function(e,a){var r,i;if(this.opts.backgroundPath){r=n.create(this.opts.backgroundPath)}if(this.opts.backgroundColor){i=this.opts.backgroundColor}this.file.push(o.construct(".","bwsp",this.opts.window));this.file.push(o.construct(".","icvp",{iconSize:this.opts.iconSize,rawAlias:r,colorComponents:i}));this.file.write(e,a)};Helper.prototype.setBackground=p.deprecate(Helper.prototype.setBackgroundPath,"setBackground is deprecated, please use setBackgroundPath");e.exports=a=Helper},9414:(e,a,r)=>{var i=r(5747);var n=r(5622);var p=r(3539);function DSStore(){this.entries=[]}DSStore.prototype.push=function(e){this.entries.push(e)};DSStore.prototype.write=function(e,a){var n=this.entries.sort(p.sort);i.readFile(r.ab+"DSStore-clean",(function(r,p){if(r)return a(r);var o=new Buffer(3840);o.fill(0);var d=0;var s=0;var l=n.length;o.writeUInt32BE(s,d);o.writeUInt32BE(l,d+4);d+=8;n.forEach((function(e,a){var r=e.buffer;r.copy(o,d);d+=r.length}));p.writeUInt32BE(n.length,76);o.copy(p,4100);i.writeFile(e,p,(function(e){a(e)}))}))};e.exports=a=DSStore},3539:(e,a,r)=>{var i=r(8694);var n=r(4067);function utf16be(e){var a=new Buffer(e,"ucs2");for(var r=0;r{"use strict";e.exports=function encodeUtf8(e){var a=[];var r=e.length;for(var i=0;i=55296&&n<=56319&&r>i+1){var p=e.charCodeAt(i+1);if(p>=56320&&p<=57343){n=(n-55296)*1024+p-56320+65536;i+=1}}if(n<128){a.push(n);continue}if(n<2048){a.push(n>>6|192);a.push(n&63|128);continue}if(n<55296||n>=57344&&n<65536){a.push(n>>12|224);a.push(n>>6&63|128);a.push(n&63|128);continue}if(n>=65536&&n<=1114111){a.push(n>>18|240);a.push(n>>12&63|128);a.push(n>>6&63|128);a.push(n&63|128);continue}a.push(239,191,189)}return new Uint8Array(a).buffer}},1205:(e,a,r)=>{var i=r(1223);var noop=function(){};var isRequest=function(e){return e.setHeader&&typeof e.abort==="function"};var isChildProcess=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3};var eos=function(e,a,r){if(typeof a==="function")return eos(e,null,a);if(!a)a={};r=i(r||noop);var n=e._writableState;var p=e._readableState;var o=a.readable||a.readable!==false&&e.readable;var d=a.writable||a.writable!==false&&e.writable;var s=false;var onlegacyfinish=function(){if(!e.writable)onfinish()};var onfinish=function(){d=false;if(!o)r.call(e)};var onend=function(){o=false;if(!d)r.call(e)};var onexit=function(a){r.call(e,a?new Error("exited with error code: "+a):null)};var onerror=function(a){r.call(e,a)};var onclose=function(){process.nextTick(onclosenexttick)};var onclosenexttick=function(){if(s)return;if(o&&!(p&&(p.ended&&!p.destroyed)))return r.call(e,new Error("premature close"));if(d&&!(n&&(n.ended&&!n.destroyed)))return r.call(e,new Error("premature close"))};var onrequest=function(){e.req.on("finish",onfinish)};if(isRequest(e)){e.on("complete",onfinish);e.on("abort",onclose);if(e.req)onrequest();else e.on("request",onrequest)}else if(d&&!n){e.on("end",onlegacyfinish);e.on("close",onlegacyfinish)}if(isChildProcess(e))e.on("exit",onexit);e.on("end",onend);e.on("finish",onfinish);if(a.error!==false)e.on("error",onerror);e.on("close",onclose);return function(){s=true;e.removeListener("complete",onfinish);e.removeListener("abort",onclose);e.removeListener("request",onrequest);if(e.req)e.req.removeListener("finish",onfinish);e.removeListener("end",onlegacyfinish);e.removeListener("close",onlegacyfinish);e.removeListener("finish",onfinish);e.removeListener("exit",onexit);e.removeListener("end",onend);e.removeListener("error",onerror);e.removeListener("close",onclose)}};e.exports=eos},460:(e,a,r)=>{const i=r(8237)("extract-zip");const{createWriteStream:n,promises:p}=r(5747);const o=r(1766);const d=r(5622);const{promisify:s}=r(1669);const l=r(2413);const u=r(8781);const m=s(u.open);const c=s(l.pipeline);class Extractor{constructor(e,a){this.zipPath=e;this.opts=a}async extract(){i("opening",this.zipPath,"with opts",this.opts);this.zipfile=await m(this.zipPath,{lazyEntries:true});this.canceled=false;return new Promise(((e,a)=>{this.zipfile.on("error",(e=>{this.canceled=true;a(e)}));this.zipfile.readEntry();this.zipfile.on("close",(()=>{if(!this.canceled){i("zip extraction complete");e()}}));this.zipfile.on("entry",(async e=>{if(this.canceled){i("skipping entry",e.fileName,{cancelled:this.canceled});return}i("zipfile entry",e.fileName);if(e.fileName.startsWith("__MACOSX/")){this.zipfile.readEntry();return}const r=d.dirname(d.join(this.opts.dir,e.fileName));try{await p.mkdir(r,{recursive:true});const a=await p.realpath(r);const n=d.relative(this.opts.dir,a);if(n.split(d.sep).includes("..")){throw new Error(`Out of bound path "${a}" found while processing file ${e.fileName}`)}await this.extractEntry(e);i("finished processing",e.fileName);this.zipfile.readEntry()}catch(e){this.canceled=true;this.zipfile.close();a(e)}}))}))}async extractEntry(e){if(this.canceled){i("skipping entry extraction",e.fileName,{cancelled:this.canceled});return}if(this.opts.onEntry){this.opts.onEntry(e,this.zipfile)}const a=d.join(this.opts.dir,e.fileName);const r=e.externalFileAttributes>>16&65535;const l=61440;const u=16384;const m=40960;const h=(r&l)===m;let v=(r&l)===u;if(!v&&e.fileName.endsWith("/")){v=true}const g=e.versionMadeBy>>8;if(!v)v=g===0&&e.externalFileAttributes===16;i("extracting entry",{filename:e.fileName,isDir:v,isSymlink:h});const y=this.getExtractedMode(r,v)&511;const w=v?a:d.dirname(a);const b={recursive:true};if(v){b.mode=y}i("mkdir",{dir:w,...b});await p.mkdir(w,b);if(v)return;i("opening read stream",a);const S=await s(this.zipfile.openReadStream.bind(this.zipfile))(e);if(h){const e=await o(S);i("creating symlink",e,a);await p.symlink(e,a)}else{await c(S,n(a,{mode:y}))}}getExtractedMode(e,a){let r=e;if(r===0){if(a){if(this.opts.defaultDirMode){r=parseInt(this.opts.defaultDirMode,10)}if(!r){r=493}}else{if(this.opts.defaultFileMode){r=parseInt(this.opts.defaultFileMode,10)}if(!r){r=420}}}return r}}e.exports=async function(e,a){i("creating target directory",a.dir);if(!d.isAbsolute(a.dir)){throw new Error("Target directory is expected to be absolute")}await p.mkdir(a.dir,{recursive:true});a.dir=await p.realpath(a.dir);return new Extractor(e,a).extract()}},5010:(e,a,r)=>{var i=r(5747);var n=r(1669);var p=r(2413);var o=p.Readable;var d=p.Writable;var s=p.PassThrough;var l=r(4833);var u=r(8614).EventEmitter;a.createFromBuffer=createFromBuffer;a.createFromFd=createFromFd;a.BufferSlicer=BufferSlicer;a.FdSlicer=FdSlicer;n.inherits(FdSlicer,u);function FdSlicer(e,a){a=a||{};u.call(this);this.fd=e;this.pend=new l;this.pend.max=1;this.refCount=0;this.autoClose=!!a.autoClose}FdSlicer.prototype.read=function(e,a,r,n,p){var o=this;o.pend.go((function(d){i.read(o.fd,e,a,r,n,(function(e,a,r){d();p(e,a,r)}))}))};FdSlicer.prototype.write=function(e,a,r,n,p){var o=this;o.pend.go((function(d){i.write(o.fd,e,a,r,n,(function(e,a,r){d();p(e,a,r)}))}))};FdSlicer.prototype.createReadStream=function(e){return new ReadStream(this,e)};FdSlicer.prototype.createWriteStream=function(e){return new WriteStream(this,e)};FdSlicer.prototype.ref=function(){this.refCount+=1};FdSlicer.prototype.unref=function(){var e=this;e.refCount-=1;if(e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");if(e.autoClose){i.close(e.fd,onCloseDone)}function onCloseDone(a){if(a){e.emit("error",a)}else{e.emit("close")}}};n.inherits(ReadStream,o);function ReadStream(e,a){a=a||{};o.call(this,a);this.context=e;this.context.ref();this.start=a.start||0;this.endOffset=a.end;this.pos=this.start;this.destroyed=false}ReadStream.prototype._read=function(e){var a=this;if(a.destroyed)return;var r=Math.min(a._readableState.highWaterMark,e);if(a.endOffset!=null){r=Math.min(r,a.endOffset-a.pos)}if(r<=0){a.destroyed=true;a.push(null);a.context.unref();return}a.context.pend.go((function(e){if(a.destroyed)return e();var n=new Buffer(r);i.read(a.context.fd,n,0,r,a.pos,(function(r,i){if(r){a.destroy(r)}else if(i===0){a.destroyed=true;a.push(null);a.context.unref()}else{a.pos+=i;a.push(n.slice(0,i))}e()}))}))};ReadStream.prototype.destroy=function(e){if(this.destroyed)return;e=e||new Error("stream destroyed");this.destroyed=true;this.emit("error",e);this.context.unref()};n.inherits(WriteStream,d);function WriteStream(e,a){a=a||{};d.call(this,a);this.context=e;this.context.ref();this.start=a.start||0;this.endOffset=a.end==null?Infinity:+a.end;this.bytesWritten=0;this.pos=this.start;this.destroyed=false;this.on("finish",this.destroy.bind(this))}WriteStream.prototype._write=function(e,a,r){var n=this;if(n.destroyed)return;if(n.pos+e.length>n.endOffset){var p=new Error("maximum file length exceeded");p.code="ETOOBIG";n.destroy();r(p);return}n.context.pend.go((function(a){if(n.destroyed)return a();i.write(n.context.fd,e,0,e.length,n.pos,(function(e,i){if(e){n.destroy();a();r(e)}else{n.bytesWritten+=i;n.pos+=i;n.emit("progress");a();r()}}))}))};WriteStream.prototype.destroy=function(){if(this.destroyed)return;this.destroyed=true;this.context.unref()};n.inherits(BufferSlicer,u);function BufferSlicer(e,a){u.call(this);a=a||{};this.refCount=0;this.buffer=e;this.maxChunkSize=a.maxChunkSize||Number.MAX_SAFE_INTEGER}BufferSlicer.prototype.read=function(e,a,r,i,n){var p=i+r;var o=p-this.buffer.length;var d=o>0?o:r;this.buffer.copy(e,a,i,p);setImmediate((function(){n(null,d)}))};BufferSlicer.prototype.write=function(e,a,r,i,n){e.copy(this.buffer,i,a,a+r);setImmediate((function(){n(null,r,e)}))};BufferSlicer.prototype.createReadStream=function(e){e=e||{};var a=new s(e);a.destroyed=false;a.start=e.start||0;a.endOffset=e.end;a.pos=a.endOffset||this.buffer.length;var r=this.buffer.slice(a.start,a.pos);var i=0;while(true){var n=i+this.maxChunkSize;if(n>=r.length){if(ir.endOffset){var o=new Error("maximum file length exceeded");o.code="ETOOBIG";r.destroyed=true;n(o);return}e.copy(a.buffer,r.pos,0,e.length);r.bytesWritten+=e.length;r.pos=p;r.emit("progress");n()};r.destroy=function(){r.destroyed=true};return r};BufferSlicer.prototype.ref=function(){this.refCount+=1};BufferSlicer.prototype.unref=function(){this.refCount-=1;if(this.refCount<0){throw new Error("invalid unref")}};function createFromBuffer(e,a){return new BufferSlicer(e,a)}function createFromFd(e,a){return new FdSlicer(e,a)}},8062:(e,a,r)=>{var i=r(3070);e.exports=function fmix(e){e^=e>>>16;e=i(e,2246822507);e^=e>>>13;e=i(e,3266489909);e^=e>>>16;return e>>>0}},1371:(e,a,r)=>{var i=r(2851);var n=r(3515);function template(e){n.validateTemplate(e);return{open:i.open.bind(i,e),openSync:i.openSync.bind(i,e),mkdir:i.mkdir.bind(i,e),mkdirSync:i.mkdirSync.bind(i,e),writeFile:i.writeFile.bind(i,e),writeFileSync:i.writeFileSync.bind(i,e),createWriteStream:i.createWriteStream.bind(i,e)}}e.exports=template("%s");e.exports.template=template},6328:(e,a)=>{function sync(e){var a;var r=3;while(--r){try{a=e()}catch(e){if(e.code==="EEXIST")continue;throw e}return a}throw new Error("Failed to find unique name")}function async(e,a){var r=3;(function next(){e((function(e,i){if(!e)return a(null,i);if(e.code!=="EEXIST")return a(e);if(--r===0)return a(new Error("Failed to find unique name"));next()}))})()}a.sync=sync;a.async=async},2851:(e,a,r)=>{var i=r(5747);var n=r(2087);var p=r(3515);var o=r(6328);var d=r(7974);var s=n.tmpdir();function open(e,a,r,n){switch(a){case"w":a="wx";break;case"w+":a="wx+";break;default:throw new Error("Unknown file open flag: "+a)}if(typeof r==="function"){n=r;r=undefined}var d;o.async((function(n){d=p(s,e);i.open(d,a,r,n)}),(function(e,a){n(e,e?undefined:{fd:a,path:d})}))}function openSync(e,a,r){switch(a){case"w":a="wx";break;case"w+":a="wx+";break;default:throw new Error("Unknown file open flag: "+a)}var n;var d=o.sync((function(){n=p(s,e);return i.openSync(n,a,r)}));return{fd:d,path:n}}function mkdir(e,a,r){if(typeof a==="function"){r=a;a=undefined}var n;o.async((function(r){n=p(s,e);i.mkdir(n,a,r)}),(function(e){r(e,e?undefined:n)}))}function mkdirSync(e,a){var r;o.sync((function(){r=p(s,e);i.mkdirSync(r,a)}));return r}function writeFile(e,a,r,n){n=arguments[arguments.length-1];if(typeof r==="function"||!r){r={flag:"wx"}}else if(typeof r==="string"){r={encoding:r,flag:"wx"}}else if(typeof r==="object"){r.flag="wx"}else{throw new TypeError("Bad arguments")}var d;o.async((function(n){d=p(s,e);i.writeFile(d,a,r,n)}),(function(e){n(e,e?undefined:d)}))}function writeFileSync(e,a,r){if(!r){r={flag:"wx"}}else if(typeof r==="string"){r={encoding:r,flag:"wx"}}else if(typeof r==="object"){r.flag="wx"}else{throw new TypeError("Bad arguments")}var n;o.sync((function(){n=p(s,e);i.writeFileSync(n,a,r)}));return n}function createWriteStream(e,a){return new d(e,a)}a.open=open;a.openSync=openSync;a.mkdir=mkdir;a.mkdirSync=mkdirSync;a.writeFile=writeFile;a.writeFileSync=writeFileSync;a.createWriteStream=createWriteStream},7974:(e,a,r)=>{var i=r(2851);var n=r(5747).WriteStream;function TempWriteStream(e,a){this.template=e;n.call(this,null,a)}TempWriteStream.prototype=Object.create(n.prototype);TempWriteStream.prototype.open=function open(){i.open(this.template,this.flags,this.mode,function(e,a){if(e){this.destroy();this.emit("error",e);return}this.fd=a.fd;this.path=a.path;this.emit("path",a.path);this.emit("open",a.fd)}.bind(this))};e.exports=TempWriteStream},6863:(e,a,r)=>{e.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var i=r(5747);var n=i.realpath;var p=i.realpathSync;var o=process.version;var d=/^v[0-5]\./.test(o);var s=r(1734);function newError(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function realpath(e,a,r){if(d){return n(e,a,r)}if(typeof a==="function"){r=a;a=null}n(e,a,(function(i,n){if(newError(i)){s.realpath(e,a,r)}else{r(i,n)}}))}function realpathSync(e,a){if(d){return p(e,a)}try{return p(e,a)}catch(r){if(newError(r)){return s.realpathSync(e,a)}else{throw r}}}function monkeypatch(){i.realpath=realpath;i.realpathSync=realpathSync}function unmonkeypatch(){i.realpath=n;i.realpathSync=p}},1734:(e,a,r)=>{var i=r(5622);var n=process.platform==="win32";var p=r(5747);var o=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function rethrow(){var e;if(o){var a=new Error;e=debugCallback}else e=missingCallback;return e;function debugCallback(e){if(e){a.message=e.message;e=a;missingCallback(e)}}function missingCallback(e){if(e){if(process.throwDeprecation)throw e;else if(!process.noDeprecation){var a="fs: missing callback "+(e.stack||e.message);if(process.traceDeprecation)console.trace(a);else console.error(a)}}}}function maybeCallback(e){return typeof e==="function"?e:rethrow()}var d=i.normalize;if(n){var s=/(.*?)(?:[\/\\]+|$)/g}else{var s=/(.*?)(?:[\/]+|$)/g}if(n){var l=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/}else{var l=/^[\/]*/}a.realpathSync=function realpathSync(e,a){e=i.resolve(e);if(a&&Object.prototype.hasOwnProperty.call(a,e)){return a[e]}var r=e,o={},d={};var u;var m;var c;var h;start();function start(){var a=l.exec(e);u=a[0].length;m=a[0];c=a[0];h="";if(n&&!d[c]){p.lstatSync(c);d[c]=true}}while(u=e.length){if(a)a[o]=e;return r(null,e)}s.lastIndex=m;var i=s.exec(e);v=c;c+=i[0];h=v+i[1];m=s.lastIndex;if(u[h]||a&&a[h]===h){return process.nextTick(LOOP)}if(a&&Object.prototype.hasOwnProperty.call(a,h)){return gotResolvedLink(a[h])}return p.lstat(h,gotStat)}function gotStat(e,i){if(e)return r(e);if(!i.isSymbolicLink()){u[h]=true;if(a)a[h]=h;return process.nextTick(LOOP)}if(!n){var o=i.dev.toString(32)+":"+i.ino.toString(32);if(d.hasOwnProperty(o)){return gotTarget(null,d[o],h)}}p.stat(h,(function(e){if(e)return r(e);p.readlink(h,(function(e,a){if(!n)d[o]=a;gotTarget(e,a)}))}))}function gotTarget(e,n,p){if(e)return r(e);var o=i.resolve(v,n);if(a)a[p]=o;gotResolvedLink(o)}function gotResolvedLink(a){e=i.resolve(a,e.slice(m));start()}}},1585:(e,a,r)=>{"use strict";const{PassThrough:i}=r(2413);e.exports=e=>{e={...e};const{array:a}=e;let{encoding:r}=e;const n=r==="buffer";let p=false;if(a){p=!(r||n)}else{r=r||"utf8"}if(n){r=null}const o=new i({objectMode:p});if(r){o.setEncoding(r)}let d=0;const s=[];o.on("data",(e=>{s.push(e);if(p){d=s.length}else{d+=e.length}}));o.getBufferedValue=()=>{if(a){return s}return n?Buffer.concat(s,d):s.join("")};o.getBufferedLength=()=>d;return o}},1766:(e,a,r)=>{"use strict";const{constants:i}=r(4293);const n=r(8341);const p=r(1585);class MaxBufferError extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}}async function getStream(e,a){if(!e){return Promise.reject(new Error("Expected a stream"))}a={maxBuffer:Infinity,...a};const{maxBuffer:r}=a;let o;await new Promise(((d,s)=>{const rejectPromise=e=>{if(e&&o.getBufferedLength()<=i.MAX_LENGTH){e.bufferedData=o.getBufferedValue()}s(e)};o=n(e,p(a),(e=>{if(e){rejectPromise(e);return}d()}));o.on("data",(()=>{if(o.getBufferedLength()>r){rejectPromise(new MaxBufferError)}}))}));return o.getBufferedValue()}e.exports=getStream;e.exports.default=getStream;e.exports.buffer=(e,a)=>getStream(e,{...a,encoding:"buffer"});e.exports.array=(e,a)=>getStream(e,{...a,array:true});e.exports.MaxBufferError=MaxBufferError},7625:(e,a,r)=>{a.setopts=setopts;a.ownProp=ownProp;a.makeAbs=makeAbs;a.finish=finish;a.mark=mark;a.isIgnored=isIgnored;a.childrenIgnored=childrenIgnored;function ownProp(e,a){return Object.prototype.hasOwnProperty.call(e,a)}var i=r(5747);var n=r(5622);var p=r(3973);var o=r(8714);var d=p.Minimatch;function alphasort(e,a){return e.localeCompare(a,"en")}function setupIgnores(e,a){e.ignore=a.ignore||[];if(!Array.isArray(e.ignore))e.ignore=[e.ignore];if(e.ignore.length){e.ignore=e.ignore.map(ignoreMap)}}function ignoreMap(e){var a=null;if(e.slice(-3)==="/**"){var r=e.replace(/(\/\*\*)+$/,"");a=new d(r,{dot:true})}return{matcher:new d(e,{dot:true}),gmatcher:a}}function setopts(e,a,r){if(!r)r={};if(r.matchBase&&-1===a.indexOf("/")){if(r.noglobstar){throw new Error("base matching requires globstar")}a="**/"+a}e.silent=!!r.silent;e.pattern=a;e.strict=r.strict!==false;e.realpath=!!r.realpath;e.realpathCache=r.realpathCache||Object.create(null);e.follow=!!r.follow;e.dot=!!r.dot;e.mark=!!r.mark;e.nodir=!!r.nodir;if(e.nodir)e.mark=true;e.sync=!!r.sync;e.nounique=!!r.nounique;e.nonull=!!r.nonull;e.nosort=!!r.nosort;e.nocase=!!r.nocase;e.stat=!!r.stat;e.noprocess=!!r.noprocess;e.absolute=!!r.absolute;e.fs=r.fs||i;e.maxLength=r.maxLength||Infinity;e.cache=r.cache||Object.create(null);e.statCache=r.statCache||Object.create(null);e.symlinks=r.symlinks||Object.create(null);setupIgnores(e,r);e.changedCwd=false;var p=process.cwd();if(!ownProp(r,"cwd"))e.cwd=p;else{e.cwd=n.resolve(r.cwd);e.changedCwd=e.cwd!==p}e.root=r.root||n.resolve(e.cwd,"/");e.root=n.resolve(e.root);if(process.platform==="win32")e.root=e.root.replace(/\\/g,"/");e.cwdAbs=o(e.cwd)?e.cwd:makeAbs(e,e.cwd);if(process.platform==="win32")e.cwdAbs=e.cwdAbs.replace(/\\/g,"/");e.nomount=!!r.nomount;r.nonegate=true;r.nocomment=true;e.minimatch=new d(a,r);e.options=e.minimatch.options}function finish(e){var a=e.nounique;var r=a?[]:Object.create(null);for(var i=0,n=e.matches.length;i{e.exports=glob;var i=r(6863);var n=r(3973);var p=n.Minimatch;var o=r(4124);var d=r(8614).EventEmitter;var s=r(5622);var l=r(2357);var u=r(8714);var m=r(9010);var c=r(7625);var h=c.setopts;var v=c.ownProp;var g=r(2492);var y=r(1669);var w=c.childrenIgnored;var b=c.isIgnored;var S=r(1223);function glob(e,a,r){if(typeof a==="function")r=a,a={};if(!a)a={};if(a.sync){if(r)throw new TypeError("callback provided to sync glob");return m(e,a)}return new Glob(e,a,r)}glob.sync=m;var _=glob.GlobSync=m.GlobSync;glob.glob=glob;function extend(e,a){if(a===null||typeof a!=="object"){return e}var r=Object.keys(a);var i=r.length;while(i--){e[r[i]]=a[r[i]]}return e}glob.hasMagic=function(e,a){var r=extend({},a);r.noprocess=true;var i=new Glob(e,r);var n=i.minimatch.set;if(!e)return false;if(n.length>1)return true;for(var p=0;pthis.maxLength)return a();if(!this.stat&&v(this.cache,r)){var n=this.cache[r];if(Array.isArray(n))n="DIR";if(!i||n==="DIR")return a(null,n);if(i&&n==="FILE")return a()}var p;var o=this.statCache[r];if(o!==undefined){if(o===false)return a(null,o);else{var d=o.isDirectory()?"DIR":"FILE";if(i&&d==="FILE")return a();else return a(null,d,o)}}var s=this;var l=g("stat\0"+r,lstatcb_);if(l)s.fs.lstat(r,l);function lstatcb_(i,n){if(n&&n.isSymbolicLink()){return s.fs.stat(r,(function(i,p){if(i)s._stat2(e,r,null,n,a);else s._stat2(e,r,i,p,a)}))}else{s._stat2(e,r,i,n,a)}}};Glob.prototype._stat2=function(e,a,r,i,n){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[a]=false;return n()}var p=e.slice(-1)==="/";this.statCache[a]=i;if(a.slice(-1)==="/"&&i&&!i.isDirectory())return n(null,false,i);var o=true;if(i)o=i.isDirectory()?"DIR":"FILE";this.cache[a]=this.cache[a]||o;if(p&&o==="FILE")return n();return n(null,o,i)}},9010:(e,a,r)=>{e.exports=globSync;globSync.GlobSync=GlobSync;var i=r(6863);var n=r(3973);var p=n.Minimatch;var o=r(1957).Glob;var d=r(1669);var s=r(5622);var l=r(2357);var u=r(8714);var m=r(7625);var c=m.setopts;var h=m.ownProp;var v=m.childrenIgnored;var g=m.isIgnored;function globSync(e,a){if(typeof a==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(e,a).found}function GlobSync(e,a){if(!e)throw new Error("must provide pattern");if(typeof a==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(e,a);c(this,e,a);if(this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var i=0;ithis.maxLength)return false;if(!this.stat&&h(this.cache,a)){var i=this.cache[a];if(Array.isArray(i))i="DIR";if(!r||i==="DIR")return i;if(r&&i==="FILE")return false}var n;var p=this.statCache[a];if(!p){var o;try{o=this.fs.lstatSync(a)}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR")){this.statCache[a]=false;return false}}if(o&&o.isSymbolicLink()){try{p=this.fs.statSync(a)}catch(e){p=o}}else{p=o}}this.statCache[a]=p;var i=true;if(p)i=p.isDirectory()?"DIR":"FILE";this.cache[a]=this.cache[a]||i;if(r&&i==="FILE")return false;return i};GlobSync.prototype._mark=function(e){return m.mark(this,e)};GlobSync.prototype._makeAbs=function(e){return m.makeAbs(this,e)}},1621:e=>{"use strict";e.exports=(e,a=process.argv)=>{const r=e.startsWith("-")?"":e.length===1?"-":"--";const i=a.indexOf(r+e);const n=a.indexOf("--");return i!==-1&&(n===-1||i{"use strict";e.exports=Math.imul||function(e,a){var r=e>>>16&65535;var i=e&65535;var n=a>>>16&65535;var p=a&65535;return i*p+(r*p+i*n<<16>>>0)|0}},2492:(e,a,r)=>{var i=r(2940);var n=Object.create(null);var p=r(1223);e.exports=i(inflight);function inflight(e,a){if(n[e]){n[e].push(a);return null}else{n[e]=[a];return makeres(e)}}function makeres(e){return p((function RES(){var a=n[e];var r=a.length;var i=slice(arguments);try{for(var p=0;pr){a.splice(0,r);process.nextTick((function(){RES.apply(null,i)}))}else{delete n[e]}}}))}function slice(e){var a=e.length;var r=[];for(var i=0;i{try{var i=r(1669);if(typeof i.inherits!=="function")throw"";e.exports=i.inherits}catch(a){e.exports=r(8544)}},8544:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,a){if(a){e.super_=a;e.prototype=Object.create(a.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,a){if(a){e.super_=a;var TempCtor=function(){};TempCtor.prototype=a.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}}}},5625:e=>{ +(()=>{var __webpack_modules__={1990:(e,a,r)=>{const i=r(1184);const n=r(467);const p=r(5008);const o=r(1066);const d=`${workspaceDir}/mac/Audacity.entitlements`;async function signFile(e,a,r){r=r||[];return p.execWithLog("xcrun",["codesign","--verbose=3","--timestamp","--sign",a,"--options","runtime","--entitlements",d,"--force",...r,e])}async function fixupRPath(e){const a=(await p.getExecOutput("otool",["-L",e])).stdout;const r=a.split("\n").filter((e=>e.indexOf("@rpath")!=-1)).map((e=>e.match(/@rpath\/.+\.dylib/)[0]));if(r.length==0){return}const i=(await p.getExecOutput("otool",["-l",e])).stdout.split("\n").map((e=>e.trim())).filter((e=>e.search(/path\s+@(?:executable|loader)_path/)!=-1)).map((e=>e.match(/path\s+(@(?:executable|loader)_path.*)\s+\(/)[1])).map((e=>["-delete_rpath",e])).flat(Infinity);const n=r.map((e=>["-change",e,e.replace("@rpath","@executable_path/../Frameworks")])).flat(Infinity);p.log(`Fixing rpath for ${e}`);return p.execWithLog("install_name_tool",[...n,...i,e])}async function singApp(e,a){if(!a){p.log("Skipping code signings, as there is no codesign identity provided");return}const r=await o.getAudacityMacOSBundleFiles(e);exeFiles=r.MacOS;modules=r.modules;frameworks=r.Frameworks.dylib;binaries=[...exeFiles,...modules,...frameworks];for(const e of binaries){await fixupRPath(e)}for(const e of[...modules]){await signFile(e,a)}await signFile(e,a,["--deep"]);await p.execWithLog("codesign",["--verify","--deep","--verbose=4","--strict",e])}async function signDMG(e,a,r){if(!r){p.log("Skipping code signings, as there is no codesign identity provided");return}await p.execWithLog("xcrun",["codesign","--verbose","--timestamp","--identifier",a,"--sign",r,e])}async function notarizeDMG(e,a,r,i){if(!a||!a||!i){p.log("Skipping notarization, as there are no credentials provided");return}p.log(`Notarizing DMG: ${e}`);const n=await p.getExecOutput("xcrun",["notarytool","submit","--apple-id",a,"--team-id",i,"--password",r,"--output-format","json","--wait",e]);const o=JSON.parse(n.stdout);const d=await p.getExecOutput("xcrun",["notarytool","log","--apple-id",a,"--team-id",i,"--password",r,o["id"]]);p.log(d.stdout);if(o["status"]!="Accepted"){p.log(`Notarization failed: ${o["status"]}`)}await p.execWithLog("xcrun",["stapler","staple",e]);p.log(`Notarizing was successful: ${e}`)}e.exports={singApp:singApp,signDMG:signDMG,notarizeDMG:notarizeDMG}},4523:(e,a,r)=>{const i=r(2186);e.exports={Alpha:0,Beta:1,Release:2,getBuildLevel:()=>{const e=i.getInput("build_level");const a=e.length>0?e:process.env["AUDACITY_BUILD_LEVEL"];if(a==="beta"){return 1}else if(a==="release"){return 2}else{const e=Number(a);if(Number.isInteger(e)&&e>=0&&e<=2){return e}return 0}},getBuildSuffix:e=>{if(e==1){return"beta"}else if(e==2){return""}else{return"alpha"}}}},3202:(e,a,r)=>{const i=r(5747);const n=r(1371);const p=r(5622);const o=r(1349);const d=r(5008);const s=r(1066);const l=p.join(workspaceDir,"mac","Resources","Audacity-DMG-background.png");async function estimateBundleSize(e){let a=0;for(const r of e){a+=(await i.promises.lstat(r)).size}return a*1.5}async function createTempImage(e,a,r,o){const s=n.template("%s.dmg").writeFileSync("");d.log(s);o.push((async()=>{if(i.existsSync(s)){d.log(`Removing image ${s}`);await i.promises.rm(s)}}));await d.execWithLog("hdiutil",["create",s,"-ov","-format","UDRW","-fs","HFS+","-size",r,"-srcdir",p.dirname(e),"-volname",a]);return s}async function detachImage(e){const a=10;for(let r=1;r{if(i.existsSync(p)){d.log(`Detaching image ${e} mounted at ${p}`);await detachImage(p)}}));return p}async function copyFiles(e,a,r){a=p.dirname(a);const n=p.join(e,".background");const o=p.join(n,"bg.png");if(!i.existsSync(n)){i.mkdirSync(n)}await i.promises.copyFile(l,o)}async function createLinks(e){await i.promises.symlink("/Applications",p.join(e,"Applications"))}async function createDSStore(e,a){const r=new o;r.vSrn(1);r.setIconSize(72);r.setBackgroundPath(p.join(e,".background","bg.png"));r.setWindowPos(400,100);r.setWindowSize(600,450);r.setIconPos(a,170,350);r.setIconPos("Applications",430,350);await new Promise(((a,i)=>{r.write(p.join(e,".DS_Store"),(e=>{if(e){i(e)}else{a()}}))}))}async function convertDMG(e,a){if(i.existsSync(a)){i.rmSync(a)}await d.execWithLog("hdiutil",["convert",e,"-format","UDZO","-imagekey","zlib-level=9","-o",a])}async function packageDMG(e,a){finalizers=[];const r=p.basename(a,".app");try{const i=await s.listDirectory(a);const n=await estimateBundleSize([...i,l]);const o=await createTempImage(a,r,n,finalizers);const d=await attachImage(o,finalizers);await copyFiles(d,a,i);await createLinks(d);await createDSStore(d,p.basename(a));await detachImage(d);await convertDMG(o,e)}finally{Promise.all(finalizers.slice(0).reverse().map((async e=>e())))}}e.exports={packageDMG:packageDMG}},1066:(e,a,r)=>{const i=r(5747);const n=r(5622);const p=r(8090);helpers=r(5008);const getFilesFromDirectoryRecursive=async e=>{const a=await i.promises.readdir(e);const r=await Promise.all(a.map((async a=>{const r=n.join(e,a);const p=await i.promises.stat(r);if(p.isDirectory()){return getFilesFromDirectoryRecursive(r)}else{return r}})));return r.filter((e=>e.length))};async function globFiles(e){const a=await p.create(Array.isArray(e)?e.join("\n"):e);let r=[];for await(const e of a.globGenerator()){const a=await i.promises.lstat(e);if(a.isSymbolicLink()){continue}r.push(e)}return r}async function listMacosAppsRecursive(e,a){const r=await i.promises.readdir(e);await Promise.all(r.map((async r=>{const p=n.join(e,r);const o=await i.promises.stat(p);if(o.isDirectory()){if(n.extname(r)==".app"){a.push(p)}else{return listMacosAppsRecursive(p,a)}}})))}async function getAudacityMacOSBundleFiles(e){bundle={MacOS:[],Frameworks:{dylib:[]},modules:[],misc:[]};const a=(await getFilesFromDirectoryRecursive(e)).flat(Infinity);a.forEach((e=>{if(e.indexOf("Contents/MacOS")!=-1){bundle.MacOS.push(e)}else if(e.indexOf("Contents/Frameworks")!=-1){const a=i.statSync(e);if(a.isSymbolicLink()){bundle.misc.push(e)}else if(a.isFile()){bundle.Frameworks.dylib.push(e)}else{throw Error("Bundled frameworks are not supported")}}else if(e.indexOf("Contents/modules")!=-1){bundle.modules.push(e)}else{bundle.misc.push(e)}}));return bundle}async function copyFile(e,a){const r=n.dirname(a);if(!i.existsSync(r)){i.mkdirSync(r,{recursive:true})}return i.promises.copyFile(e,a)}async function copyFiles(e,a,r){return helpers.awaitAll(a,(async a=>{const i=n.relative(e,a);return copyFile(a,n.join(r,i))}))}async function listMacosApps(e){apps=[];await listMacosAppsRecursive(e,apps);return apps}e.exports={listDirectory:async e=>(await getFilesFromDirectoryRecursive(e)).flat(Infinity),globFiles:globFiles,listMacosApps:listMacosApps,getAudacityMacOSBundleFiles:getAudacityMacOSBundleFiles,copyFile:copyFile,copyFiles:copyFiles}},5008:(e,a,r)=>{const i=r(2186);const n=r(1514);const p=r(5622);const o=r(1711);const d=r(5747);const s=process.env["CI"];global.workspaceDir=process.env["GITHUB_WORKSPACE"];global.conanCachePath=p.join(workspaceDir,".conan");function log(e){if(s){i.info(e)}else{console.log(e)}}function error(e){if(s){i.error(e)}else{console.error(e)}}async function execWithLog(e,arguments){if(s){return n.exec(e,arguments)}else{return n.exec(e,arguments,{listeners:{stdout:e=>{log(e.toString())},stderr:e=>{error(e.toString())}}})}}async function getExecOutput(e,arguments){if(s){return n.getExecOutput(e,arguments)}else{return n.getExecOutput(e,arguments,{listeners:{stdout:e=>{log(e.toString())},stderr:e=>{error(e.toString())}}})}}async function awaitAll(e,a){return await Promise.all(e.map((async e=>a(e))))}async function getMD5(e){const a=await d.promises.readFile(e);return o(a)}function getDateString(){const e=new Date;return[e.getFullYear(),("0"+(e.getMonth()+1)).slice(-2),("0"+e.getDate()).slice(-2)].join("")}const sleep=e=>new Promise((a=>setTimeout(a,e)));process.on("unhandledRejection",((e,a)=>{error(e);i.setFailed(e);process.exit(1)})).on("uncaughtException",(e=>{error(e);i.setFailed(e);process.exit(1)}));e.exports={log:log,error:error,execWithLog:execWithLog,getExecOutput:getExecOutput,sleep:sleep,awaitAll:awaitAll,getMD5:getMD5,getDateString:getDateString}},9070:(e,a,r)=>{const i=r(5622);const n=r(5008);const p=r(1066);const o=r(5747);async function create(e,a){firstBundle=await p.getAudacityMacOSBundleFiles(a[0]);await p.copyFiles(a[0],firstBundle.misc,e);enlprojPath=i.join(e,"Contents","Resources","en.lproj");if(!o.existsSync(enlprojPath)){o.mkdirSync(enlprojPath,{recursive:true})}const r=[...firstBundle.MacOS,...firstBundle.Frameworks.dylib,...firstBundle.modules];return n.awaitAll(r,(r=>{const p=i.relative(a[0],r);const d=a.map((e=>i.join(e,p)));const s=i.join(e,p);const l=i.dirname(s);if(!o.existsSync(l)){o.mkdirSync(l,{recursive:true})}return n.execWithLog("lipo",["-create","-output",s,...d])}))}async function archs(e){const a=i.join(e,"Contents","MacOS");const r=i.join(a,o.readdirSync(a)[0]);return(await n.getExecOutput("lipo",["-archs",r])).stdout.split(/\s+/).map((e=>e.trim())).filter((e=>e.length>0))}async function archSuffix(e){const a=await archs(e);if(a.length==1){return a[0]}else{return"universal"}}e.exports={create:create,archs:archs,archs:archs,archSuffix:archSuffix}},2605:(e,a,r)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});const i=r(8802);function create(){return i.DefaultArtifactClient.create()}a.create=create},8802:function(e,a,r){"use strict";var i=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))a[r]=e[r];a["default"]=e;return a};Object.defineProperty(a,"__esModule",{value:true});const p=n(r(2186));const o=r(183);const d=r(4354);const s=r(6327);const l=r(8538);const u=r(5686);const m=r(2222);const c=r(5622);class DefaultArtifactClient{static create(){return new DefaultArtifactClient}uploadArtifact(e,a,r,n){return i(this,void 0,void 0,(function*(){s.checkArtifactName(e);const i=o.getUploadSpecification(e,r,a);const l={artifactName:e,artifactItems:[],size:0,failedItems:[]};const u=new d.UploadHttpClient;if(i.length===0){p.warning(`No files found that can be uploaded`)}else{const a=yield u.createArtifactInFileContainer(e,n);if(!a.fileContainerResourceUrl){p.debug(a.toString());throw new Error("No URL provided by the Artifact Service to upload an artifact to")}p.debug(`Upload Resource URL: ${a.fileContainerResourceUrl}`);const r=yield u.uploadArtifactToFileContainer(a.fileContainerResourceUrl,i,n);yield u.patchArtifactSize(r.totalSize,e);p.info(`Finished uploading artifact ${e}. Reported size is ${r.uploadSize} bytes. There were ${r.failedItems.length} items that failed to upload`);l.artifactItems=i.map((e=>e.absoluteFilePath));l.size=r.uploadSize;l.failedItems=r.failedItems}return l}))}downloadArtifact(e,a,r){return i(this,void 0,void 0,(function*(){const i=new l.DownloadHttpClient;const n=yield i.listArtifacts();if(n.count===0){throw new Error(`Unable to find any artifacts for the associated workflow`)}const o=n.value.find((a=>a.name===e));if(!o){throw new Error(`Unable to find an artifact with the name: ${e}`)}const d=yield i.getContainerItems(o.name,o.fileContainerResourceUrl);if(!a){a=m.getWorkSpaceDirectory()}a=c.normalize(a);a=c.resolve(a);const h=u.getDownloadSpecification(e,d.value,a,(r===null||r===void 0?void 0:r.createArtifactFolder)||false);if(h.filesToDownload.length===0){p.info(`No downloadable files were found for the artifact: ${o.name}`)}else{yield s.createDirectoriesForArtifact(h.directoryStructure);p.info("Directory structure has been setup for the artifact");yield s.createEmptyFilesForArtifact(h.emptyFilesToCreate);yield i.downloadSingleArtifact(h.filesToDownload)}return{artifactName:e,downloadPath:h.rootDownloadLocation}}))}downloadAllArtifacts(e){return i(this,void 0,void 0,(function*(){const a=new l.DownloadHttpClient;const r=[];const i=yield a.listArtifacts();if(i.count===0){p.info("Unable to find any artifacts for the associated workflow");return r}if(!e){e=m.getWorkSpaceDirectory()}e=c.normalize(e);e=c.resolve(e);let n=0;while(n{"use strict";Object.defineProperty(a,"__esModule",{value:true});function getUploadFileConcurrency(){return 2}a.getUploadFileConcurrency=getUploadFileConcurrency;function getUploadChunkSize(){return 8*1024*1024}a.getUploadChunkSize=getUploadChunkSize;function getRetryLimit(){return 5}a.getRetryLimit=getRetryLimit;function getRetryMultiplier(){return 1.5}a.getRetryMultiplier=getRetryMultiplier;function getInitialRetryIntervalInMilliseconds(){return 3e3}a.getInitialRetryIntervalInMilliseconds=getInitialRetryIntervalInMilliseconds;function getDownloadFileConcurrency(){return 2}a.getDownloadFileConcurrency=getDownloadFileConcurrency;function getRuntimeToken(){const e=process.env["ACTIONS_RUNTIME_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_RUNTIME_TOKEN env variable")}return e}a.getRuntimeToken=getRuntimeToken;function getRuntimeUrl(){const e=process.env["ACTIONS_RUNTIME_URL"];if(!e){throw new Error("Unable to get ACTIONS_RUNTIME_URL env variable")}return e}a.getRuntimeUrl=getRuntimeUrl;function getWorkFlowRunId(){const e=process.env["GITHUB_RUN_ID"];if(!e){throw new Error("Unable to get GITHUB_RUN_ID env variable")}return e}a.getWorkFlowRunId=getWorkFlowRunId;function getWorkSpaceDirectory(){const e=process.env["GITHUB_WORKSPACE"];if(!e){throw new Error("Unable to get GITHUB_WORKSPACE env variable")}return e}a.getWorkSpaceDirectory=getWorkSpaceDirectory;function getRetentionDays(){return process.env["GITHUB_RETENTION_DAYS"]}a.getRetentionDays=getRetentionDays},8538:function(e,a,r){"use strict";var i=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))a[r]=e[r];a["default"]=e;return a};Object.defineProperty(a,"__esModule",{value:true});const p=n(r(5747));const o=n(r(2186));const d=n(r(8761));const s=r(6327);const l=r(8835);const u=r(9081);const m=r(630);const c=r(6527);const h=r(2222);const v=r(755);class DownloadHttpClient{constructor(){this.downloadHttpManager=new c.HttpManager(h.getDownloadFileConcurrency(),"@actions/artifact-download");this.statusReporter=new u.StatusReporter(1e3)}listArtifacts(){return i(this,void 0,void 0,(function*(){const e=s.getArtifactUrl();const a=this.downloadHttpManager.getClient(0);const r=s.getDownloadHeaders("application/json");const n=yield v.retryHttpClientRequest("List Artifacts",(()=>i(this,void 0,void 0,(function*(){return a.get(e,r)}))));const p=yield n.readBody();return JSON.parse(p)}))}getContainerItems(e,a){return i(this,void 0,void 0,(function*(){const r=new l.URL(a);r.searchParams.append("itemPath",e);const n=this.downloadHttpManager.getClient(0);const p=s.getDownloadHeaders("application/json");const o=yield v.retryHttpClientRequest("Get Container Items",(()=>i(this,void 0,void 0,(function*(){return n.get(r.toString(),p)}))));const d=yield o.readBody();return JSON.parse(d)}))}downloadSingleArtifact(e){return i(this,void 0,void 0,(function*(){const a=h.getDownloadFileConcurrency();o.debug(`Download file concurrency is set to ${a}`);const r=[...new Array(a).keys()];let n=0;let p=0;o.info(`Total number of files that will be downloaded: ${e.length}`);this.statusReporter.setTotalNumberOfFilesToProcess(e.length);this.statusReporter.start();yield Promise.all(r.map((a=>i(this,void 0,void 0,(function*(){while(n{throw new Error(`Unable to download the artifact: ${e}`)})).finally((()=>{this.statusReporter.stop();this.downloadHttpManager.disposeAndReplaceAllClients()}))}))}downloadIndividualFile(e,a,r){return i(this,void 0,void 0,(function*(){let n=0;const d=h.getRetryLimit();let l=p.createWriteStream(r);const u=s.getDownloadHeaders("application/json",true,true);const makeDownloadRequest=()=>i(this,void 0,void 0,(function*(){const r=this.downloadHttpManager.getClient(e);return yield r.get(a,u)}));const isGzip=e=>"content-encoding"in e&&e["content-encoding"]==="gzip";const backOff=r=>i(this,void 0,void 0,(function*(){n++;if(n>d){return Promise.reject(new Error(`Retry limit has been reached. Unable to download ${a}`))}else{this.downloadHttpManager.disposeAndReplaceClient(e);if(r){o.info(`Backoff due to too many requests, retry #${n}. Waiting for ${r} milliseconds before continuing the download`);yield s.sleep(r)}else{const e=s.getExponentialRetryTimeInMilliseconds(n);o.info(`Exponential backoff for retry #${n}. Waiting for ${e} milliseconds before continuing the download`);yield s.sleep(e)}o.info(`Finished backoff for retry #${n}, continuing with download`)}}));const isAllBytesReceived=(e,a)=>{if(!e||!a||process.env["ACTIONS_ARTIFACT_SKIP_DOWNLOAD_VALIDATION"]){o.info("Skipping download validation.");return true}return parseInt(e)===a};const resetDestinationStream=e=>i(this,void 0,void 0,(function*(){l.close();yield s.rmFile(e);l=p.createWriteStream(e)}));while(n<=d){let e;try{e=yield makeDownloadRequest();if(o.isDebug()){s.displayHttpDiagnostics(e)}}catch(e){o.info("An error occurred while attempting to download a file");console.log(e);yield backOff();continue}let i=false;if(s.isSuccessStatusCode(e.message.statusCode)){try{const a=isGzip(e.message.headers);yield this.pipeResponseToFile(e,l,a);if(a||isAllBytesReceived(e.message.headers["content-length"],yield s.getFileSize(r))){return}else{i=true}}catch(e){i=true}}if(i||s.isRetryableStatusCode(e.message.statusCode)){o.info(`A ${e.message.statusCode} response code has been received while attempting to download an artifact`);resetDestinationStream(r);s.isThrottledStatusCode(e.message.statusCode)?yield backOff(s.tryGetRetryAfterValueTimeInMilliseconds(e.message.headers)):yield backOff()}else{s.displayHttpDiagnostics(e);return Promise.reject(new Error(`Unexpected http ${e.message.statusCode} during download for ${a}`))}}}))}pipeResponseToFile(e,a,r){return i(this,void 0,void 0,(function*(){yield new Promise(((i,n)=>{if(r){const r=d.createGunzip();e.message.on("error",(e=>{o.error(`An error occurred while attempting to read the response stream`);r.close();a.close();n(e)})).pipe(r).on("error",(e=>{o.error(`An error occurred while attempting to decompress the response stream`);a.close();n(e)})).pipe(a).on("close",(()=>{i()})).on("error",(e=>{o.error(`An error occurred while writing a downloaded file to ${a.path}`);n(e)}))}else{e.message.on("error",(e=>{o.error(`An error occurred while attempting to read the response stream`);a.close();n(e)})).pipe(a).on("close",(()=>{i()})).on("error",(e=>{o.error(`An error occurred while writing a downloaded file to ${a.path}`);n(e)}))}}));return}))}}a.DownloadHttpClient=DownloadHttpClient},5686:function(e,a,r){"use strict";var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))a[r]=e[r];a["default"]=e;return a};Object.defineProperty(a,"__esModule",{value:true});const n=i(r(5622));function getDownloadSpecification(e,a,r,i){const p=new Set;const o={rootDownloadLocation:i?n.join(r,e):r,directoryStructure:[],emptyFilesToCreate:[],filesToDownload:[]};for(const d of a){if(d.path.startsWith(`${e}/`)||d.path.startsWith(`${e}\\`)){const a=n.normalize(d.path);const s=n.join(r,i?a:a.replace(e,""));if(d.itemType==="file"){p.add(n.dirname(s));if(d.fileLength===0){o.emptyFilesToCreate.push(s)}else{o.filesToDownload.push({sourceLocation:d.contentLocation,targetPath:s})}}}}o.directoryStructure=Array.from(p);return o}a.getDownloadSpecification=getDownloadSpecification},6527:(e,a,r)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});const i=r(6327);class HttpManager{constructor(e,a){if(e<1){throw new Error("There must be at least one client")}this.userAgent=a;this.clients=new Array(e).fill(i.createHttpClient(a))}getClient(e){return this.clients[e]}disposeAndReplaceClient(e){this.clients[e].dispose();this.clients[e]=i.createHttpClient(this.userAgent)}disposeAndReplaceAllClients(){for(const[e]of this.clients.entries()){this.disposeAndReplaceClient(e)}}}a.HttpManager=HttpManager},755:function(e,a,r){"use strict";var i=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))a[r]=e[r];a["default"]=e;return a};Object.defineProperty(a,"__esModule",{value:true});const p=r(6327);const o=n(r(2186));const d=r(2222);function retry(e,a,r,n){return i(this,void 0,void 0,(function*(){let i=undefined;let d=undefined;let s=false;let l="";let u=undefined;let m=1;while(m<=n){try{i=yield a();d=i.message.statusCode;if(p.isSuccessStatusCode(d)){return i}if(d){u=r.get(d)}s=p.isRetryableStatusCode(d);l=`Artifact service responded with ${d}`}catch(e){s=true;l=e.message}if(!s){o.info(`${e} - Error is not retryable`);if(i){p.displayHttpDiagnostics(i)}break}o.info(`${e} - Attempt ${m} of ${n} failed with error: ${l}`);yield p.sleep(p.getExponentialRetryTimeInMilliseconds(m));m++}if(i){p.displayHttpDiagnostics(i)}if(u){throw Error(`${e} failed: ${u}`)}throw Error(`${e} failed: ${l}`)}))}a.retry=retry;function retryHttpClientRequest(e,a,r=new Map,n=d.getRetryLimit()){return i(this,void 0,void 0,(function*(){return yield retry(e,a,r,n)}))}a.retryHttpClientRequest=retryHttpClientRequest},9081:(e,a,r)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});const i=r(2186);class StatusReporter{constructor(e){this.totalNumberOfFilesToProcess=0;this.processedCount=0;this.largeFiles=new Map;this.totalFileStatus=undefined;this.largeFileStatus=undefined;this.displayFrequencyInMilliseconds=e}setTotalNumberOfFilesToProcess(e){this.totalNumberOfFilesToProcess=e}start(){this.totalFileStatus=setInterval((()=>{const e=this.formatPercentage(this.processedCount,this.totalNumberOfFilesToProcess);i.info(`Total file count: ${this.totalNumberOfFilesToProcess} ---- Processed file #${this.processedCount} (${e.slice(0,e.indexOf(".")+2)}%)`)}),this.displayFrequencyInMilliseconds);this.largeFileStatus=setInterval((()=>{for(const e of Array.from(this.largeFiles.values())){i.info(e)}this.largeFiles.clear()}),1e3)}updateLargeFileStatus(e,a,r){const i=this.formatPercentage(a,r);const n=`Uploading ${e} (${i.slice(0,i.indexOf(".")+2)}%)`;this.largeFiles.set(e,n)}stop(){if(this.totalFileStatus){clearInterval(this.totalFileStatus)}if(this.largeFileStatus){clearInterval(this.largeFileStatus)}}incrementProcessedCount(){this.processedCount++}formatPercentage(e,a){return(e/a*100).toFixed(4).toString()}}a.StatusReporter=StatusReporter},606:function(e,a,r){"use strict";var i=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};var n=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=e[Symbol.asyncIterator],r;return a?a.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),r={},verb("next"),verb("throw"),verb("return"),r[Symbol.asyncIterator]=function(){return this},r);function verb(a){r[a]=e[a]&&function(r){return new Promise((function(i,n){r=e[a](r),settle(i,n,r.done,r.value)}))}}function settle(e,a,r,i){Promise.resolve(i).then((function(a){e({value:a,done:r})}),a)}};var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))a[r]=e[r];a["default"]=e;return a};Object.defineProperty(a,"__esModule",{value:true});const o=p(r(5747));const d=p(r(8761));const s=r(1669);const l=s.promisify(o.stat);function createGZipFileOnDisk(e,a){return i(this,void 0,void 0,(function*(){return new Promise(((r,n)=>{const p=o.createReadStream(e);const s=d.createGzip();const u=o.createWriteStream(a);p.pipe(s).pipe(u);u.on("finish",(()=>i(this,void 0,void 0,(function*(){const e=(yield l(a)).size;r(e)}))));u.on("error",(e=>{console.log(e);n}))}))}))}a.createGZipFileOnDisk=createGZipFileOnDisk;function createGZipFileInBuffer(e){return i(this,void 0,void 0,(function*(){return new Promise((a=>i(this,void 0,void 0,(function*(){var r,i;const p=o.createReadStream(e);const s=d.createGzip();p.pipe(s);const l=[];try{for(var u=n(s),m;m=yield u.next(),!m.done;){const e=m.value;l.push(e)}}catch(e){r={error:e}}finally{try{if(m&&!m.done&&(i=u.return))yield i.call(u)}finally{if(r)throw r.error}}a(Buffer.concat(l))}))))}))}a.createGZipFileInBuffer=createGZipFileInBuffer},4354:function(e,a,r){"use strict";var i=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))a[r]=e[r];a["default"]=e;return a};Object.defineProperty(a,"__esModule",{value:true});const p=n(r(5747));const o=n(r(2186));const d=n(r(8065));const s=n(r(2413));const l=r(6327);const u=r(2222);const m=r(1669);const c=r(8835);const h=r(630);const v=r(9081);const g=r(9925);const y=r(6527);const w=r(606);const b=r(755);const S=m.promisify(p.stat);class UploadHttpClient{constructor(){this.uploadHttpManager=new y.HttpManager(u.getUploadFileConcurrency(),"@actions/artifact-upload");this.statusReporter=new v.StatusReporter(1e4)}createArtifactInFileContainer(e,a){return i(this,void 0,void 0,(function*(){const r={Type:"actions_storage",Name:e};if(a&&a.retentionDays){const e=u.getRetentionDays();r.RetentionDays=l.getProperRetention(a.retentionDays,e)}const n=JSON.stringify(r,null,2);const p=l.getArtifactUrl();const o=this.uploadHttpManager.getClient(0);const d=l.getUploadHeaders("application/json",false);const s=new Map([[g.HttpCodes.Forbidden,"Artifact storage quota has been hit. Unable to upload any new artifacts"],[g.HttpCodes.BadRequest,`The artifact name ${e} is not valid. Request URL ${p}`]]);const m=yield b.retryHttpClientRequest("Create Artifact Container",(()=>i(this,void 0,void 0,(function*(){return o.post(p,n,d)}))),s);const c=yield m.readBody();return JSON.parse(c)}))}uploadArtifactToFileContainer(e,a,r){return i(this,void 0,void 0,(function*(){const n=u.getUploadFileConcurrency();const p=u.getUploadChunkSize();o.debug(`File Concurrency: ${n}, and Chunk Size: ${p}`);const d=[];let s=true;if(r){if(r.continueOnError===false){s=false}}for(const r of a){const a=new c.URL(e);a.searchParams.append("itemPath",r.uploadFilePath);d.push({file:r.absoluteFilePath,resourceUrl:a.toString(),maxChunkSize:p,continueOnError:s})}const l=[...new Array(n).keys()];const m=[];let v=0;let g=0;let y=0;let w=0;let b=false;this.statusReporter.setTotalNumberOfFilesToProcess(a.length);this.statusReporter.start();yield Promise.all(l.map((e=>i(this,void 0,void 0,(function*(){while(vp.createReadStream(a.file);m=false;u=r}else{d=()=>{const e=new s.PassThrough;e.end(i);return e};u=i.byteLength}const c=yield this.uploadChunk(e,a.resourceUrl,d,0,u-1,u,m,r);if(!c){n=false;l+=u;o.warning(`Aborting upload for ${a.file} due to failure`)}return{isSuccess:n,successfulUploadSize:u-l,totalSize:r}}else{const s=yield d.file();u=yield w.createGZipFileOnDisk(a.file,s.path);let c=s.path;if(r104857600){this.statusReporter.updateLargeFileStatus(a.file,i,u)}const s=i;const v=i+d-1;i+=a.maxChunkSize;if(h){l+=d;continue}const g=yield this.uploadChunk(e,a.resourceUrl,(()=>p.createReadStream(c,{start:s,end:v,autoClose:false})),s,v,u,m,r);if(!g){n=false;l+=d;o.warning(`Aborting upload for ${a.file} due to failure`);h=true}}yield s.cleanup();return{isSuccess:n,successfulUploadSize:u-l,totalSize:r}}}))}uploadChunk(e,a,r,n,p,d,s,m){return i(this,void 0,void 0,(function*(){const c=l.getUploadHeaders("application/octet-stream",true,s,m,p-n+1,l.getContentRange(n,p,d));const uploadChunkRequest=()=>i(this,void 0,void 0,(function*(){const i=this.uploadHttpManager.getClient(e);return yield i.sendStream("PUT",a,r(),c)}));let h=0;const v=u.getRetryLimit();const incrementAndCheckRetryLimit=e=>{h++;if(h>v){if(e){l.displayHttpDiagnostics(e)}o.info(`Retry limit has been reached for chunk at offset ${n} to ${a}`);return true}return false};const backOff=a=>i(this,void 0,void 0,(function*(){this.uploadHttpManager.disposeAndReplaceClient(e);if(a){o.info(`Backoff due to too many requests, retry #${h}. Waiting for ${a} milliseconds before continuing the upload`);yield l.sleep(a)}else{const e=l.getExponentialRetryTimeInMilliseconds(h);o.info(`Exponential backoff for retry #${h}. Waiting for ${e} milliseconds before continuing the upload at offset ${n}`);yield l.sleep(e)}o.info(`Finished backoff for retry #${h}, continuing with upload`);return}));while(h<=v){let r;try{r=yield uploadChunkRequest()}catch(a){o.info(`An error has been caught http-client index ${e}, retrying the upload`);console.log(a);if(incrementAndCheckRetryLimit()){return false}yield backOff();continue}yield r.readBody();if(l.isSuccessStatusCode(r.message.statusCode)){return true}else if(l.isRetryableStatusCode(r.message.statusCode)){o.info(`A ${r.message.statusCode} status code has been received, will attempt to retry the upload`);if(incrementAndCheckRetryLimit(r)){return false}l.isThrottledStatusCode(r.message.statusCode)?yield backOff(l.tryGetRetryAfterValueTimeInMilliseconds(r.message.headers)):yield backOff()}else{o.error(`Unexpected response. Unable to upload chunk to ${a}`);l.displayHttpDiagnostics(r);return false}}return false}))}patchArtifactSize(e,a){return i(this,void 0,void 0,(function*(){const r=new c.URL(l.getArtifactUrl());r.searchParams.append("artifactName",a);const n={Size:e};const p=JSON.stringify(n,null,2);o.debug(`URL is ${r.toString()}`);const d=this.uploadHttpManager.getClient(0);const s=l.getUploadHeaders("application/json",false);const u=new Map([[g.HttpCodes.NotFound,`An Artifact with the name ${a} was not found`]]);const m=yield b.retryHttpClientRequest("Finalize artifact upload",(()=>i(this,void 0,void 0,(function*(){return d.patch(r.toString(),p,s)}))),u);yield m.readBody();o.debug(`Artifact ${a} has been successfully uploaded, total size in bytes: ${e}`)}))}}a.UploadHttpClient=UploadHttpClient},183:function(e,a,r){"use strict";var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))a[r]=e[r];a["default"]=e;return a};Object.defineProperty(a,"__esModule",{value:true});const n=i(r(5747));const p=r(2186);const o=r(5622);const d=r(6327);function getUploadSpecification(e,a,r){d.checkArtifactName(e);const i=[];if(!n.existsSync(a)){throw new Error(`Provided rootDirectory ${a} does not exist`)}if(!n.lstatSync(a).isDirectory()){throw new Error(`Provided rootDirectory ${a} is not a valid directory`)}a=o.normalize(a);a=o.resolve(a);for(let s of r){if(!n.existsSync(s)){throw new Error(`File ${s} does not exist`)}if(!n.lstatSync(s).isDirectory()){s=o.normalize(s);s=o.resolve(s);if(!s.startsWith(a)){throw new Error(`The rootDirectory: ${a} is not a parent directory of the file: ${s}`)}const r=s.replace(a,"");d.checkArtifactFilePath(r);i.push({absoluteFilePath:s,uploadFilePath:o.join(e,r)})}else{p.debug(`Removing ${s} from rawSearchResults because it is a directory`)}}return i}a.getUploadSpecification=getUploadSpecification},6327:function(e,a,r){"use strict";var i=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};Object.defineProperty(a,"__esModule",{value:true});const n=r(2186);const p=r(5747);const o=r(9925);const d=r(3702);const s=r(2222);function getExponentialRetryTimeInMilliseconds(e){if(e<0){throw new Error("RetryCount should not be negative")}else if(e===0){return s.getInitialRetryIntervalInMilliseconds()}const a=s.getInitialRetryIntervalInMilliseconds()*s.getRetryMultiplier()*e;const r=a*s.getRetryMultiplier();return Math.random()*(r-a)+a}a.getExponentialRetryTimeInMilliseconds=getExponentialRetryTimeInMilliseconds;function parseEnvNumber(e){const a=Number(process.env[e]);if(Number.isNaN(a)||a<0){return undefined}return a}a.parseEnvNumber=parseEnvNumber;function getApiVersion(){return"6.0-preview"}a.getApiVersion=getApiVersion;function isSuccessStatusCode(e){if(!e){return false}return e>=200&&e<300}a.isSuccessStatusCode=isSuccessStatusCode;function isForbiddenStatusCode(e){if(!e){return false}return e===o.HttpCodes.Forbidden}a.isForbiddenStatusCode=isForbiddenStatusCode;function isRetryableStatusCode(e){if(!e){return false}const a=[o.HttpCodes.BadGateway,o.HttpCodes.GatewayTimeout,o.HttpCodes.InternalServerError,o.HttpCodes.ServiceUnavailable,o.HttpCodes.TooManyRequests,413];return a.includes(e)}a.isRetryableStatusCode=isRetryableStatusCode;function isThrottledStatusCode(e){if(!e){return false}return e===o.HttpCodes.TooManyRequests}a.isThrottledStatusCode=isThrottledStatusCode;function tryGetRetryAfterValueTimeInMilliseconds(e){if(e["retry-after"]){const a=Number(e["retry-after"]);if(!isNaN(a)){n.info(`Retry-After header is present with a value of ${a}`);return a*1e3}n.info(`Returned retry-after header value: ${a} is non-numeric and cannot be used`);return undefined}n.info(`No retry-after header was found. Dumping all headers for diagnostic purposes`);console.log(e);return undefined}a.tryGetRetryAfterValueTimeInMilliseconds=tryGetRetryAfterValueTimeInMilliseconds;function getContentRange(e,a,r){return`bytes ${e}-${a}/${r}`}a.getContentRange=getContentRange;function getDownloadHeaders(e,a,r){const i={};if(e){i["Content-Type"]=e}if(a){i["Connection"]="Keep-Alive";i["Keep-Alive"]="10"}if(r){i["Accept-Encoding"]="gzip";i["Accept"]=`application/octet-stream;api-version=${getApiVersion()}`}else{i["Accept"]=`application/json;api-version=${getApiVersion()}`}return i}a.getDownloadHeaders=getDownloadHeaders;function getUploadHeaders(e,a,r,i,n,p){const o={};o["Accept"]=`application/json;api-version=${getApiVersion()}`;if(e){o["Content-Type"]=e}if(a){o["Connection"]="Keep-Alive";o["Keep-Alive"]="10"}if(r){o["Content-Encoding"]="gzip";o["x-tfs-filelength"]=i}if(n){o["Content-Length"]=n}if(p){o["Content-Range"]=p}return o}a.getUploadHeaders=getUploadHeaders;function createHttpClient(e){return new o.HttpClient(e,[new d.BearerCredentialHandler(s.getRuntimeToken())])}a.createHttpClient=createHttpClient;function getArtifactUrl(){const e=`${s.getRuntimeUrl()}_apis/pipelines/workflows/${s.getWorkFlowRunId()}/artifacts?api-version=${getApiVersion()}`;n.debug(`Artifact Url: ${e}`);return e}a.getArtifactUrl=getArtifactUrl;function displayHttpDiagnostics(e){n.info(`##### Begin Diagnostic HTTP information #####\nStatus Code: ${e.message.statusCode}\nStatus Message: ${e.message.statusMessage}\nHeader Information: ${JSON.stringify(e.message.headers,undefined,2)}\n###### End Diagnostic HTTP information ######`)}a.displayHttpDiagnostics=displayHttpDiagnostics;const l=['"',":","<",">","|","*","?"];const u=[...l,"\\","/"];function checkArtifactName(e){if(!e){throw new Error(`Artifact name: ${e}, is incorrectly provided`)}for(const a of u){if(e.includes(a)){throw new Error(`Artifact name is not valid: ${e}. Contains character: "${a}". Invalid artifact name characters include: ${u.toString()}.`)}}}a.checkArtifactName=checkArtifactName;function checkArtifactFilePath(e){if(!e){throw new Error(`Artifact path: ${e}, is incorrectly provided`)}for(const a of l){if(e.includes(a)){throw new Error(`Artifact path is not valid: ${e}. Contains character: "${a}". Invalid characters include: ${l.toString()}.`)}}}a.checkArtifactFilePath=checkArtifactFilePath;function createDirectoriesForArtifact(e){return i(this,void 0,void 0,(function*(){for(const a of e){yield p.promises.mkdir(a,{recursive:true})}}))}a.createDirectoriesForArtifact=createDirectoriesForArtifact;function createEmptyFilesForArtifact(e){return i(this,void 0,void 0,(function*(){for(const a of e){yield(yield p.promises.open(a,"w")).close()}}))}a.createEmptyFilesForArtifact=createEmptyFilesForArtifact;function getFileSize(e){return i(this,void 0,void 0,(function*(){const a=yield p.promises.stat(e);n.debug(`${e} size:(${a.size}) blksize:(${a.blksize}) blocks:(${a.blocks})`);return a.size}))}a.getFileSize=getFileSize;function rmFile(e){return i(this,void 0,void 0,(function*(){yield p.promises.unlink(e)}))}a.rmFile=rmFile;function getProperRetention(e,a){if(e<0){throw new Error("Invalid retention, minimum value is 1.")}let r=e;if(a){const e=parseInt(a);if(!isNaN(e)&&esetTimeout(a,e)))}))}a.sleep=sleep},7351:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};Object.defineProperty(a,"__esModule",{value:true});a.issue=a.issueCommand=void 0;const o=p(r(2087));const d=r(5278);function issueCommand(e,a,r){const i=new Command(e,a,r);process.stdout.write(i.toString()+o.EOL)}a.issueCommand=issueCommand;function issue(e,a=""){issueCommand(e,{},a)}a.issue=issue;const s="::";class Command{constructor(e,a,r){if(!e){e="missing.command"}this.command=e;this.properties=a;this.message=r}toString(){let e=s+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let a=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const i=this.properties[r];if(i){if(a){a=false}else{e+=","}e+=`${r}=${escapeProperty(i)}`}}}}e+=`${s}${escapeData(this.message)}`;return e}}function escapeData(e){return d.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return d.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};Object.defineProperty(a,"__esModule",{value:true});a.getIDToken=a.getState=a.saveState=a.group=a.endGroup=a.startGroup=a.info=a.notice=a.warning=a.error=a.debug=a.isDebug=a.setFailed=a.setCommandEcho=a.setOutput=a.getBooleanInput=a.getMultilineInput=a.getInput=a.addPath=a.setSecret=a.exportVariable=a.ExitCode=void 0;const d=r(7351);const s=r(717);const l=r(5278);const u=p(r(2087));const m=p(r(5622));const c=r(8041);var h;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(h=a.ExitCode||(a.ExitCode={}));function exportVariable(e,a){const r=l.toCommandValue(a);process.env[e]=r;const i=process.env["GITHUB_ENV"]||"";if(i){const a="_GitHubActionsFileCommandDelimeter_";const i=`${e}<<${a}${u.EOL}${r}${u.EOL}${a}`;s.issueCommand("ENV",i)}else{d.issueCommand("set-env",{name:e},r)}}a.exportVariable=exportVariable;function setSecret(e){d.issueCommand("add-mask",{},e)}a.setSecret=setSecret;function addPath(e){const a=process.env["GITHUB_PATH"]||"";if(a){s.issueCommand("PATH",e)}else{d.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${m.delimiter}${process.env["PATH"]}`}a.addPath=addPath;function getInput(e,a){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(a&&a.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(a&&a.trimWhitespace===false){return r}return r.trim()}a.getInput=getInput;function getMultilineInput(e,a){const r=getInput(e,a).split("\n").filter((e=>e!==""));return r}a.getMultilineInput=getMultilineInput;function getBooleanInput(e,a){const r=["true","True","TRUE"];const i=["false","False","FALSE"];const n=getInput(e,a);if(r.includes(n))return true;if(i.includes(n))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}a.getBooleanInput=getBooleanInput;function setOutput(e,a){process.stdout.write(u.EOL);d.issueCommand("set-output",{name:e},a)}a.setOutput=setOutput;function setCommandEcho(e){d.issue("echo",e?"on":"off")}a.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=h.Failure;error(e)}a.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}a.isDebug=isDebug;function debug(e){d.issueCommand("debug",{},e)}a.debug=debug;function error(e,a={}){d.issueCommand("error",l.toCommandProperties(a),e instanceof Error?e.toString():e)}a.error=error;function warning(e,a={}){d.issueCommand("warning",l.toCommandProperties(a),e instanceof Error?e.toString():e)}a.warning=warning;function notice(e,a={}){d.issueCommand("notice",l.toCommandProperties(a),e instanceof Error?e.toString():e)}a.notice=notice;function info(e){process.stdout.write(e+u.EOL)}a.info=info;function startGroup(e){d.issue("group",e)}a.startGroup=startGroup;function endGroup(){d.issue("endgroup")}a.endGroup=endGroup;function group(e,a){return o(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield a()}finally{endGroup()}return r}))}a.group=group;function saveState(e,a){d.issueCommand("save-state",{name:e},a)}a.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}a.getState=getState;function getIDToken(e){return o(this,void 0,void 0,(function*(){return yield c.OidcClient.getIDToken(e)}))}a.getIDToken=getIDToken},717:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};Object.defineProperty(a,"__esModule",{value:true});a.issueCommand=void 0;const o=p(r(5747));const d=p(r(2087));const s=r(5278);function issueCommand(e,a){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!o.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}o.appendFileSync(r,`${s.toCommandValue(a)}${d.EOL}`,{encoding:"utf8"})}a.issueCommand=issueCommand},8041:function(e,a,r){"use strict";var i=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};Object.defineProperty(a,"__esModule",{value:true});a.OidcClient=void 0;const n=r(9925);const p=r(3702);const o=r(2186);class OidcClient{static createHttpClient(e=true,a=10){const r={allowRetries:e,maxRetries:a};return new n.HttpClient("actions/oidc-client",[new p.BearerCredentialHandler(OidcClient.getRequestToken())],r)}static getRequestToken(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return e}static getIDTokenUrl(){const e=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!e){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return e}static getCall(e){var a;return i(this,void 0,void 0,(function*(){const r=OidcClient.createHttpClient();const i=yield r.getJson(e).catch((e=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${e.statusCode}\n \n Error Message: ${e.result.message}`)}));const n=(a=i.result)===null||a===void 0?void 0:a.value;if(!n){throw new Error("Response json body do not have ID Token field")}return n}))}static getIDToken(e){return i(this,void 0,void 0,(function*(){try{let a=OidcClient.getIDTokenUrl();if(e){const r=encodeURIComponent(e);a=`${a}&audience=${r}`}o.debug(`ID token url is ${a}`);const r=yield OidcClient.getCall(a);o.setSecret(r);return r}catch(e){throw new Error(`Error message: ${e.message}`)}}))}}a.OidcClient=OidcClient},5278:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});a.toCommandProperties=a.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}a.toCommandValue=toCommandValue;function toCommandProperties(e){if(!Object.keys(e).length){return{}}return{title:e.title,file:e.file,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}}a.toCommandProperties=toCommandProperties},1514:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};Object.defineProperty(a,"__esModule",{value:true});a.getExecOutput=a.exec=void 0;const d=r(4304);const s=p(r(8159));function exec(e,a,r){return o(this,void 0,void 0,(function*(){const i=s.argStringToArray(e);if(i.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const n=i[0];a=i.slice(1).concat(a||[]);const p=new s.ToolRunner(n,a,r);return p.exec()}))}a.exec=exec;function getExecOutput(e,a,r){var i,n;return o(this,void 0,void 0,(function*(){let p="";let o="";const s=new d.StringDecoder("utf8");const l=new d.StringDecoder("utf8");const u=(i=r===null||r===void 0?void 0:r.listeners)===null||i===void 0?void 0:i.stdout;const m=(n=r===null||r===void 0?void 0:r.listeners)===null||n===void 0?void 0:n.stderr;const stdErrListener=e=>{o+=l.write(e);if(m){m(e)}};const stdOutListener=e=>{p+=s.write(e);if(u){u(e)}};const c=Object.assign(Object.assign({},r===null||r===void 0?void 0:r.listeners),{stdout:stdOutListener,stderr:stdErrListener});const h=yield exec(e,a,Object.assign(Object.assign({},r),{listeners:c}));p+=s.end();o+=l.end();return{exitCode:h,stdout:p,stderr:o}}))}a.getExecOutput=getExecOutput},8159:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};Object.defineProperty(a,"__esModule",{value:true});a.argStringToArray=a.ToolRunner=void 0;const d=p(r(2087));const s=p(r(8614));const l=p(r(3129));const u=p(r(5622));const m=p(r(7436));const c=p(r(1962));const h=r(8213);const v=process.platform==="win32";class ToolRunner extends s.EventEmitter{constructor(e,a,r){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=a||[];this.options=r||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,a){const r=this._getSpawnFileName();const i=this._getSpawnArgs(e);let n=a?"":"[command]";if(v){if(this._isCmdFile()){n+=r;for(const e of i){n+=` ${e}`}}else if(e.windowsVerbatimArguments){n+=`"${r}"`;for(const e of i){n+=` ${e}`}}else{n+=this._windowsQuoteCmdArg(r);for(const e of i){n+=` ${this._windowsQuoteCmdArg(e)}`}}}else{n+=r;for(const e of i){n+=` ${e}`}}return n}_processLineBuffer(e,a,r){try{let i=a+e.toString();let n=i.indexOf(d.EOL);while(n>-1){const e=i.substring(0,n);r(e);i=i.substring(n+d.EOL.length);n=i.indexOf(d.EOL)}return i}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(v){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(v){if(this._isCmdFile()){let a=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const r of this.args){a+=" ";a+=e.windowsVerbatimArguments?r:this._windowsQuoteCmdArg(r)}a+='"';return[a]}}return this.args}_endsWith(e,a){return e.endsWith(a)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const a=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let r=false;for(const i of e){if(a.some((e=>e===i))){r=true;break}}if(!r){return e}let i='"';let n=true;for(let a=e.length;a>0;a--){i+=e[a-1];if(n&&e[a-1]==="\\"){i+="\\"}else if(e[a-1]==='"'){n=true;i+='"'}else{n=false}}i+='"';return i.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let a='"';let r=true;for(let i=e.length;i>0;i--){a+=e[i-1];if(r&&e[i-1]==="\\"){a+="\\"}else if(e[i-1]==='"'){r=true;a+="\\"}else{r=false}}a+='"';return a.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const a={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};a.outStream=e.outStream||process.stdout;a.errStream=e.errStream||process.stderr;return a}_getSpawnOptions(e,a){e=e||{};const r={};r.cwd=e.cwd;r.env=e.env;r["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){r.argv0=`"${a}"`}return r}exec(){return o(this,void 0,void 0,(function*(){if(!c.isRooted(this.toolPath)&&(this.toolPath.includes("/")||v&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield m.which(this.toolPath,true);return new Promise(((e,a)=>o(this,void 0,void 0,(function*(){this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const r=this._cloneExecOptions(this.options);if(!r.silent&&r.outStream){r.outStream.write(this._getCommandString(r)+d.EOL)}const i=new ExecState(r,this.toolPath);i.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield c.exists(this.options.cwd))){return a(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const n=this._getSpawnFileName();const p=l.spawn(n,this._getSpawnArgs(r),this._getSpawnOptions(this.options,n));let o="";if(p.stdout){p.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!r.silent&&r.outStream){r.outStream.write(e)}o=this._processLineBuffer(e,o,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let s="";if(p.stderr){p.stderr.on("data",(e=>{i.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!r.silent&&r.errStream&&r.outStream){const a=r.failOnStdErr?r.errStream:r.outStream;a.write(e)}s=this._processLineBuffer(e,s,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}p.on("error",(e=>{i.processError=e.message;i.processExited=true;i.processClosed=true;i.CheckComplete()}));p.on("exit",(e=>{i.processExitCode=e;i.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);i.CheckComplete()}));p.on("close",(e=>{i.processExitCode=e;i.processExited=true;i.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);i.CheckComplete()}));i.on("done",((r,i)=>{if(o.length>0){this.emit("stdline",o)}if(s.length>0){this.emit("errline",s)}p.removeAllListeners();if(r){a(r)}else{e(i)}}));if(this.options.input){if(!p.stdin){throw new Error("child process missing stdin")}p.stdin.end(this.options.input)}}))))}))}}a.ToolRunner=ToolRunner;function argStringToArray(e){const a=[];let r=false;let i=false;let n="";function append(e){if(i&&e!=='"'){n+="\\"}n+=e;i=false}for(let p=0;p0){a.push(n);n=""}continue}append(o)}if(n.length>0){a.push(n.trim())}return a}a.argStringToArray=argStringToArray;class ExecState extends s.EventEmitter{constructor(e,a){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!a){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=a;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=h.setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const a=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(a)}e._setResult()}}},8090:function(e,a,r){"use strict";var i=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};Object.defineProperty(a,"__esModule",{value:true});a.hashFiles=a.create=void 0;const n=r(8298);const p=r(2448);function create(e,a){return i(this,void 0,void 0,(function*(){return yield n.DefaultGlobber.create(e,a)}))}a.create=create;function hashFiles(e,a){return i(this,void 0,void 0,(function*(){let r=true;if(a&&typeof a.followSymbolicLinks==="boolean"){r=a.followSymbolicLinks}const i=yield create(e,{followSymbolicLinks:r});return p.hashFiles(i)}))}a.hashFiles=hashFiles},1026:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};Object.defineProperty(a,"__esModule",{value:true});a.getOptions=void 0;const o=p(r(2186));function getOptions(e){const a={followSymbolicLinks:true,implicitDescendants:true,matchDirectories:true,omitBrokenSymbolicLinks:true};if(e){if(typeof e.followSymbolicLinks==="boolean"){a.followSymbolicLinks=e.followSymbolicLinks;o.debug(`followSymbolicLinks '${a.followSymbolicLinks}'`)}if(typeof e.implicitDescendants==="boolean"){a.implicitDescendants=e.implicitDescendants;o.debug(`implicitDescendants '${a.implicitDescendants}'`)}if(typeof e.matchDirectories==="boolean"){a.matchDirectories=e.matchDirectories;o.debug(`matchDirectories '${a.matchDirectories}'`)}if(typeof e.omitBrokenSymbolicLinks==="boolean"){a.omitBrokenSymbolicLinks=e.omitBrokenSymbolicLinks;o.debug(`omitBrokenSymbolicLinks '${a.omitBrokenSymbolicLinks}'`)}}return a}a.getOptions=getOptions},8298:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};var d=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=e[Symbol.asyncIterator],r;return a?a.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),r={},verb("next"),verb("throw"),verb("return"),r[Symbol.asyncIterator]=function(){return this},r);function verb(a){r[a]=e[a]&&function(r){return new Promise((function(i,n){r=e[a](r),settle(i,n,r.done,r.value)}))}}function settle(e,a,r,i){Promise.resolve(i).then((function(a){e({value:a,done:r})}),a)}};var s=this&&this.__await||function(e){return this instanceof s?(this.v=e,this):new s(e)};var l=this&&this.__asyncGenerator||function(e,a,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r.apply(e,a||[]),n,p=[];return n={},verb("next"),verb("throw"),verb("return"),n[Symbol.asyncIterator]=function(){return this},n;function verb(e){if(i[e])n[e]=function(a){return new Promise((function(r,i){p.push([e,a,r,i])>1||resume(e,a)}))}}function resume(e,a){try{step(i[e](a))}catch(e){settle(p[0][3],e)}}function step(e){e.value instanceof s?Promise.resolve(e.value.v).then(fulfill,reject):settle(p[0][2],e)}function fulfill(e){resume("next",e)}function reject(e){resume("throw",e)}function settle(e,a){if(e(a),p.shift(),p.length)resume(p[0][0],p[0][1])}};Object.defineProperty(a,"__esModule",{value:true});a.DefaultGlobber=void 0;const u=p(r(2186));const m=p(r(5747));const c=p(r(1026));const h=p(r(5622));const v=p(r(9005));const g=r(1063);const y=r(4536);const w=r(9117);const b=process.platform==="win32";class DefaultGlobber{constructor(e){this.patterns=[];this.searchPaths=[];this.options=c.getOptions(e)}getSearchPaths(){return this.searchPaths.slice()}glob(){var e,a;return o(this,void 0,void 0,(function*(){const r=[];try{for(var i=d(this.globGenerator()),n;n=yield i.next(),!n.done;){const e=n.value;r.push(e)}}catch(a){e={error:a}}finally{try{if(n&&!n.done&&(a=i.return))yield a.call(i)}finally{if(e)throw e.error}}return r}))}globGenerator(){return l(this,arguments,(function*globGenerator_1(){const e=c.getOptions(this.options);const a=[];for(const r of this.patterns){a.push(r);if(e.implicitDescendants&&(r.trailingSeparator||r.segments[r.segments.length-1]!=="**")){a.push(new y.Pattern(r.negate,true,r.segments.concat("**")))}}const r=[];for(const e of v.getSearchPaths(a)){u.debug(`Search path '${e}'`);try{yield s(m.promises.lstat(e))}catch(e){if(e.code==="ENOENT"){continue}throw e}r.unshift(new w.SearchState(e,1))}const i=[];while(r.length){const n=r.pop();const p=v.match(a,n.path);const o=!!p||v.partialMatch(a,n.path);if(!p&&!o){continue}const d=yield s(DefaultGlobber.stat(n,e,i));if(!d){continue}if(d.isDirectory()){if(p&g.MatchKind.Directory&&e.matchDirectories){yield yield s(n.path)}else if(!o){continue}const a=n.level+1;const i=(yield s(m.promises.readdir(n.path))).map((e=>new w.SearchState(h.join(n.path,e),a)));r.push(...i.reverse())}else if(p&g.MatchKind.File){yield yield s(n.path)}}}))}static create(e,a){return o(this,void 0,void 0,(function*(){const r=new DefaultGlobber(a);if(b){e=e.replace(/\r\n/g,"\n");e=e.replace(/\r/g,"\n")}const i=e.split("\n").map((e=>e.trim()));for(const e of i){if(!e||e.startsWith("#")){continue}else{r.patterns.push(new y.Pattern(e))}}r.searchPaths.push(...v.getSearchPaths(r.patterns));return r}))}static stat(e,a,r){return o(this,void 0,void 0,(function*(){let i;if(a.followSymbolicLinks){try{i=yield m.promises.stat(e.path)}catch(r){if(r.code==="ENOENT"){if(a.omitBrokenSymbolicLinks){u.debug(`Broken symlink '${e.path}'`);return undefined}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw r}}else{i=yield m.promises.lstat(e.path)}if(i.isDirectory()&&a.followSymbolicLinks){const a=yield m.promises.realpath(e.path);while(r.length>=e.level){r.pop()}if(r.some((e=>e===a))){u.debug(`Symlink cycle detected for path '${e.path}' and realpath '${a}'`);return undefined}r.push(a)}return i}))}}a.DefaultGlobber=DefaultGlobber},2448:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};var d=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=e[Symbol.asyncIterator],r;return a?a.call(e):(e=typeof __values==="function"?__values(e):e[Symbol.iterator](),r={},verb("next"),verb("throw"),verb("return"),r[Symbol.asyncIterator]=function(){return this},r);function verb(a){r[a]=e[a]&&function(r){return new Promise((function(i,n){r=e[a](r),settle(i,n,r.done,r.value)}))}}function settle(e,a,r,i){Promise.resolve(i).then((function(a){e({value:a,done:r})}),a)}};Object.defineProperty(a,"__esModule",{value:true});a.hashFiles=void 0;const s=p(r(6417));const l=p(r(2186));const u=p(r(5747));const m=p(r(2413));const c=p(r(1669));const h=p(r(5622));function hashFiles(e){var a,r;var i;return o(this,void 0,void 0,(function*(){let n=false;const p=(i=process.env["GITHUB_WORKSPACE"])!==null&&i!==void 0?i:process.cwd();const o=s.createHash("sha256");let v=0;try{for(var g=d(e.globGenerator()),y;y=yield g.next(),!y.done;){const e=y.value;l.debug(e);if(!e.startsWith(`${p}${h.sep}`)){l.debug(`Ignore '${e}' since it is not under GITHUB_WORKSPACE.`);continue}if(u.statSync(e).isDirectory()){l.debug(`Skip directory '${e}'.`);continue}const a=s.createHash("sha256");const r=c.promisify(m.pipeline);yield r(u.createReadStream(e),a);o.write(a.digest());v++;if(!n){n=true}}}catch(e){a={error:e}}finally{try{if(y&&!y.done&&(r=g.return))yield r.call(g)}finally{if(a)throw a.error}}o.end();if(n){l.debug(`Found ${v} files to hash.`);return o.digest("hex")}else{l.debug(`No matches found for glob`);return""}}))}a.hashFiles=hashFiles},1063:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});a.MatchKind=void 0;var r;(function(e){e[e["None"]=0]="None";e[e["Directory"]=1]="Directory";e[e["File"]=2]="File";e[e["All"]=3]="All"})(r=a.MatchKind||(a.MatchKind={}))},1849:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:true});a.safeTrimTrailingSeparator=a.normalizeSeparators=a.hasRoot=a.hasAbsoluteRoot=a.ensureAbsoluteRoot=a.dirname=void 0;const d=p(r(5622));const s=o(r(2357));const l=process.platform==="win32";function dirname(e){e=safeTrimTrailingSeparator(e);if(l&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(e)){return e}let a=d.dirname(e);if(l&&/^\\\\[^\\]+\\[^\\]+\\$/.test(a)){a=safeTrimTrailingSeparator(a)}return a}a.dirname=dirname;function ensureAbsoluteRoot(e,a){s.default(e,`ensureAbsoluteRoot parameter 'root' must not be empty`);s.default(a,`ensureAbsoluteRoot parameter 'itemPath' must not be empty`);if(hasAbsoluteRoot(a)){return a}if(l){if(a.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let e=process.cwd();s.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`);if(a[0].toUpperCase()===e[0].toUpperCase()){if(a.length===2){return`${a[0]}:\\${e.substr(3)}`}else{if(!e.endsWith("\\")){e+="\\"}return`${a[0]}:\\${e.substr(3)}${a.substr(2)}`}}else{return`${a[0]}:\\${a.substr(2)}`}}else if(normalizeSeparators(a).match(/^\\$|^\\[^\\]/)){const e=process.cwd();s.default(e.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${e}'`);return`${e[0]}:\\${a.substr(1)}`}}s.default(hasAbsoluteRoot(e),`ensureAbsoluteRoot parameter 'root' must have an absolute root`);if(e.endsWith("/")||l&&e.endsWith("\\")){}else{e+=d.sep}return e+a}a.ensureAbsoluteRoot=ensureAbsoluteRoot;function hasAbsoluteRoot(e){s.default(e,`hasAbsoluteRoot parameter 'itemPath' must not be empty`);e=normalizeSeparators(e);if(l){return e.startsWith("\\\\")||/^[A-Z]:\\/i.test(e)}return e.startsWith("/")}a.hasAbsoluteRoot=hasAbsoluteRoot;function hasRoot(e){s.default(e,`isRooted parameter 'itemPath' must not be empty`);e=normalizeSeparators(e);if(l){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}a.hasRoot=hasRoot;function normalizeSeparators(e){e=e||"";if(l){e=e.replace(/\//g,"\\");const a=/^\\\\+[^\\]/.test(e);return(a?"\\":"")+e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}a.normalizeSeparators=normalizeSeparators;function safeTrimTrailingSeparator(e){if(!e){return""}e=normalizeSeparators(e);if(!e.endsWith(d.sep)){return e}if(e===d.sep){return e}if(l&&/^[A-Z]:\\$/i.test(e)){return e}return e.substr(0,e.length-1)}a.safeTrimTrailingSeparator=safeTrimTrailingSeparator},6836:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:true});a.Path=void 0;const d=p(r(5622));const s=p(r(1849));const l=o(r(2357));const u=process.platform==="win32";class Path{constructor(e){this.segments=[];if(typeof e==="string"){l.default(e,`Parameter 'itemPath' must not be empty`);e=s.safeTrimTrailingSeparator(e);if(!s.hasRoot(e)){this.segments=e.split(d.sep)}else{let a=e;let r=s.dirname(a);while(r!==a){const e=d.basename(a);this.segments.unshift(e);a=r;r=s.dirname(a)}this.segments.unshift(a)}}else{l.default(e.length>0,`Parameter 'itemPath' must not be an empty array`);for(let a=0;a!e.negate));const a={};for(const r of e){const e=s?r.searchPath.toUpperCase():r.searchPath;a[e]="candidate"}const r=[];for(const i of e){const e=s?i.searchPath.toUpperCase():i.searchPath;if(a[e]==="included"){continue}let n=false;let p=e;let d=o.dirname(p);while(d!==p){if(a[d]){n=true;break}p=d;d=o.dirname(p)}if(!n){r.push(i.searchPath);a[e]="included"}}return r}a.getSearchPaths=getSearchPaths;function match(e,a){let r=d.MatchKind.None;for(const i of e){if(i.negate){r&=~i.match(a)}else{r|=i.match(a)}}return r}a.match=match;function partialMatch(e,a){return e.some((e=>!e.negate&&e.partialMatch(a)))}a.partialMatch=partialMatch},4536:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:true});a.Pattern=void 0;const d=p(r(2087));const s=p(r(5622));const l=p(r(1849));const u=o(r(2357));const m=r(3973);const c=r(1063);const h=r(6836);const v=process.platform==="win32";class Pattern{constructor(e,a=false,r,i){this.negate=false;let n;if(typeof e==="string"){n=e.trim()}else{r=r||[];u.default(r.length,`Parameter 'segments' must not empty`);const a=Pattern.getLiteral(r[0]);u.default(a&&l.hasAbsoluteRoot(a),`Parameter 'segments' first element must be a root path`);n=new h.Path(r).toString().trim();if(e){n=`!${n}`}}while(n.startsWith("!")){this.negate=!this.negate;n=n.substr(1).trim()}n=Pattern.fixupPattern(n,i);this.segments=new h.Path(n).segments;this.trailingSeparator=l.normalizeSeparators(n).endsWith(s.sep);n=l.safeTrimTrailingSeparator(n);let p=false;const o=this.segments.map((e=>Pattern.getLiteral(e))).filter((e=>!p&&!(p=e==="")));this.searchPath=new h.Path(o).toString();this.rootRegExp=new RegExp(Pattern.regExpEscape(o[0]),v?"i":"");this.isImplicitPattern=a;const d={dot:true,nobrace:true,nocase:v,nocomment:true,noext:true,nonegate:true};n=v?n.replace(/\\/g,"/"):n;this.minimatch=new m.Minimatch(n,d)}match(e){if(this.segments[this.segments.length-1]==="**"){e=l.normalizeSeparators(e);if(!e.endsWith(s.sep)&&this.isImplicitPattern===false){e=`${e}${s.sep}`}}else{e=l.safeTrimTrailingSeparator(e)}if(this.minimatch.match(e)){return this.trailingSeparator?c.MatchKind.Directory:c.MatchKind.All}return c.MatchKind.None}partialMatch(e){e=l.safeTrimTrailingSeparator(e);if(l.dirname(e)===e){return this.rootRegExp.test(e)}return this.minimatch.matchOne(e.split(v?/\\+/:/\/+/),this.minimatch.set[0],true)}static globEscape(e){return(v?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,a){u.default(e,"pattern cannot be empty");const r=new h.Path(e).segments.map((e=>Pattern.getLiteral(e)));u.default(r.every(((e,a)=>(e!=="."||a===0)&&e!=="..")),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`);u.default(!l.hasRoot(e)||r[0],`Invalid pattern '${e}'. Root segment must not contain globs.`);e=l.normalizeSeparators(e);if(e==="."||e.startsWith(`.${s.sep}`)){e=Pattern.globEscape(process.cwd())+e.substr(1)}else if(e==="~"||e.startsWith(`~${s.sep}`)){a=a||d.homedir();u.default(a,"Unable to determine HOME directory");u.default(l.hasAbsoluteRoot(a),`Expected HOME directory to be a rooted path. Actual '${a}'`);e=Pattern.globEscape(a)+e.substr(1)}else if(v&&(e.match(/^[A-Z]:$/i)||e.match(/^[A-Z]:[^\\]/i))){let a=l.ensureAbsoluteRoot("C:\\dummy-root",e.substr(0,2));if(e.length>2&&!a.endsWith("\\")){a+="\\"}e=Pattern.globEscape(a)+e.substr(2)}else if(v&&(e==="\\"||e.match(/^\\[^\\]/))){let a=l.ensureAbsoluteRoot("C:\\dummy-root","\\");if(!a.endsWith("\\")){a+="\\"}e=Pattern.globEscape(a)+e.substr(1)}else{e=l.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()),e)}return l.normalizeSeparators(e)}static getLiteral(e){let a="";for(let r=0;r=0){if(i.length>1){return""}if(i){a+=i;r=n;continue}}}a+=i}return a}static regExpEscape(e){return e.replace(/[[\\^$.|?*+()]/g,"\\$&")}}a.Pattern=Pattern},9117:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});a.SearchState=void 0;class SearchState{constructor(e,a){this.path=e;this.level=a}}a.SearchState=SearchState},3702:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});class BasicCredentialHandler{constructor(e,a){this.username=e;this.password=a}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from(this.username+":"+this.password).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,a,r){return null}}a.BasicCredentialHandler=BasicCredentialHandler;class BearerCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Bearer "+this.token}canHandleAuthentication(e){return false}handleAuthentication(e,a,r){return null}}a.BearerCredentialHandler=BearerCredentialHandler;class PersonalAccessTokenCredentialHandler{constructor(e){this.token=e}prepareRequest(e){e.headers["Authorization"]="Basic "+Buffer.from("PAT:"+this.token).toString("base64")}canHandleAuthentication(e){return false}handleAuthentication(e,a,r){return null}}a.PersonalAccessTokenCredentialHandler=PersonalAccessTokenCredentialHandler},9925:(e,a,r)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});const i=r(8605);const n=r(7211);const p=r(6443);let o;var d;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(d=a.HttpCodes||(a.HttpCodes={}));var s;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(s=a.Headers||(a.Headers={}));var l;(function(e){e["ApplicationJson"]="application/json"})(l=a.MediaTypes||(a.MediaTypes={}));function getProxyUrl(e){let a=p.getProxyUrl(new URL(e));return a?a.href:""}a.getProxyUrl=getProxyUrl;const u=[d.MovedPermanently,d.ResourceMoved,d.SeeOther,d.TemporaryRedirect,d.PermanentRedirect];const m=[d.BadGateway,d.ServiceUnavailable,d.GatewayTimeout];const c=["OPTIONS","GET","DELETE","HEAD"];const h=10;const v=5;class HttpClientError extends Error{constructor(e,a){super(e);this.name="HttpClientError";this.statusCode=a;Object.setPrototypeOf(this,HttpClientError.prototype)}}a.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise((async(e,a)=>{let r=Buffer.alloc(0);this.message.on("data",(e=>{r=Buffer.concat([r,e])}));this.message.on("end",(()=>{e(r.toString())}))}))}}a.HttpClientResponse=HttpClientResponse;function isHttps(e){let a=new URL(e);return a.protocol==="https:"}a.isHttps=isHttps;class HttpClient{constructor(e,a,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=a||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,a){return this.request("OPTIONS",e,null,a||{})}get(e,a){return this.request("GET",e,null,a||{})}del(e,a){return this.request("DELETE",e,null,a||{})}post(e,a,r){return this.request("POST",e,a,r||{})}patch(e,a,r){return this.request("PATCH",e,a,r||{})}put(e,a,r){return this.request("PUT",e,a,r||{})}head(e,a){return this.request("HEAD",e,null,a||{})}sendStream(e,a,r,i){return this.request(e,a,r,i)}async getJson(e,a={}){a[s.Accept]=this._getExistingOrDefaultHeader(a,s.Accept,l.ApplicationJson);let r=await this.get(e,a);return this._processResponse(r,this.requestOptions)}async postJson(e,a,r={}){let i=JSON.stringify(a,null,2);r[s.Accept]=this._getExistingOrDefaultHeader(r,s.Accept,l.ApplicationJson);r[s.ContentType]=this._getExistingOrDefaultHeader(r,s.ContentType,l.ApplicationJson);let n=await this.post(e,i,r);return this._processResponse(n,this.requestOptions)}async putJson(e,a,r={}){let i=JSON.stringify(a,null,2);r[s.Accept]=this._getExistingOrDefaultHeader(r,s.Accept,l.ApplicationJson);r[s.ContentType]=this._getExistingOrDefaultHeader(r,s.ContentType,l.ApplicationJson);let n=await this.put(e,i,r);return this._processResponse(n,this.requestOptions)}async patchJson(e,a,r={}){let i=JSON.stringify(a,null,2);r[s.Accept]=this._getExistingOrDefaultHeader(r,s.Accept,l.ApplicationJson);r[s.ContentType]=this._getExistingOrDefaultHeader(r,s.ContentType,l.ApplicationJson);let n=await this.patch(e,i,r);return this._processResponse(n,this.requestOptions)}async request(e,a,r,i){if(this._disposed){throw new Error("Client has already been disposed.")}let n=new URL(a);let p=this._prepareRequest(e,n,i);let o=this._allowRetries&&c.indexOf(e)!=-1?this._maxRetries+1:1;let s=0;let l;while(s0){const o=l.message.headers["location"];if(!o){break}let d=new URL(o);if(n.protocol=="https:"&&n.protocol!=d.protocol&&!this._allowRedirectDowngrade){throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.")}await l.readBody();if(d.hostname!==n.hostname){for(let e in i){if(e.toLowerCase()==="authorization"){delete i[e]}}}p=this._prepareRequest(e,d,i);l=await this.requestRaw(p,r);a--}if(m.indexOf(l.message.statusCode)==-1){return l}s+=1;if(s{let callbackForResult=function(e,a){if(e){i(e)}r(a)};this.requestRawWithCallback(e,a,callbackForResult)}))}requestRawWithCallback(e,a,r){let i;if(typeof a==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(a,"utf8")}let n=false;let handleResult=(e,a)=>{if(!n){n=true;r(e,a)}};let p=e.httpModule.request(e.options,(e=>{let a=new HttpClientResponse(e);handleResult(null,a)}));p.on("socket",(e=>{i=e}));p.setTimeout(this._socketTimeout||3*6e4,(()=>{if(i){i.end()}handleResult(new Error("Request timeout: "+e.options.path),null)}));p.on("error",(function(e){handleResult(e,null)}));if(a&&typeof a==="string"){p.write(a,"utf8")}if(a&&typeof a!=="string"){a.on("close",(function(){p.end()}));a.pipe(p)}else{p.end()}}getAgent(e){let a=new URL(e);return this._getAgent(a)}_prepareRequest(e,a,r){const p={};p.parsedUrl=a;const o=p.parsedUrl.protocol==="https:";p.httpModule=o?n:i;const d=o?443:80;p.options={};p.options.host=p.parsedUrl.hostname;p.options.port=p.parsedUrl.port?parseInt(p.parsedUrl.port):d;p.options.path=(p.parsedUrl.pathname||"")+(p.parsedUrl.search||"");p.options.method=e;p.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){p.options.headers["user-agent"]=this.userAgent}p.options.agent=this._getAgent(p.parsedUrl);if(this.handlers){this.handlers.forEach((e=>{e.prepareRequest(p.options)}))}return p}_mergeHeaders(e){const lowercaseKeys=e=>Object.keys(e).reduce(((a,r)=>(a[r.toLowerCase()]=e[r],a)),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,a,r){const lowercaseKeys=e=>Object.keys(e).reduce(((a,r)=>(a[r.toLowerCase()]=e[r],a)),{});let i;if(this.requestOptions&&this.requestOptions.headers){i=lowercaseKeys(this.requestOptions.headers)[a]}return e[a]||i||r}_getAgent(e){let a;let d=p.getProxyUrl(e);let s=d&&d.hostname;if(this._keepAlive&&s){a=this._proxyAgent}if(this._keepAlive&&!s){a=this._agent}if(!!a){return a}const l=e.protocol==="https:";let u=100;if(!!this.requestOptions){u=this.requestOptions.maxSockets||i.globalAgent.maxSockets}if(s){if(!o){o=r(4294)}const e={maxSockets:u,keepAlive:this._keepAlive,proxy:{...(d.username||d.password)&&{proxyAuth:`${d.username}:${d.password}`},host:d.hostname,port:d.port}};let i;const n=d.protocol==="https:";if(l){i=n?o.httpsOverHttps:o.httpsOverHttp}else{i=n?o.httpOverHttps:o.httpOverHttp}a=i(e);this._proxyAgent=a}if(this._keepAlive&&!a){const e={keepAlive:this._keepAlive,maxSockets:u};a=l?new n.Agent(e):new i.Agent(e);this._agent=a}if(!a){a=l?n.globalAgent:i.globalAgent}if(l&&this._ignoreSslError){a.options=Object.assign(a.options||{},{rejectUnauthorized:false})}return a}_performExponentialBackoff(e){e=Math.min(h,e);const a=v*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),a)))}static dateTimeDeserializer(e,a){if(typeof a==="string"){let e=new Date(a);if(!isNaN(e.valueOf())){return e}}return a}async _processResponse(e,a){return new Promise((async(r,i)=>{const n=e.message.statusCode;const p={statusCode:n,result:null,headers:{}};if(n==d.NotFound){r(p)}let o;let s;try{s=await e.readBody();if(s&&s.length>0){if(a&&a.deserializeDates){o=JSON.parse(s,HttpClient.dateTimeDeserializer)}else{o=JSON.parse(s)}p.result=o}p.headers=e.message.headers}catch(e){}if(n>299){let e;if(o&&o.message){e=o.message}else if(s&&s.length>0){e=s}else{e="Failed request: ("+n+")"}let a=new HttpClientError(e,n);a.result=p.result;i(a)}else{r(p)}}))}}a.HttpClient=HttpClient},6443:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:true});function getProxyUrl(e){let a=e.protocol==="https:";let r;if(checkBypass(e)){return r}let i;if(a){i=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{i=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(i){r=new URL(i)}return r}a.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}let a=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!a){return false}let r;if(e.port){r=Number(e.port)}else if(e.protocol==="http:"){r=80}else if(e.protocol==="https:"){r=443}let i=[e.hostname.toUpperCase()];if(typeof r==="number"){i.push(`${i[0]}:${r}`)}for(let e of a.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(i.some((a=>a===e))){return true}}return false}a.checkBypass=checkBypass},1962:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};var d;Object.defineProperty(a,"__esModule",{value:true});a.getCmdPath=a.tryGetExecutablePath=a.isRooted=a.isDirectory=a.exists=a.IS_WINDOWS=a.unlink=a.symlink=a.stat=a.rmdir=a.rename=a.readlink=a.readdir=a.mkdir=a.lstat=a.copyFile=a.chmod=void 0;const s=p(r(5747));const l=p(r(5622));d=s.promises,a.chmod=d.chmod,a.copyFile=d.copyFile,a.lstat=d.lstat,a.mkdir=d.mkdir,a.readdir=d.readdir,a.readlink=d.readlink,a.rename=d.rename,a.rmdir=d.rmdir,a.stat=d.stat,a.symlink=d.symlink,a.unlink=d.unlink;a.IS_WINDOWS=process.platform==="win32";function exists(e){return o(this,void 0,void 0,(function*(){try{yield a.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true}))}a.exists=exists;function isDirectory(e,r=false){return o(this,void 0,void 0,(function*(){const i=r?yield a.stat(e):yield a.lstat(e);return i.isDirectory()}))}a.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(a.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}a.isRooted=isRooted;function tryGetExecutablePath(e,r){return o(this,void 0,void 0,(function*(){let i=undefined;try{i=yield a.stat(e)}catch(a){if(a.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${a}`)}}if(i&&i.isFile()){if(a.IS_WINDOWS){const a=l.extname(e).toUpperCase();if(r.some((e=>e.toUpperCase()===a))){return e}}else{if(isUnixExecutable(i)){return e}}}const n=e;for(const p of r){e=n+p;i=undefined;try{i=yield a.stat(e)}catch(a){if(a.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${a}`)}}if(i&&i.isFile()){if(a.IS_WINDOWS){try{const r=l.dirname(e);const i=l.basename(e).toUpperCase();for(const n of yield a.readdir(r)){if(i===n.toUpperCase()){e=l.join(r,n);break}}}catch(a){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${a}`)}return e}else{if(isUnixExecutable(i)){return e}}}}return""}))}a.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(a.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}a.getCmdPath=getCmdPath},7436:function(e,a,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,a,r,i){if(i===undefined)i=r;Object.defineProperty(e,i,{enumerable:true,get:function(){return a[r]}})}:function(e,a,r,i){if(i===undefined)i=r;e[i]=a[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:true,value:a})}:function(e,a){e["default"]=a});var p=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))i(a,e,r);n(a,e);return a};var o=this&&this.__awaiter||function(e,a,r,i){function adopt(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,a||[])).next())}))};Object.defineProperty(a,"__esModule",{value:true});a.findInPath=a.which=a.mkdirP=a.rmRF=a.mv=a.cp=void 0;const d=r(2357);const s=p(r(3129));const l=p(r(5622));const u=r(1669);const m=p(r(1962));const c=u.promisify(s.exec);const h=u.promisify(s.execFile);function cp(e,a,r={}){return o(this,void 0,void 0,(function*(){const{force:i,recursive:n,copySourceDirectory:p}=readCopyOptions(r);const o=(yield m.exists(a))?yield m.stat(a):null;if(o&&o.isFile()&&!i){return}const d=o&&o.isDirectory()&&p?l.join(a,l.basename(e)):a;if(!(yield m.exists(e))){throw new Error(`no such file or directory: ${e}`)}const s=yield m.stat(e);if(s.isDirectory()){if(!n){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,d,0,i)}}else{if(l.relative(e,d)===""){throw new Error(`'${d}' and '${e}' are the same file`)}yield copyFile(e,d,i)}}))}a.cp=cp;function mv(e,a,r={}){return o(this,void 0,void 0,(function*(){if(yield m.exists(a)){let i=true;if(yield m.isDirectory(a)){a=l.join(a,l.basename(e));i=yield m.exists(a)}if(i){if(r.force==null||r.force){yield rmRF(a)}else{throw new Error("Destination already exists")}}}yield mkdirP(l.dirname(a));yield m.rename(e,a)}))}a.mv=mv;function rmRF(e){return o(this,void 0,void 0,(function*(){if(m.IS_WINDOWS){if(/[*"<>|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}try{const a=m.getCmdPath();if(yield m.isDirectory(e,true)){yield c(`${a} /s /c "rd /s /q "%inputPath%""`,{env:{inputPath:e}})}else{yield c(`${a} /s /c "del /f /a "%inputPath%""`,{env:{inputPath:e}})}}catch(e){if(e.code!=="ENOENT")throw e}try{yield m.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let a=false;try{a=yield m.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(a){yield h(`rm`,[`-rf`,`${e}`])}else{yield m.unlink(e)}}}))}a.rmRF=rmRF;function mkdirP(e){return o(this,void 0,void 0,(function*(){d.ok(e,"a path argument must be provided");yield m.mkdir(e,{recursive:true})}))}a.mkdirP=mkdirP;function which(e,a){return o(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(a){const a=yield which(e,false);if(!a){if(m.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}return a}const r=yield findInPath(e);if(r&&r.length>0){return r[0]}return""}))}a.which=which;function findInPath(e){return o(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const a=[];if(m.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(l.delimiter)){if(e){a.push(e)}}}if(m.isRooted(e)){const r=yield m.tryGetExecutablePath(e,a);if(r){return[r]}return[]}if(e.includes(l.sep)){return[]}const r=[];if(process.env.PATH){for(const e of process.env.PATH.split(l.delimiter)){if(e){r.push(e)}}}const i=[];for(const n of r){const r=yield m.tryGetExecutablePath(l.join(n,e),a);if(r){i.push(r)}}return i}))}a.findInPath=findInPath;function readCopyOptions(e){const a=e.force==null?true:e.force;const r=Boolean(e.recursive);const i=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:a,recursive:r,copySourceDirectory:i}}function cpDirRecursive(e,a,r,i){return o(this,void 0,void 0,(function*(){if(r>=255)return;r++;yield mkdirP(a);const n=yield m.readdir(e);for(const p of n){const n=`${e}/${p}`;const o=`${a}/${p}`;const d=yield m.lstat(n);if(d.isDirectory()){yield cpDirRecursive(n,o,r,i)}else{yield copyFile(n,o,i)}}yield m.chmod(a,(yield m.stat(e)).mode)}))}function copyFile(e,a,r){return o(this,void 0,void 0,(function*(){if((yield m.lstat(e)).isSymbolicLink()){try{yield m.lstat(a);yield m.unlink(a)}catch(e){if(e.code==="EPERM"){yield m.chmod(a,"0666");yield m.unlink(a)}}const r=yield m.readlink(e);yield m.symlink(r,a,m.IS_WINDOWS?"junction":null)}else if(!(yield m.exists(a))||r){yield m.copyFile(e,a)}}))}},9417:e=>{"use strict";e.exports=balanced;function balanced(e,a,r){if(e instanceof RegExp)e=maybeMatch(e,r);if(a instanceof RegExp)a=maybeMatch(a,r);var i=range(e,a,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+e.length,i[1]),post:r.slice(i[1]+a.length)}}function maybeMatch(e,a){var r=a.match(e);return r?r[0]:null}balanced.range=range;function range(e,a,r){var i,n,p,o,d;var s=r.indexOf(e);var l=r.indexOf(a,s+1);var u=s;if(s>=0&&l>0){if(e===a){return[s,l]}i=[];p=r.length;while(u>=0&&!d){if(u==s){i.push(u);s=r.indexOf(e,u+1)}else if(i.length==1){d=[i.pop(),l]}else{n=i.pop();if(n=0?s:l}if(i.length){d=[p,o]}}return d}},7817:(e,a,r)=>{var i=r(5026);var n="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";var p="0123456789ABCDEFGHIJKLMNOPQRSTUV";var o="0123456789ABCDEFGHJKMNPQRSTVWXYZ";e.exports=function base32Encode(e,a,r){r=r||{};var d,s;switch(a){case"RFC3548":case"RFC4648":d=n;s=true;break;case"RFC4648-HEX":d=p;s=true;break;case"Crockford":d=o;s=false;break;default:throw new Error("Unknown base32 variant: "+a)}var l=r.padding!==undefined?r.padding:s;var u=i(e);var m=0;var c=0;var h="";for(var v=0;v=5){h+=d[c>>>m-5&31];m-=5}}if(m>0){h+=d[c<<5-m&31]}if(l){while(h.length%8!==0){h+="="}}return h}},6463:(e,a)=>{"use strict";a.byteLength=byteLength;a.toByteArray=toByteArray;a.fromByteArray=fromByteArray;var r=[];var i=[];var n=typeof Uint8Array!=="undefined"?Uint8Array:Array;var p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var o=0,d=p.length;o0){throw new Error("Invalid string. Length must be a multiple of 4")}var r=e.indexOf("=");if(r===-1)r=a;var i=r===a?0:4-r%4;return[r,i]}function byteLength(e){var a=getLens(e);var r=a[0];var i=a[1];return(r+i)*3/4-i}function _byteLength(e,a,r){return(a+r)*3/4-r}function toByteArray(e){var a;var r=getLens(e);var p=r[0];var o=r[1];var d=new n(_byteLength(e,p,o));var s=0;var l=o>0?p-4:p;var u;for(u=0;u>16&255;d[s++]=a>>8&255;d[s++]=a&255}if(o===2){a=i[e.charCodeAt(u)]<<2|i[e.charCodeAt(u+1)]>>4;d[s++]=a&255}if(o===1){a=i[e.charCodeAt(u)]<<10|i[e.charCodeAt(u+1)]<<4|i[e.charCodeAt(u+2)]>>2;d[s++]=a>>8&255;d[s++]=a&255}return d}function tripletToBase64(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[e&63]}function encodeChunk(e,a,r){var i;var n=[];for(var p=a;ps?s:d+o))}if(n===1){a=e[i-1];p.push(r[a>>2]+r[a<<4&63]+"==")}else if(n===2){a=(e[i-2]<<8)+e[i-1];p.push(r[a>>10]+r[a>>4&63]+r[a<<2&63]+"=")}return p.join("")}},1575:(e,a,r)=>{e=r.nmd(e);var i=function(e){"use strict";var a=1e7,r=7,n=9007199254740992,p=smallToArray(n),o="0123456789abcdefghijklmnopqrstuvwxyz";var d=typeof BigInt==="function";function Integer(e,a,r,i){if(typeof e==="undefined")return Integer[0];if(typeof a!=="undefined")return+a===10&&!r?parseValue(e):parseBase(e,a,r,i);return parseValue(e)}function BigInteger(e,a){this.value=e;this.sign=a;this.isSmall=false}BigInteger.prototype=Object.create(Integer.prototype);function SmallInteger(e){this.value=e;this.sign=e<0;this.isSmall=true}SmallInteger.prototype=Object.create(Integer.prototype);function NativeBigInt(e){this.value=e}NativeBigInt.prototype=Object.create(Integer.prototype);function isPrecise(e){return-n0)return Math.floor(e);return Math.ceil(e)}function add(e,r){var i=e.length,n=r.length,p=new Array(i),o=0,d=a,s,l;for(l=0;l=d?1:0;p[l]=s-o*d}while(l0)p.push(o);return p}function addAny(e,a){if(e.length>=a.length)return add(e,a);return add(a,e)}function addSmall(e,r){var i=e.length,n=new Array(i),p=a,o,d;for(d=0;d0){n[d++]=r%p;r=Math.floor(r/p)}return n}BigInteger.prototype.add=function(e){var a=parseValue(e);if(this.sign!==a.sign){return this.subtract(a.negate())}var r=this.value,i=a.value;if(a.isSmall){return new BigInteger(addSmall(r,Math.abs(i)),this.sign)}return new BigInteger(addAny(r,i),this.sign)};BigInteger.prototype.plus=BigInteger.prototype.add;SmallInteger.prototype.add=function(e){var a=parseValue(e);var r=this.value;if(r<0!==a.sign){return this.subtract(a.negate())}var i=a.value;if(a.isSmall){if(isPrecise(r+i))return new SmallInteger(r+i);i=smallToArray(Math.abs(i))}return new BigInteger(addSmall(i,Math.abs(r)),r<0)};SmallInteger.prototype.plus=SmallInteger.prototype.add;NativeBigInt.prototype.add=function(e){return new NativeBigInt(this.value+parseValue(e).value)};NativeBigInt.prototype.plus=NativeBigInt.prototype.add;function subtract(e,r){var i=e.length,n=r.length,p=new Array(i),o=0,d=a,s,l;for(s=0;s=0){i=subtract(e,a)}else{i=subtract(a,e);r=!r}i=arrayToSmall(i);if(typeof i==="number"){if(r)i=-i;return new SmallInteger(i)}return new BigInteger(i,r)}function subtractSmall(e,r,i){var n=e.length,p=new Array(n),o=-r,d=a,s,l;for(s=0;s=0)};SmallInteger.prototype.minus=SmallInteger.prototype.subtract;NativeBigInt.prototype.subtract=function(e){return new NativeBigInt(this.value-parseValue(e).value)};NativeBigInt.prototype.minus=NativeBigInt.prototype.subtract;BigInteger.prototype.negate=function(){return new BigInteger(this.value,!this.sign)};SmallInteger.prototype.negate=function(){var e=this.sign;var a=new SmallInteger(-this.value);a.sign=!e;return a};NativeBigInt.prototype.negate=function(){return new NativeBigInt(-this.value)};BigInteger.prototype.abs=function(){return new BigInteger(this.value,false)};SmallInteger.prototype.abs=function(){return new SmallInteger(Math.abs(this.value))};NativeBigInt.prototype.abs=function(){return new NativeBigInt(this.value>=0?this.value:-this.value)};function multiplyLong(e,r){var i=e.length,n=r.length,p=i+n,o=createArray(p),d=a,s,l,u,m,c;for(u=0;u0){n[s++]=o%p;o=Math.floor(o/p)}return n}function shiftLeft(e,a){var r=[];while(a-- >0)r.push(0);return r.concat(e)}function multiplyKaratsuba(e,a){var r=Math.max(e.length,a.length);if(r<=30)return multiplyLong(e,a);r=Math.ceil(r/2);var i=e.slice(r),n=e.slice(0,r),p=a.slice(r),o=a.slice(0,r);var d=multiplyKaratsuba(n,o),s=multiplyKaratsuba(i,p),l=multiplyKaratsuba(addAny(n,i),addAny(o,p));var u=addAny(addAny(d,shiftLeft(subtract(subtract(l,d),s),r)),shiftLeft(s,2*r));trim(u);return u}function useKaratsuba(e,a){return-.012*e-.012*a+15e-6*e*a>0}BigInteger.prototype.multiply=function(e){var r=parseValue(e),i=this.value,n=r.value,p=this.sign!==r.sign,o;if(r.isSmall){if(n===0)return Integer[0];if(n===1)return this;if(n===-1)return this.negate();o=Math.abs(n);if(o=0;c--){m=p-1;if(l[c+n]!==d){m=Math.floor((l[c+n]*p+l[c+n-1])/d)}h=0;v=0;y=u.length;for(g=0;gn){u=(u+1)*d}s=Math.ceil(u/m);do{c=multiplySmall(r,s);if(compareAbs(c,o)<=0)break;s--}while(s);p.push(s);o=subtract(o,c)}p.reverse();return[arrayToSmall(p),arrayToSmall(o)]}function divModSmall(e,r){var i=e.length,n=createArray(i),p=a,o,d,s,l;s=0;for(o=i-1;o>=0;--o){l=s*p+e[o];d=truncate(l/r);s=l-d*r;n[o]=d|0}return[n,s|0]}function divModAny(e,r){var i,n=parseValue(r);if(d){return[new NativeBigInt(e.value/n.value),new NativeBigInt(e.value%n.value)]}var p=e.value,o=n.value;var s;if(o===0)throw new Error("Cannot divide by zero");if(e.isSmall){if(n.isSmall){return[new SmallInteger(truncate(p/o)),new SmallInteger(p%o)]}return[Integer[0],e]}if(n.isSmall){if(o===1)return[e,Integer[0]];if(o==-1)return[e.negate(),Integer[0]];var l=Math.abs(o);if(la.length?1:-1}for(var r=e.length-1;r>=0;r--){if(e[r]!==a[r])return e[r]>a[r]?1:-1}return 0}BigInteger.prototype.compareAbs=function(e){var a=parseValue(e),r=this.value,i=a.value;if(a.isSmall)return 1;return compareAbs(r,i)};SmallInteger.prototype.compareAbs=function(e){var a=parseValue(e),r=Math.abs(this.value),i=a.value;if(a.isSmall){i=Math.abs(i);return r===i?0:r>i?1:-1}return-1};NativeBigInt.prototype.compareAbs=function(e){var a=this.value;var r=parseValue(e).value;a=a>=0?a:-a;r=r>=0?r:-r;return a===r?0:a>r?1:-1};BigInteger.prototype.compare=function(e){if(e===Infinity){return-1}if(e===-Infinity){return 1}var a=parseValue(e),r=this.value,i=a.value;if(this.sign!==a.sign){return a.sign?1:-1}if(a.isSmall){return this.sign?-1:1}return compareAbs(r,i)*(this.sign?-1:1)};BigInteger.prototype.compareTo=BigInteger.prototype.compare;SmallInteger.prototype.compare=function(e){if(e===Infinity){return-1}if(e===-Infinity){return 1}var a=parseValue(e),r=this.value,i=a.value;if(a.isSmall){return r==i?0:r>i?1:-1}if(r<0!==a.sign){return r<0?-1:1}return r<0?1:-1};SmallInteger.prototype.compareTo=SmallInteger.prototype.compare;NativeBigInt.prototype.compare=function(e){if(e===Infinity){return-1}if(e===-Infinity){return 1}var a=this.value;var r=parseValue(e).value;return a===r?0:a>r?1:-1};NativeBigInt.prototype.compareTo=NativeBigInt.prototype.compare;BigInteger.prototype.equals=function(e){return this.compare(e)===0};NativeBigInt.prototype.eq=NativeBigInt.prototype.equals=SmallInteger.prototype.eq=SmallInteger.prototype.equals=BigInteger.prototype.eq=BigInteger.prototype.equals;BigInteger.prototype.notEquals=function(e){return this.compare(e)!==0};NativeBigInt.prototype.neq=NativeBigInt.prototype.notEquals=SmallInteger.prototype.neq=SmallInteger.prototype.notEquals=BigInteger.prototype.neq=BigInteger.prototype.notEquals;BigInteger.prototype.greater=function(e){return this.compare(e)>0};NativeBigInt.prototype.gt=NativeBigInt.prototype.greater=SmallInteger.prototype.gt=SmallInteger.prototype.greater=BigInteger.prototype.gt=BigInteger.prototype.greater;BigInteger.prototype.lesser=function(e){return this.compare(e)<0};NativeBigInt.prototype.lt=NativeBigInt.prototype.lesser=SmallInteger.prototype.lt=SmallInteger.prototype.lesser=BigInteger.prototype.lt=BigInteger.prototype.lesser;BigInteger.prototype.greaterOrEquals=function(e){return this.compare(e)>=0};NativeBigInt.prototype.geq=NativeBigInt.prototype.greaterOrEquals=SmallInteger.prototype.geq=SmallInteger.prototype.greaterOrEquals=BigInteger.prototype.geq=BigInteger.prototype.greaterOrEquals;BigInteger.prototype.lesserOrEquals=function(e){return this.compare(e)<=0};NativeBigInt.prototype.leq=NativeBigInt.prototype.lesserOrEquals=SmallInteger.prototype.leq=SmallInteger.prototype.lesserOrEquals=BigInteger.prototype.leq=BigInteger.prototype.lesserOrEquals;BigInteger.prototype.isEven=function(){return(this.value[0]&1)===0};SmallInteger.prototype.isEven=function(){return(this.value&1)===0};NativeBigInt.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)};BigInteger.prototype.isOdd=function(){return(this.value[0]&1)===1};SmallInteger.prototype.isOdd=function(){return(this.value&1)===1};NativeBigInt.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)};BigInteger.prototype.isPositive=function(){return!this.sign};SmallInteger.prototype.isPositive=function(){return this.value>0};NativeBigInt.prototype.isPositive=SmallInteger.prototype.isPositive;BigInteger.prototype.isNegative=function(){return this.sign};SmallInteger.prototype.isNegative=function(){return this.value<0};NativeBigInt.prototype.isNegative=SmallInteger.prototype.isNegative;BigInteger.prototype.isUnit=function(){return false};SmallInteger.prototype.isUnit=function(){return Math.abs(this.value)===1};NativeBigInt.prototype.isUnit=function(){return this.abs().value===BigInt(1)};BigInteger.prototype.isZero=function(){return false};SmallInteger.prototype.isZero=function(){return this.value===0};NativeBigInt.prototype.isZero=function(){return this.value===BigInt(0)};BigInteger.prototype.isDivisibleBy=function(e){var a=parseValue(e);if(a.isZero())return false;if(a.isUnit())return true;if(a.compareAbs(2)===0)return this.isEven();return this.mod(a).isZero()};NativeBigInt.prototype.isDivisibleBy=SmallInteger.prototype.isDivisibleBy=BigInteger.prototype.isDivisibleBy;function isBasicPrime(e){var a=e.abs();if(a.isUnit())return false;if(a.equals(2)||a.equals(3)||a.equals(5))return true;if(a.isEven()||a.isDivisibleBy(3)||a.isDivisibleBy(5))return false;if(a.lesser(49))return true}function millerRabinTest(e,a){var r=e.prev(),n=r,p=0,o,d,s,l;while(n.isEven())n=n.divide(2),p++;e:for(s=0;s-n)return new SmallInteger(e-1);return new BigInteger(p,true)};NativeBigInt.prototype.prev=function(){return new NativeBigInt(this.value-BigInt(1))};var s=[1];while(2*s[s.length-1]<=a)s.push(2*s[s.length-1]);var l=s.length,u=s[l-1];function shift_isSmall(e){return Math.abs(e)<=a}BigInteger.prototype.shiftLeft=function(e){var a=parseValue(e).toJSNumber();if(!shift_isSmall(a)){throw new Error(String(a)+" is too large for shifting.")}if(a<0)return this.shiftRight(-a);var r=this;if(r.isZero())return r;while(a>=l){r=r.multiply(u);a-=l-1}return r.multiply(s[a])};NativeBigInt.prototype.shiftLeft=SmallInteger.prototype.shiftLeft=BigInteger.prototype.shiftLeft;BigInteger.prototype.shiftRight=function(e){var a;var r=parseValue(e).toJSNumber();if(!shift_isSmall(r)){throw new Error(String(r)+" is too large for shifting.")}if(r<0)return this.shiftLeft(-r);var i=this;while(r>=l){if(i.isZero()||i.isNegative()&&i.isUnit())return i;a=divModAny(i,u);i=a[1].isNegative()?a[0].prev():a[0];r-=l-1}a=divModAny(i,s[r]);return a[1].isNegative()?a[0].prev():a[0]};NativeBigInt.prototype.shiftRight=SmallInteger.prototype.shiftRight=BigInteger.prototype.shiftRight;function bitwise(e,a,r){a=parseValue(a);var n=e.isNegative(),p=a.isNegative();var o=n?e.not():e,d=p?a.not():a;var s=0,l=0;var m=null,c=null;var h=[];while(!o.isZero()||!d.isZero()){m=divModAny(o,u);s=m[1].toJSNumber();if(n){s=u-1-s}c=divModAny(d,u);l=c[1].toJSNumber();if(p){l=u-1-l}o=m[0];d=c[0];h.push(r(s,l))}var v=r(n?1:0,p?1:0)!==0?i(-1):i(0);for(var g=h.length-1;g>=0;g-=1){v=v.multiply(u).add(i(h[g]))}return v}BigInteger.prototype.not=function(){return this.negate().prev()};NativeBigInt.prototype.not=SmallInteger.prototype.not=BigInteger.prototype.not;BigInteger.prototype.and=function(e){return bitwise(this,e,(function(e,a){return e&a}))};NativeBigInt.prototype.and=SmallInteger.prototype.and=BigInteger.prototype.and;BigInteger.prototype.or=function(e){return bitwise(this,e,(function(e,a){return e|a}))};NativeBigInt.prototype.or=SmallInteger.prototype.or=BigInteger.prototype.or;BigInteger.prototype.xor=function(e){return bitwise(this,e,(function(e,a){return e^a}))};NativeBigInt.prototype.xor=SmallInteger.prototype.xor=BigInteger.prototype.xor;var m=1<<30,c=(a&-a)*(a&-a)|m;function roughLOB(e){var r=e.value,i=typeof r==="number"?r|m:typeof r==="bigint"?r|BigInt(m):r[0]+r[1]*a|c;return i&-i}function integerLogarithm(e,a){if(a.compareTo(e)<=0){var r=integerLogarithm(e,a.square(a));var n=r.p;var p=r.e;var o=n.multiply(a);return o.compareTo(e)<=0?{p:o,e:p*2+1}:{p:n,e:p*2}}return{p:i(1),e:0}}BigInteger.prototype.bitLength=function(){var e=this;if(e.compareTo(i(0))<0){e=e.negate().subtract(i(1))}if(e.compareTo(i(0))===0){return i(0)}return i(integerLogarithm(e,i(2)).e).add(i(1))};NativeBigInt.prototype.bitLength=SmallInteger.prototype.bitLength=BigInteger.prototype.bitLength;function max(e,a){e=parseValue(e);a=parseValue(a);return e.greater(a)?e:a}function min(e,a){e=parseValue(e);a=parseValue(a);return e.lesser(a)?e:a}function gcd(e,a){e=parseValue(e).abs();a=parseValue(a).abs();if(e.equals(a))return e;if(e.isZero())return a;if(a.isZero())return e;var r=Integer[1],i,n;while(e.isEven()&&a.isEven()){i=min(roughLOB(e),roughLOB(a));e=e.divide(i);a=a.divide(i);r=r.multiply(i)}while(e.isEven()){e=e.divide(roughLOB(e))}do{while(a.isEven()){a=a.divide(roughLOB(a))}if(e.greater(a)){n=a;a=e;e=n}a=a.subtract(e)}while(!a.isZero());return r.isUnit()?e:e.multiply(r)}function lcm(e,a){e=parseValue(e).abs();a=parseValue(a).abs();return e.divide(gcd(e,a)).multiply(a)}function randBetween(e,r,i){e=parseValue(e);r=parseValue(r);var n=i||Math.random;var p=min(e,r),o=max(e,r);var d=o.subtract(p).add(1);if(d.isSmall)return p.add(Math.floor(n()*d));var s=toBase(d,a).value;var l=[],u=true;for(var m=0;m=d){if(l==="1"&&d===1)continue;throw new Error(l+" is not a valid digit in base "+a+".")}}}a=parseValue(a);var u=[];var m=e[0]==="-";for(p=m?1:0;p"&&p=0;p--){i=i.add(e[p].times(n));n=n.times(a)}return r?i.negate():i}function stringify(e,a){a=a||o;if(e"}function toBase(e,a){a=i(a);if(a.isZero()){if(e.isZero())return{value:[0],isNegative:false};throw new Error("Cannot convert nonzero numbers to base 0.")}if(a.equals(-1)){if(e.isZero())return{value:[0],isNegative:false};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:false};var r=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);r.unshift([1]);return{value:[].concat.apply([],r),isNegative:false}}var n=false;if(e.isNegative()&&a.isPositive()){n=true;e=e.abs()}if(a.isUnit()){if(e.isZero())return{value:[0],isNegative:false};return{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:n}}var p=[];var o=e,d;while(o.isNegative()||o.compareAbs(a)>=0){d=o.divmod(a);o=d.quotient;var s=d.remainder;if(s.isNegative()){s=a.minus(s).abs();o=o.next()}p.push(s.toJSNumber())}p.push(o.toJSNumber());return{value:p.reverse(),isNegative:n}}function toBaseString(e,a,r){var i=toBase(e,a);return(i.isNegative?"-":"")+i.value.map((function(e){return stringify(e,r)})).join("")}BigInteger.prototype.toArray=function(e){return toBase(this,e)};SmallInteger.prototype.toArray=function(e){return toBase(this,e)};NativeBigInt.prototype.toArray=function(e){return toBase(this,e)};BigInteger.prototype.toString=function(a,r){if(a===e)a=10;if(a!==10)return toBaseString(this,a,r);var i=this.value,n=i.length,p=String(i[--n]),o="0000000",d;while(--n>=0){d=String(i[n]);p+=o.slice(d.length)+d}var s=this.sign?"-":"";return s+p};SmallInteger.prototype.toString=function(a,r){if(a===e)a=10;if(a!=10)return toBaseString(this,a,r);return String(this.value)};NativeBigInt.prototype.toString=SmallInteger.prototype.toString;NativeBigInt.prototype.toJSON=BigInteger.prototype.toJSON=SmallInteger.prototype.toJSON=function(){return this.toString()};BigInteger.prototype.valueOf=function(){return parseInt(this.toString(),10)};BigInteger.prototype.toJSNumber=BigInteger.prototype.valueOf;SmallInteger.prototype.valueOf=function(){return this.value};SmallInteger.prototype.toJSNumber=SmallInteger.prototype.valueOf;NativeBigInt.prototype.valueOf=NativeBigInt.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function parseStringValue(e){if(isPrecise(+e)){var a=+e;if(a===truncate(a))return d?new NativeBigInt(BigInt(a)):new SmallInteger(a);throw new Error("Invalid integer: "+e)}var i=e[0]==="-";if(i)e=e.slice(1);var n=e.split(/e/i);if(n.length>2)throw new Error("Invalid integer: "+n.join("e"));if(n.length===2){var p=n[1];if(p[0]==="+")p=p.slice(1);p=+p;if(p!==truncate(p)||!isPrecise(p))throw new Error("Invalid integer: "+p+" is not a valid exponent.");var o=n[0];var s=o.indexOf(".");if(s>=0){p-=o.length-s-1;o=o.slice(0,s)+o.slice(s+1)}if(p<0)throw new Error("Cannot include negative exponent part for integers");o+=new Array(p+1).join("0");e=o}var l=/^([0-9][0-9]*)$/.test(e);if(!l)throw new Error("Invalid integer: "+e);if(d){return new NativeBigInt(BigInt(i?"-"+e:e))}var u=[],m=e.length,c=r,h=m-c;while(m>0){u.push(+e.slice(h,m));h-=c;if(h<0)h=0;m-=c}trim(u);return new BigInteger(u,i)}function parseNumberValue(e){if(d){return new NativeBigInt(BigInt(e))}if(isPrecise(e)){if(e!==truncate(e))throw new Error(e+" is not an integer.");return new SmallInteger(e)}return parseStringValue(e.toString())}function parseValue(e){if(typeof e==="number"){return parseNumberValue(e)}if(typeof e==="string"){return parseStringValue(e)}if(typeof e==="bigint"){return new NativeBigInt(e)}return e}for(var h=0;h<1e3;h++){Integer[h]=parseValue(h);if(h>0)Integer[-h]=parseValue(-h)}Integer.one=Integer[1];Integer.zero=Integer[0];Integer.minusOne=Integer[-1];Integer.max=max;Integer.min=min;Integer.gcd=gcd;Integer.lcm=lcm;Integer.isInstance=function(e){return e instanceof BigInteger||e instanceof SmallInteger||e instanceof NativeBigInt};Integer.randBetween=randBetween;Integer.fromArray=function(e,a,r){return parseBaseFromArray(e.map(parseValue),parseValue(a||10),r)};return Integer}();if(true&&e.hasOwnProperty("exports")){e.exports=i}if(typeof define==="function"&&define.amd){define((function(){return i}))}},4067:(e,a,r)=>{"use strict";var i=r(8168);var n=false;function Real(e){this.value=e}e.exports=function(e){var a=new i.WritableStreamBuffer;a.write(new Buffer("bplist00"));if(n){console.log("create",r(1669).inspect(e,false,10))}if(e instanceof Array&&e.length===1){e=e[0]}var p=toEntries(e);if(n){console.log("entries",p)}var o=computeIdSizeInBytes(p.length);var d=[];var s;var l;updateEntryIds();p.forEach((function(e,r){d[r]=a.size();if(!e){a.write(0)}else{write(e)}}));writeOffsetTable();writeTrailer();return a.getContents();function updateEntryIds(){var e={};var a=0;p.forEach((function(r){if(r.id){return}if(r.type==="string"){if(!r.bplistOverride&&e.hasOwnProperty(r.value)){r.type="stringref";r.id=e[r.value]}else{e[r.value]=r.id=a++}}else{r.id=a++}}));p=p.filter((function(e){return e.type!=="stringref"}))}function writeTrailer(){if(n){console.log("0x"+a.size().toString(16),"writeTrailer")}a.write(new Buffer([0,0,0,0,0,0]));if(n){console.log("0x"+a.size().toString(16),"writeTrailer(offsetSizeInBytes):",s)}writeByte(s);if(n){console.log("0x"+a.size().toString(16),"writeTrailer(offsetSizeInBytes):",o)}writeByte(o);if(n){console.log("0x"+a.size().toString(16),"writeTrailer(number of objects):",p.length)}writeLong(p.length);if(n){console.log("0x"+a.size().toString(16),"writeTrailer(top object)")}writeLong(0);if(n){console.log("0x"+a.size().toString(16),"writeTrailer(offset table offset):",l)}writeLong(l)}function writeOffsetTable(){if(n){console.log("0x"+a.size().toString(16),"writeOffsetTable")}l=a.size();s=computeOffsetSizeInBytes(l);d.forEach((function(e){writeBytes(e,s)}))}function write(e){switch(e.type){case"dict":writeDict(e);break;case"number":case"double":writeNumber(e);break;case"UID":writeUID(e);break;case"array":writeArray(e);break;case"boolean":writeBoolean(e);break;case"string":case"string-utf16":writeString(e);break;case"date":writeDate(e);break;case"data":writeData(e);break;default:throw new Error("unhandled entry type: "+e.type)}}function writeDate(e){writeByte(51);var a=Date.parse(e.value)/1e3-978307200;writeDouble(a)}function writeDict(e){if(n){var r=e.entryKeys.map((function(e){return e.id}));var i=e.entryValues.map((function(e){return e.id}));console.log("0x"+a.size().toString(16),"writeDict","(id: "+e.id+")","(keys: "+r+")","(values: "+i+")")}writeIntHeader(13,e.entryKeys.length);e.entryKeys.forEach((function(e){writeID(e.id)}));e.entryValues.forEach((function(e){writeID(e.id)}))}function writeNumber(e){if(n){console.log("0x"+a.size().toString(16),"writeNumber",e.value," (type: "+e.type+")","(id: "+e.id+")")}if(e.type!=="double"&&parseFloat(e.value.toFixed())==e.value){if(e.value<0){writeByte(19);writeBytes(e.value,8,true)}else if(e.value<=255){writeByte(16);writeBytes(e.value,1)}else if(e.value<=65535){writeByte(17);writeBytes(e.value,2)}else if(e.value<=4294967295){writeByte(18);writeBytes(e.value,4)}else{writeByte(20);writeBytes(e.value,8)}}else{writeByte(35);writeDouble(e.value)}}function writeUID(e){if(n){console.log("0x"+a.size().toString(16),"writeUID",e.value," (type: "+e.type+")","(id: "+e.id+")")}writeIntHeader(8,0);writeID(e.value)}function writeArray(e){if(n){console.log("0x"+a.size().toString(16),"writeArray (length: "+e.entries.length+")","(id: "+e.id+")")}writeIntHeader(10,e.entries.length);e.entries.forEach((function(e){writeID(e.id)}))}function writeBoolean(e){if(n){console.log("0x"+a.size().toString(16),"writeBoolean",e.value,"(id: "+e.id+")")}writeByte(e.value?9:8)}function writeString(e){if(n){console.log("0x"+a.size().toString(16),"writeString",e.value,"(id: "+e.id+")")}if(e.type==="string-utf16"||mustBeUtf16(e.value)){var r=new Buffer(e.value,"ucs2");writeIntHeader(6,r.length/2);for(var i=0;i4){n[p++]=0;r--}}for(var o=r-1;o>=0;o--){n[p++]=e>>8*o}a.write(n)}function mustBeUtf16(e){return Buffer.byteLength(e,"utf8")!=e.length}};function toEntries(e){if(e.bplistOverride){return[e]}if(e instanceof Array){return toEntriesArray(e)}else if(e instanceof Buffer){return[{type:"data",value:e}]}else if(e instanceof Real){return[{type:"double",value:e.value}]}else if(typeof e==="object"){if(e instanceof Date){return[{type:"date",value:e}]}else if(Object.keys(e).length==1&&typeof e.UID==="number"){return[{type:"UID",value:e.UID}]}else{return toEntriesObject(e)}}else if(typeof e==="string"){return[{type:"string",value:e}]}else if(typeof e==="number"){return[{type:"number",value:e}]}else if(typeof e==="boolean"){return[{type:"boolean",value:e}]}else if(typeof e==="bigint"){return[{type:"number",value:Number(BigInt.asIntN(32,e))}]}else{throw new Error("unhandled entry: "+e)}}function toEntriesArray(e){if(n){console.log("toEntriesArray")}var a=[{type:"array",entries:[]}];e.forEach((function(e){var r=toEntries(e);a[0].entries.push(r[0]);a=a.concat(r)}));return a}function toEntriesObject(e){if(n){console.log("toEntriesObject")}var a=[{type:"dict",entryKeys:[],entryValues:[]}];Object.keys(e).forEach((function(e){var r=toEntries(e);a[0].entryKeys.push(r[0]);a=a.concat(r[0])}));Object.keys(e).forEach((function(r){var i=toEntries(e[r]);a[0].entryValues.push(i[0]);a=a.concat(i)}));return a}function computeOffsetSizeInBytes(e){if(e<256){return 1}if(e<65536){return 2}if(e<4294967296){return 4}return 8}function computeIdSizeInBytes(e){if(e<256){return 1}if(e<65536){return 2}return 4}e.exports.Real=Real},8905:(e,a,r)=>{"use strict";const i=r(5747);const n=r(1575);const p=false;a.maxObjectSize=100*1e3*1e3;a.maxObjectCount=32768;const o=9783072e5;const d=a.UID=function(e){this.UID=e};const s=a.parseFile=function(e,a){return new Promise((function(r,n){function tryParseBuffer(e){let i=null;let p;try{p=l(e);r(p)}catch(e){i=e;n(i)}finally{if(a)a(i,p)}}if(Buffer.isBuffer(e)){return tryParseBuffer(e)}i.readFile(e,(function(e,r){if(e){n(e);return a(e)}tryParseBuffer(r)}))}))};const l=a.parseBuffer=function(e){const r=e.slice(0,"bplist".length).toString("utf8");if(r!=="bplist"){throw new Error("Invalid binary plist. Expected 'bplist' at offset 0.")}const i=e.slice(e.length-32,e.length);const s=i.readUInt8(6);if(p){console.log("offsetSize: "+s)}const l=i.readUInt8(7);if(p){console.log("objectRefSize: "+l)}const u=readUInt64BE(i,8);if(p){console.log("numObjects: "+u)}const m=readUInt64BE(i,16);if(p){console.log("topObject: "+m)}const c=readUInt64BE(i,24);if(p){console.log("offsetTableOffset: "+c)}if(u>a.maxObjectCount){throw new Error("maxObjectCount exceeded")}const h=[];for(let a=0;a>4;const m=s&15;switch(u){case 0:return parseSimple();case 1:return parseInteger();case 8:return parseUID();case 2:return parseReal();case 3:return parseDate();case 4:return parseData();case 5:return parsePlistString();case 6:return parsePlistString(true);case 10:return parseArray();case 13:return parseDictionary();default:throw new Error("Unhandled type 0x"+u.toString(16))}function parseSimple(){switch(m){case 0:return null;case 8:return false;case 9:return true;case 15:return null;default:throw new Error("Unhandled simple type 0x"+u.toString(16))}}function bufferToHexString(e){let a="";let r;for(r=0;ra.maxObjectSize){throw new Error("To little heap space available!")}const p=[];for(let a=0;aa.maxObjectSize){throw new Error("To little heap space available!")}if(p){console.log("Parsing dictionary #"+r)}const d={};for(let a=0;a{var i=r(6891);var n=r(9417);e.exports=expandTop;var p="\0SLASH"+Math.random()+"\0";var o="\0OPEN"+Math.random()+"\0";var d="\0CLOSE"+Math.random()+"\0";var s="\0COMMA"+Math.random()+"\0";var l="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function escapeBraces(e){return e.split("\\\\").join(p).split("\\{").join(o).split("\\}").join(d).split("\\,").join(s).split("\\.").join(l)}function unescapeBraces(e){return e.split(p).join("\\").split(o).join("{").split(d).join("}").split(s).join(",").split(l).join(".")}function parseCommaParts(e){if(!e)return[""];var a=[];var r=n("{","}",e);if(!r)return e.split(",");var i=r.pre;var p=r.body;var o=r.post;var d=i.split(",");d[d.length-1]+="{"+p+"}";var s=parseCommaParts(o);if(o.length){d[d.length-1]+=s.shift();d.push.apply(d,s)}a.push.apply(a,d);return a}function expandTop(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return expand(escapeBraces(e),true).map(unescapeBraces)}function identity(e){return e}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,a){return e<=a}function gte(e,a){return e>=a}function expand(e,a){var r=[];var p=n("{","}",e);if(!p||/\$$/.test(p.pre))return[e];var o=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(p.body);var s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(p.body);var l=o||s;var u=p.body.indexOf(",")>=0;if(!l&&!u){if(p.post.match(/,.*\}/)){e=p.pre+"{"+p.body+d+p.post;return expand(e)}return[e]}var m;if(l){m=p.body.split(/\.\./)}else{m=parseCommaParts(p.body);if(m.length===1){m=expand(m[0],false).map(embrace);if(m.length===1){var c=p.post.length?expand(p.post,false):[""];return c.map((function(e){return p.pre+m[0]+e}))}}}var h=p.pre;var c=p.post.length?expand(p.post,false):[""];var v;if(l){var g=numeric(m[0]);var y=numeric(m[1]);var w=Math.max(m[0].length,m[1].length);var b=m.length==3?Math.abs(numeric(m[2])):1;var S=lte;var _=y0){var I=new Array(C+1).join("0");if(E<0)D="-"+I+D.slice(1);else D=I+D}}}v.push(D)}}else{v=i(m,(function(e){return expand(e,false)}))}for(var T=0;T{var i=r(4293).Buffer;var n=[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];if(typeof Int32Array!=="undefined"){n=new Int32Array(n)}function ensureBuffer(e){if(i.isBuffer(e)){return e}var a=typeof i.alloc==="function"&&typeof i.from==="function";if(typeof e==="number"){return a?i.alloc(e):new i(e)}else if(typeof e==="string"){return a?i.from(e):new i(e)}else{throw new Error("input must be buffer, number, or string, received "+typeof e)}}function bufferizeInt(e){var a=ensureBuffer(4);a.writeInt32BE(e,0);return a}function _crc32(e,a){e=ensureBuffer(e);if(i.isBuffer(a)){a=a.readUInt32BE(0)}var r=~~a^-1;for(var p=0;p>>8}return r^-1}function crc32(){return bufferizeInt(_crc32.apply(null,arguments))}crc32.signed=function(){return _crc32.apply(null,arguments)};crc32.unsigned=function(){return _crc32.apply(null,arguments)>>>0};e.exports=crc32},421:e=>{var a={utf8:{stringToBytes:function(e){return a.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(a.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var a=[],r=0;r{e.exports=function(e,r){var i=[];for(var n=0;n{(function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(e,a){return e<>>32-a},rotr:function(e,a){return e<<32-a|e>>>a},endian:function(e){if(e.constructor==Number){return r.rotl(e,8)&16711935|r.rotl(e,24)&4278255360}for(var a=0;a0;e--)a.push(Math.floor(Math.random()*256));return a},bytesToWords:function(e){for(var a=[],r=0,i=0;r>>5]|=e[r]<<24-i%32;return a},wordsToBytes:function(e){for(var a=[],r=0;r>>5]>>>24-r%32&255);return a},bytesToHex:function(e){for(var a=[],r=0;r>>4).toString(16));a.push((e[r]&15).toString(16))}return a.join("")},hexToBytes:function(e){for(var a=[],r=0;r>>6*(3-p)&63));else r.push("=")}return r.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],i=0,n=0;i>>6-n*2)}return r}};e.exports=r})()},8222:(e,a,r)=>{a.formatArgs=formatArgs;a.save=save;a.load=load;a.useColors=useColors;a.storage=localstorage();a.destroy=(()=>{let e=false;return()=>{if(!e){e=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(a){a[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+a[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const r="color: "+this.color;a.splice(1,0,r,"color: inherit");let i=0;let n=0;a[0].replace(/%[a-zA-Z%]/g,(e=>{if(e==="%%"){return}i++;if(e==="%c"){n=i}}));a.splice(n,0,r)}a.log=console.debug||console.log||(()=>{});function save(e){try{if(e){a.storage.setItem("debug",e)}else{a.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=a.storage.getItem("debug")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=r(6243)(a);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},6243:(e,a,r)=>{function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=r(900);createDebug.destroy=destroy;Object.keys(e).forEach((a=>{createDebug[a]=e[a]}));createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let a=0;for(let r=0;r{if(a==="%%"){return"%"}p++;const n=createDebug.formatters[i];if(typeof n==="function"){const i=e[p];a=n.call(r,i);e.splice(p,1);p--}return a}));createDebug.formatArgs.call(r,e);const o=r.log||createDebug.log;o.apply(r,e)}debug.namespace=e;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(e);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(r!==null){return r}if(i!==createDebug.namespaces){i=createDebug.namespaces;n=createDebug.enabled(e)}return n},set:e=>{r=e}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(e,a){const r=createDebug(this.namespace+(typeof a==="undefined"?":":a)+e);r.log=this.log;return r}function enable(e){createDebug.save(e);createDebug.namespaces=e;createDebug.names=[];createDebug.skips=[];let a;const r=(typeof e==="string"?e:"").split(/[\s,]+/);const i=r.length;for(a=0;a"-"+e))].join(",");createDebug.enable("");return e}function enabled(e){if(e[e.length-1]==="*"){return true}let a;let r;for(a=0,r=createDebug.skips.length;a{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=r(8222)}else{e.exports=r(5332)}},5332:(e,a,r)=>{const i=r(3867);const n=r(1669);a.init=init;a.log=log;a.formatArgs=formatArgs;a.save=save;a.load=load;a.useColors=useColors;a.destroy=n.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");a.colors=[6,2,3,4,5,1];try{const e=r(9318);if(e&&(e.stderr||e).level>=2){a.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}a.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,a)=>{const r=a.substring(6).toLowerCase().replace(/_([a-z])/g,((e,a)=>a.toUpperCase()));let i=process.env[a];if(/^(yes|on|true|enabled)$/i.test(i)){i=true}else if(/^(no|off|false|disabled)$/i.test(i)){i=false}else if(i==="null"){i=null}else{i=Number(i)}e[r]=i;return e}),{});function useColors(){return"colors"in a.inspectOpts?Boolean(a.inspectOpts.colors):i.isatty(process.stderr.fd)}function formatArgs(a){const{namespace:r,useColors:i}=this;if(i){const i=this.color;const n="[3"+(i<8?i:"8;5;"+i);const p=` ${n};1m${r} `;a[0]=p+a[0].split("\n").join("\n"+p);a.push(n+"m+"+e.exports.humanize(this.diff)+"")}else{a[0]=getDate()+r+" "+a[0]}}function getDate(){if(a.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(n.format(...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const r=Object.keys(a.inspectOpts);for(let i=0;ie.trim())).join(" ")};p.O=function(e){this.inspectOpts.colors=this.useColors;return n.inspect(e,this.inspectOpts)}},1349:(e,a,r)=>{var i=r(2357);var n=r(4223);var p=r(1669);var o=r(3539);var d=r(9414);function Helper(){this.file=new d;this.opts={window:{x:100,y:100}}}Helper.prototype.setBackgroundPath=function(e){this.opts.backgroundPath=e};Helper.prototype.setBackgroundColor=function(e,a,r){this.opts.backgroundColor=[e,a,r]};Helper.prototype.setIconSize=function(e){this.opts.iconSize=e};Helper.prototype.setIconPos=function(e,a,r){this.file.push(o.construct(e,"Iloc",{x:a,y:r}))};Helper.prototype.setWindowPos=function(e,a){this.opts.window.x=e;this.opts.window.y=a};Helper.prototype.setWindowSize=function(e,a){this.opts.window.width=e;this.opts.window.height=a+22};Helper.prototype.vSrn=function(e){i(e===0||e===1);this.file.push(o.construct(".","vSrn",{value:e}))};Helper.prototype.write=function(e,a){var r,i;if(this.opts.backgroundPath){r=n.create(this.opts.backgroundPath)}if(this.opts.backgroundColor){i=this.opts.backgroundColor}this.file.push(o.construct(".","bwsp",this.opts.window));this.file.push(o.construct(".","icvp",{iconSize:this.opts.iconSize,rawAlias:r,colorComponents:i}));this.file.write(e,a)};Helper.prototype.setBackground=p.deprecate(Helper.prototype.setBackgroundPath,"setBackground is deprecated, please use setBackgroundPath");e.exports=a=Helper},9414:(e,a,r)=>{var i=r(5747);var n=r(5622);var p=r(3539);function DSStore(){this.entries=[]}DSStore.prototype.push=function(e){this.entries.push(e)};DSStore.prototype.write=function(e,a){var n=this.entries.sort(p.sort);i.readFile(r.ab+"DSStore-clean",(function(r,p){if(r)return a(r);var o=new Buffer(3840);o.fill(0);var d=0;var s=0;var l=n.length;o.writeUInt32BE(s,d);o.writeUInt32BE(l,d+4);d+=8;n.forEach((function(e,a){var r=e.buffer;r.copy(o,d);d+=r.length}));p.writeUInt32BE(n.length,76);o.copy(p,4100);i.writeFile(e,p,(function(e){a(e)}))}))};e.exports=a=DSStore},3539:(e,a,r)=>{var i=r(8694);var n=r(4067);function utf16be(e){var a=new Buffer(e,"ucs2");for(var r=0;r{"use strict";e.exports=function encodeUtf8(e){var a=[];var r=e.length;for(var i=0;i=55296&&n<=56319&&r>i+1){var p=e.charCodeAt(i+1);if(p>=56320&&p<=57343){n=(n-55296)*1024+p-56320+65536;i+=1}}if(n<128){a.push(n);continue}if(n<2048){a.push(n>>6|192);a.push(n&63|128);continue}if(n<55296||n>=57344&&n<65536){a.push(n>>12|224);a.push(n>>6&63|128);a.push(n&63|128);continue}if(n>=65536&&n<=1114111){a.push(n>>18|240);a.push(n>>12&63|128);a.push(n>>6&63|128);a.push(n&63|128);continue}a.push(239,191,189)}return new Uint8Array(a).buffer}},1205:(e,a,r)=>{var i=r(1223);var noop=function(){};var isRequest=function(e){return e.setHeader&&typeof e.abort==="function"};var isChildProcess=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3};var eos=function(e,a,r){if(typeof a==="function")return eos(e,null,a);if(!a)a={};r=i(r||noop);var n=e._writableState;var p=e._readableState;var o=a.readable||a.readable!==false&&e.readable;var d=a.writable||a.writable!==false&&e.writable;var s=false;var onlegacyfinish=function(){if(!e.writable)onfinish()};var onfinish=function(){d=false;if(!o)r.call(e)};var onend=function(){o=false;if(!d)r.call(e)};var onexit=function(a){r.call(e,a?new Error("exited with error code: "+a):null)};var onerror=function(a){r.call(e,a)};var onclose=function(){process.nextTick(onclosenexttick)};var onclosenexttick=function(){if(s)return;if(o&&!(p&&(p.ended&&!p.destroyed)))return r.call(e,new Error("premature close"));if(d&&!(n&&(n.ended&&!n.destroyed)))return r.call(e,new Error("premature close"))};var onrequest=function(){e.req.on("finish",onfinish)};if(isRequest(e)){e.on("complete",onfinish);e.on("abort",onclose);if(e.req)onrequest();else e.on("request",onrequest)}else if(d&&!n){e.on("end",onlegacyfinish);e.on("close",onlegacyfinish)}if(isChildProcess(e))e.on("exit",onexit);e.on("end",onend);e.on("finish",onfinish);if(a.error!==false)e.on("error",onerror);e.on("close",onclose);return function(){s=true;e.removeListener("complete",onfinish);e.removeListener("abort",onclose);e.removeListener("request",onrequest);if(e.req)e.req.removeListener("finish",onfinish);e.removeListener("end",onlegacyfinish);e.removeListener("close",onlegacyfinish);e.removeListener("finish",onfinish);e.removeListener("exit",onexit);e.removeListener("end",onend);e.removeListener("error",onerror);e.removeListener("close",onclose)}};e.exports=eos},460:(e,a,r)=>{const i=r(8237)("extract-zip");const{createWriteStream:n,promises:p}=r(5747);const o=r(1766);const d=r(5622);const{promisify:s}=r(1669);const l=r(2413);const u=r(8781);const m=s(u.open);const c=s(l.pipeline);class Extractor{constructor(e,a){this.zipPath=e;this.opts=a}async extract(){i("opening",this.zipPath,"with opts",this.opts);this.zipfile=await m(this.zipPath,{lazyEntries:true});this.canceled=false;return new Promise(((e,a)=>{this.zipfile.on("error",(e=>{this.canceled=true;a(e)}));this.zipfile.readEntry();this.zipfile.on("close",(()=>{if(!this.canceled){i("zip extraction complete");e()}}));this.zipfile.on("entry",(async e=>{if(this.canceled){i("skipping entry",e.fileName,{cancelled:this.canceled});return}i("zipfile entry",e.fileName);if(e.fileName.startsWith("__MACOSX/")){this.zipfile.readEntry();return}const r=d.dirname(d.join(this.opts.dir,e.fileName));try{await p.mkdir(r,{recursive:true});const a=await p.realpath(r);const n=d.relative(this.opts.dir,a);if(n.split(d.sep).includes("..")){throw new Error(`Out of bound path "${a}" found while processing file ${e.fileName}`)}await this.extractEntry(e);i("finished processing",e.fileName);this.zipfile.readEntry()}catch(e){this.canceled=true;this.zipfile.close();a(e)}}))}))}async extractEntry(e){if(this.canceled){i("skipping entry extraction",e.fileName,{cancelled:this.canceled});return}if(this.opts.onEntry){this.opts.onEntry(e,this.zipfile)}const a=d.join(this.opts.dir,e.fileName);const r=e.externalFileAttributes>>16&65535;const l=61440;const u=16384;const m=40960;const h=(r&l)===m;let v=(r&l)===u;if(!v&&e.fileName.endsWith("/")){v=true}const g=e.versionMadeBy>>8;if(!v)v=g===0&&e.externalFileAttributes===16;i("extracting entry",{filename:e.fileName,isDir:v,isSymlink:h});const y=this.getExtractedMode(r,v)&511;const w=v?a:d.dirname(a);const b={recursive:true};if(v){b.mode=y}i("mkdir",{dir:w,...b});await p.mkdir(w,b);if(v)return;i("opening read stream",a);const S=await s(this.zipfile.openReadStream.bind(this.zipfile))(e);if(h){const e=await o(S);i("creating symlink",e,a);await p.symlink(e,a)}else{await c(S,n(a,{mode:y}))}}getExtractedMode(e,a){let r=e;if(r===0){if(a){if(this.opts.defaultDirMode){r=parseInt(this.opts.defaultDirMode,10)}if(!r){r=493}}else{if(this.opts.defaultFileMode){r=parseInt(this.opts.defaultFileMode,10)}if(!r){r=420}}}return r}}e.exports=async function(e,a){i("creating target directory",a.dir);if(!d.isAbsolute(a.dir)){throw new Error("Target directory is expected to be absolute")}await p.mkdir(a.dir,{recursive:true});a.dir=await p.realpath(a.dir);return new Extractor(e,a).extract()}},5010:(e,a,r)=>{var i=r(5747);var n=r(1669);var p=r(2413);var o=p.Readable;var d=p.Writable;var s=p.PassThrough;var l=r(4833);var u=r(8614).EventEmitter;a.createFromBuffer=createFromBuffer;a.createFromFd=createFromFd;a.BufferSlicer=BufferSlicer;a.FdSlicer=FdSlicer;n.inherits(FdSlicer,u);function FdSlicer(e,a){a=a||{};u.call(this);this.fd=e;this.pend=new l;this.pend.max=1;this.refCount=0;this.autoClose=!!a.autoClose}FdSlicer.prototype.read=function(e,a,r,n,p){var o=this;o.pend.go((function(d){i.read(o.fd,e,a,r,n,(function(e,a,r){d();p(e,a,r)}))}))};FdSlicer.prototype.write=function(e,a,r,n,p){var o=this;o.pend.go((function(d){i.write(o.fd,e,a,r,n,(function(e,a,r){d();p(e,a,r)}))}))};FdSlicer.prototype.createReadStream=function(e){return new ReadStream(this,e)};FdSlicer.prototype.createWriteStream=function(e){return new WriteStream(this,e)};FdSlicer.prototype.ref=function(){this.refCount+=1};FdSlicer.prototype.unref=function(){var e=this;e.refCount-=1;if(e.refCount>0)return;if(e.refCount<0)throw new Error("invalid unref");if(e.autoClose){i.close(e.fd,onCloseDone)}function onCloseDone(a){if(a){e.emit("error",a)}else{e.emit("close")}}};n.inherits(ReadStream,o);function ReadStream(e,a){a=a||{};o.call(this,a);this.context=e;this.context.ref();this.start=a.start||0;this.endOffset=a.end;this.pos=this.start;this.destroyed=false}ReadStream.prototype._read=function(e){var a=this;if(a.destroyed)return;var r=Math.min(a._readableState.highWaterMark,e);if(a.endOffset!=null){r=Math.min(r,a.endOffset-a.pos)}if(r<=0){a.destroyed=true;a.push(null);a.context.unref();return}a.context.pend.go((function(e){if(a.destroyed)return e();var n=new Buffer(r);i.read(a.context.fd,n,0,r,a.pos,(function(r,i){if(r){a.destroy(r)}else if(i===0){a.destroyed=true;a.push(null);a.context.unref()}else{a.pos+=i;a.push(n.slice(0,i))}e()}))}))};ReadStream.prototype.destroy=function(e){if(this.destroyed)return;e=e||new Error("stream destroyed");this.destroyed=true;this.emit("error",e);this.context.unref()};n.inherits(WriteStream,d);function WriteStream(e,a){a=a||{};d.call(this,a);this.context=e;this.context.ref();this.start=a.start||0;this.endOffset=a.end==null?Infinity:+a.end;this.bytesWritten=0;this.pos=this.start;this.destroyed=false;this.on("finish",this.destroy.bind(this))}WriteStream.prototype._write=function(e,a,r){var n=this;if(n.destroyed)return;if(n.pos+e.length>n.endOffset){var p=new Error("maximum file length exceeded");p.code="ETOOBIG";n.destroy();r(p);return}n.context.pend.go((function(a){if(n.destroyed)return a();i.write(n.context.fd,e,0,e.length,n.pos,(function(e,i){if(e){n.destroy();a();r(e)}else{n.bytesWritten+=i;n.pos+=i;n.emit("progress");a();r()}}))}))};WriteStream.prototype.destroy=function(){if(this.destroyed)return;this.destroyed=true;this.context.unref()};n.inherits(BufferSlicer,u);function BufferSlicer(e,a){u.call(this);a=a||{};this.refCount=0;this.buffer=e;this.maxChunkSize=a.maxChunkSize||Number.MAX_SAFE_INTEGER}BufferSlicer.prototype.read=function(e,a,r,i,n){var p=i+r;var o=p-this.buffer.length;var d=o>0?o:r;this.buffer.copy(e,a,i,p);setImmediate((function(){n(null,d)}))};BufferSlicer.prototype.write=function(e,a,r,i,n){e.copy(this.buffer,i,a,a+r);setImmediate((function(){n(null,r,e)}))};BufferSlicer.prototype.createReadStream=function(e){e=e||{};var a=new s(e);a.destroyed=false;a.start=e.start||0;a.endOffset=e.end;a.pos=a.endOffset||this.buffer.length;var r=this.buffer.slice(a.start,a.pos);var i=0;while(true){var n=i+this.maxChunkSize;if(n>=r.length){if(ir.endOffset){var o=new Error("maximum file length exceeded");o.code="ETOOBIG";r.destroyed=true;n(o);return}e.copy(a.buffer,r.pos,0,e.length);r.bytesWritten+=e.length;r.pos=p;r.emit("progress");n()};r.destroy=function(){r.destroyed=true};return r};BufferSlicer.prototype.ref=function(){this.refCount+=1};BufferSlicer.prototype.unref=function(){this.refCount-=1;if(this.refCount<0){throw new Error("invalid unref")}};function createFromBuffer(e,a){return new BufferSlicer(e,a)}function createFromFd(e,a){return new FdSlicer(e,a)}},8062:(e,a,r)=>{var i=r(3070);e.exports=function fmix(e){e^=e>>>16;e=i(e,2246822507);e^=e>>>13;e=i(e,3266489909);e^=e>>>16;return e>>>0}},1371:(e,a,r)=>{var i=r(2851);var n=r(3515);function template(e){n.validateTemplate(e);return{open:i.open.bind(i,e),openSync:i.openSync.bind(i,e),mkdir:i.mkdir.bind(i,e),mkdirSync:i.mkdirSync.bind(i,e),writeFile:i.writeFile.bind(i,e),writeFileSync:i.writeFileSync.bind(i,e),createWriteStream:i.createWriteStream.bind(i,e)}}e.exports=template("%s");e.exports.template=template},6328:(e,a)=>{function sync(e){var a;var r=3;while(--r){try{a=e()}catch(e){if(e.code==="EEXIST")continue;throw e}return a}throw new Error("Failed to find unique name")}function async(e,a){var r=3;(function next(){e((function(e,i){if(!e)return a(null,i);if(e.code!=="EEXIST")return a(e);if(--r===0)return a(new Error("Failed to find unique name"));next()}))})()}a.sync=sync;a.async=async},2851:(e,a,r)=>{var i=r(5747);var n=r(2087);var p=r(3515);var o=r(6328);var d=r(7974);var s=n.tmpdir();function open(e,a,r,n){switch(a){case"w":a="wx";break;case"w+":a="wx+";break;default:throw new Error("Unknown file open flag: "+a)}if(typeof r==="function"){n=r;r=undefined}var d;o.async((function(n){d=p(s,e);i.open(d,a,r,n)}),(function(e,a){n(e,e?undefined:{fd:a,path:d})}))}function openSync(e,a,r){switch(a){case"w":a="wx";break;case"w+":a="wx+";break;default:throw new Error("Unknown file open flag: "+a)}var n;var d=o.sync((function(){n=p(s,e);return i.openSync(n,a,r)}));return{fd:d,path:n}}function mkdir(e,a,r){if(typeof a==="function"){r=a;a=undefined}var n;o.async((function(r){n=p(s,e);i.mkdir(n,a,r)}),(function(e){r(e,e?undefined:n)}))}function mkdirSync(e,a){var r;o.sync((function(){r=p(s,e);i.mkdirSync(r,a)}));return r}function writeFile(e,a,r,n){n=arguments[arguments.length-1];if(typeof r==="function"||!r){r={flag:"wx"}}else if(typeof r==="string"){r={encoding:r,flag:"wx"}}else if(typeof r==="object"){r.flag="wx"}else{throw new TypeError("Bad arguments")}var d;o.async((function(n){d=p(s,e);i.writeFile(d,a,r,n)}),(function(e){n(e,e?undefined:d)}))}function writeFileSync(e,a,r){if(!r){r={flag:"wx"}}else if(typeof r==="string"){r={encoding:r,flag:"wx"}}else if(typeof r==="object"){r.flag="wx"}else{throw new TypeError("Bad arguments")}var n;o.sync((function(){n=p(s,e);i.writeFileSync(n,a,r)}));return n}function createWriteStream(e,a){return new d(e,a)}a.open=open;a.openSync=openSync;a.mkdir=mkdir;a.mkdirSync=mkdirSync;a.writeFile=writeFile;a.writeFileSync=writeFileSync;a.createWriteStream=createWriteStream},7974:(e,a,r)=>{var i=r(2851);var n=r(5747).WriteStream;function TempWriteStream(e,a){this.template=e;n.call(this,null,a)}TempWriteStream.prototype=Object.create(n.prototype);TempWriteStream.prototype.open=function open(){i.open(this.template,this.flags,this.mode,function(e,a){if(e){this.destroy();this.emit("error",e);return}this.fd=a.fd;this.path=a.path;this.emit("path",a.path);this.emit("open",a.fd)}.bind(this))};e.exports=TempWriteStream},6863:(e,a,r)=>{e.exports=realpath;realpath.realpath=realpath;realpath.sync=realpathSync;realpath.realpathSync=realpathSync;realpath.monkeypatch=monkeypatch;realpath.unmonkeypatch=unmonkeypatch;var i=r(5747);var n=i.realpath;var p=i.realpathSync;var o=process.version;var d=/^v[0-5]\./.test(o);var s=r(1734);function newError(e){return e&&e.syscall==="realpath"&&(e.code==="ELOOP"||e.code==="ENOMEM"||e.code==="ENAMETOOLONG")}function realpath(e,a,r){if(d){return n(e,a,r)}if(typeof a==="function"){r=a;a=null}n(e,a,(function(i,n){if(newError(i)){s.realpath(e,a,r)}else{r(i,n)}}))}function realpathSync(e,a){if(d){return p(e,a)}try{return p(e,a)}catch(r){if(newError(r)){return s.realpathSync(e,a)}else{throw r}}}function monkeypatch(){i.realpath=realpath;i.realpathSync=realpathSync}function unmonkeypatch(){i.realpath=n;i.realpathSync=p}},1734:(e,a,r)=>{var i=r(5622);var n=process.platform==="win32";var p=r(5747);var o=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);function rethrow(){var e;if(o){var a=new Error;e=debugCallback}else e=missingCallback;return e;function debugCallback(e){if(e){a.message=e.message;e=a;missingCallback(e)}}function missingCallback(e){if(e){if(process.throwDeprecation)throw e;else if(!process.noDeprecation){var a="fs: missing callback "+(e.stack||e.message);if(process.traceDeprecation)console.trace(a);else console.error(a)}}}}function maybeCallback(e){return typeof e==="function"?e:rethrow()}var d=i.normalize;if(n){var s=/(.*?)(?:[\/\\]+|$)/g}else{var s=/(.*?)(?:[\/]+|$)/g}if(n){var l=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/}else{var l=/^[\/]*/}a.realpathSync=function realpathSync(e,a){e=i.resolve(e);if(a&&Object.prototype.hasOwnProperty.call(a,e)){return a[e]}var r=e,o={},d={};var u;var m;var c;var h;start();function start(){var a=l.exec(e);u=a[0].length;m=a[0];c=a[0];h="";if(n&&!d[c]){p.lstatSync(c);d[c]=true}}while(u=e.length){if(a)a[o]=e;return r(null,e)}s.lastIndex=m;var i=s.exec(e);v=c;c+=i[0];h=v+i[1];m=s.lastIndex;if(u[h]||a&&a[h]===h){return process.nextTick(LOOP)}if(a&&Object.prototype.hasOwnProperty.call(a,h)){return gotResolvedLink(a[h])}return p.lstat(h,gotStat)}function gotStat(e,i){if(e)return r(e);if(!i.isSymbolicLink()){u[h]=true;if(a)a[h]=h;return process.nextTick(LOOP)}if(!n){var o=i.dev.toString(32)+":"+i.ino.toString(32);if(d.hasOwnProperty(o)){return gotTarget(null,d[o],h)}}p.stat(h,(function(e){if(e)return r(e);p.readlink(h,(function(e,a){if(!n)d[o]=a;gotTarget(e,a)}))}))}function gotTarget(e,n,p){if(e)return r(e);var o=i.resolve(v,n);if(a)a[p]=o;gotResolvedLink(o)}function gotResolvedLink(a){e=i.resolve(a,e.slice(m));start()}}},1585:(e,a,r)=>{"use strict";const{PassThrough:i}=r(2413);e.exports=e=>{e={...e};const{array:a}=e;let{encoding:r}=e;const n=r==="buffer";let p=false;if(a){p=!(r||n)}else{r=r||"utf8"}if(n){r=null}const o=new i({objectMode:p});if(r){o.setEncoding(r)}let d=0;const s=[];o.on("data",(e=>{s.push(e);if(p){d=s.length}else{d+=e.length}}));o.getBufferedValue=()=>{if(a){return s}return n?Buffer.concat(s,d):s.join("")};o.getBufferedLength=()=>d;return o}},1766:(e,a,r)=>{"use strict";const{constants:i}=r(4293);const n=r(8341);const p=r(1585);class MaxBufferError extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}}async function getStream(e,a){if(!e){return Promise.reject(new Error("Expected a stream"))}a={maxBuffer:Infinity,...a};const{maxBuffer:r}=a;let o;await new Promise(((d,s)=>{const rejectPromise=e=>{if(e&&o.getBufferedLength()<=i.MAX_LENGTH){e.bufferedData=o.getBufferedValue()}s(e)};o=n(e,p(a),(e=>{if(e){rejectPromise(e);return}d()}));o.on("data",(()=>{if(o.getBufferedLength()>r){rejectPromise(new MaxBufferError)}}))}));return o.getBufferedValue()}e.exports=getStream;e.exports.default=getStream;e.exports.buffer=(e,a)=>getStream(e,{...a,encoding:"buffer"});e.exports.array=(e,a)=>getStream(e,{...a,array:true});e.exports.MaxBufferError=MaxBufferError},7625:(e,a,r)=>{a.setopts=setopts;a.ownProp=ownProp;a.makeAbs=makeAbs;a.finish=finish;a.mark=mark;a.isIgnored=isIgnored;a.childrenIgnored=childrenIgnored;function ownProp(e,a){return Object.prototype.hasOwnProperty.call(e,a)}var i=r(5747);var n=r(5622);var p=r(3973);var o=r(8714);var d=p.Minimatch;function alphasort(e,a){return e.localeCompare(a,"en")}function setupIgnores(e,a){e.ignore=a.ignore||[];if(!Array.isArray(e.ignore))e.ignore=[e.ignore];if(e.ignore.length){e.ignore=e.ignore.map(ignoreMap)}}function ignoreMap(e){var a=null;if(e.slice(-3)==="/**"){var r=e.replace(/(\/\*\*)+$/,"");a=new d(r,{dot:true})}return{matcher:new d(e,{dot:true}),gmatcher:a}}function setopts(e,a,r){if(!r)r={};if(r.matchBase&&-1===a.indexOf("/")){if(r.noglobstar){throw new Error("base matching requires globstar")}a="**/"+a}e.silent=!!r.silent;e.pattern=a;e.strict=r.strict!==false;e.realpath=!!r.realpath;e.realpathCache=r.realpathCache||Object.create(null);e.follow=!!r.follow;e.dot=!!r.dot;e.mark=!!r.mark;e.nodir=!!r.nodir;if(e.nodir)e.mark=true;e.sync=!!r.sync;e.nounique=!!r.nounique;e.nonull=!!r.nonull;e.nosort=!!r.nosort;e.nocase=!!r.nocase;e.stat=!!r.stat;e.noprocess=!!r.noprocess;e.absolute=!!r.absolute;e.fs=r.fs||i;e.maxLength=r.maxLength||Infinity;e.cache=r.cache||Object.create(null);e.statCache=r.statCache||Object.create(null);e.symlinks=r.symlinks||Object.create(null);setupIgnores(e,r);e.changedCwd=false;var p=process.cwd();if(!ownProp(r,"cwd"))e.cwd=p;else{e.cwd=n.resolve(r.cwd);e.changedCwd=e.cwd!==p}e.root=r.root||n.resolve(e.cwd,"/");e.root=n.resolve(e.root);if(process.platform==="win32")e.root=e.root.replace(/\\/g,"/");e.cwdAbs=o(e.cwd)?e.cwd:makeAbs(e,e.cwd);if(process.platform==="win32")e.cwdAbs=e.cwdAbs.replace(/\\/g,"/");e.nomount=!!r.nomount;r.nonegate=true;r.nocomment=true;e.minimatch=new d(a,r);e.options=e.minimatch.options}function finish(e){var a=e.nounique;var r=a?[]:Object.create(null);for(var i=0,n=e.matches.length;i{e.exports=glob;var i=r(6863);var n=r(3973);var p=n.Minimatch;var o=r(4124);var d=r(8614).EventEmitter;var s=r(5622);var l=r(2357);var u=r(8714);var m=r(9010);var c=r(7625);var h=c.setopts;var v=c.ownProp;var g=r(2492);var y=r(1669);var w=c.childrenIgnored;var b=c.isIgnored;var S=r(1223);function glob(e,a,r){if(typeof a==="function")r=a,a={};if(!a)a={};if(a.sync){if(r)throw new TypeError("callback provided to sync glob");return m(e,a)}return new Glob(e,a,r)}glob.sync=m;var _=glob.GlobSync=m.GlobSync;glob.glob=glob;function extend(e,a){if(a===null||typeof a!=="object"){return e}var r=Object.keys(a);var i=r.length;while(i--){e[r[i]]=a[r[i]]}return e}glob.hasMagic=function(e,a){var r=extend({},a);r.noprocess=true;var i=new Glob(e,r);var n=i.minimatch.set;if(!e)return false;if(n.length>1)return true;for(var p=0;pthis.maxLength)return a();if(!this.stat&&v(this.cache,r)){var n=this.cache[r];if(Array.isArray(n))n="DIR";if(!i||n==="DIR")return a(null,n);if(i&&n==="FILE")return a()}var p;var o=this.statCache[r];if(o!==undefined){if(o===false)return a(null,o);else{var d=o.isDirectory()?"DIR":"FILE";if(i&&d==="FILE")return a();else return a(null,d,o)}}var s=this;var l=g("stat\0"+r,lstatcb_);if(l)s.fs.lstat(r,l);function lstatcb_(i,n){if(n&&n.isSymbolicLink()){return s.fs.stat(r,(function(i,p){if(i)s._stat2(e,r,null,n,a);else s._stat2(e,r,i,p,a)}))}else{s._stat2(e,r,i,n,a)}}};Glob.prototype._stat2=function(e,a,r,i,n){if(r&&(r.code==="ENOENT"||r.code==="ENOTDIR")){this.statCache[a]=false;return n()}var p=e.slice(-1)==="/";this.statCache[a]=i;if(a.slice(-1)==="/"&&i&&!i.isDirectory())return n(null,false,i);var o=true;if(i)o=i.isDirectory()?"DIR":"FILE";this.cache[a]=this.cache[a]||o;if(p&&o==="FILE")return n();return n(null,o,i)}},9010:(e,a,r)=>{e.exports=globSync;globSync.GlobSync=GlobSync;var i=r(6863);var n=r(3973);var p=n.Minimatch;var o=r(1957).Glob;var d=r(1669);var s=r(5622);var l=r(2357);var u=r(8714);var m=r(7625);var c=m.setopts;var h=m.ownProp;var v=m.childrenIgnored;var g=m.isIgnored;function globSync(e,a){if(typeof a==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");return new GlobSync(e,a).found}function GlobSync(e,a){if(!e)throw new Error("must provide pattern");if(typeof a==="function"||arguments.length===3)throw new TypeError("callback provided to sync glob\n"+"See: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof GlobSync))return new GlobSync(e,a);c(this,e,a);if(this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var i=0;ithis.maxLength)return false;if(!this.stat&&h(this.cache,a)){var i=this.cache[a];if(Array.isArray(i))i="DIR";if(!r||i==="DIR")return i;if(r&&i==="FILE")return false}var n;var p=this.statCache[a];if(!p){var o;try{o=this.fs.lstatSync(a)}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR")){this.statCache[a]=false;return false}}if(o&&o.isSymbolicLink()){try{p=this.fs.statSync(a)}catch(e){p=o}}else{p=o}}this.statCache[a]=p;var i=true;if(p)i=p.isDirectory()?"DIR":"FILE";this.cache[a]=this.cache[a]||i;if(r&&i==="FILE")return false;return i};GlobSync.prototype._mark=function(e){return m.mark(this,e)};GlobSync.prototype._makeAbs=function(e){return m.makeAbs(this,e)}},1621:e=>{"use strict";e.exports=(e,a=process.argv)=>{const r=e.startsWith("-")?"":e.length===1?"-":"--";const i=a.indexOf(r+e);const n=a.indexOf("--");return i!==-1&&(n===-1||i{"use strict";e.exports=Math.imul||function(e,a){var r=e>>>16&65535;var i=e&65535;var n=a>>>16&65535;var p=a&65535;return i*p+(r*p+i*n<<16>>>0)|0}},2492:(e,a,r)=>{var i=r(2940);var n=Object.create(null);var p=r(1223);e.exports=i(inflight);function inflight(e,a){if(n[e]){n[e].push(a);return null}else{n[e]=[a];return makeres(e)}}function makeres(e){return p((function RES(){var a=n[e];var r=a.length;var i=slice(arguments);try{for(var p=0;pr){a.splice(0,r);process.nextTick((function(){RES.apply(null,i)}))}else{delete n[e]}}}))}function slice(e){var a=e.length;var r=[];for(var i=0;i{try{var i=r(1669);if(typeof i.inherits!=="function")throw"";e.exports=i.inherits}catch(a){e.exports=r(8544)}},8544:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,a){if(a){e.super_=a;e.prototype=Object.create(a.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,a){if(a){e.super_=a;var TempCtor=function(){};TempCtor.prototype=a.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}}}},5625:e=>{ /*! * Determine if an object is a Buffer * diff --git a/lib/appleCodeSigning.js b/lib/appleCodeSigning.js index 428023d..3102841 100644 --- a/lib/appleCodeSigning.js +++ b/lib/appleCodeSigning.js @@ -134,7 +134,8 @@ async function notarizeDMG(dmgPath, notarizationUser, notarizationPassword, nota helpers.log(notarizationLog.stdout); if (parsedResult["status"] != "Accepted") { - throw Error(`Notarization failed: ${parsedResult["status"]}`); + //throw Error(`Notarization failed: ${parsedResult["status"]}`); + helpers.log(`Notarization failed: ${parsedResult["status"]}`); } await helpers.execWithLog('xcrun', ["stapler", "staple", dmgPath]);