setup-cpp/dist/legacy/actions_python.0fa61708.js

3 lines
67 KiB
JavaScript

function $parcel$export(e,t,r,i){Object.defineProperty(e,t,{get:r,set:i,enumerable:!0,configurable:!0});}function $parcel$interopDefault(e){return e&&e.__esModule?e.default:e;}var $kC5q1$path=require("path"),$kC5q1$os=require("os"),$kC5q1$fs=require("fs"),$kC5q1$stream=require("stream"),$kC5q1$util=require("util"),$kC5q1$assert=require("assert"),$kC5q1$child_process=require("child_process"),$parcel$global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},parcelRequire=$parcel$global.parcelRequire810d;parcelRequire.register("8L9T2",function(e,t){var r,i,s,n,o,a,h,l,c;function u(e){return e.startsWith("pypy");}async function f(e,t,o){var l;h.IS_MAC&&(process.env.AGENT_TOOLSDIRECTORY="/Users/runner/hostedtoolcache");let c=null===(l=process.env.AGENT_TOOLSDIRECTORY)||void 0===l?void 0:l.trim();if("string"==typeof c&&""!==c&&(process.env.RUNNER_TOOL_CACHE=process.env.AGENT_TOOLSDIRECTORY),(0,n.debug)("Python is expected to be installed into "+process.env.RUNNER_TOOL_CACHE),e){let t;if(u(e)){let r=await(0,i.findPyPyVersion)(e,o,!0,d,!1);t=`${r.resolvedPyPyVersion}-${r.resolvedPythonVersion}`,(0,s.info)(`Successfully set up PyPy ${r.resolvedPyPyVersion} with Python (${r.resolvedPythonVersion})`);}else{let i=await(0,r.useCpythonVersion)(e,o,!0,d,!1);t=i.version,(0,s.info)(`Successfully set up ${i.impl} (${t})`);}}a.GITHUB_ACTIONS&&(await p());}async function p(){let e=(0,o.join)(c,"python_matcher.json");if(!(await(0,l.pathExists)(e)))return(0,s.warning)("the python_matcher.json file does not exist in the same folder as setup-cpp.js");(0,s.info)("::add-matcher::"+e);}$parcel$export(e.exports,"setupActionsPython",()=>f),r=parcelRequire("g8XlV"),i=parcelRequire("49ncA"),s=parcelRequire("hHq4F"),n=parcelRequire("kBxNe"),o=parcelRequire("A8hFE"),a=parcelRequire("3TMui"),h=parcelRequire("42Mcf"),l=parcelRequire("3WkGD"),c=$kC5q1$path.resolve(__dirname,"../../src/python");let d=!1;}),parcelRequire.register("g8XlV",function(e,t){var r,i,s,n,o;function a(e){return r.IS_WINDOWS?$kC5q1$path.join(e,"Scripts"):$kC5q1$path.join(e,"bin");}async function h(e,t,h,f,p){let d=null,y=u(l(e),p);if(n.debug(`Semantic version spec of ${e} is ${y}`),f){var m;d=await s.getManifest();let e=null===(m=await s.findReleaseFromManifest(y,t,d))||void 0===m?void 0:m.version;e?(y=e,n.info(`Resolved as '${y}'`)):n.info(`Failed to resolve version ${y} from manifest`);}let x=o.find("Python",y,t);if(!x){n.info(`Version ${y} was not found in the local cache`);let e=await s.findReleaseFromManifest(y,t,d);e&&e.files&&e.files.length>0&&(n.info(`Version ${y} is available for downloading`),await s.installCpythonFromRelease(e),x=o.find("Python",y,t));}if(!x){let i=await(0,r.getOSInfo)();throw Error([`The version '${e}' with architecture '${t}' was not found for ${i?`${i.osName} ${i.osVersion}`:"this operating system"}.`,"The list of all available versions can be found here: "+s.MANIFEST_URL].join($kC5q1$os.EOL));}let g=a(x),w=r.IS_WINDOWS?".exe":"",b=$kC5q1$path.join(r.IS_WINDOWS?x:g,"python"+w);if(h){if(n.exportVariable("pythonLocation",x),n.exportVariable("PKG_CONFIG_PATH",x+"/lib/pkgconfig"),n.exportVariable("pythonLocation",x),n.exportVariable("Python_ROOT_DIR",x),n.exportVariable("Python2_ROOT_DIR",x),n.exportVariable("Python3_ROOT_DIR",x),n.exportVariable("PKG_CONFIG_PATH",x+"/lib/pkgconfig"),r.IS_LINUX){let e=process.env.LD_LIBRARY_PATH?":"+process.env.LD_LIBRARY_PATH:"",t=$kC5q1$path.join(x,"lib");e.split(":").includes(t)||n.exportVariable("LD_LIBRARY_PATH",t+e);}if(n.addPath(x),n.addPath(g),r.IS_WINDOWS){let e=$kC5q1$path.basename($kC5q1$path.dirname(x)),t=i.major(e),r=i.minor(e),s=$kC5q1$path.join(process.env.APPDATA||"","Python",`Python${t}${r}`,"Scripts");n.addPath(s);}}let v=c(x);return n.setOutput("python-version",v),n.setOutput("python-path",b),{impl:"CPython",version:v};}function l(e){let t=/^(\d+)\.(\d+)-dev$/;return e.replace(t,"~$1.$2.0-0");}function c(e){let t=e.split($kC5q1$path.sep),r=t.findIndex(e=>"PyPy"===e||"Python"===e);return t[r+1]||"";}function u(e,t){let r=/(\d+\.\d+\.\d+)((?:a|b|rc)\d*)/g,i=/^(\d+)\.(\d+)$/,s=e.replace(r,"$1-$2");return t&&(s=s.replace(i,"~$1.$2.0-0")),s;}$parcel$export(e.exports,"useCpythonVersion",()=>h),r=parcelRequire("42Mcf"),i=parcelRequire("lqN0l"),s=parcelRequire("xjYT4"),n=parcelRequire("kBxNe"),o=parcelRequire("9aCWy");}),parcelRequire.register("42Mcf",function(e,t){var r,i,s;function n(e,t,r,i=!1){let s=$kC5q1$path.join(e,t),n=$kC5q1$path.join(e,r);$parcel$interopDefault($kC5q1$fs).existsSync(n)||($parcel$interopDefault($kC5q1$fs).symlinkSync(s,n),!m&&i&&$parcel$interopDefault($kC5q1$fs).chmodSync(n,"755"));}function o(e){return a(e)||!!i.validRange(e);}function a(e){return"nightly"===e;}function h(e){return $kC5q1$path.basename($kC5q1$path.dirname(e));}function l(e){let t="",r=$kC5q1$path.join(e,v);return $parcel$interopDefault($kC5q1$fs).existsSync(r)&&(t=$parcel$interopDefault($kC5q1$fs).readFileSync(r).toString().trim()),t;}function c(e,t){let r=$kC5q1$path.join(e,v);$parcel$interopDefault($kC5q1$fs).writeFileSync(r,t);}function u(e){return /^\d+\.\d+$/.test(e);}async function f(){let{stdout:e}=await s.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',void 0,{silent:!0});return{osName:"Windows",osVersion:e.trim().split(" ")[3]};}async function p(){let{stdout:e}=await s.getExecOutput("sw_vers",["-productVersion"],{silent:!0});return{osName:"macOS",osVersion:e.trim()};}async function d(){let{stdout:e}=await s.getExecOutput("lsb_release",["-i","-r","-s"],{silent:!0}),[t,i]=e.trim().split("\n");return r.debug(`OS Name: ${t}, Version: ${i}`),{osName:t,osVersion:i};}async function y(){let e;try{m?e=await f():x?e=await d():g&&(e=await p());}catch(t){let e=t;r.debug(e.message);}finally{return e;}}$parcel$export(e.exports,"IS_WINDOWS",()=>m),$parcel$export(e.exports,"IS_LINUX",()=>x),$parcel$export(e.exports,"IS_MAC",()=>g),$parcel$export(e.exports,"WINDOWS_ARCHS",()=>w),$parcel$export(e.exports,"WINDOWS_PLATFORMS",()=>b),$parcel$export(e.exports,"createSymlinkInFolder",()=>n),$parcel$export(e.exports,"validateVersion",()=>o),$parcel$export(e.exports,"isNightlyKeyword",()=>a),$parcel$export(e.exports,"getPyPyVersionFromPath",()=>h),$parcel$export(e.exports,"readExactPyPyVersionFile",()=>l),$parcel$export(e.exports,"writeExactPyPyVersionFile",()=>c),$parcel$export(e.exports,"validatePythonVersionFormatForPyPy",()=>u),$parcel$export(e.exports,"getOSInfo",()=>y),r=parcelRequire("kBxNe"),i=parcelRequire("lqN0l"),parcelRequire("gQjQu"),s=parcelRequire("2mVwa");let m="win32"===process.platform,x="linux"===process.platform,g="darwin"===process.platform,w=["x86","x64"],b=["win32","win64"],v="PYPY_VERSION";}),parcelRequire.register("gQjQu",function(e,t){var r;$parcel$export(e.exports,"parse",()=>r,e=>r=e),r=parcelRequire("8eMJt"),parcelRequire("bhUE6");}),parcelRequire.register("8eMJt",function(e,t){e.exports=parcelRequire("e1aDm"),e.exports.async=parcelRequire("2S5Eu"),e.exports.stream=parcelRequire("9JW1y"),e.exports.prettyError=parcelRequire("gBYD8");}),parcelRequire.register("e1aDm",function(e,t){var r,i;function s(e){$parcel$global.Buffer&&$parcel$global.Buffer.isBuffer(e)&&(e=e.toString("utf8"));let t=new r();try{return t.parse(e),t.finish();}catch(t){throw i(t,e);}}e.exports=s,r=parcelRequire("3XGwc"),i=parcelRequire("gBYD8");}),parcelRequire.register("3XGwc",function(module,exports){var $4HTEH,$biA0C,$51zGI,$8bnbQ;let _custom;function isDigit(e){return e>=CHAR_0&&e<=CHAR_9;}function isHexit(e){return e>=CHAR_A&&e<=CHAR_F||e>=CHAR_a&&e<=CHAR_f||e>=CHAR_0&&e<=CHAR_9;}function isBit(e){return e===CHAR_1||e===CHAR_0;}function isOctit(e){return e>=CHAR_0&&e<=CHAR_7;}function isAlphaNumQuoteHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_APOS||e===CHAR_QUOT||e===CHAR_LOWBAR||e===CHAR_HYPHEN;}function isAlphaNumHyphen(e){return e>=CHAR_A&&e<=CHAR_Z||e>=CHAR_a&&e<=CHAR_z||e>=CHAR_0&&e<=CHAR_9||e===CHAR_LOWBAR||e===CHAR_HYPHEN;}function hasKey(e,t){return!!hasOwnProperty.call(e,t)||("__proto__"===t&&defineProperty(e,"__proto__",descriptor),!1);}function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}});}function isInlineTable(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_TABLE;}function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}});}function isTable(e){return null!==e&&"object"==typeof e&&e[_type]===TABLE;}function InlineList(e){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:e}});}function isInlineList(e){return null!==e&&"object"==typeof e&&e[_type]===INLINE_LIST;}function List(){return Object.defineProperties([],{[_type]:{value:LIST}});}function isList(e){return null!==e&&"object"==typeof e&&e[_type]===LIST;}function Integer(e){let t=+e;return(Object.is(t,-0)&&(t=0),$parcel$global.BigInt&&!Number.isSafeInteger(t))?new BoxedBigInt(e):Object.defineProperties(new Number(t),{isNaN:{value:function(){return isNaN(this);}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${e}]`}});}function isInteger(e){return null!==e&&"object"==typeof e&&e[_type]===INTEGER;}function Float(e){return Object.defineProperties(new Number(e),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${e}]`}});}function isFloat(e){return null!==e&&"object"==typeof e&&e[_type]===FLOAT;}function tomlType(e){let t=typeof e;if("object"===t){if(null===e)return"null";if(e instanceof Date)return"datetime";if(_type in e)switch(e[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer";}}return t;}function makeParserClass(e){class t extends e{constructor(){super(),this.ctx=this.obj=Table();}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine();}atEndOfLine(){return this.char===e.END||this.char===CTRL_J||this.char===CTRL_M;}parseStart(){if(this.char===e.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);else throw this.error(new TomlError(`Unknown character "${this.char}"`));}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===e.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"));}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement);}recordAssignStatement(e){let t=this.ctx,r=e.key.pop();for(let r of e.key){if(hasKey(t,r)&&(!isTable(t[r])||t[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[r]=t[r]||Table();}if(hasKey(t,r))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[r]=e.value.valueOf():t[r]=e.value,this.goto(this.parseWhitespaceToEOL);}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword);}recordAssignKeyword(e){return this.state.resultTable?this.state.resultTable.push(e):this.state.resultTable=[e],this.goto(this.parseAssignKeywordPreDot);}parseAssignKeywordPreDot(){return this.char===CHAR_PERIOD?this.next(this.parseAssignKeywordPostDot):this.char!==CHAR_SP&&this.char!==CTRL_I?this.goto(this.parseAssignEqual):void 0;}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword);}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'));}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue);}recordAssignValue(e){return this.returnNow({key:this.state.resultTable,value:e});}parseComment(){do if(this.char===e.END||this.char===CTRL_J)return this.return();while(this.nextChar());}parseTableOrList(){if(this.char!==CHAR_LSQB)return this.goto(this.parseTable);this.next(this.parseList);}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext);}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore);}parseTableMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)&&(!isTable(this.ctx[e])||this.ctx[e][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[e]=this.ctx[e]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL);}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e)){if(isTable(this.ctx[e]))this.ctx=this.ctx[e];else if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else throw this.error(new TomlError("Can't redefine existing key"));}else this.ctx=this.ctx[e]=Table();return this.next(this.parseTableNext);}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"));}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext);}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore);}parseListMore(e){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,e)||(this.ctx[e]=List()),isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[e])){let t=Table();this.ctx[e].push(t),this.ctx=t;}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd);}if(this.char===CHAR_PERIOD){if(hasKey(this.ctx,e)){if(isInlineList(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[e]))throw this.error(new TomlError("Can't extend an inline table"));else if(isList(this.ctx[e]))this.ctx=this.ctx[e][this.ctx[e].length-1];else if(isTable(this.ctx[e]))this.ctx=this.ctx[e];else throw this.error(new TomlError("Can't redefine an existing key"));}else this.ctx=this.ctx[e]=Table();return this.next(this.parseListNext);}throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"));}parseListEnd(e){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"));}parseValue(){if(this.char===e.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);else if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);else if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);else if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);else throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"));}recordValue(e){return this.returnNow(e);}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'));}parseInf2(){if(this.char===CHAR_f)return"-"===this.state.buf?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'));}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'));}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'));}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey);}parseBareKey(){do{if(this.char===e.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else if(0!==this.state.buf.length)return this.returnNow();else throw this.error(new TomlError("Empty bare keys are not allowed"));}while(this.nextChar());}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString);}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();else this.consume();}while(this.nextChar());}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow();}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent);}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();else this.consume();}while(this.nextChar());}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent));}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent));}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString);}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));else if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();else this.consume();}while(this.nextChar());}recordEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseBasicString);}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow();}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent);}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===e.END)throw this.error(new TomlError("Unterminated multi-line string"));else if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();else this.consume();}while(this.nextChar());}errorControlCharInString(){let e="\\u00";return this.char<16&&(e+="0"),e+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${e} instead`));}recordMultiEscapeReplacement(e){return this.state.buf+=e,this.goto(this.parseMultiStringContent);}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent));}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent));}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape);}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"));}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow();}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char));}parseUnicodeReturn(e){try{let t=parseInt(e,16);if(t>=SURROGATE_FIRST&&t<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(t));}catch(e){throw this.error(TomlError.wrap(e));}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return();}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return();}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"));}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan);}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart);}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger);}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf));}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);let e=Integer(this.state.buf);if(!e.isNaN())return this.returnNow(e);throw this.error(new TomlError("Invalid number"));}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow();}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow();}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);else return this.returnNow(Float(this.state.buf));}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"));}parseNumberExponent(){if(isDigit(this.char))this.consume();else if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);else return this.returnNow(Float(this.state.buf));}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly);}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);else if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);else if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);else if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);else return this.returnNow(Integer(this.state.buf));}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"));}if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"));}parseNumberBaseOrDateTime(){if(this.char===CHAR_b)return this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin);if(this.char===CHAR_o)return this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct);if(this.char===CHAR_x)return this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex);if(this.char===CHAR_PERIOD)return this.goto(this.parseNumberInteger);if(isDigit(this.char))return this.goto(this.parseDateTimeOnly);else return this.returnNow(Integer(this.state.buf));}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);let e=Integer(this.state.buf);if(!e.isNaN())return this.returnNow(e);throw this.error(new TomlError("Invalid number"));}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);let e=Integer(this.state.buf);if(!e.isNaN())return this.returnNow(e);throw this.error(new TomlError("Invalid number"));}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);let e=Integer(this.state.buf);if(!e.isNaN())return this.returnNow(e);throw this.error(new TomlError("Invalid number"));}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth);}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay);}if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"));}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour);}if(this.atEndOfWord())return this.returnNow($51zGI(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"));}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow($51zGI(this.state.result)):this.goto(this.parseTimeHour);}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin);}if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"));}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);else throw this.error(new TomlError("Incomplete datetime"));}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),2===this.state.buf.length)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction);}else throw this.error(new TomlError("Incomplete datetime"));}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin);}throw this.error(new TomlError("Incomplete time"));}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else if(2===this.state.buf.length&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);else throw this.error(new TomlError("Incomplete time"));}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),2===this.state.buf.length)return this.next(this.parseOnlyTimeFractionMaybe);}else throw this.error(new TomlError("Incomplete time"));}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char!==CHAR_PERIOD)return this.return($8bnbQ(this.state.result));this.state.buf="",this.next(this.parseOnlyTimeFraction);}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(0===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow($8bnbQ(this.state.result+"."+this.state.buf));}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"));}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else if(this.char===CHAR_Z)return this.consume(),this.return($4HTEH(this.state.result+this.state.buf));else if(this.atEndOfWord())return this.returnNow($biA0C(this.state.result+this.state.buf));else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"));}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else if(1===this.state.buf.length)throw this.error(new TomlError("Expected digit in milliseconds"));else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else if(this.char===CHAR_Z)return this.consume(),this.return($4HTEH(this.state.result+this.state.buf));else if(this.atEndOfWord())return this.returnNow($biA0C(this.state.result+this.state.buf));else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"));}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep);}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"));}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"));}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return($4HTEH(this.state.result+this.state.buf));}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"));}parseBoolean(){return this.char===CHAR_t?(this.consume(),this.next(this.parseTrue_r)):this.char===CHAR_f?(this.consume(),this.next(this.parseFalse_a)):void 0;}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"));}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"));}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"));}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"));}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"));}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"));}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"));}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===e.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue);}recordInlineListValue(e){if(this.state.resultArr){let t=this.state.resultArr[_contentType],r=tomlType(e);if(t!==r)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${t} and ${r}`));}else this.state.resultArr=InlineList(tomlType(e));return isFloat(e)||isInteger(e)?this.state.resultArr.push(e.valueOf()):this.state.resultArr.push(e),this.goto(this.parseInlineListNext);}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"));}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue));}recordInlineTableValue(e){let t=this.state.resultTable,r=e.key.pop();for(let r of e.key){if(hasKey(t,r)&&(!isTable(t[r])||t[r][_declared]))throw this.error(new TomlError("Can't redefine existing key"));t=t[r]=t[r]||Table();}if(hasKey(t,r))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(e.value)||isFloat(e.value)?t[r]=e.value.valueOf():t[r]=e.value,this.goto(this.parseInlineTableNext);}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===e.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"));}}return t;}module.exports=makeParserClass(parcelRequire("fd397")),module.exports.makeParserClass=makeParserClass;class TomlError extends Error{constructor(e){super(e),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,TomlError),this.fromTOML=!0,this.wrapped=null;}}TomlError.wrap=e=>{let t=new TomlError(e.message);return t.code=e.code,t.wrapped=e,t;},module.exports.TomlError=TomlError,$4HTEH=parcelRequire("4HTEH"),$biA0C=parcelRequire("biA0C"),$51zGI=parcelRequire("51zGI"),$8bnbQ=parcelRequire("8bnbQ");let CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:"\n",[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"},_type=Symbol(),_declared=Symbol(),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0},INLINE_TABLE=Symbol(),TABLE=Symbol(),_contentType=Symbol(),INLINE_LIST=Symbol(),LIST=Symbol();try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom;}catch(_){}let _inspect=_custom||"inspect";class BoxedBigInt{constructor(e){try{this.value=$parcel$global.BigInt.asIntN(64,e);}catch(e){this.value=null;}Object.defineProperty(this,_type,{value:INTEGER});}isNaN(){return null===this.value;}toString(){return this.value+"";}[_inspect](){return`[BigInt: ${this.toString()}]}`;}valueOf(){return this.value;}}let INTEGER=Symbol(),FLOAT=Symbol();}),parcelRequire.register("fd397",function(e,t){let r=1114112;class i extends Error{constructor(e,t,r){super("[ParserError] "+e,t,r),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,i);}}class s{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null;}}class n{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new s(this.parseStart);}parse(e){let t;if(0!==e.length&&null!=e.length){for(this._buf=e+"",this.ii=-1,this.char=-1;!1===t||this.nextChar();)t=this.runOne();this._buf=null;}}nextChar(){return 10===this.char&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer();}haveBuffer(){return this.ii<this._buf.length;}runOne(){return this.state.parser.call(this,this.state.returned);}finish(){let e;this.char=r;do e=this.state.parser,this.runOne();while(this.state.parser!==e);return this.ctx=null,this.state=null,this._buf=null,this.obj;}next(e){if("function"!=typeof e)throw new i("Tried to set state to non-existent state: "+JSON.stringify(e));this.state.parser=e;}goto(e){return this.next(e),this.runOne();}call(e,t){t&&this.next(t),this.stack.push(this.state),this.state=new s(e);}callNow(e,t){return this.call(e,t),this.runOne();}return(e){if(0===this.stack.length)throw this.error(new i("Stack underflow"));void 0===e&&(e=this.state.buf),this.state=this.stack.pop(),this.state.returned=e;}returnNow(e){return this.return(e),this.runOne();}consume(){if(this.char===r)throw this.error(new i("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii];}error(e){return e.line=this.line,e.col=this.col,e.pos=this.pos,e;}parseStart(){throw new i("Must declare a parseStart method");}}n.END=r,n.Error=i,e.exports=n;}),parcelRequire.register("4HTEH",function(e,t){e.exports=e=>{let t=new Date(e);if(!isNaN(t))return t;throw TypeError("Invalid Datetime");};}),parcelRequire.register("biA0C",function(e,t){var r=parcelRequire("1fZYw");class i extends Date{constructor(e){super(e+"Z"),this.isFloating=!0;}toISOString(){let e=`${this.getUTCFullYear()}-${r(2,this.getUTCMonth()+1)}-${r(2,this.getUTCDate())}`,t=`${r(2,this.getUTCHours())}:${r(2,this.getUTCMinutes())}:${r(2,this.getUTCSeconds())}.${r(3,this.getUTCMilliseconds())}`;return`${e}T${t}`;}}e.exports=e=>{let t=new i(e);if(!isNaN(t))return t;throw TypeError("Invalid Datetime");};}),parcelRequire.register("1fZYw",function(e,t){e.exports=(e,t)=>{for(t+="";t.length<e;)t="0"+t;return t;};}),parcelRequire.register("51zGI",function(e,t){var r=parcelRequire("1fZYw");let i=$parcel$global.Date;class s extends i{constructor(e){super(e),this.isDate=!0;}toISOString(){return`${this.getUTCFullYear()}-${r(2,this.getUTCMonth()+1)}-${r(2,this.getUTCDate())}`;}}e.exports=e=>{let t=new s(e);if(!isNaN(t))return t;throw TypeError("Invalid Datetime");};}),parcelRequire.register("8bnbQ",function(e,t){var r=parcelRequire("1fZYw");class i extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0;}toISOString(){return`${r(2,this.getUTCHours())}:${r(2,this.getUTCMinutes())}:${r(2,this.getUTCSeconds())}.${r(3,this.getUTCMilliseconds())}`;}}e.exports=e=>{let t=new i(e);if(!isNaN(t))return t;throw TypeError("Invalid Datetime");};}),parcelRequire.register("gBYD8",function(e,t){function r(e,t){if(null==e.pos||null==e.line)return e;let r=e.message;if(r+=` at row ${e.line+1}, col ${e.col+1}, pos ${e.pos}:
`,t&&t.split){let i=t.split(/\n/),s=(Math.min(i.length,e.line+3)+"").length,n=" ";for(;n.length<s;)n+=" ";for(let t=Math.max(0,e.line-1);t<Math.min(i.length,e.line+2);++t){let o=t+1+"";if(o.length<s&&(o=" "+o),e.line===t){r+=o+"> "+i[t]+"\n"+n+" ";for(let t=0;t<e.col;++t)r+=" ";r+="^\n";}else r+=o+": "+i[t]+"\n";}}return e.message=r+"\n",e;}e.exports=r;}),parcelRequire.register("2S5Eu",function(e,t){var r,i;function s(e,t){function s(t,r,n,o){if(t>=e.length)try{return n(a.finish());}catch(t){return o(i(t,e));}try{a.parse(e.slice(t,t+r)),setImmediate(s,t+r,r,n,o);}catch(t){o(i(t,e));}}t||(t={});let n=0,o=t.blocksize||40960,a=new r();return new Promise((e,t)=>{setImmediate(s,n,o,e,t);});}e.exports=s,r=parcelRequire("3XGwc"),i=parcelRequire("gBYD8");}),parcelRequire.register("9JW1y",function(e,t){var r;function i(e){return e?s(e):n(e);}function s(e){let t=new r();return e.setEncoding("utf8"),new Promise((r,i)=>{let s;function n(){if(h=!0,!s)try{r(t.finish());}catch(e){i(e);}}function o(e){l=!0,i(e);}function a(){let r;for(s=!0;null!==(r=e.read());)try{t.parse(r);}catch(e){return o(e);}if(s=!1,h)return n();l||e.once("readable",a);}let h=!1,l=!1;e.once("end",n),e.once("error",o),a();});}function n(){let e=new r();return new $kC5q1$stream.Transform({objectMode:!0,transform(t,r,i){try{e.parse(t.toString(r));}catch(e){this.emit("error",e);}i();},flush(t){try{this.push(e.finish());}catch(e){this.emit("error",e);}t();}});}e.exports=i,r=parcelRequire("3XGwc");}),parcelRequire.register("bhUE6",function(e,t){function r(e){if(null===e)throw i("null");if(void 0===e)throw i("undefined");if("object"!=typeof e)throw i(typeof e);if("function"==typeof e.toJSON&&(e=e.toJSON()),null==e)return null;let t=c(e);if("table"!==t)throw i(t);return h("","",e);}function i(e){return Error("Can only stringify objects, not "+e);}function s(){return Error("Array values can't have mixed types");}function n(e){return Object.keys(e).filter(t=>l(e[t]));}function o(e){return Object.keys(e).filter(t=>!l(e[t]));}function a(e){let t=Array.isArray(e)?[]:Object.prototype.hasOwnProperty.call(e,"__proto__")?{["__proto__"]:void 0}:{};for(let r of Object.keys(e))!e[r]||"function"!=typeof e[r].toJSON||"toISOString"in e[r]?t[r]=e[r]:t[r]=e[r].toJSON();return t;}function h(e,t,r){i=n(r=a(r)),s=o(r);var i,s,h=[],l=t||"";i.forEach(e=>{var t=c(r[e]);"undefined"!==t&&"null"!==t&&h.push(l+u(e)+" = "+x(r[e],!0));}),h.length>0&&h.push("");var f=e&&i.length>0?t+" ":"";return s.forEach(t=>{h.push(E(e,f,t,r[t]));}),h.join("\n");}function l(e){switch(c(e)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return 0===e.length||"table"!==c(e[0]);case"table":return 0===Object.keys(e).length;default:return!1;}}function c(e){if(void 0===e)return"undefined";if(null===e)return"null";if("bigint"==typeof e||Number.isInteger(e)&&!Object.is(e,-0))return"integer";if("number"==typeof e)return"float";if("boolean"==typeof e)return"boolean";else if("string"==typeof e)return"string";else if("toISOString"in e)return isNaN(e)?"undefined":"datetime";else if(Array.isArray(e))return"array";else return"table";}function u(e){var t=e+"";return /^[-A-Za-z0-9_]+$/.test(t)?t:f(t);}function f(e){return'"'+y(e).replace(/"/g,'\\"')+'"';}function p(e){return"'"+e+"'";}function d(e,t){for(;t.length<e;)t="0"+t;return t;}function y(e){return e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,e=>"\\u"+d(4,e.codePointAt(0).toString(16)));}function m(e){let t=e.split(/\n/).map(e=>y(e).replace(/"(?="")/g,'\\"')).join("\n");return'"'===t.slice(-1)&&(t+="\\\n"),'"""\n'+t+'"""';}function x(e,t){let r=c(e);return"string"===r&&(t&&/\n/.test(e)?r="string-multiline":!/[\b\t\n\f\r']/.test(e)&&/"/.test(e)&&(r="string-literal")),g(e,r);}function g(e,t){switch(t||(t=c(e)),t){case"string-multiline":return m(e);case"string":return f(e);case"string-literal":return p(e);case"integer":return w(e);case"float":return b(e);case"boolean":return v(e);case"datetime":return S(e);case"array":return T(e.filter(e=>"null"!==c(e)&&"undefined"!==c(e)&&"nan"!==c(e)));case"table":return _(e);default:throw i(t);}}function w(e){return(e+"").replace(/\B(?=(\d{3})+(?!\d))/g,"_");}function b(e){if(e===1/0)return"inf";if(e===-1/0)return"-inf";if(Object.is(e,NaN))return"nan";if(Object.is(e,-0))return"-0.0";var t=(e+"").split("."),r=t[0],i=t[1]||0;return w(r)+"."+i;}function v(e){return e+"";}function S(e){return e.toISOString();}function N(e){return"float"===e||"integer"===e;}function P(e){var t=c(e[0]);return e.every(e=>c(e)===t)?t:e.every(e=>N(c(e)))?"float":"mixed";}function O(e){let t=P(e);if("mixed"===t)throw s();return t;}function T(e){let t=O(e=a(e));var r="[",i=e.map(e=>g(e,t));return i.join(", ").length>60||/\n/.test(i)?r+="\n "+i.join(",\n ")+"\n":r+=" "+i.join(", ")+(i.length>0?" ":""),r+"]";}function _(e){e=a(e);var t=[];return Object.keys(e).forEach(r=>{t.push(u(r)+" = "+x(e[r],!1));}),"{ "+t.join(", ")+(t.length>0?" ":"")+"}";}function E(e,t,r,s){var n=c(s);if("array"===n)return I(e,t,r,s);if("table"===n)return $(e,t,r,s);throw i(n);}function I(e,t,r,s){O(s=a(s));var n=c(s[0]);if("table"!==n)throw i(n);var o=e+u(r),l="";return s.forEach(e=>{l.length>0&&(l+="\n"),l+=t+"[["+o+"]]\n"+h(o+".",t,e);}),l;}function $(e,t,r,i){var s=e+u(r),o="";return n(i).length>0&&(o+=t+"["+s+"]\n"),o+h(s+".",t,i);}e.exports=r,e.exports.value=g;}),parcelRequire.register("xjYT4",function(e,t){var r,i,s,n;async function o(e,t,r){return r||(r=await a()),await i.findFromManifest(e,!1,r,t);}function a(){return r.debug(`Getting manifest from ${f}/${p}@${d}`),i.getManifestFromRepo(f,p,u,d);}async function h(e){let t={cwd:e,env:{...process.env,...(n.IS_LINUX&&{LD_LIBRARY_PATH:$kC5q1$path.join(e,"lib")})},silent:!0,listeners:{stdout(e){r.info(e.toString().trim());},stderr(e){r.error(e.toString().trim());}}};n.IS_WINDOWS?await s.exec("powershell",["./setup.ps1"],t):await s.exec("bash",["./setup.sh"],t);}async function l(e){let t=e.files[0].download_url;r.info(`Download from "${t}"`);let s="";try{let e;s=await i.downloadTool(t,void 0,u),r.info("Extract downloaded archive"),e=n.IS_WINDOWS?await i.extractZip(s):await i.extractTar(s),r.info("Execute installation script"),await h(e);}catch(e){throw e instanceof i.HTTPError&&(403===e.httpStatusCode||429===e.httpStatusCode?r.info(`Received HTTP status code ${e.httpStatusCode}. This usually indicates the rate limit has been exceeded`):r.info(e.message),e.stack&&r.debug(e.stack)),e;}}$parcel$export(e.exports,"MANIFEST_URL",()=>y),$parcel$export(e.exports,"findReleaseFromManifest",()=>o),$parcel$export(e.exports,"getManifest",()=>a),$parcel$export(e.exports,"installCpythonFromRelease",()=>l),r=parcelRequire("kBxNe"),i=parcelRequire("9aCWy"),s=parcelRequire("2mVwa"),n=parcelRequire("42Mcf");let c=r.getInput("token"),u=c?"token "+c:void 0,f="actions",p="python-versions",d="main",y=`https://raw.githubusercontent.com/${f}/${p}/${d}/versions-manifest.json`;}),parcelRequire.register("9aCWy",function(e,t){function r(e,t,r,s){return E(this,void 0,void 0,function*(){t=t||F.join(S(),B.default()),yield V.mkdirP(F.dirname(t)),M.debug("Downloading "+e),M.debug("Destination "+t);let n=3,o=N("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),a=N("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20),h=new D.RetryHelper(n,o,a);return yield h.execute(()=>E(this,void 0,void 0,function*(){return yield i(e,t||"",r,s);}),e=>!(e instanceof H)||!e.httpStatusCode||!(e.httpStatusCode<500)||408===e.httpStatusCode||429===e.httpStatusCode);});}function i(e,t,r,i){return E(this,void 0,void 0,function*(){if(A.existsSync(t))throw Error(`Destination file path ${t} already exists`);let s=new U.HttpClient(Y,[],{allowRetries:!1});r&&(M.debug("set auth"),void 0===i&&(i={}),i.authorization=r);let n=yield s.get(e,i);if(200!==n.message.statusCode){let t=new H(n.message.statusCode);throw M.debug(`Failed to download from "${e}". Code(${n.message.statusCode}) Message(${n.message.statusMessage})`),t;}let o=W.promisify(k.pipeline),a=N("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>n.message)(),h=!1;try{return yield o(a,A.createWriteStream(t)),M.debug("download complete"),h=!0,t;}finally{if(!h){M.debug("download failed");try{yield V.rmRF(t);}catch(e){M.debug(`Failed to delete '${t}'. ${e.message}`);}}}});}function s(e,t,r){return E(this,void 0,void 0,function*(){$kC5q1$assert.ok(Z,"extract7z() not supported on current OS"),$kC5q1$assert.ok(e,'parameter "file" is required'),t=yield m(t);let i=process.cwd();if(process.chdir(t),r)try{let t=M.isDebug()?"-bb1":"-bb0",i=["x",t,"-bd","-sccUTF-8",e],s={silent:!0};yield $.exec(`"${r}"`,i,s);}finally{process.chdir(i);}else{let r=F.join(C,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,""),s=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),n=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),o=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${r}' -Source '${s}' -Target '${n}'`],a={silent:!0};try{let e=yield V.which("powershell",!0);yield $.exec(`"${e}"`,o,a);}finally{process.chdir(i);}}return t;});}function n(e,t,r="xz"){return E(this,void 0,void 0,function*(){let i;if(!e)throw Error("parameter 'file' is required");t=yield m(t),M.debug("Checking tar --version");let s="";yield $.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>s+=e.toString(),stderr:e=>s+=e.toString()}}),M.debug(s.trim());let n=s.toUpperCase().includes("GNU TAR");i=r instanceof Array?r:[r],M.isDebug()&&!r.includes("v")&&i.push("-v");let o=t,a=e;return Z&&n&&(i.push("--force-local"),o=t.replace(/\\/g,"/"),a=e.replace(/\\/g,"/")),n&&(i.push("--warning=no-unknown-keyword"),i.push("--overwrite")),i.push("-C",o,"-f",a),yield $.exec("tar",i),t;});}function o(e,t,r=[]){return E(this,void 0,void 0,function*(){let i;$kC5q1$assert.ok(q,"extractXar() not supported on current OS"),$kC5q1$assert.ok(e,'parameter "file" is required'),t=yield m(t),(i=r instanceof Array?r:[r]).push("-x","-C",t,"-f",e),M.isDebug()&&i.push("-v");let s=yield V.which("xar",!0);return yield $.exec(`"${s}"`,P(i)),t;});}function a(e,t){return E(this,void 0,void 0,function*(){if(!e)throw Error("parameter 'file' is required");return t=yield m(t),Z?yield h(e,t):yield l(e,t),t;});}function h(e,t){return E(this,void 0,void 0,function*(){let r=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),i=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),s=yield V.which("pwsh",!1);if(s){let e=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ; try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${i}', $true) } catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${r}' -DestinationPath '${i}' -Force } else { throw $_ } } ;`];M.debug("Using pwsh at path: "+s),yield $.exec(`"${s}"`,e);}else{let e=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${r}' -DestinationPath '${i}' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${i}', $true) }`],t=yield V.which("powershell",!0);M.debug("Using powershell at path: "+t),yield $.exec(`"${t}"`,e);}});}function l(e,t){return E(this,void 0,void 0,function*(){let r=yield V.which("unzip",!0),i=[e];M.isDebug()||i.unshift("-q"),i.unshift("-o"),yield $.exec(`"${r}"`,i,{cwd:t});});}function c(e,t,r,i){return E(this,void 0,void 0,function*(){if(r=R.clean(r)||r,i=i||L.arch(),M.debug(`Caching tool ${t} ${r} ${i}`),M.debug("source dir: "+e),!A.statSync(e).isDirectory())throw Error("sourceDir is not a directory");let s=yield x(t,r,i);for(let t of A.readdirSync(e)){let r=F.join(e,t);yield V.cp(r,s,{recursive:!0});}return g(t,r,i),s;});}function u(e,t,r,i,s){return E(this,void 0,void 0,function*(){if(i=R.clean(i)||i,s=s||L.arch(),M.debug(`Caching tool ${r} ${i} ${s}`),M.debug("source file: "+e),!A.statSync(e).isFile())throw Error("sourceFile is not a file");let n=yield x(r,i,s),o=F.join(n,t);return M.debug("destination file "+o),yield V.cp(e,o),g(r,i,s),n;});}function f(e,t,r){if(!e)throw Error("toolName parameter is required");if(!t)throw Error("versionSpec parameter is required");r=r||L.arch(),w(t)||(t=b(p(e,r),t));let i="";if(t){t=R.clean(t)||"";let s=F.join(v(),e,t,r);M.debug("checking cache: "+s),A.existsSync(s)&&A.existsSync(`${s}.complete`)?(M.debug(`Found tool in cache ${e} ${t} ${r}`),i=s):M.debug("not found");}return i;}function p(e,t){let r=[];t=t||L.arch();let i=F.join(v(),e);if(A.existsSync(i)){for(let e of A.readdirSync(i))if(w(e)){let s=F.join(i,e,t||"");A.existsSync(s)&&A.existsSync(`${s}.complete`)&&r.push(e);}}return r;}function d(e,t,r,i="master"){return E(this,void 0,void 0,function*(){let s=[],n=`https://api.github.com/repos/${e}/${t}/git/trees/${i}`,o=new U.HttpClient("tool-cache"),a={};r&&(M.debug("set auth"),a.authorization=r);let h=yield o.getJson(n,a);if(!h.result)return s;let l="";for(let e of h.result.tree)if("versions-manifest.json"===e.path){l=e.url;break;}a.accept="application/vnd.github.VERSION.raw";let c=yield(yield o.get(l,a)).readBody();if(c){c=c.replace(/^\uFEFF/,"");try{s=JSON.parse(c);}catch(e){M.debug("Invalid json");}}return s;});}function y(e,t,r,i=L.arch()){return E(this,void 0,void 0,function*(){return yield j._findMatch(e,t,r,i);});}function m(e){return E(this,void 0,void 0,function*(){return e||(e=F.join(S(),B.default())),yield V.mkdirP(e),e;});}function x(e,t,r){return E(this,void 0,void 0,function*(){let i=F.join(v(),e,R.clean(t)||t,r||"");M.debug("destination "+i);let s=`${i}.complete`;return yield V.rmRF(i),yield V.rmRF(s),yield V.mkdirP(i),i;});}function g(e,t,r){let i=F.join(v(),e,R.clean(t)||t,r||""),s=`${i}.complete`;A.writeFileSync(s,""),M.debug("finished caching tool");}function w(e){let t=R.clean(e)||"";M.debug("isExplicit: "+t);let r=null!=R.valid(t);return M.debug("explicit? "+r),r;}function b(e,t){let r="";M.debug(`evaluating ${e.length} versions`),e=e.sort((e,t)=>R.gt(e,t)?1:-1);for(let i=e.length-1;i>=0;i--){let s=e[i];if(R.satisfies(s,t)){r=s;break;}}return r?M.debug("matched: "+r):M.debug("match not found"),r;}function v(){let e=process.env.RUNNER_TOOL_CACHE||"";return $kC5q1$assert.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e;}function S(){let e=process.env.RUNNER_TEMP||"";return $kC5q1$assert.ok(e,"Expected RUNNER_TEMP to be defined"),e;}function N(e,t){let r=$parcel$global[e];return void 0!==r?r:t;}function P(e){return Array.from(new Set(e));}var O,T,_,E,I,$,D,C=$kC5q1$path.resolve(__dirname,"../../node_modules/.pnpm/@actions+tool-cache@1.7.2/node_modules/@actions/tool-cache/lib");O=e.exports&&e.exports.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r];}});}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r];}),T=e.exports&&e.exports.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),_=e.exports&&e.exports.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&O(t,e,r);return T(t,e),t;},E=e.exports&&e.exports.__awaiter||function(e,t,r,i){function s(e){return e instanceof r?e:new r(function(t){t(e);});}return new(r||(r=Promise))(function(r,n){function o(e){try{h(i.next(e));}catch(e){n(e);}}function a(e){try{h(i.throw(e));}catch(e){n(e);}}function h(e){e.done?r(e.value):s(e.value).then(o,a);}h((i=i.apply(e,t||[])).next());});},I=e.exports&&e.exports.__importDefault||function(e){return e&&e.__esModule?e:{default:e};},Object.defineProperty(e.exports,"__esModule",{value:!0}),e.exports.evaluateVersions=e.exports.isExplicitVersion=e.exports.findFromManifest=e.exports.getManifestFromRepo=e.exports.findAllVersions=e.exports.find=e.exports.cacheFile=e.exports.cacheDir=e.exports.extractZip=e.exports.extractXar=e.exports.extractTar=e.exports.extract7z=e.exports.downloadTool=e.exports.HTTPError=void 0;let M=_(parcelRequire("kBxNe")),V=_(parcelRequire("kSdX3")),A=_($kC5q1$fs),j=_(parcelRequire("1Zp5D")),L=_($kC5q1$os),F=_($kC5q1$path),U=_(parcelRequire("aPbbM")),R=_(parcelRequire("3BvyU")),k=_($kC5q1$stream),W=_($kC5q1$util),B=I(parcelRequire("bxsAi"));$=parcelRequire("2mVwa"),D=parcelRequire("2yfZv");class H extends Error{constructor(e){super("Unexpected HTTP response: "+e),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype);}}e.exports.HTTPError=H;let Z="win32"===process.platform,q="darwin"===process.platform,Y="actions/tool-cache";e.exports.downloadTool=r,e.exports.extract7z=s,e.exports.extractTar=n,e.exports.extractXar=o,e.exports.extractZip=a,e.exports.cacheDir=c,e.exports.cacheFile=u,e.exports.find=f,e.exports.findAllVersions=p,e.exports.getManifestFromRepo=d,e.exports.findFromManifest=y,e.exports.isExplicitVersion=w,e.exports.evaluateVersions=b;}),parcelRequire.register("1Zp5D",function(e,t){var r,i,s,n,o;function a(t,r,i,s){return n(this,void 0,void 0,function*(){let n,a,h;let l=$kC5q1$os.platform();for(let n of i){let i=n.version;if(o.debug(`check ${i} satisfies ${t}`),c.satisfies(i,t)&&(!r||n.stable===r)&&(h=n.files.find(t=>{o.debug(`${t.arch}===${s} && ${t.platform}===${l}`);let r=t.arch===s&&t.platform===l;if(r&&t.platform_version){let i=e.exports._getOsVersion();r=i===t.platform_version||c.satisfies(i,t.platform_version);}return r;}))){o.debug("matched "+n.version),a=n;break;}}return a&&h&&((n=Object.assign({},a)).files=[h]),n;});}function h(){let t=$kC5q1$os.platform(),r="";if("darwin"===t)r=$kC5q1$child_process.execSync("sw_vers -productVersion").toString();else if("linux"===t){let t=e.exports._readLinuxVersionFile();if(t)for(let e of t.split("\n")){let t=e.split("=");if(2===t.length&&("VERSION_ID"===t[0].trim()||"DISTRIB_RELEASE"===t[0].trim())){r=t[1].trim().replace(/^"/,"").replace(/"$/,"");break;}}}return r;}function l(){let e="/etc/lsb-release",t="/etc/os-release",r="";return $kC5q1$fs.existsSync(e)?r=$kC5q1$fs.readFileSync(e).toString():$kC5q1$fs.existsSync(t)&&(r=$kC5q1$fs.readFileSync(t).toString()),r;}r=e.exports&&e.exports.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r];}});}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r];}),i=e.exports&&e.exports.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),s=e.exports&&e.exports.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.hasOwnProperty.call(e,s)&&r(t,e,s);return i(t,e),t;},n=e.exports&&e.exports.__awaiter||function(e,t,r,i){function s(e){return e instanceof r?e:new r(function(t){t(e);});}return new(r||(r=Promise))(function(r,n){function o(e){try{h(i.next(e));}catch(e){n(e);}}function a(e){try{h(i.throw(e));}catch(e){n(e);}}function h(e){e.done?r(e.value):s(e.value).then(o,a);}h((i=i.apply(e,t||[])).next());});},Object.defineProperty(e.exports,"__esModule",{value:!0}),e.exports._readLinuxVersionFile=e.exports._getOsVersion=e.exports._findMatch=void 0;let c=s(parcelRequire("3BvyU"));o=parcelRequire("kBxNe"),e.exports._findMatch=a,e.exports._getOsVersion=h,e.exports._readLinuxVersionFile=l;}),parcelRequire.register("2yfZv",function(e,t){var r=e.exports&&e.exports.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[r];}});}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r];}),i=e.exports&&e.exports.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t});}:function(e,t){e.default=t;}),s=e.exports&&e.exports.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s in e)"default"!==s&&Object.hasOwnProperty.call(e,s)&&r(t,e,s);return i(t,e),t;},n=e.exports&&e.exports.__awaiter||function(e,t,r,i){function s(e){return e instanceof r?e:new r(function(t){t(e);});}return new(r||(r=Promise))(function(r,n){function o(e){try{h(i.next(e));}catch(e){n(e);}}function a(e){try{h(i.throw(e));}catch(e){n(e);}}function h(e){e.done?r(e.value):s(e.value).then(o,a);}h((i=i.apply(e,t||[])).next());});};Object.defineProperty(e.exports,"__esModule",{value:!0}),e.exports.RetryHelper=void 0;let o=s(parcelRequire("kBxNe"));class a{constructor(e,t,r){if(e<1)throw Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(t),this.maxSeconds=Math.floor(r),this.minSeconds>this.maxSeconds)throw Error("min seconds should be less than or equal to max seconds");}execute(e,t){return n(this,void 0,void 0,function*(){let r=1;for(;r<this.maxAttempts;){try{return yield e();}catch(e){if(t&&!t(e))throw e;o.info(e.message);}let i=this.getSleepAmount();o.info(`Waiting ${i} seconds before trying again`),yield this.sleep(i),r++;}return yield e();});}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds;}sleep(e){return n(this,void 0,void 0,function*(){return new Promise(t=>setTimeout(t,1e3*e));});}}e.exports.RetryHelper=a;}),parcelRequire.register("49ncA",function(e,t){var r,i,s,n,o;async function a(e,t,s,o,a){let c,u,f="",p="",d=l(e);if(o&&(u=await r.getAvailablePyPyVersions())&&u.length>0){let e=r.findRelease(u,d.pythonVersion,d.pypyVersion,t,!1);e?(n.info(`Resolved as PyPy ${e.resolvedPyPyVersion} with Python (${e.resolvedPythonVersion})`),d.pythonVersion=e.resolvedPythonVersion,d.pypyVersion=e.resolvedPyPyVersion):n.info(`Failed to resolve PyPy ${d.pypyVersion} with Python (${d.pythonVersion}) from manifest`);}({installDir:c,resolvedPythonVersion:p,resolvedPyPyVersion:f}=h(d.pythonVersion,d.pypyVersion,t)),c||({installDir:c,resolvedPythonVersion:p,resolvedPyPyVersion:f}=await r.installPyPy(d.pypyVersion,d.pythonVersion,t,a,u));let y=i.IS_WINDOWS?"Scripts":"bin",m=$kC5q1$path.join(c,y),x=i.IS_WINDOWS?".exe":"",g=$kC5q1$path.join(i.IS_WINDOWS?c:m,"python"+x),w=r.getPyPyBinaryPath(c);return s&&(n.exportVariable("pythonLocation",c),n.exportVariable("Python_ROOT_DIR",c),n.exportVariable("Python2_ROOT_DIR",c),n.exportVariable("Python3_ROOT_DIR",c),n.exportVariable("PKG_CONFIG_PATH",w+"/lib/pkgconfig"),n.addPath(w),n.addPath(m)),n.setOutput("python-version","pypy"+f),n.setOutput("python-path",g),{resolvedPyPyVersion:f,resolvedPythonVersion:p};}function h(e,t,r){let a="",h="",l=i.IS_WINDOWS?c(e):o.find("PyPy",e,r);return l&&(h=(0,i.getPyPyVersionFromPath)(l),a=(0,i.readExactPyPyVersionFile)(l),s.satisfies(a,t)||(l=null,a="",h="")),l||n.info(`PyPy version ${e} (${t}) was not found in the local cache`),{installDir:l,resolvedPythonVersion:h,resolvedPyPyVersion:a};}function l(e){let t;let s=e.split("-").filter(e=>!!e);if(/^(pypy)(.+)/.test(s[0])){let e=s[0].replace("pypy","");s.splice(0,1,"pypy",e);}if(s.length<2||"pypy"!=s[0])throw Error("Invalid 'version' property for PyPy. PyPy version should be specified as 'pypy<python-version>' or 'pypy-<python-version>'. See README for examples and documentation.");let n=s[1];if(t=s.length>2?r.pypyVersionToSemantic(s[2]):"x",!(0,i.validateVersion)(n)||!(0,i.validateVersion)(t))throw Error("Invalid 'version' property for PyPy. Both Python version and PyPy versions should satisfy SemVer notation. See README for examples and documentation.");if(!(0,i.validatePythonVersionFormatForPyPy)(n))throw Error("Invalid format of Python version for PyPy. Python version should be specified in format 'x.y'. See README for examples and documentation.");return{pypyVersion:t,pythonVersion:n};}function c(e){let t="";return(0,i.WINDOWS_ARCHS).forEach(r=>t=t||o.find("PyPy",e,r)),t;}$parcel$export(e.exports,"findPyPyVersion",()=>a),r=parcelRequire("dDV6t"),i=parcelRequire("42Mcf"),s=parcelRequire("lqN0l"),n=parcelRequire("kBxNe"),o=parcelRequire("9aCWy");}),parcelRequire.register("dDV6t",function(e,t){var r,i,s,n,o,a;async function h(e,t,s,n,o){let h;if(!(o=null!=o?o:await l())||0===o.length)throw Error("No release was found in PyPy version.json");let d=f(o,t,e,s,!1);if(!n||d&&d.foundAsset||(r.info([`Stable PyPy version ${t} (${e}) with arch ${s} not found`,"Trying pre-release versions"].join($kC5q1$os.EOL)),d=f(o,t,e,s,!0)),!d||!d.foundAsset)throw Error(`PyPy version ${t} (${e}) with arch ${s} not found`);let{foundAsset:y,resolvedPythonVersion:m,resolvedPyPyVersion:x}=d,g=""+y.download_url;r.info(`Downloading PyPy from "${g}" ...`);try{let e=await i.downloadTool(g);r.info("Extracting downloaded archive..."),h=a.IS_WINDOWS?await i.extractZip(e):await i.extractTar(e,void 0,"x");let t=$parcel$interopDefault($kC5q1$fs).readdirSync(h)[0],n=$kC5q1$path.join(h,t),o=n;(0,a.isNightlyKeyword)(x)||(o=await i.cacheDir(n,"PyPy",m,s)),(0,a.writeExactPyPyVersionFile)(o,x);let l=p(o);return await c(l,m),await u(l),{installDir:o,resolvedPythonVersion:m,resolvedPyPyVersion:x};}catch(e){throw e instanceof Error&&(e instanceof i.HTTPError&&(403===e.httpStatusCode||429===e.httpStatusCode)?r.info(`Received HTTP status code ${e.httpStatusCode}. This usually indicates the rate limit has been exceeded`):r.info(e.message),void 0!==e.stack&&r.debug(e.stack)),e;}}async function l(){let e="https://downloads.python.org/pypy/versions.json",t=new n.HttpClient("tool-cache"),r=await t.getJson(e);if(!r.result)throw Error(`Unable to retrieve the list of available PyPy versions from '${e}'`);return r.result;}async function c(e,t){let i=s.coerce(t),n=s.major(i),o=s.minor(i),h=2===n?"":"3",l=`${n}.${o}`,c=a.IS_WINDOWS?".exe":"";r.info("Creating symlinks..."),(0,a.createSymlinkInFolder)(e,`pypy${h}${c}`,`python${n}${c}`,!0),(0,a.createSymlinkInFolder)(e,`pypy${h}${c}`,"python"+c,!0),(0,a.createSymlinkInFolder)(e,`pypy${h}${c}`,`pypy${l}${c}`,!0);}async function u(e){r.info("Installing and updating pip");let t=$kC5q1$path.join(e,"python");await o.exec(`${t} -m ensurepip`),await o.exec(`${e}/python -m pip install --ignore-installed pip`);}function f(e,t,r,i,n){let o={includePrerelease:n},h=e.filter(e=>{let n=s.satisfies(s.coerce(e.python_version),t),h=(0,a.isNightlyKeyword)(r)&&(0,a.isNightlyKeyword)(e.pypy_version)||s.satisfies(d(e.pypy_version),r,o),l=e.files&&(a.IS_WINDOWS?y(e,i):m(e,i,process.platform));return n&&h&&l;});if(0===h.length)return null;let l=h.sort((e,t)=>s.compare(s.coerce(d(t.pypy_version)),s.coerce(d(e.pypy_version)))||s.compare(s.coerce(t.python_version),s.coerce(e.python_version)))[0];return{foundAsset:a.IS_WINDOWS?x(l,i):g(l,i,process.platform),resolvedPythonVersion:l.python_version,resolvedPyPyVersion:l.pypy_version.trim()};}function p(e){let t=$kC5q1$path.join(e,"bin");return a.IS_WINDOWS?e:t;}function d(e){let t=/(\d+\.\d+\.\d+)((?:a|b|rc))(\d*)/g;return e.replace(t,"$1-$2.$3");}function y(e,t){return t=w(t),e.files.some(e=>(0,a.WINDOWS_PLATFORMS).includes(e.platform)&&e.arch===t);}function m(e,t,r){return e.files.some(e=>e.arch===t&&e.platform===r);}function x(e,t){return t=w(t),e.files.find(e=>(0,a.WINDOWS_PLATFORMS).includes(e.platform)&&e.arch===t);}function g(e,t,r){return e.files.find(e=>e.arch===t&&e.platform===r);}function w(e){return"x32"===e&&(e="x86"),e;}$parcel$export(e.exports,"installPyPy",()=>h),$parcel$export(e.exports,"getAvailablePyPyVersions",()=>l),$parcel$export(e.exports,"findRelease",()=>f),$parcel$export(e.exports,"getPyPyBinaryPath",()=>p),$parcel$export(e.exports,"pypyVersionToSemantic",()=>d),r=parcelRequire("kBxNe"),i=parcelRequire("9aCWy"),s=parcelRequire("lqN0l"),n=parcelRequire("aPbbM"),o=parcelRequire("2mVwa"),a=parcelRequire("42Mcf");});
//# sourceMappingURL=actions_python.0fa61708.js.map