From e46399169f59e112c5006023ab99c182b14af0e4 Mon Sep 17 00:00:00 2001 From: Webber Date: Fri, 1 May 2020 15:50:28 +0200 Subject: [PATCH] Add tests for System model --- .github/workflows/main.yml | 2 +- action/index.js | 2 +- src/model/system.js | 2 +- src/model/system.test.js | 45 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 src/model/system.test.js diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1a081977..e96f6c37 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,7 @@ name: Actions 😎 on: pull_request: {} - push: { branches: [master, debug-push-pipeline] } + push: { branches: [master] } env: UNITY_LICENSE: "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \nJHdOBFmBNq2H8BrGFzir/StLoYo=aENLHd37a51RtP2/g7YU0Pexf5mx0/ENXYGtrPzqwZ8NQt2AsSdxGnl0CUB45/GuNXfJVDt2HWot\ncNYZB2OylVBn1WHQbKZlPmm8gEAMz0MYbr4Isb5i5buryBrZlmbEOjnRI+pEg1CBwlgMo6xdtjjE\n/d7cC293QIUO91kdzRXftYou1dNaUyuPL9ZH65vdB2pDXGRNxgUVD+GnnqZA7b5L2HXqNQclcWAK\n5Yd1BeF3VzR1iLw9G/SmH5oOhnpXSmqbL4qk7LVP2/mgXpFk5kP4X8VC3z47obNhBIGq40dwWyEe\nUYk5/nRAOkZawDT+tcu96e06gPC9Cxk5PdbRbA==" diff --git a/action/index.js b/action/index.js index 7e8dbd40..dddde144 100644 --- a/action/index.js +++ b/action/index.js @@ -1 +1 @@ -module.exports=function(e,r){"use strict";var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var n=t[r]={i:r,l:false,exports:{}};e[r].call(n.exports,n,n.exports,__webpack_require__);n.l=true;return n.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(77)}r(__webpack_require__);return startup()}({1:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});const a=t(129);const i=t(622);const o=t(669);const u=t(672);const s=o.promisify(a.exec);function cp(e,r,t={}){return n(this,void 0,void 0,function*(){const{force:n,recursive:a}=readCopyOptions(t);const o=(yield u.exists(r))?yield u.stat(r):null;if(o&&o.isFile()&&!n){return}const s=o&&o.isDirectory()?i.join(r,i.basename(e)):r;if(!(yield u.exists(e))){throw new Error(`no such file or directory: ${e}`)}const c=yield u.stat(e);if(c.isDirectory()){if(!a){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,s,0,n)}}else{if(i.relative(e,s)===""){throw new Error(`'${s}' and '${e}' are the same file`)}yield copyFile(e,s,n)}})}r.cp=cp;function mv(e,r,t={}){return n(this,void 0,void 0,function*(){if(yield u.exists(r)){let n=true;if(yield u.isDirectory(r)){r=i.join(r,i.basename(e));n=yield u.exists(r)}if(n){if(t.force==null||t.force){yield rmRF(r)}else{throw new Error("Destination already exists")}}}yield mkdirP(i.dirname(r));yield u.rename(e,r)})}r.mv=mv;function rmRF(e){return n(this,void 0,void 0,function*(){if(u.IS_WINDOWS){try{if(yield u.isDirectory(e,true)){yield s(`rd /s /q "${e}"`)}else{yield s(`del /f /a "${e}"`)}}catch(e){if(e.code!=="ENOENT")throw e}try{yield u.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let r=false;try{r=yield u.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(r){yield s(`rm -rf "${e}"`)}else{yield u.unlink(e)}}})}r.rmRF=rmRF;function mkdirP(e){return n(this,void 0,void 0,function*(){yield u.mkdirP(e)})}r.mkdirP=mkdirP;function which(e,r){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'tool' is required")}if(r){const r=yield which(e,false);if(!r){if(u.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.`)}}}try{const r=[];if(u.IS_WINDOWS&&process.env.PATHEXT){for(const e of process.env.PATHEXT.split(i.delimiter)){if(e){r.push(e)}}}if(u.isRooted(e)){const t=yield u.tryGetExecutablePath(e,r);if(t){return t}return""}if(e.includes("/")||u.IS_WINDOWS&&e.includes("\\")){return""}const t=[];if(process.env.PATH){for(const e of process.env.PATH.split(i.delimiter)){if(e){t.push(e)}}}for(const n of t){const t=yield u.tryGetExecutablePath(n+i.sep+e,r);if(t){return t}}return""}catch(e){throw new Error(`which failed with message ${e.message}`)}})}r.which=which;function readCopyOptions(e){const r=e.force==null?true:e.force;const t=Boolean(e.recursive);return{force:r,recursive:t}}function cpDirRecursive(e,r,t,a){return n(this,void 0,void 0,function*(){if(t>=255)return;t++;yield mkdirP(r);const n=yield u.readdir(e);for(const i of n){const n=`${e}/${i}`;const o=`${r}/${i}`;const s=yield u.lstat(n);if(s.isDirectory()){yield cpDirRecursive(n,o,t,a)}else{yield copyFile(n,o,a)}}yield u.chmod(r,(yield u.stat(e)).mode)})}function copyFile(e,r,t){return n(this,void 0,void 0,function*(){if((yield u.lstat(e)).isSymbolicLink()){try{yield u.lstat(r);yield u.unlink(r)}catch(e){if(e.code==="EPERM"){yield u.chmod(r,"0666");yield u.unlink(r)}}const t=yield u.readlink(e);yield u.symlink(t,r,u.IS_WINDOWS?"junction":null)}else if(!(yield u.exists(r))||t){yield u.copyFile(e,r)}})}},9:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});const a=t(87);const i=t(614);const o=t(129);const u=t(622);const s=t(1);const c=t(672);const f=process.platform==="win32";class ToolRunner extends i.EventEmitter{constructor(e,r,t){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=r||[];this.options=t||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,r){const t=this._getSpawnFileName();const n=this._getSpawnArgs(e);let a=r?"":"[command]";if(f){if(this._isCmdFile()){a+=t;for(const e of n){a+=` ${e}`}}else if(e.windowsVerbatimArguments){a+=`"${t}"`;for(const e of n){a+=` ${e}`}}else{a+=this._windowsQuoteCmdArg(t);for(const e of n){a+=` ${this._windowsQuoteCmdArg(e)}`}}}else{a+=t;for(const e of n){a+=` ${e}`}}return a}_processLineBuffer(e,r,t){try{let n=r+e.toString();let i=n.indexOf(a.EOL);while(i>-1){const e=n.substring(0,i);t(e);n=n.substring(i+a.EOL.length);i=n.indexOf(a.EOL)}r=n}catch(e){this._debug(`error processing line. Failed with error ${e}`)}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){if(this._isCmdFile()){let r=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const t of this.args){r+=" ";r+=e.windowsVerbatimArguments?t:this._windowsQuoteCmdArg(t)}r+='"';return[r]}}return this.args}_endsWith(e,r){return e.endsWith(r)}_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 r=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let t=false;for(const n of e){if(r.some(e=>e===n)){t=true;break}}if(!t){return e}let n='"';let a=true;for(let r=e.length;r>0;r--){n+=e[r-1];if(a&&e[r-1]==="\\"){n+="\\"}else if(e[r-1]==='"'){a=true;n+='"'}else{a=false}}n+='"';return n.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 r='"';let t=true;for(let n=e.length;n>0;n--){r+=e[n-1];if(t&&e[n-1]==="\\"){r+="\\"}else if(e[n-1]==='"'){t=true;r+="\\"}else{t=false}}r+='"';return r.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const r={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};r.outStream=e.outStream||process.stdout;r.errStream=e.errStream||process.stderr;return r}_getSpawnOptions(e,r){e=e||{};const t={};t.cwd=e.cwd;t.env=e.env;t["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){t.argv0=`"${r}"`}return t}exec(){return n(this,void 0,void 0,function*(){if(!c.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield s.which(this.toolPath,true);return new Promise((e,r)=>{this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const t=this._cloneExecOptions(this.options);if(!t.silent&&t.outStream){t.outStream.write(this._getCommandString(t)+a.EOL)}const n=new ExecState(t,this.toolPath);n.on("debug",e=>{this._debug(e)});const i=this._getSpawnFileName();const u=o.spawn(i,this._getSpawnArgs(t),this._getSpawnOptions(this.options,i));const s="";if(u.stdout){u.stdout.on("data",e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!t.silent&&t.outStream){t.outStream.write(e)}this._processLineBuffer(e,s,e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}})})}const c="";if(u.stderr){u.stderr.on("data",e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!t.silent&&t.errStream&&t.outStream){const r=t.failOnStdErr?t.errStream:t.outStream;r.write(e)}this._processLineBuffer(e,c,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}u.on("error",e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()});u.on("exit",e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()});u.on("close",e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()});n.on("done",(t,n)=>{if(s.length>0){this.emit("stdline",s)}if(c.length>0){this.emit("errline",c)}u.removeAllListeners();if(t){r(t)}else{e(n)}})})})}}r.ToolRunner=ToolRunner;function argStringToArray(e){const r=[];let t=false;let n=false;let a="";function append(e){if(n&&e!=='"'){a+="\\"}a+=e;n=false}for(let i=0;i0){r.push(a);a=""}continue}append(o)}if(a.length>0){r.push(a.trim())}return r}r.argStringToArray=argStringToArray;class ExecState extends i.EventEmitter{constructor(e,r){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(!r){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=r;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=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 r=`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(r)}e._setResult()}}},77:function(e,r,t){"use strict";t.r(r);var n=t(622);var a=t.n(n);class action_Action{static get supportedPlatforms(){return["linux"]}static get isRunningLocally(){return process.env.RUNNER_WORKSPACE===undefined}static get isRunningFromSource(){return a().basename(__dirname)==="model"}static get name(){return"unity-builder"}static get rootFolder(){if(action_Action.isRunningFromSource){return a().dirname(a().dirname(a().dirname(__filename)))}return a().dirname(a().dirname(__filename))}static get actionFolder(){return`${action_Action.rootFolder}/action`}static get dockerfile(){return`${action_Action.actionFolder}/Dockerfile`}static get workspace(){return process.env.GITHUB_WORKSPACE}static checkCompatibility(){const e=process.platform;if(!action_Action.supportedPlatforms.includes(e)){throw new Error(`Currently ${e}-platform is not supported`)}}}var i=action_Action;class Platform{static get default(){return Platform.types.StandaloneWindows64}static get types(){return{StandaloneOSX:"StandaloneOSX",StandaloneWindows:"StandaloneWindows",StandaloneWindows64:"StandaloneWindows64",StandaloneLinux64:"StandaloneLinux64",iOS:"iOS",Android:"Android",WebGL:"WebGL",WSAPlayer:"WSAPlayer",PS4:"PS4",XboxOne:"XboxOne",tvOS:"tvOS",Switch:"Switch",Lumin:"Lumin",BJM:"BJM",Stadia:"Stadia",Facebook:"Facebook",NoTarget:"NoTarget",Test:"Test"}}static isWindows(e){switch(e){case Platform.types.StandaloneWindows:case Platform.types.StandaloneWindows64:return true;default:return false}}static isAndroid(e){switch(e){case Platform.types.Android:return true;default:return false}}}var o=Platform;class build_parameters_BuildParameters{static create(e){const{version:r,targetPlatform:t,projectPath:n,buildName:a,buildsPath:i,buildMethod:o,buildVersion:u,customParameters:s}=e;return{version:r,platform:t,projectPath:n,buildName:a,buildPath:`${i}/${t}`,buildFile:this.parseBuildFile(a,t),buildMethod:o,buildVersion:u,customParameters:s}}static parseBuildFile(e,r){if(o.isWindows(r)){return`${e}.exe`}if(o.isAndroid(r)){return`${e}.apk`}return e}}var u=build_parameters_BuildParameters;var s=t(747);var c=t.n(s);var f=t(470);class Unity{static get libraryFolder(){return"Library"}}var l=Unity;class project_Project{static get relativePath(){const e=Object(f.getInput)("projectPath")||".";return`${e}`}static get absolutePath(){const{workspace:e}=i;return`${e}/${this.relativePath}`}static get libraryFolder(){return`${this.relativePath}/${l.libraryFolder}`}}var v=project_Project;class cache_Cache{static verify(){if(!c().existsSync(v.libraryFolder)){this.notifyAboutCachingPossibility()}}static notifyAboutCachingPossibility(){if(i.isRunningLocally){return}console.log(`\n Library folder does not exist.\n Consider setting up caching to speed up your workflow\n If this is not your first build.`)}}var d=cache_Cache;var p=t(986);var h=typeof global=="object"&&global&&global.Object===Object&&global;var y=h;var g=typeof self=="object"&&self&&self.Object===Object&&self;var b=y||g||Function("return this")();var m=b;var _=m.Symbol;var w=_;var x=Object.prototype;var S=x.hasOwnProperty;var O=x.toString;var j=w?w.toStringTag:undefined;function getRawTag(e){var r=S.call(e,j),t=e[j];try{e[j]=undefined;var n=true}catch(e){}var a=O.call(e);if(n){if(r){e[j]=t}else{delete e[j]}}return a}var I=getRawTag;var A=Object.prototype;var E=A.toString;function objectToString(e){return E.call(e)}var k=objectToString;var P="[object Null]",C="[object Undefined]";var R=w?w.toStringTag:undefined;function baseGetTag(e){if(e==null){return e===undefined?C:P}return R&&R in Object(e)?I(e):k(e)}var W=baseGetTag;function isObjectLike(e){return e!=null&&typeof e=="object"}var T=isObjectLike;var M="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||T(e)&&W(e)==M}var B=isSymbol;var D=0/0;function baseToNumber(e){if(typeof e=="number"){return e}if(B(e)){return D}return+e}var L=baseToNumber;function arrayMap(e,r){var t=-1,n=e==null?0:e.length,a=Array(n);while(++t0){if(++r>=pr){return arguments[0]}}else{r=0}return e.apply(undefined,arguments)}}var gr=shortOut;var br=gr(De);var mr=br;var _r=/\{\n\/\* \[wrapped with (.+)\] \*/,wr=/,? & /;function getWrapDetails(e){var r=e.match(_r);return r?r[1].split(wr):[]}var xr=getWrapDetails;var Sr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function insertWrapDetails(e,r){var t=r.length;if(!t){return e}var n=t-1;r[n]=(t>1?"& ":"")+r[n];r=r.join(t>2?", ":" ");return e.replace(Sr,"{\n/* [wrapped with "+r+"] */\n")}var Or=insertWrapDetails;function constant(e){return function(){return e}}var jr=constant;var Ir=function(){try{var e=Ce(Object,"defineProperty");e({},"",{});return e}catch(e){}}();var Ar=Ir;var Er=!Ar?ce:function(e,r){return Ar(e,"toString",{configurable:true,enumerable:false,value:jr(r),writable:true})};var kr=Er;var Pr=gr(kr);var Cr=Pr;function arrayEach(e,r){var t=-1,n=e==null?0:e.length;while(++t-1}var Dr=arrayIncludes;var Lr=1,Fr=2,Nr=8,$r=16,Ur=32,zr=64,qr=128,Hr=256,Vr=512;var Gr=[["ary",qr],["bind",Lr],["bindKey",Fr],["curry",Nr],["curryRight",$r],["flip",Vr],["partial",Ur],["partialRight",zr],["rearg",Hr]];function updateWrapDetails(e,r){Rr(Gr,function(t){var n="_."+t[0];if(r&t[1]&&!Dr(e,n)){e.push(n)}});return e.sort()}var Kr=updateWrapDetails;function setWrapToString(e,r,t){var n=r+"";return Cr(e,Or(n,Kr(xr(n),t)))}var Zr=setWrapToString;var Xr=1,Yr=2,Jr=4,Qr=8,et=32,rt=64;function createRecurry(e,r,t,n,a,i,o,u,s,c){var f=r&Qr,l=f?o:undefined,v=f?undefined:o,d=f?i:undefined,p=f?undefined:i;r|=f?et:rt;r&=~(f?rt:et);if(!(r&Jr)){r&=~(Xr|Yr)}var h=[e,r,a,d,l,p,v,u,s,c];var y=t.apply(undefined,h);if(dr(e)){mr(y,h)}y.placeholder=n;return Zr(y,e,r)}var tt=createRecurry;function getHolder(e){var r=e;return r.placeholder}var nt=getHolder;var at=9007199254740991;var it=/^(?:0|[1-9]\d*)$/;function isIndex(e,r){var t=typeof e;r=r==null?at:r;return!!r&&(t=="number"||t!="symbol"&&it.test(e))&&(e>-1&&e%1==0&&e1){g.reverse()}if(f&&s-1&&e%1==0&&e<=Xt}var Yt=isLength;function isArrayLike(e){return e!=null&&Yt(e.length)&&!pe(e)}var Jt=isArrayLike;function isIterateeCall(e,r,t){if(!Z(t)){return false}var n=typeof r;if(n=="number"?Jt(t)&&ot(r,t.length):n=="string"&&r in t){return Ut(t[r],e)}return false}var Qt=isIterateeCall;function createAssigner(e){return Zt(function(r,t){var n=-1,a=t.length,i=a>1?t[a-1]:undefined,o=a>2?t[2]:undefined;i=e.length>3&&typeof i=="function"?(a--,i):undefined;if(o&&Qt(t[0],t[1],o)){i=a<3?undefined:i;a=1}r=Object(r);while(++n-1}var Xa=listCacheHas;function listCacheSet(e,r){var t=this.__data__,n=Ha(t,e);if(n<0){++this.size;t.push([e,r])}else{t[n][1]=r}return this}var Ya=listCacheSet;function ListCache(e){var r=-1,t=e==null?0:e.length;this.clear();while(++r0&&t(u)){if(r>1){baseFlatten(u,r-1,t,n,a)}else{Oi(a,u)}}else if(!n){a[a.length]=u}}return a}var Ai=baseFlatten;function flatten(e){var r=e==null?0:e.length;return r?Ai(e,1):[]}var Ei=flatten;function flatRest(e){return Cr(Kt(e,undefined,Ei),e+"")}var ki=flatRest;var Pi=ki(Si);var Ci=Pi;var Ri=ia(Object.getPrototypeOf,Object);var Wi=Ri;var Ti="[object Object]";var Mi=Function.prototype,Bi=Object.prototype;var Di=Mi.toString;var Li=Bi.hasOwnProperty;var Fi=Di.call(Object);function isPlainObject(e){if(!T(e)||W(e)!=Ti){return false}var r=Wi(e);if(r===null){return true}var t=Li.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&Di.call(t)==Fi}var Ni=isPlainObject;var $i="[object DOMException]",Ui="[object Error]";function isError(e){if(!T(e)){return false}var r=W(e);return r==Ui||r==$i||typeof e.message=="string"&&typeof e.name=="string"&&!Ni(e)}var zi=isError;var qi=Zt(function(e,r){try{return qe(e,undefined,r)}catch(e){return zi(e)?e:new Error(e)}});var Hi=qi;var Vi="Expected a function";function before(e,r){var t;if(typeof r!="function"){throw new TypeError(Vi)}e=oe(e);return function(){if(--e>0){t=r.apply(this,arguments)}if(e<=1){r=undefined}return t}}var Gi=before;var Ki=1,Zi=32;var Xi=Zt(function(e,r,t){var n=Ki;if(t.length){var a=ft(t,nt(Xi));n|=Zi}return Lt(e,n,r,t,a)});Xi.placeholder={};var Yi=Xi;var Ji=ki(function(e,r){Rr(r,function(r){r=_i(r);$t(e,r,Yi(e[r],e))});return e});var Qi=Ji;var eo=1,ro=2,to=32;var no=Zt(function(e,r,t){var n=eo|ro;if(t.length){var a=ft(t,nt(no));n|=to}return Lt(r,n,e,t,a)});no.placeholder={};var ao=no;function baseSlice(e,r,t){var n=-1,a=e.length;if(r<0){r=-r>a?0:a+r}t=t>a?a:t;if(t<0){t+=a}a=r>t?0:t-r>>>0;r>>>=0;var i=Array(a);while(++n=n?e:io(e,r,t)}var oo=castSlice;var uo="\\ud800-\\udfff",so="\\u0300-\\u036f",co="\\ufe20-\\ufe2f",fo="\\u20d0-\\u20ff",lo=so+co+fo,vo="\\ufe0e\\ufe0f";var po="\\u200d";var ho=RegExp("["+po+uo+lo+vo+"]");function hasUnicode(e){return ho.test(e)}var yo=hasUnicode;function asciiToArray(e){return e.split("")}var go=asciiToArray;var bo="\\ud800-\\udfff",mo="\\u0300-\\u036f",_o="\\ufe20-\\ufe2f",wo="\\u20d0-\\u20ff",xo=mo+_o+wo,So="\\ufe0e\\ufe0f";var Oo="["+bo+"]",jo="["+xo+"]",Io="\\ud83c[\\udffb-\\udfff]",Ao="(?:"+jo+"|"+Io+")",Eo="[^"+bo+"]",ko="(?:\\ud83c[\\udde6-\\uddff]){2}",Po="[\\ud800-\\udbff][\\udc00-\\udfff]",Co="\\u200d";var Ro=Ao+"?",Wo="["+So+"]?",To="(?:"+Co+"(?:"+[Eo,ko,Po].join("|")+")"+Wo+Ro+")*",Mo=Wo+Ro+To,Bo="(?:"+[Eo+jo+"?",jo,ko,Po,Oo].join("|")+")";var Do=RegExp(Io+"(?="+Io+")|"+Bo+Mo,"g");function unicodeToArray(e){return e.match(Do)||[]}var Lo=unicodeToArray;function stringToArray(e){return yo(e)?Lo(e):go(e)}var Fo=stringToArray;function createCaseFirst(e){return function(r){r=gi(r);var t=yo(r)?Fo(r):undefined;var n=t?t[0]:r.charAt(0);var a=t?oo(t,1).join(""):r.slice(1);return n[e]()+a}}var No=createCaseFirst;var $o=No("toUpperCase");var Uo=$o;function capitalize(e){return Uo(gi(e).toLowerCase())}var zo=capitalize;function arrayReduce(e,r,t,n){var a=-1,i=e==null?0:e.length;if(n&&i){t=e[++a]}while(++a=r?e:r}}return e}var fs=baseClamp;function clamp(e,r,t){if(t===undefined){t=r;r=undefined}if(t!==undefined){t=te(t);t=t===t?t:0}if(r!==undefined){r=te(r);r=r===r?r:0}return fs(te(e),r,t)}var ls=clamp;function stackClear(){this.__data__=new Ja;this.size=0}var vs=stackClear;function stackDelete(e){var r=this.__data__,t=r["delete"](e);this.size=r.size;return t}var ds=stackDelete;function stackGet(e){return this.__data__.get(e)}var ps=stackGet;function stackHas(e){return this.__data__.has(e)}var hs=stackHas;var ys=200;function stackSet(e,r){var t=this.__data__;if(t instanceof Ja){var n=t.__data__;if(!ei||n.lengthu)){return false}var c=i.get(e);if(c&&i.get(r)){return c==r}var f=-1,l=true,v=t&Zf?new Hf:undefined;i.set(e,r);i.set(r,e);while(++f=r||t<0||l&&n>=i}function timerExpired(){var e=gv();if(shouldInvoke(e)){return trailingEdge(e)}u=setTimeout(timerExpired,remainingWait(e))}function trailingEdge(e){u=undefined;if(v&&n){return invokeFunc(e)}n=a=undefined;return o}function cancel(){if(u!==undefined){clearTimeout(u)}c=0;n=s=a=u=undefined}function flush(){return u===undefined?o:trailingEdge(gv())}function debounced(){var e=gv(),t=shouldInvoke(e);n=arguments;a=this;s=e;if(t){if(u===undefined){return leadingEdge(s)}if(l){clearTimeout(u);u=setTimeout(timerExpired,r);return invokeFunc(s)}}if(u===undefined){u=setTimeout(timerExpired,r)}return o}debounced.cancel=cancel;debounced.flush=flush;return debounced}var wv=debounce;function defaultTo(e,r){return e==null||e!==e?r:e}var xv=defaultTo;var Sv=Object.prototype;var Ov=Sv.hasOwnProperty;var jv=Zt(function(e,r){e=Object(e);var t=-1;var n=r.length;var a=n>2?r[2]:undefined;if(a&&Qt(r[0],r[1],a)){n=1}while(++t=Hv){i=Gf;o=false;r=new Hf(r)}e:while(++a=0&&e.slice(t,a)==r}var yd=endsWith;function baseToPairs(e,r){return F(r,function(r){return[r,e[r]]})}var gd=baseToPairs;function setToPairs(e){var r=-1,t=Array(e.size);e.forEach(function(e){t[++r]=[e,e]});return t}var bd=setToPairs;var md="[object Map]",_d="[object Set]";function createToPairs(e){return function(r){var t=oc(r);if(t==md){return Yf(r)}if(t==_d){return bd(r)}return gd(r,e(r))}}var wd=createToPairs;var xd=wd(la);var Sd=xd;var Od=wd(_a);var jd=Od;var Id={"&":"&","<":"<",">":">",'"':""","'":"'"};var Ad=Ho(Id);var Ed=Ad;var kd=/[&<>"']/g,Pd=RegExp(kd.source);function escape_escape(e){e=gi(e);return e&&Pd.test(e)?e.replace(kd,Ed):e}var Cd=escape_escape;var Rd=/[\\^$.*+?()[\]{}|]/g,Wd=RegExp(Rd.source);function escapeRegExp(e){e=gi(e);return e&&Wd.test(e)?e.replace(Rd,"\\$&"):e}var Td=escapeRegExp;function arrayEvery(e,r){var t=-1,n=e==null?0:e.length;while(++ta?0:a+t}n=n===undefined||n>a?a:oe(n);if(n<0){n+=a}n=t>n?0:Fd(n);while(t-1?a[i?r[o]:o]:undefined}}var qd=createFind;var Hd=Math.max;function findIndex(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=t==null?0:oe(t);if(a<0){a=Hd(n+a,0)}return Wr(e,zl(r,3),a)}var Vd=findIndex;var Gd=qd(Vd);var Kd=Gd;function baseFindKey(e,r,t){var n;t(e,function(e,t,a){if(r(e,t,a)){n=t;return false}});return n}var Zd=baseFindKey;function findKey(e,r){return Zd(e,zl(r,3),rv)}var Xd=findKey;var Yd=Math.max,Jd=Math.min;function findLastIndex(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=n-1;if(t!==undefined){a=oe(t);a=t<0?Yd(n+a,0):Jd(a,n-1)}return Wr(e,zl(r,3),a,true)}var Qd=findLastIndex;var ep=qd(Qd);var rp=ep;function findLastKey(e,r){return Zd(e,zl(r,3),vd)}var tp=findLastKey;function head(e){return e&&e.length?e[0]:undefined}var np=head;function baseMap(e,r){var t=-1,n=Jt(e)?Array(e.length):[];av(e,function(e,a,i){n[++t]=r(e,a,i)});return n}var ap=baseMap;function map_map(e,r){var t=$(e)?F:ap;return t(e,zl(r,3))}var ip=map_map;function flatMap(e,r){return Ai(ip(e,r),1)}var op=flatMap;var up=1/0;function flatMapDeep(e,r){return Ai(ip(e,r),up)}var sp=flatMapDeep;function flatMapDepth(e,r,t){t=t===undefined?1:oe(t);return Ai(ip(e,r),t)}var cp=flatMapDepth;var fp=1/0;function flattenDeep(e){var r=e==null?0:e.length;return r?Ai(e,fp):[]}var lp=flattenDeep;function flattenDepth(e,r){var t=e==null?0:e.length;if(!t){return[]}r=r===undefined?1:oe(r);return Ai(e,r)}var vp=flattenDepth;var dp=512;function flip(e){return Lt(e,dp)}var pp=flip;var hp=ns("floor");var yp=hp;var gp="Expected a function";var bp=8,mp=32,_p=128,wp=256;function createFlow(e){return ki(function(r){var t=r.length,n=t,a=ur.prototype.thru;if(e){r.reverse()}while(n--){var i=r[n];if(typeof i!="function"){throw new TypeError(gp)}if(a&&!o&&or(i)=="wrapper"){var o=new ur([],true)}}n=o?n:t;while(++nr}var Fp=baseGt;function createRelationalOperation(e){return function(r,t){if(!(typeof r=="string"&&typeof t=="string")){r=te(r);t=te(t)}return e(r,t)}}var Np=createRelationalOperation;var $p=Np(Fp);var Up=$p;var zp=Np(function(e,r){return e>=r});var qp=zp;var Hp=Object.prototype;var Vp=Hp.hasOwnProperty;function baseHas(e,r){return e!=null&&Vp.call(e,r)}var Gp=baseHas;function has(e,r){return e!=null&&Ml(e,r,Gp)}var Kp=has;var Zp=Math.max,Xp=Math.min;function baseInRange(e,r,t){return e>=Xp(r,t)&&e-1:!!a&&Br(e,r,t)>-1}var ah=includes_includes;var ih=Math.max;function indexOf_indexOf(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=t==null?0:oe(t);if(a<0){a=ih(n+a,0)}return Br(e,r,a)}var oh=indexOf_indexOf;function initial(e){var r=e==null?0:e.length;return r?io(e,0,-1):[]}var uh=initial;var sh=Math.min;function baseIntersection(e,r,t){var n=t?qv:Dr,a=e[0].length,i=e.length,o=i,u=Array(i),s=Infinity,c=[];while(o--){var f=e[o];if(o&&r){f=F(f,Vn(r))}s=sh(f.length,s);u[o]=!t&&(r||a>=120&&f.length>=120)?new Hf(o&&f):undefined}f=e[0];var l=-1,v=u[0];e:while(++l=-my&&e<=my}var _y=isSafeInteger;function isUndefined(e){return e===undefined}var wy=isUndefined;var xy="[object WeakMap]";function isWeakMap(e){return T(e)&&oc(e)==xy}var Sy=isWeakMap;var Oy="[object WeakSet]";function isWeakSet(e){return T(e)&&W(e)==Oy}var jy=isWeakSet;var Iy=1;function iteratee_iteratee(e){return zl(typeof e=="function"?e:Ef(e,Iy))}var Ay=iteratee_iteratee;var Ey=Array.prototype;var ky=Ey.join;function join(e,r){return e==null?"":ky.call(e,r)}var Py=join;var Cy=Yu(function(e,r,t){return e+(t?"-":"")+r.toLowerCase()});var Ry=Cy;var Wy=ov(function(e,r,t){$t(e,t,r)});var Ty=Wy;function strictLastIndexOf(e,r,t){var n=t+1;while(n--){if(e[n]===r){return n}}return n}var My=strictLastIndexOf;var By=Math.max,Dy=Math.min;function lastIndexOf(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=n;if(t!==undefined){a=oe(t);a=a<0?By(n+a,0):Dy(a,n-1)}return r===r?My(e,r,a):Wr(e,Tr,a,true)}var Ly=lastIndexOf;var Fy=Yu(function(e,r,t){return e+(t?" ":"")+r.toLowerCase()});var Ny=Fy;var $y=No("toLowerCase");var Uy=$y;function baseLt(e,r){return e=this.__values__.length,r=e?undefined:this.__values__[this.__index__++];return{done:e,value:r}}var Ig=wrapperNext;function baseNth(e,r){var t=e.length;if(!t){return}r+=r<0?t:0;return ot(r,t)?e[r]:undefined}var Ag=baseNth;function nth(e,r){return e&&e.length?Ag(e,oe(r)):undefined}var Eg=nth;function nthArg(e){e=oe(e);return Zt(function(r){return Ag(r,e)})}var kg=nthArg;function baseUnset(e,r){r=bi(r,e);e=Eh(e,r);return e==null||delete e[_i(Zv(r))]}var Pg=baseUnset;function customOmitClone(e){return Ni(e)?undefined:e}var Cg=customOmitClone;var Rg=1,Wg=2,Tg=4;var Mg=ki(function(e,r){var t={};if(e==null){return t}var n=false;r=F(r,function(r){r=bi(r,e);n||(n=r.length>1);return r});Vt(e,$s(e),t);if(n){t=Ef(t,Rg|Wg|Tg,Cg)}var a=r.length;while(a--){Pg(t,r[a])}return t});var Bg=Mg;function baseSet(e,r,t,n){if(!Z(e)){return e}r=bi(r,e);var a=-1,i=r.length,o=i-1,u=e;while(u!=null&&++ar||i&&o&&s&&!u&&!c||n&&o&&s||!t&&s||!a){return 1}if(!n&&!i&&!c&&e=u){return s}var c=t[n];return s*(c=="desc"?-1:1)}}return e.index-r.index}var qg=compareMultiple;function baseOrderBy(e,r,t){var n=-1;r=F(r.length?r:[ce],Vn(zl));var a=ap(e,function(e,t,a){var i=F(r,function(r){return r(e)});return{criteria:i,index:++n,value:e}});return Ug(a,function(e,r){return qg(e,r,t)})}var Hg=baseOrderBy;function orderBy(e,r,t,n){if(e==null){return[]}if(!$(r)){r=r==null?[]:[r]}t=n?undefined:t;if(!$(t)){t=t==null?[]:[t]}return Hg(e,r,t)}var Vg=orderBy;function createOver(e){return ki(function(r){r=F(r,Vn(zl));return Zt(function(t){var n=this;return e(r,function(e){return qe(e,n,t)})})})}var Gg=createOver;var Kg=Gg(F);var Zg=Kg;var Xg=Zt;var Yg=Xg;var Jg=Math.min;var Qg=Yg(function(e,r){r=r.length==1&&$(r[0])?F(r[0],Vn(zl)):F(Ai(r,1),Vn(zl));var t=r.length;return Zt(function(n){var a=-1,i=Jg(n.length,t);while(++aib){return t}do{if(r%2){t+=e}r=ob(r/2);if(r){e+=e}}while(r);return t}var ub=baseRepeat;var sb=Nl("length");var cb=sb;var fb="\\ud800-\\udfff",lb="\\u0300-\\u036f",vb="\\ufe20-\\ufe2f",db="\\u20d0-\\u20ff",pb=lb+vb+db,hb="\\ufe0e\\ufe0f";var yb="["+fb+"]",gb="["+pb+"]",bb="\\ud83c[\\udffb-\\udfff]",mb="(?:"+gb+"|"+bb+")",_b="[^"+fb+"]",wb="(?:\\ud83c[\\udde6-\\uddff]){2}",xb="[\\ud800-\\udbff][\\udc00-\\udfff]",Sb="\\u200d";var Ob=mb+"?",jb="["+hb+"]?",Ib="(?:"+Sb+"(?:"+[_b,wb,xb].join("|")+")"+jb+Ob+")*",Ab=jb+Ob+Ib,Eb="(?:"+[_b+gb+"?",gb,wb,xb,yb].join("|")+")";var kb=RegExp(bb+"(?="+bb+")|"+Eb+Ab,"g");function unicodeSize(e){var r=kb.lastIndex=0;while(kb.test(e)){++r}return r}var Pb=unicodeSize;function stringSize(e){return yo(e)?Pb(e):cb(e)}var Cb=stringSize;var Rb=Math.ceil;function createPadding(e,r){r=r===undefined?" ":H(r);var t=r.length;if(t<2){return t?ub(r,e):r}var n=ub(r,Rb(e/Cb(r)));return yo(r)?oo(Fo(n),0,e).join(""):n.slice(0,e)}var Wb=createPadding;var Tb=Math.ceil,Mb=Math.floor;function pad(e,r,t){e=gi(e);r=oe(r);var n=r?Cb(e):0;if(!r||n>=r){return e}var a=(r-n)/2;return Wb(Mb(a),t)+e+Wb(Tb(a),t)}var Bb=pad;function padEnd(e,r,t){e=gi(e);r=oe(r);var n=r?Cb(e):0;return r&&n-1){if(u!==e){nm.call(u,s,1)}nm.call(e,s,1)}}return e}var am=basePullAll;function pullAll(e,r){return e&&e.length&&r&&r.length?am(e,r):e}var im=pullAll;var om=Zt(im);var um=om;function pullAllBy(e,r,t){return e&&e.length&&r&&r.length?am(e,r,zl(t,2)):e}var sm=pullAllBy;function pullAllWith(e,r,t){return e&&e.length&&r&&r.length?am(e,r,undefined,t):e}var cm=pullAllWith;var fm=Array.prototype;var lm=fm.splice;function basePullAt(e,r){var t=e?r.length:0,n=t-1;while(t--){var a=r[t];if(t==n||a!==i){var i=a;if(ot(a)){lm.call(e,a,1)}else{Pg(e,a)}}}return e}var vm=basePullAt;var dm=ki(function(e,r){var t=e==null?0:e.length,n=Si(e,r);vm(e,F(r,function(e){return ot(e,t)?+e:e}).sort(zg));return n});var pm=dm;var hm=Math.floor,ym=Math.random;function baseRandom(e,r){return e+hm(ym()*(r-e+1))}var gm=baseRandom;var bm=parseFloat;var mm=Math.min,_m=Math.random;function random(e,r,t){if(t&&typeof t!="boolean"&&Qt(e,r,t)){r=t=undefined}if(t===undefined){if(typeof r=="boolean"){t=r;r=undefined}else if(typeof e=="boolean"){t=e;e=undefined}}if(e===undefined&&r===undefined){e=0;r=1}else{e=ie(e);if(r===undefined){r=e;e=0}else{r=ie(r)}}if(e>r){var n=e;e=r;r=n}if(t||e%1||r%1){var a=_m();return mm(e+a*(r-e+bm("1e-"+((a+"").length-1))),r)}return gm(e,r)}var wm=random;var xm=Math.ceil,Sm=Math.max;function baseRange(e,r,t,n){var a=-1,i=Sm(xm((r-e)/(t||1)),0),o=Array(i);while(i--){o[n?i:++a]=e;e+=t}return o}var Om=baseRange;function createRange(e){return function(r,t,n){if(n&&typeof n!="number"&&Qt(r,t,n)){t=n=undefined}r=ie(r);if(t===undefined){t=r;r=0}else{t=ie(t)}n=n===undefined?r1&&Qt(e,r[0],r[1])){r=[]}else if(t>2&&Qt(r[0],r[1],r[2])){r=[r[0]]}return Hg(e,Ai(r,1),[])});var y_=h_;var g_=4294967295,b_=g_-1;var m_=Math.floor,__=Math.min;function baseSortedIndexBy(e,r,t,n){r=t(r);var a=0,i=e==null?0:e.length,o=r!==r,u=r===null,s=B(r),c=r===undefined;while(a>>1;function baseSortedIndex(e,r,t){var n=0,a=e==null?n:e.length;if(typeof r=="number"&&r===r&&a<=S_){while(n>>1,o=e[i];if(o!==null&&!B(o)&&(t?o<=r:o>>0;if(!t){return[]}e=gi(e);if(e&&(typeof r=="string"||r!=null&&!by(r))){r=H(r);if(!r&&yo(e)){return oo(Fo(e),0,t)}}return e.split(r,t)}var M_=split;var B_="Expected a function";var D_=Math.max;function spread(e,r){if(typeof e!="function"){throw new TypeError(B_)}r=r==null?0:D_(oe(r),0);return Zt(function(t){var n=t[r],a=oo(t,0,r);if(n){Oi(a,n)}return qe(e,this,a)})}var L_=spread;var F_=Yu(function(e,r,t){return e+(t?" ":"")+Uo(r)});var N_=F_;function startsWith(e,r,t){e=gi(e);t=t==null?0:fs(oe(t),0,e.length);r=H(r);return e.slice(t,t+r.length)==r}var $_=startsWith;function stubObject(){return{}}var U_=stubObject;function stubString(){return""}var z_=stubString;function stubTrue(){return true}var q_=stubTrue;var H_=V(function(e,r){return e-r},0);var V_=H_;function sum(e){return e&&e.length?ng(e,ce):0}var G_=sum;function sumBy(e,r){return e&&e.length?ng(e,zl(r,2)):0}var K_=sumBy;function tail(e){var r=e==null?0:e.length;return r?io(e,1,r):[]}var Z_=tail;function take(e,r,t){if(!(e&&e.length)){return[]}r=t||r===undefined?1:oe(r);return io(e,0,r<0?0:r)}var X_=take;function takeRight(e,r,t){var n=e==null?0:e.length;if(!n){return[]}r=t||r===undefined?1:oe(r);r=n-r;return io(e,r<0?0:r,n)}var Y_=takeRight;function takeRightWhile(e,r){return e&&e.length?ad(e,zl(r,3),false,true):[]}var J_=takeRightWhile;function takeWhile(e,r){return e&&e.length?ad(e,zl(r,3)):[]}var Q_=takeWhile;function tap(e,r){r(e);return e}var ew=tap;var rw=Object.prototype;var tw=rw.hasOwnProperty;function customDefaultsAssignIn(e,r,t,n){if(e===undefined||Ut(e,rw[t])&&!tw.call(n,t)){return r}return e}var nw=customDefaultsAssignIn;var aw={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function escapeStringChar(e){return"\\"+aw[e]}var iw=escapeStringChar;var ow=/<%=([\s\S]+?)%>/g;var uw=ow;var sw=/<%-([\s\S]+?)%>/g;var cw=sw;var fw=/<%([\s\S]+?)%>/g;var lw=fw;var vw={escape:cw,evaluate:lw,interpolate:uw,variable:"",imports:{_:{escape:Cd}}};var dw=vw;var pw=/\b__p \+= '';/g,hw=/\b(__p \+=) '' \+/g,yw=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var gw=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var bw=/($^)/;var mw=/['\n\r\u2028\u2029\\]/g;var _w=Object.prototype;var ww=_w.hasOwnProperty;function template(e,r,t){var n=dw.imports._.templateSettings||dw;if(t&&Qt(e,r,t)){r=undefined}e=gi(e);r=Oa({},r,n,nw);var a=Oa({},r.imports,n.imports,nw),i=la(a),o=rh(a,i);var u,s,c=0,f=r.interpolate||bw,l="__p += '";var v=RegExp((r.escape||bw).source+"|"+f.source+"|"+(f===uw?gw:bw).source+"|"+(r.evaluate||bw).source+"|$","g");var d=ww.call(r,"sourceURL")?"//# sourceURL="+(r.sourceURL+"").replace(/[\r\n]/g," ")+"\n":"";e.replace(v,function(r,t,n,a,i,o){n||(n=a);l+=e.slice(c,o).replace(mw,iw);if(t){u=true;l+="' +\n__e("+t+") +\n'"}if(i){s=true;l+="';\n"+i+";\n__p += '"}if(n){l+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"}c=o+r.length;return r});l+="';\n";var p=ww.call(r,"variable")&&r.variable;if(!p){l="with (obj) {\n"+l+"\n}\n"}l=(s?l.replace(pw,""):l).replace(hw,"$1").replace(yw,"$1;");l="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var h=Hi(function(){return Function(i,d+"return "+l).apply(undefined,o)});h.source=l;if(zi(h)){throw h}return h}var xw=template;var Sw="Expected a function";function throttle(e,r,t){var n=true,a=true;if(typeof e!="function"){throw new TypeError(Sw)}if(Z(t)){n="leading"in t?!!t.leading:n;a="trailing"in t?!!t.trailing:a}return wv(e,r,{leading:n,maxWait:r,trailing:a})}var Ow=throttle;function thru(e,r){return r(e)}var jw=thru;var Iw=9007199254740991;var Aw=4294967295;var Ew=Math.min;function times(e,r){e=oe(e);if(e<1||e>Iw){return[]}var t=Aw,n=Ew(e,Aw);r=ud(r);e-=Aw;var a=nn(n,r);while(++t-1){}return t}var Fw=charsEndIndex;function charsStartIndex(e,r){var t=-1,n=e.length;while(++t-1){}return t}var Nw=charsStartIndex;var $w=/^\s+|\s+$/g;function trim(e,r,t){e=gi(e);if(e&&(t||r===undefined)){return e.replace($w,"")}if(!e||!(r=H(r))){return e}var n=Fo(e),a=Fo(r),i=Nw(n,a),o=Fw(n,a)+1;return oo(n,i,o).join("")}var Uw=trim;var zw=/\s+$/;function trimEnd(e,r,t){e=gi(e);if(e&&(t||r===undefined)){return e.replace(zw,"")}if(!e||!(r=H(r))){return e}var n=Fo(e),a=Fw(n,Fo(r))+1;return oo(n,0,a).join("")}var qw=trimEnd;var Hw=/^\s+/;function trimStart(e,r,t){e=gi(e);if(e&&(t||r===undefined)){return e.replace(Hw,"")}if(!e||!(r=H(r))){return e}var n=Fo(e),a=Nw(n,Fo(r));return oo(n,a).join("")}var Vw=trimStart;var Gw=30,Kw="...";var Zw=/\w*$/;function truncate(e,r){var t=Gw,n=Kw;if(Z(r)){var a="separator"in r?r.separator:a;t="length"in r?oe(r.length):t;n="omission"in r?H(r.omission):n}e=gi(e);var i=e.length;if(yo(e)){var o=Fo(e);i=o.length}if(t>=i){return e}var u=t-Cb(n);if(u<1){return n}var s=o?oo(o,0,u).join(""):e.slice(0,u);if(a===undefined){return s+n}if(o){u+=s.length-u}if(by(a)){if(e.slice(u).search(a)){var c,f=s;if(!a.global){a=RegExp(a.source,gi(Zw.exec(a))+"g")}a.lastIndex=0;while(c=a.exec(f)){var l=c.index}s=s.slice(0,l===undefined?u:l)}}else if(e.indexOf(H(a),u)!=u){var v=s.lastIndexOf(a);if(v>-1){s=s.slice(0,v)}}return s+n}var Xw=truncate;function unary(e){return Nt(e,1)}var Yw=unary;var Jw={"&":"&","<":"<",">":">",""":'"',"'":"'"};var Qw=Ho(Jw);var ex=Qw;var rx=/&(?:amp|lt|gt|quot|#39);/g,tx=RegExp(rx.source);function unescape_unescape(e){e=gi(e);return e&&tx.test(e)?e.replace(rx,ex):e}var nx=unescape_unescape;var ax=1/0;var ix=!(Gs&&1/Jf(new Gs([,-0]))[1]==ax)?Qe:function(e){return new Gs(e)};var ox=ix;var ux=200;function baseUniq(e,r,t){var n=-1,a=Dr,i=e.length,o=true,u=[],s=u;if(t){o=false;a=qv}else if(i>=ux){var c=r?null:ox(e);if(c){return Jf(c)}o=false;a=Gf;s=new Hf}else{s=r?[]:u}e:while(++n1||this.__actions__.length||!(n instanceof Je)||!ot(t)){return this.thru(a)}n=n.slice(t,+t+(r?1:0));n.__actions__.push({func:jw,args:[a],thisArg:undefined});return new ur(n,this.__chain__).thru(function(e){if(r&&!e.length){e.push(undefined)}return e})});var Tx=Wx;function wrapperChain(){return os(this)}var Mx=wrapperChain;function wrapperReverse(){var e=this.__wrapped__;if(e instanceof Je){var r=e;if(this.__actions__.length){r=new Je(this)}r=r.reverse();r.__actions__.push({func:jw,args:[Vm],thisArg:undefined});return new ur(r,this.__chain__)}return this.thru(Vm)}var Bx=wrapperReverse;function baseXor(e,r,t){var n=e.length;if(n<2){return n?sx(e[0]):[]}var a=-1,i=Array(n);while(++a1?e[r-1]:undefined;t=typeof t=="function"?(e.pop(),t):undefined;return Sx(e,t)});var Xx=Zx;var Yx={chunk:cs,compact:Nf,concat:$f,difference:Kv,differenceBy:Yv,differenceWith:Qv,drop:td,dropRight:nd,dropRightWhile:id,dropWhile:od,fill:$d,findIndex:Vd,findLastIndex:Qd,first:np,flatten:Ei,flattenDeep:lp,flattenDepth:vp,fromPairs:Cp,head:np,indexOf:oh,initial:uh,intersection:vh,intersectionBy:ph,intersectionWith:yh,join:Py,last:Zv,lastIndexOf:Ly,nth:Eg,pull:um,pullAll:im,pullAllBy:sm,pullAllWith:cm,pullAt:pm,remove:Lm,reverse:Vm,slice:f_,sortedIndex:j_,sortedIndexBy:I_,sortedIndexOf:A_,sortedLastIndex:E_,sortedLastIndexBy:k_,sortedLastIndexOf:P_,sortedUniq:R_,sortedUniqBy:W_,tail:Z_,take:X_,takeRight:Y_,takeRightWhile:J_,takeWhile:Q_,union:fx,unionBy:vx,unionWith:px,uniq:hx,uniqBy:yx,uniqWith:gx,unzip:xx,unzipWith:Sx,without:Cx,xor:Fx,xorBy:$x,xorWith:zx,zip:Hx,zipObject:Gx,zipObjectDeep:Kx,zipWith:Xx};var Jx={countBy:fv,each:sd,eachRight:hd,every:Dd,filter:zd,find:Kd,findLast:rp,flatMap:op,flatMapDeep:sp,flatMapDepth:cp,forEach:sd,forEachRight:hd,groupBy:Lp,includes:ah,invokeMap:Wh,keyBy:Ty,map:ip,orderBy:Vg,partition:Zb,reduce:Tm,reduceRight:Bm,reject:Dm,sample:Ym,sampleSize:r_,shuffle:o_,size:c_,some:p_,sortBy:y_};var Qx={now:gv};var eS={after:se,ary:Nt,before:Gi,bind:Yi,bindKey:ao,curry:dv,curryRight:hv,debounce:wv,defer:$v,delay:zv,flip:pp,memoize:fi,negate:_g,once:$g,overArgs:eb,partial:qb,partialRight:Gb,rearg:Rm,rest:Um,spread:L_,throttle:Ow,unary:Yw,wrap:Rx};var rS={castArray:es,clone:Pf,cloneDeep:Wf,cloneDeepWith:Bf,cloneWith:Lf,conformsTo:Xl,eq:Ut,gt:Up,gte:qp,isArguments:ln,isArray:$,isArrayBuffer:Lh,isArrayLike:Jt,isArrayLikeObject:Ev,isBoolean:Nh,isBuffer:mn,isDate:Hh,isElement:Vh,isEmpty:Yh,isEqual:Jh,isEqualWith:Qh,isError:zi,isFinite:ry,isFunction:pe,isInteger:ty,isLength:Yt,isMap:Hc,isMatch:ny,isMatchWith:ay,isNaN:uy,isNative:ly,isNil:vy,isNull:dy,isNumber:oy,isObject:Z,isObjectLike:T,isPlainObject:Ni,isRegExp:by,isSafeInteger:_y,isSet:Xc,isString:eh,isSymbol:B,isTypedArray:ra,isUndefined:wy,isWeakMap:Sy,isWeakSet:jy,lt:Hy,lte:Gy,toArray:jg,toFinite:ie,toInteger:oe,toLength:Fd,toNumber:te,toPlainObject:Pv,toSafeInteger:Bw,toString:gi};var tS={add:K,ceil:is,divide:rd,floor:yp,max:rg,maxBy:tg,mean:og,meanBy:ug,min:pg,minBy:hg,multiply:bg,round:Km,subtract:V_,sum:G_,sumBy:K_};var nS={clamp:ls,inRange:Jp,random:wm};var aS={assign:ha,assignIn:xa,assignInWith:Oa,assignWith:Ia,at:Ci,create:lv,defaults:Iv,defaultsDeep:Dv,entries:Sd,entriesIn:jd,extend:xa,extendWith:Oa,findKey:Xd,findLastKey:tp,forIn:Ap,forInRight:Ep,forOwn:kp,forOwnRight:Pp,functions:Wp,functionsIn:Tp,get:xi,has:Kp,hasIn:Bl,invert:xh,invertBy:Ah,invoke:Ch,keys:la,keysIn:_a,mapKeys:Ky,mapValues:Zy,merge:cg,mergeWith:Mv,omit:Bg,omitBy:Ng,pick:Jb,pickBy:Fg,result:zm,set:t_,setWith:n_,toPairs:Sd,toPairsIn:jd,transform:Lw,unset:_x,update:jx,updateWith:Ix,values:th,valuesIn:kx};var iS={at:Tx,chain:os,commit:Ff,lodash:vr,next:Ig,plant:Qb,reverse:Bx,tap:ew,thru:jw,toIterator:Pw,toJSON:Rw,value:Rw,valueOf:Rw,wrapperChain:Mx};var oS={camelCase:Qu,capitalize:zo,deburr:tu,endsWith:yd,escape:Cd,escapeRegExp:Td,kebabCase:Ry,lowerCase:Ny,lowerFirst:Uy,pad:Bb,padEnd:Db,padStart:Lb,parseInt:$b,repeat:Fm,replace:Nm,snakeCase:v_,split:M_,startCase:N_,startsWith:$_,template:xw,templateSettings:dw,toLower:Ww,toUpper:Dw,trim:Uw,trimEnd:qw,trimStart:Vw,truncate:Xw,unescape:nx,upperCase:Ex,upperFirst:Uo,words:Ku};var uS={attempt:Hi,bindAll:Qi,cond:Hl,conforms:Zl,constant:jr,defaultTo:xv,flow:Op,flowRight:Ip,identity:ce,iteratee:Ay,matches:Yy,matchesProperty:Qy,method:lg,methodOf:dg,mixin:yg,noop:Qe,nthArg:kg,over:Zg,overEvery:tb,overSome:ab,property:Ul,propertyOf:em,range:Am,rangeRight:km,stubArray:Es,stubFalse:vn,stubObject:U_,stubString:z_,stubTrue:q_,times:kw,toPath:Tw,uniqueId:mx};function lazyClone(){var e=new Je(this.__wrapped__);e.__actions__=sr(this.__actions__);e.__dir__=this.__dir__;e.__filtered__=this.__filtered__;e.__iteratees__=sr(this.__iteratees__);e.__takeCount__=this.__takeCount__;e.__views__=sr(this.__views__);return e}var sS=lazyClone;function lazyReverse(){if(this.__filtered__){var e=new Je(this);e.__dir__=-1;e.__filtered__=true}else{e=this.clone();e.__dir__*=-1}return e}var cS=lazyReverse;var fS=Math.max,lS=Math.min;function getView(e,r,t){var n=-1,a=t.length;while(++n0||r<0)){return new Je(t)}if(e<0){t=t.takeRight(-e)}else if(e){t=t.drop(e)}if(r!==undefined){r=oe(r);t=r<0?t.dropRight(-r):t.take(r-e)}return t};Je.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()};Je.prototype.toArray=function(){return this.take(wS)};rv(Je.prototype,function(e,r){var t=/^(?:filter|find|map|reject)|While$/.test(r),n=/^(?:head|last)$/.test(r),a=vr[n?"take"+(r=="last"?"Right":""):r],i=n||/^find/.test(r);if(!a){return}vr.prototype[r]=function(){var r=this.__wrapped__,o=n?[1]:arguments,u=r instanceof Je,s=o[0],c=u||$(r);var f=function(e){var r=a.apply(vr,Oi([e],o));return n&&l?r[0]:r};if(c&&t&&typeof s=="function"&&s.length!=1){u=c=false}var l=this.__chain__,v=!!this.__actions__.length,d=i&&!l,p=u&&!v;if(!i&&c){r=p?r:new Je(this);var h=e.apply(r,o);h.__actions__.push({func:jw,args:[f],thisArg:undefined});return new ur(h,l)}if(d&&p){return e.apply(this,o)}h=this.thru(f);return d?n?h.value()[0]:h.value():h}});Rr(["pop","push","shift","sort","splice","unshift"],function(e){var r=xS[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);vr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var a=this.value();return r.apply($(a)?a:[],e)}return this[t](function(t){return r.apply($(t)?t:[],e)})}});rv(Je.prototype,function(e,r){var t=vr[r];if(t){var n=t.name+"";if(!OS.call(nr,n)){nr[n]=[]}nr[n].push({name:r,func:t})}});nr[gt(undefined,bS).name]=[{name:"wrapper",func:undefined}];Je.prototype.clone=sS;Je.prototype.reverse=cS;Je.prototype.value=yS;vr.prototype.at=iS.at;vr.prototype.chain=iS.wrapperChain;vr.prototype.commit=iS.commit;vr.prototype.next=iS.next;vr.prototype.plant=iS.plant;vr.prototype.reverse=iS.reverse;vr.prototype.toJSON=vr.prototype.valueOf=vr.prototype.value=iS.value;vr.prototype.first=vr.prototype.head;if(jS){vr.prototype[jS]=iS.toIterator}var kS=vr;class image_tag_ImageTag{constructor(e){const{repository:r="gableroux",name:t="unity3d",version:n="2019.2.11f1",platform:a}=e;if(!image_tag_ImageTag.versionPattern.test(n)){throw new Error(`Invalid version "${n}".`)}if(!Kp(image_tag_ImageTag.targetPlatformToImageSuffixMap,a)){throw new Error(`Platform "${a}" is currently not supported.`)}const i=xi(image_tag_ImageTag.targetPlatformToImageSuffixMap,a,image_tag_ImageTag.imageSuffixes.generic);Object.assign(this,{repository:r,name:t,version:n,platform:a,builderPlatform:i})}static get versionPattern(){return/^20\d{2}\.\d\.\w{3,4}|3$/}static get imageSuffixes(){return{generic:"",webgl:"webgl",mac:"mac",windows:"windows",android:"android",ios:"ios",facebook:"facebook"}}static get targetPlatformToImageSuffixMap(){const{generic:e,webgl:r,mac:t,windows:n,android:a,ios:i,facebook:u}=image_tag_ImageTag.imageSuffixes;return{[o.types.StandaloneOSX]:t,[o.types.StandaloneWindows]:n,[o.types.StandaloneWindows64]:n,[o.types.StandaloneLinux64]:n,[o.types.iOS]:i,[o.types.Android]:a,[o.types.WebGL]:r,[o.types.WSAPlayer]:n,[o.types.PS4]:n,[o.types.XboxOne]:n,[o.types.tvOS]:n,[o.types.Switch]:n,[o.types.Lumin]:n,[o.types.BJM]:n,[o.types.Stadia]:n,[o.types.Facebook]:u,[o.types.NoTarget]:e,[o.types.Test]:e}}get tag(){return qw(`${this.version}-${this.builderPlatform}`,"-")}get image(){return Vw(`${this.repository}/${this.name}`,"/")}toString(){const{image:e,tag:r}=this;return`${e}:${r}`}}var PS=image_tag_ImageTag;class docker_Docker{static async build(e,r=false){const{path:t,dockerfile:n,baseImage:a}=e;const{version:i,platform:o}=a;const u=new PS({repository:"",name:"unity-builder",version:i,platform:o});const s=`docker build ${t} --file ${n} --build-arg IMAGE=${a} --tag ${u}`;await Object(p.exec)(s,null,{silent:r});return u}static async run(e,r,t=false){const{version:n,workspace:a,platform:i,projectPath:o,buildName:u,buildPath:s,buildFile:c,buildMethod:f,buildVersion:l,customParameters:v}=r;const d=`docker run --workdir /github/workspace --rm --env UNITY_LICENSE --env UNITY_LICENSE_FILE --env UNITY_EMAIL --env UNITY_PASSWORD --env UNITY_SERIAL --env UNITY_VERSION="${n}" --env PROJECT_PATH="${o}" --env BUILD_TARGET="${i}" --env BUILD_NAME="${u}" --env BUILD_PATH="${s}" --env BUILD_FILE="${c}" --env BUILD_METHOD="${f}" --env VERSION="${l}" --env CUSTOM_PARAMETERS="${v}" --env HOME=/github/home --env GITHUB_REF --env GITHUB_SHA --env GITHUB_REPOSITORY --env GITHUB_ACTOR --env GITHUB_WORKFLOW --env GITHUB_HEAD_REF --env GITHUB_BASE_REF --env GITHUB_EVENT_NAME --env GITHUB_WORKSPACE=/github/workspace --env GITHUB_ACTION --env GITHUB_EVENT_PATH --env RUNNER_OS --env RUNNER_TOOL_CACHE --env RUNNER_TEMP --env RUNNER_WORKSPACE --volume "/var/run/docker.sock":"/var/run/docker.sock" --volume "/home/runner/work/_temp/_github_home":"/github/home" --volume "/home/runner/work/_temp/_github_workflow":"/github/workflow" --volume "${a}":"/github/workspace" ${e}`;await Object(p.exec)(d,null,{silent:t})}}var CS=docker_Docker;class NotImplementedException extends Error{constructor(e){super(e);this.name="NotImplementedException"}}var RS=NotImplementedException;class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError"}}var WS=ValidationError;class system_System{static async run(e,r,t){let n="";let a="";let i="";const o={stdout:e=>{n+=e.toString()},stderr:e=>{a+=e.toString()},debug:e=>{i+=e.toString()}};const u=await Object(p.exec)(e,r,{...t,listeners:o});if(i!==""){Object(f.debug)(i)}if(n!==""){Object(f.info)(n)}if(u!==0){throw new Error(a)}if(a!==""){Object(f.warning)(a)}return n}}var TS=system_System;class versioning_Versioning{static get strategies(){return{None:"None",Semantic:"Semantic",Tag:"Tag",Custom:"Custom"}}static get branch(){return this.headRef||this.ref&&this.ref.slice(11)}static get headRef(){return process.env.GITHUB_HEAD_REF}static get ref(){return process.env.GITHUB_REF}static get descriptionRegex(){return/^v([\d.]+)-(\d+)-g(\w+)-?(\w+)*/g}static async determineVersion(e,r){if(!Object.hasOwnProperty.call(this.strategies,e)){throw new WS(`Versioning strategy should be one of ${Object.values(this.strategies).join(", ")}.`)}let t;switch(e){case this.strategies.None:t="none";break;case this.strategies.Custom:t=r;break;case this.strategies.Semantic:t=await this.generateSemanticVersion();break;case this.strategies.Tag:t=await this.generateTagVersion();break;default:throw new RS(`Strategy ${e} is not implemented.`)}return t}static async generateSemanticVersion(){await this.fetch();if(await this.isDirty()){throw new Error("Branch is dirty. Refusing to base semantic version on uncommitted changes")}if(!await this.hasAnyVersionTags()){const e=`0.0.${await this.getTotalNumberOfCommits()}`;Object(f.info)(`Generated version ${e} (no version tags found).`);return e}const{tag:e,commits:r,hash:t}=await this.parseSemanticVersion();Object(f.info)(`Found semantic version ${e}.${r} for ${this.branch}@${t}`);return`${e}.${r}`}static async generateTagVersion(){let e=await this.getTag();if(e.charAt(0)==="v"){e=e.slice(1)}return e}static async parseSemanticVersion(){const e=await this.getVersionDescription();try{const[r,t,n,a]=this.descriptionRegex.exec(e);return{match:r,tag:t,commits:n,hash:a}}catch(r){throw new Error(`Failed to parse git describe output: "${e}".`)}}static async fetch(){try{await TS.run("git",["fetch","--unshallow"])}catch(e){Object(f.warning)(e);await TS.run("git",["fetch"])}}static async getVersionDescription(){return TS.run("git",["describe","--long","--tags","--always","--debug",`origin/${this.branch}`])}static async isDirty(){const e=await TS.run("git",["status","--porcelain"]);return e!==""}static async getTag(){return TS.run("git",["tag","--points-at","HEAD"])}static async hasAnyVersionTags(){const e=await TS.run("git",["tag","--list","--merged","HEAD","|","grep v[0-9]*","|","wc -l"]);return e!=="0"}static async getTotalNumberOfCommits(){const e=await TS.run("git",["rev-list","--count","HEAD"]);return parseInt(e,10)}}const MS=t(470);class input_Input{static async getFromUser(){const e=MS.getInput("unityVersion");const r=MS.getInput("targetPlatform")||o.default;const t=MS.getInput("projectPath")||".";const n=MS.getInput("buildName")||r;const a=MS.getInput("buildsPath")||"build";const i=MS.getInput("buildMethod");const u=MS.getInput("versioning")||"Semantic";const s=MS.getInput("version")||"";const c=MS.getInput("customParameters")||"";const f=t.replace(/\/$/,"");const l=await versioning_Versioning.determineVersion(u,s);return{version:e,targetPlatform:r,projectPath:f,buildName:n,buildsPath:a,buildMethod:i,buildVersion:l,customParameters:c}}}var BS=input_Input;const DS=t(470);async function src_action(){i.checkCompatibility();d.verify();const{dockerfile:e,workspace:r,actionFolder:t}=i;const n=u.create(await BS.getFromUser());const a=new PS(n);const o=await CS.build({path:t,dockerfile:e,baseImage:a});await CS.run(o,{workspace:r,...n})}src_action().catch(e=>{DS.setFailed(e.message)})},87:function(e){e.exports=require("os")},129:function(e){e.exports=require("child_process")},357:function(e){e.exports=require("assert")},431:function(e,r,t){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(Object.hasOwnProperty.call(e,t))r[t]=e[t];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const a=n(t(87));function issueCommand(e,r,t){const n=new Command(e,r,t);process.stdout.write(n.toString()+a.EOL)}r.issueCommand=issueCommand;function issue(e,r=""){issueCommand(e,{},r)}r.issue=issue;const i="::";class Command{constructor(e,r,t){if(!e){e="missing.command"}this.command=e;this.properties=r;this.message=t}toString(){let e=i+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=true;for(const t in this.properties){if(this.properties.hasOwnProperty(t)){const n=this.properties[t];if(n){if(r){r=false}else{e+=","}e+=`${t}=${escapeProperty(n)}`}}}}e+=`${i}${escapeData(this.message)}`;return e}}function escapeData(e){return(e||"").replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return(e||"").replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},470:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(Object.hasOwnProperty.call(e,t))r[t]=e[t];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const i=t(431);const o=a(t(87));const u=a(t(622));var s;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(s=r.ExitCode||(r.ExitCode={}));function exportVariable(e,r){process.env[e]=r;i.issueCommand("set-env",{name:e},r)}r.exportVariable=exportVariable;function setSecret(e){i.issueCommand("add-mask",{},e)}r.setSecret=setSecret;function addPath(e){i.issueCommand("add-path",{},e);process.env["PATH"]=`${e}${u.delimiter}${process.env["PATH"]}`}r.addPath=addPath;function getInput(e,r){const t=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(r&&r.required&&!t){throw new Error(`Input required and not supplied: ${e}`)}return t.trim()}r.getInput=getInput;function setOutput(e,r){i.issueCommand("set-output",{name:e},r)}r.setOutput=setOutput;function setFailed(e){process.exitCode=s.Failure;error(e)}r.setFailed=setFailed;function debug(e){i.issueCommand("debug",{},e)}r.debug=debug;function error(e){i.issue("error",e)}r.error=error;function warning(e){i.issue("warning",e)}r.warning=warning;function info(e){process.stdout.write(e+o.EOL)}r.info=info;function startGroup(e){i.issue("group",e)}r.startGroup=startGroup;function endGroup(){i.issue("endgroup")}r.endGroup=endGroup;function group(e,r){return n(this,void 0,void 0,function*(){startGroup(e);let t;try{t=yield r()}finally{endGroup()}return t})}r.group=group;function saveState(e,r){i.issueCommand("save-state",{name:e},r)}r.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}r.getState=getState},614:function(e){e.exports=require("events")},622:function(e){e.exports=require("path")},669:function(e){e.exports=require("util")},672:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};var a;Object.defineProperty(r,"__esModule",{value:true});const i=t(357);const o=t(747);const u=t(622);a=o.promises,r.chmod=a.chmod,r.copyFile=a.copyFile,r.lstat=a.lstat,r.mkdir=a.mkdir,r.readdir=a.readdir,r.readlink=a.readlink,r.rename=a.rename,r.rmdir=a.rmdir,r.stat=a.stat,r.symlink=a.symlink,r.unlink=a.unlink;r.IS_WINDOWS=process.platform==="win32";function exists(e){return n(this,void 0,void 0,function*(){try{yield r.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true})}r.exists=exists;function isDirectory(e,t=false){return n(this,void 0,void 0,function*(){const n=t?yield r.stat(e):yield r.lstat(e);return n.isDirectory()})}r.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(r.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}r.isRooted=isRooted;function mkdirP(e,t=1e3,a=1){return n(this,void 0,void 0,function*(){i.ok(e,"a path argument must be provided");e=u.resolve(e);if(a>=t)return r.mkdir(e);try{yield r.mkdir(e);return}catch(n){switch(n.code){case"ENOENT":{yield mkdirP(u.dirname(e),t,a+1);yield r.mkdir(e);return}default:{let t;try{t=yield r.stat(e)}catch(e){throw n}if(!t.isDirectory())throw n}}}})}r.mkdirP=mkdirP;function tryGetExecutablePath(e,t){return n(this,void 0,void 0,function*(){let n=undefined;try{n=yield r.stat(e)}catch(r){if(r.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${r}`)}}if(n&&n.isFile()){if(r.IS_WINDOWS){const r=u.extname(e).toUpperCase();if(t.some(e=>e.toUpperCase()===r)){return e}}else{if(isUnixExecutable(n)){return e}}}const a=e;for(const i of t){e=a+i;n=undefined;try{n=yield r.stat(e)}catch(r){if(r.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${r}`)}}if(n&&n.isFile()){if(r.IS_WINDOWS){try{const t=u.dirname(e);const n=u.basename(e).toUpperCase();for(const a of yield r.readdir(t)){if(n===a.toUpperCase()){e=u.join(t,a);break}}}catch(r){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${r}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""})}r.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(r.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()}},747:function(e){e.exports=require("fs")},986:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});const a=t(9);function exec(e,r,t){return n(this,void 0,void 0,function*(){const n=a.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const i=n[0];r=n.slice(1).concat(r||[]);const o=new a.ToolRunner(i,r,t);return o.exec()})}r.exec=exec}},function(e){"use strict";!function(){e.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}}();!function(){var r=Object.prototype.hasOwnProperty;e.d=function(e,t,n){if(!r.call(e,t)){Object.defineProperty(e,t,{enumerable:true,get:n})}}}();!function(){e.t=function(r,t){if(t&1)r=this(r);if(t&8)return r;if(t&4&&typeof r==="object"&&r&&r.__esModule)return r;var n=Object.create(null);e.r(n);Object.defineProperty(n,"default",{enumerable:true,value:r});if(t&2&&typeof r!="string")for(var a in r)e.d(n,a,function(e){return r[e]}.bind(null,a));return n}}();!function(){e.n=function(r){var t=r&&r.__esModule?function getDefault(){return r["default"]}:function getModuleExports(){return r};e.d(t,"a",t);return t}}();!function(){e.hmd=function(e){e=Object.create(e);if(!e.children)e.children=[];Object.defineProperty(e,"loaded",{enumerable:true,get:function(){return e.l}});Object.defineProperty(e,"id",{enumerable:true,get:function(){return e.i}});Object.defineProperty(e,"exports",{enumerable:true,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}});return e}}()}); \ No newline at end of file +module.exports=function(e,r){"use strict";var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var n=t[r]={i:r,l:false,exports:{}};e[r].call(n.exports,n,n.exports,__webpack_require__);n.l=true;return n.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(77)}r(__webpack_require__);return startup()}({1:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});const a=t(129);const i=t(622);const o=t(669);const u=t(672);const s=o.promisify(a.exec);function cp(e,r,t={}){return n(this,void 0,void 0,function*(){const{force:n,recursive:a}=readCopyOptions(t);const o=(yield u.exists(r))?yield u.stat(r):null;if(o&&o.isFile()&&!n){return}const s=o&&o.isDirectory()?i.join(r,i.basename(e)):r;if(!(yield u.exists(e))){throw new Error(`no such file or directory: ${e}`)}const c=yield u.stat(e);if(c.isDirectory()){if(!a){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,s,0,n)}}else{if(i.relative(e,s)===""){throw new Error(`'${s}' and '${e}' are the same file`)}yield copyFile(e,s,n)}})}r.cp=cp;function mv(e,r,t={}){return n(this,void 0,void 0,function*(){if(yield u.exists(r)){let n=true;if(yield u.isDirectory(r)){r=i.join(r,i.basename(e));n=yield u.exists(r)}if(n){if(t.force==null||t.force){yield rmRF(r)}else{throw new Error("Destination already exists")}}}yield mkdirP(i.dirname(r));yield u.rename(e,r)})}r.mv=mv;function rmRF(e){return n(this,void 0,void 0,function*(){if(u.IS_WINDOWS){try{if(yield u.isDirectory(e,true)){yield s(`rd /s /q "${e}"`)}else{yield s(`del /f /a "${e}"`)}}catch(e){if(e.code!=="ENOENT")throw e}try{yield u.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let r=false;try{r=yield u.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(r){yield s(`rm -rf "${e}"`)}else{yield u.unlink(e)}}})}r.rmRF=rmRF;function mkdirP(e){return n(this,void 0,void 0,function*(){yield u.mkdirP(e)})}r.mkdirP=mkdirP;function which(e,r){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'tool' is required")}if(r){const r=yield which(e,false);if(!r){if(u.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.`)}}}try{const r=[];if(u.IS_WINDOWS&&process.env.PATHEXT){for(const e of process.env.PATHEXT.split(i.delimiter)){if(e){r.push(e)}}}if(u.isRooted(e)){const t=yield u.tryGetExecutablePath(e,r);if(t){return t}return""}if(e.includes("/")||u.IS_WINDOWS&&e.includes("\\")){return""}const t=[];if(process.env.PATH){for(const e of process.env.PATH.split(i.delimiter)){if(e){t.push(e)}}}for(const n of t){const t=yield u.tryGetExecutablePath(n+i.sep+e,r);if(t){return t}}return""}catch(e){throw new Error(`which failed with message ${e.message}`)}})}r.which=which;function readCopyOptions(e){const r=e.force==null?true:e.force;const t=Boolean(e.recursive);return{force:r,recursive:t}}function cpDirRecursive(e,r,t,a){return n(this,void 0,void 0,function*(){if(t>=255)return;t++;yield mkdirP(r);const n=yield u.readdir(e);for(const i of n){const n=`${e}/${i}`;const o=`${r}/${i}`;const s=yield u.lstat(n);if(s.isDirectory()){yield cpDirRecursive(n,o,t,a)}else{yield copyFile(n,o,a)}}yield u.chmod(r,(yield u.stat(e)).mode)})}function copyFile(e,r,t){return n(this,void 0,void 0,function*(){if((yield u.lstat(e)).isSymbolicLink()){try{yield u.lstat(r);yield u.unlink(r)}catch(e){if(e.code==="EPERM"){yield u.chmod(r,"0666");yield u.unlink(r)}}const t=yield u.readlink(e);yield u.symlink(t,r,u.IS_WINDOWS?"junction":null)}else if(!(yield u.exists(r))||t){yield u.copyFile(e,r)}})}},9:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});const a=t(87);const i=t(614);const o=t(129);const u=t(622);const s=t(1);const c=t(672);const f=process.platform==="win32";class ToolRunner extends i.EventEmitter{constructor(e,r,t){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=r||[];this.options=t||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,r){const t=this._getSpawnFileName();const n=this._getSpawnArgs(e);let a=r?"":"[command]";if(f){if(this._isCmdFile()){a+=t;for(const e of n){a+=` ${e}`}}else if(e.windowsVerbatimArguments){a+=`"${t}"`;for(const e of n){a+=` ${e}`}}else{a+=this._windowsQuoteCmdArg(t);for(const e of n){a+=` ${this._windowsQuoteCmdArg(e)}`}}}else{a+=t;for(const e of n){a+=` ${e}`}}return a}_processLineBuffer(e,r,t){try{let n=r+e.toString();let i=n.indexOf(a.EOL);while(i>-1){const e=n.substring(0,i);t(e);n=n.substring(i+a.EOL.length);i=n.indexOf(a.EOL)}r=n}catch(e){this._debug(`error processing line. Failed with error ${e}`)}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){if(this._isCmdFile()){let r=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const t of this.args){r+=" ";r+=e.windowsVerbatimArguments?t:this._windowsQuoteCmdArg(t)}r+='"';return[r]}}return this.args}_endsWith(e,r){return e.endsWith(r)}_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 r=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let t=false;for(const n of e){if(r.some(e=>e===n)){t=true;break}}if(!t){return e}let n='"';let a=true;for(let r=e.length;r>0;r--){n+=e[r-1];if(a&&e[r-1]==="\\"){n+="\\"}else if(e[r-1]==='"'){a=true;n+='"'}else{a=false}}n+='"';return n.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 r='"';let t=true;for(let n=e.length;n>0;n--){r+=e[n-1];if(t&&e[n-1]==="\\"){r+="\\"}else if(e[n-1]==='"'){t=true;r+="\\"}else{t=false}}r+='"';return r.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const r={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};r.outStream=e.outStream||process.stdout;r.errStream=e.errStream||process.stderr;return r}_getSpawnOptions(e,r){e=e||{};const t={};t.cwd=e.cwd;t.env=e.env;t["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){t.argv0=`"${r}"`}return t}exec(){return n(this,void 0,void 0,function*(){if(!c.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield s.which(this.toolPath,true);return new Promise((e,r)=>{this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const t=this._cloneExecOptions(this.options);if(!t.silent&&t.outStream){t.outStream.write(this._getCommandString(t)+a.EOL)}const n=new ExecState(t,this.toolPath);n.on("debug",e=>{this._debug(e)});const i=this._getSpawnFileName();const u=o.spawn(i,this._getSpawnArgs(t),this._getSpawnOptions(this.options,i));const s="";if(u.stdout){u.stdout.on("data",e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!t.silent&&t.outStream){t.outStream.write(e)}this._processLineBuffer(e,s,e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}})})}const c="";if(u.stderr){u.stderr.on("data",e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!t.silent&&t.errStream&&t.outStream){const r=t.failOnStdErr?t.errStream:t.outStream;r.write(e)}this._processLineBuffer(e,c,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}u.on("error",e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()});u.on("exit",e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()});u.on("close",e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()});n.on("done",(t,n)=>{if(s.length>0){this.emit("stdline",s)}if(c.length>0){this.emit("errline",c)}u.removeAllListeners();if(t){r(t)}else{e(n)}})})})}}r.ToolRunner=ToolRunner;function argStringToArray(e){const r=[];let t=false;let n=false;let a="";function append(e){if(n&&e!=='"'){a+="\\"}a+=e;n=false}for(let i=0;i0){r.push(a);a=""}continue}append(o)}if(a.length>0){r.push(a.trim())}return r}r.argStringToArray=argStringToArray;class ExecState extends i.EventEmitter{constructor(e,r){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(!r){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=r;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=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 r=`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(r)}e._setResult()}}},77:function(e,r,t){"use strict";t.r(r);var n=t(622);var a=t.n(n);class action_Action{static get supportedPlatforms(){return["linux"]}static get isRunningLocally(){return process.env.RUNNER_WORKSPACE===undefined}static get isRunningFromSource(){return a().basename(__dirname)==="model"}static get name(){return"unity-builder"}static get rootFolder(){if(action_Action.isRunningFromSource){return a().dirname(a().dirname(a().dirname(__filename)))}return a().dirname(a().dirname(__filename))}static get actionFolder(){return`${action_Action.rootFolder}/action`}static get dockerfile(){return`${action_Action.actionFolder}/Dockerfile`}static get workspace(){return process.env.GITHUB_WORKSPACE}static checkCompatibility(){const e=process.platform;if(!action_Action.supportedPlatforms.includes(e)){throw new Error(`Currently ${e}-platform is not supported`)}}}var i=action_Action;class Platform{static get default(){return Platform.types.StandaloneWindows64}static get types(){return{StandaloneOSX:"StandaloneOSX",StandaloneWindows:"StandaloneWindows",StandaloneWindows64:"StandaloneWindows64",StandaloneLinux64:"StandaloneLinux64",iOS:"iOS",Android:"Android",WebGL:"WebGL",WSAPlayer:"WSAPlayer",PS4:"PS4",XboxOne:"XboxOne",tvOS:"tvOS",Switch:"Switch",Lumin:"Lumin",BJM:"BJM",Stadia:"Stadia",Facebook:"Facebook",NoTarget:"NoTarget",Test:"Test"}}static isWindows(e){switch(e){case Platform.types.StandaloneWindows:case Platform.types.StandaloneWindows64:return true;default:return false}}static isAndroid(e){switch(e){case Platform.types.Android:return true;default:return false}}}var o=Platform;class build_parameters_BuildParameters{static create(e){const{version:r,targetPlatform:t,projectPath:n,buildName:a,buildsPath:i,buildMethod:o,buildVersion:u,customParameters:s}=e;return{version:r,platform:t,projectPath:n,buildName:a,buildPath:`${i}/${t}`,buildFile:this.parseBuildFile(a,t),buildMethod:o,buildVersion:u,customParameters:s}}static parseBuildFile(e,r){if(o.isWindows(r)){return`${e}.exe`}if(o.isAndroid(r)){return`${e}.apk`}return e}}var u=build_parameters_BuildParameters;var s=t(747);var c=t.n(s);var f=t(470);class Unity{static get libraryFolder(){return"Library"}}var l=Unity;class project_Project{static get relativePath(){const e=Object(f.getInput)("projectPath")||".";return`${e}`}static get absolutePath(){const{workspace:e}=i;return`${e}/${this.relativePath}`}static get libraryFolder(){return`${this.relativePath}/${l.libraryFolder}`}}var v=project_Project;class cache_Cache{static verify(){if(!c().existsSync(v.libraryFolder)){this.notifyAboutCachingPossibility()}}static notifyAboutCachingPossibility(){if(i.isRunningLocally){return}console.log(`\n Library folder does not exist.\n Consider setting up caching to speed up your workflow\n If this is not your first build.`)}}var d=cache_Cache;var p=t(986);var h=typeof global=="object"&&global&&global.Object===Object&&global;var y=h;var g=typeof self=="object"&&self&&self.Object===Object&&self;var b=y||g||Function("return this")();var m=b;var _=m.Symbol;var w=_;var x=Object.prototype;var S=x.hasOwnProperty;var O=x.toString;var j=w?w.toStringTag:undefined;function getRawTag(e){var r=S.call(e,j),t=e[j];try{e[j]=undefined;var n=true}catch(e){}var a=O.call(e);if(n){if(r){e[j]=t}else{delete e[j]}}return a}var I=getRawTag;var A=Object.prototype;var E=A.toString;function objectToString(e){return E.call(e)}var k=objectToString;var P="[object Null]",C="[object Undefined]";var R=w?w.toStringTag:undefined;function baseGetTag(e){if(e==null){return e===undefined?C:P}return R&&R in Object(e)?I(e):k(e)}var W=baseGetTag;function isObjectLike(e){return e!=null&&typeof e=="object"}var T=isObjectLike;var M="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||T(e)&&W(e)==M}var B=isSymbol;var D=0/0;function baseToNumber(e){if(typeof e=="number"){return e}if(B(e)){return D}return+e}var L=baseToNumber;function arrayMap(e,r){var t=-1,n=e==null?0:e.length,a=Array(n);while(++t0){if(++r>=pr){return arguments[0]}}else{r=0}return e.apply(undefined,arguments)}}var gr=shortOut;var br=gr(De);var mr=br;var _r=/\{\n\/\* \[wrapped with (.+)\] \*/,wr=/,? & /;function getWrapDetails(e){var r=e.match(_r);return r?r[1].split(wr):[]}var xr=getWrapDetails;var Sr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function insertWrapDetails(e,r){var t=r.length;if(!t){return e}var n=t-1;r[n]=(t>1?"& ":"")+r[n];r=r.join(t>2?", ":" ");return e.replace(Sr,"{\n/* [wrapped with "+r+"] */\n")}var Or=insertWrapDetails;function constant(e){return function(){return e}}var jr=constant;var Ir=function(){try{var e=Ce(Object,"defineProperty");e({},"",{});return e}catch(e){}}();var Ar=Ir;var Er=!Ar?ce:function(e,r){return Ar(e,"toString",{configurable:true,enumerable:false,value:jr(r),writable:true})};var kr=Er;var Pr=gr(kr);var Cr=Pr;function arrayEach(e,r){var t=-1,n=e==null?0:e.length;while(++t-1}var Dr=arrayIncludes;var Lr=1,Fr=2,Nr=8,$r=16,Ur=32,zr=64,qr=128,Hr=256,Vr=512;var Gr=[["ary",qr],["bind",Lr],["bindKey",Fr],["curry",Nr],["curryRight",$r],["flip",Vr],["partial",Ur],["partialRight",zr],["rearg",Hr]];function updateWrapDetails(e,r){Rr(Gr,function(t){var n="_."+t[0];if(r&t[1]&&!Dr(e,n)){e.push(n)}});return e.sort()}var Kr=updateWrapDetails;function setWrapToString(e,r,t){var n=r+"";return Cr(e,Or(n,Kr(xr(n),t)))}var Zr=setWrapToString;var Xr=1,Yr=2,Jr=4,Qr=8,et=32,rt=64;function createRecurry(e,r,t,n,a,i,o,u,s,c){var f=r&Qr,l=f?o:undefined,v=f?undefined:o,d=f?i:undefined,p=f?undefined:i;r|=f?et:rt;r&=~(f?rt:et);if(!(r&Jr)){r&=~(Xr|Yr)}var h=[e,r,a,d,l,p,v,u,s,c];var y=t.apply(undefined,h);if(dr(e)){mr(y,h)}y.placeholder=n;return Zr(y,e,r)}var tt=createRecurry;function getHolder(e){var r=e;return r.placeholder}var nt=getHolder;var at=9007199254740991;var it=/^(?:0|[1-9]\d*)$/;function isIndex(e,r){var t=typeof e;r=r==null?at:r;return!!r&&(t=="number"||t!="symbol"&&it.test(e))&&(e>-1&&e%1==0&&e1){g.reverse()}if(f&&s-1&&e%1==0&&e<=Xt}var Yt=isLength;function isArrayLike(e){return e!=null&&Yt(e.length)&&!pe(e)}var Jt=isArrayLike;function isIterateeCall(e,r,t){if(!Z(t)){return false}var n=typeof r;if(n=="number"?Jt(t)&&ot(r,t.length):n=="string"&&r in t){return Ut(t[r],e)}return false}var Qt=isIterateeCall;function createAssigner(e){return Zt(function(r,t){var n=-1,a=t.length,i=a>1?t[a-1]:undefined,o=a>2?t[2]:undefined;i=e.length>3&&typeof i=="function"?(a--,i):undefined;if(o&&Qt(t[0],t[1],o)){i=a<3?undefined:i;a=1}r=Object(r);while(++n-1}var Xa=listCacheHas;function listCacheSet(e,r){var t=this.__data__,n=Ha(t,e);if(n<0){++this.size;t.push([e,r])}else{t[n][1]=r}return this}var Ya=listCacheSet;function ListCache(e){var r=-1,t=e==null?0:e.length;this.clear();while(++r0&&t(u)){if(r>1){baseFlatten(u,r-1,t,n,a)}else{Oi(a,u)}}else if(!n){a[a.length]=u}}return a}var Ai=baseFlatten;function flatten(e){var r=e==null?0:e.length;return r?Ai(e,1):[]}var Ei=flatten;function flatRest(e){return Cr(Kt(e,undefined,Ei),e+"")}var ki=flatRest;var Pi=ki(Si);var Ci=Pi;var Ri=ia(Object.getPrototypeOf,Object);var Wi=Ri;var Ti="[object Object]";var Mi=Function.prototype,Bi=Object.prototype;var Di=Mi.toString;var Li=Bi.hasOwnProperty;var Fi=Di.call(Object);function isPlainObject(e){if(!T(e)||W(e)!=Ti){return false}var r=Wi(e);if(r===null){return true}var t=Li.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&Di.call(t)==Fi}var Ni=isPlainObject;var $i="[object DOMException]",Ui="[object Error]";function isError(e){if(!T(e)){return false}var r=W(e);return r==Ui||r==$i||typeof e.message=="string"&&typeof e.name=="string"&&!Ni(e)}var zi=isError;var qi=Zt(function(e,r){try{return qe(e,undefined,r)}catch(e){return zi(e)?e:new Error(e)}});var Hi=qi;var Vi="Expected a function";function before(e,r){var t;if(typeof r!="function"){throw new TypeError(Vi)}e=oe(e);return function(){if(--e>0){t=r.apply(this,arguments)}if(e<=1){r=undefined}return t}}var Gi=before;var Ki=1,Zi=32;var Xi=Zt(function(e,r,t){var n=Ki;if(t.length){var a=ft(t,nt(Xi));n|=Zi}return Lt(e,n,r,t,a)});Xi.placeholder={};var Yi=Xi;var Ji=ki(function(e,r){Rr(r,function(r){r=_i(r);$t(e,r,Yi(e[r],e))});return e});var Qi=Ji;var eo=1,ro=2,to=32;var no=Zt(function(e,r,t){var n=eo|ro;if(t.length){var a=ft(t,nt(no));n|=to}return Lt(r,n,e,t,a)});no.placeholder={};var ao=no;function baseSlice(e,r,t){var n=-1,a=e.length;if(r<0){r=-r>a?0:a+r}t=t>a?a:t;if(t<0){t+=a}a=r>t?0:t-r>>>0;r>>>=0;var i=Array(a);while(++n=n?e:io(e,r,t)}var oo=castSlice;var uo="\\ud800-\\udfff",so="\\u0300-\\u036f",co="\\ufe20-\\ufe2f",fo="\\u20d0-\\u20ff",lo=so+co+fo,vo="\\ufe0e\\ufe0f";var po="\\u200d";var ho=RegExp("["+po+uo+lo+vo+"]");function hasUnicode(e){return ho.test(e)}var yo=hasUnicode;function asciiToArray(e){return e.split("")}var go=asciiToArray;var bo="\\ud800-\\udfff",mo="\\u0300-\\u036f",_o="\\ufe20-\\ufe2f",wo="\\u20d0-\\u20ff",xo=mo+_o+wo,So="\\ufe0e\\ufe0f";var Oo="["+bo+"]",jo="["+xo+"]",Io="\\ud83c[\\udffb-\\udfff]",Ao="(?:"+jo+"|"+Io+")",Eo="[^"+bo+"]",ko="(?:\\ud83c[\\udde6-\\uddff]){2}",Po="[\\ud800-\\udbff][\\udc00-\\udfff]",Co="\\u200d";var Ro=Ao+"?",Wo="["+So+"]?",To="(?:"+Co+"(?:"+[Eo,ko,Po].join("|")+")"+Wo+Ro+")*",Mo=Wo+Ro+To,Bo="(?:"+[Eo+jo+"?",jo,ko,Po,Oo].join("|")+")";var Do=RegExp(Io+"(?="+Io+")|"+Bo+Mo,"g");function unicodeToArray(e){return e.match(Do)||[]}var Lo=unicodeToArray;function stringToArray(e){return yo(e)?Lo(e):go(e)}var Fo=stringToArray;function createCaseFirst(e){return function(r){r=gi(r);var t=yo(r)?Fo(r):undefined;var n=t?t[0]:r.charAt(0);var a=t?oo(t,1).join(""):r.slice(1);return n[e]()+a}}var No=createCaseFirst;var $o=No("toUpperCase");var Uo=$o;function capitalize(e){return Uo(gi(e).toLowerCase())}var zo=capitalize;function arrayReduce(e,r,t,n){var a=-1,i=e==null?0:e.length;if(n&&i){t=e[++a]}while(++a=r?e:r}}return e}var fs=baseClamp;function clamp(e,r,t){if(t===undefined){t=r;r=undefined}if(t!==undefined){t=te(t);t=t===t?t:0}if(r!==undefined){r=te(r);r=r===r?r:0}return fs(te(e),r,t)}var ls=clamp;function stackClear(){this.__data__=new Ja;this.size=0}var vs=stackClear;function stackDelete(e){var r=this.__data__,t=r["delete"](e);this.size=r.size;return t}var ds=stackDelete;function stackGet(e){return this.__data__.get(e)}var ps=stackGet;function stackHas(e){return this.__data__.has(e)}var hs=stackHas;var ys=200;function stackSet(e,r){var t=this.__data__;if(t instanceof Ja){var n=t.__data__;if(!ei||n.lengthu)){return false}var c=i.get(e);if(c&&i.get(r)){return c==r}var f=-1,l=true,v=t&Zf?new Hf:undefined;i.set(e,r);i.set(r,e);while(++f=r||t<0||l&&n>=i}function timerExpired(){var e=gv();if(shouldInvoke(e)){return trailingEdge(e)}u=setTimeout(timerExpired,remainingWait(e))}function trailingEdge(e){u=undefined;if(v&&n){return invokeFunc(e)}n=a=undefined;return o}function cancel(){if(u!==undefined){clearTimeout(u)}c=0;n=s=a=u=undefined}function flush(){return u===undefined?o:trailingEdge(gv())}function debounced(){var e=gv(),t=shouldInvoke(e);n=arguments;a=this;s=e;if(t){if(u===undefined){return leadingEdge(s)}if(l){clearTimeout(u);u=setTimeout(timerExpired,r);return invokeFunc(s)}}if(u===undefined){u=setTimeout(timerExpired,r)}return o}debounced.cancel=cancel;debounced.flush=flush;return debounced}var wv=debounce;function defaultTo(e,r){return e==null||e!==e?r:e}var xv=defaultTo;var Sv=Object.prototype;var Ov=Sv.hasOwnProperty;var jv=Zt(function(e,r){e=Object(e);var t=-1;var n=r.length;var a=n>2?r[2]:undefined;if(a&&Qt(r[0],r[1],a)){n=1}while(++t=Hv){i=Gf;o=false;r=new Hf(r)}e:while(++a=0&&e.slice(t,a)==r}var yd=endsWith;function baseToPairs(e,r){return F(r,function(r){return[r,e[r]]})}var gd=baseToPairs;function setToPairs(e){var r=-1,t=Array(e.size);e.forEach(function(e){t[++r]=[e,e]});return t}var bd=setToPairs;var md="[object Map]",_d="[object Set]";function createToPairs(e){return function(r){var t=oc(r);if(t==md){return Yf(r)}if(t==_d){return bd(r)}return gd(r,e(r))}}var wd=createToPairs;var xd=wd(la);var Sd=xd;var Od=wd(_a);var jd=Od;var Id={"&":"&","<":"<",">":">",'"':""","'":"'"};var Ad=Ho(Id);var Ed=Ad;var kd=/[&<>"']/g,Pd=RegExp(kd.source);function escape_escape(e){e=gi(e);return e&&Pd.test(e)?e.replace(kd,Ed):e}var Cd=escape_escape;var Rd=/[\\^$.*+?()[\]{}|]/g,Wd=RegExp(Rd.source);function escapeRegExp(e){e=gi(e);return e&&Wd.test(e)?e.replace(Rd,"\\$&"):e}var Td=escapeRegExp;function arrayEvery(e,r){var t=-1,n=e==null?0:e.length;while(++ta?0:a+t}n=n===undefined||n>a?a:oe(n);if(n<0){n+=a}n=t>n?0:Fd(n);while(t-1?a[i?r[o]:o]:undefined}}var qd=createFind;var Hd=Math.max;function findIndex(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=t==null?0:oe(t);if(a<0){a=Hd(n+a,0)}return Wr(e,zl(r,3),a)}var Vd=findIndex;var Gd=qd(Vd);var Kd=Gd;function baseFindKey(e,r,t){var n;t(e,function(e,t,a){if(r(e,t,a)){n=t;return false}});return n}var Zd=baseFindKey;function findKey(e,r){return Zd(e,zl(r,3),rv)}var Xd=findKey;var Yd=Math.max,Jd=Math.min;function findLastIndex(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=n-1;if(t!==undefined){a=oe(t);a=t<0?Yd(n+a,0):Jd(a,n-1)}return Wr(e,zl(r,3),a,true)}var Qd=findLastIndex;var ep=qd(Qd);var rp=ep;function findLastKey(e,r){return Zd(e,zl(r,3),vd)}var tp=findLastKey;function head(e){return e&&e.length?e[0]:undefined}var np=head;function baseMap(e,r){var t=-1,n=Jt(e)?Array(e.length):[];av(e,function(e,a,i){n[++t]=r(e,a,i)});return n}var ap=baseMap;function map_map(e,r){var t=$(e)?F:ap;return t(e,zl(r,3))}var ip=map_map;function flatMap(e,r){return Ai(ip(e,r),1)}var op=flatMap;var up=1/0;function flatMapDeep(e,r){return Ai(ip(e,r),up)}var sp=flatMapDeep;function flatMapDepth(e,r,t){t=t===undefined?1:oe(t);return Ai(ip(e,r),t)}var cp=flatMapDepth;var fp=1/0;function flattenDeep(e){var r=e==null?0:e.length;return r?Ai(e,fp):[]}var lp=flattenDeep;function flattenDepth(e,r){var t=e==null?0:e.length;if(!t){return[]}r=r===undefined?1:oe(r);return Ai(e,r)}var vp=flattenDepth;var dp=512;function flip(e){return Lt(e,dp)}var pp=flip;var hp=ns("floor");var yp=hp;var gp="Expected a function";var bp=8,mp=32,_p=128,wp=256;function createFlow(e){return ki(function(r){var t=r.length,n=t,a=ur.prototype.thru;if(e){r.reverse()}while(n--){var i=r[n];if(typeof i!="function"){throw new TypeError(gp)}if(a&&!o&&or(i)=="wrapper"){var o=new ur([],true)}}n=o?n:t;while(++nr}var Fp=baseGt;function createRelationalOperation(e){return function(r,t){if(!(typeof r=="string"&&typeof t=="string")){r=te(r);t=te(t)}return e(r,t)}}var Np=createRelationalOperation;var $p=Np(Fp);var Up=$p;var zp=Np(function(e,r){return e>=r});var qp=zp;var Hp=Object.prototype;var Vp=Hp.hasOwnProperty;function baseHas(e,r){return e!=null&&Vp.call(e,r)}var Gp=baseHas;function has(e,r){return e!=null&&Ml(e,r,Gp)}var Kp=has;var Zp=Math.max,Xp=Math.min;function baseInRange(e,r,t){return e>=Xp(r,t)&&e-1:!!a&&Br(e,r,t)>-1}var ah=includes_includes;var ih=Math.max;function indexOf_indexOf(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=t==null?0:oe(t);if(a<0){a=ih(n+a,0)}return Br(e,r,a)}var oh=indexOf_indexOf;function initial(e){var r=e==null?0:e.length;return r?io(e,0,-1):[]}var uh=initial;var sh=Math.min;function baseIntersection(e,r,t){var n=t?qv:Dr,a=e[0].length,i=e.length,o=i,u=Array(i),s=Infinity,c=[];while(o--){var f=e[o];if(o&&r){f=F(f,Vn(r))}s=sh(f.length,s);u[o]=!t&&(r||a>=120&&f.length>=120)?new Hf(o&&f):undefined}f=e[0];var l=-1,v=u[0];e:while(++l=-my&&e<=my}var _y=isSafeInteger;function isUndefined(e){return e===undefined}var wy=isUndefined;var xy="[object WeakMap]";function isWeakMap(e){return T(e)&&oc(e)==xy}var Sy=isWeakMap;var Oy="[object WeakSet]";function isWeakSet(e){return T(e)&&W(e)==Oy}var jy=isWeakSet;var Iy=1;function iteratee_iteratee(e){return zl(typeof e=="function"?e:Ef(e,Iy))}var Ay=iteratee_iteratee;var Ey=Array.prototype;var ky=Ey.join;function join(e,r){return e==null?"":ky.call(e,r)}var Py=join;var Cy=Yu(function(e,r,t){return e+(t?"-":"")+r.toLowerCase()});var Ry=Cy;var Wy=ov(function(e,r,t){$t(e,t,r)});var Ty=Wy;function strictLastIndexOf(e,r,t){var n=t+1;while(n--){if(e[n]===r){return n}}return n}var My=strictLastIndexOf;var By=Math.max,Dy=Math.min;function lastIndexOf(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=n;if(t!==undefined){a=oe(t);a=a<0?By(n+a,0):Dy(a,n-1)}return r===r?My(e,r,a):Wr(e,Tr,a,true)}var Ly=lastIndexOf;var Fy=Yu(function(e,r,t){return e+(t?" ":"")+r.toLowerCase()});var Ny=Fy;var $y=No("toLowerCase");var Uy=$y;function baseLt(e,r){return e=this.__values__.length,r=e?undefined:this.__values__[this.__index__++];return{done:e,value:r}}var Ig=wrapperNext;function baseNth(e,r){var t=e.length;if(!t){return}r+=r<0?t:0;return ot(r,t)?e[r]:undefined}var Ag=baseNth;function nth(e,r){return e&&e.length?Ag(e,oe(r)):undefined}var Eg=nth;function nthArg(e){e=oe(e);return Zt(function(r){return Ag(r,e)})}var kg=nthArg;function baseUnset(e,r){r=bi(r,e);e=Eh(e,r);return e==null||delete e[_i(Zv(r))]}var Pg=baseUnset;function customOmitClone(e){return Ni(e)?undefined:e}var Cg=customOmitClone;var Rg=1,Wg=2,Tg=4;var Mg=ki(function(e,r){var t={};if(e==null){return t}var n=false;r=F(r,function(r){r=bi(r,e);n||(n=r.length>1);return r});Vt(e,$s(e),t);if(n){t=Ef(t,Rg|Wg|Tg,Cg)}var a=r.length;while(a--){Pg(t,r[a])}return t});var Bg=Mg;function baseSet(e,r,t,n){if(!Z(e)){return e}r=bi(r,e);var a=-1,i=r.length,o=i-1,u=e;while(u!=null&&++ar||i&&o&&s&&!u&&!c||n&&o&&s||!t&&s||!a){return 1}if(!n&&!i&&!c&&e=u){return s}var c=t[n];return s*(c=="desc"?-1:1)}}return e.index-r.index}var qg=compareMultiple;function baseOrderBy(e,r,t){var n=-1;r=F(r.length?r:[ce],Vn(zl));var a=ap(e,function(e,t,a){var i=F(r,function(r){return r(e)});return{criteria:i,index:++n,value:e}});return Ug(a,function(e,r){return qg(e,r,t)})}var Hg=baseOrderBy;function orderBy(e,r,t,n){if(e==null){return[]}if(!$(r)){r=r==null?[]:[r]}t=n?undefined:t;if(!$(t)){t=t==null?[]:[t]}return Hg(e,r,t)}var Vg=orderBy;function createOver(e){return ki(function(r){r=F(r,Vn(zl));return Zt(function(t){var n=this;return e(r,function(e){return qe(e,n,t)})})})}var Gg=createOver;var Kg=Gg(F);var Zg=Kg;var Xg=Zt;var Yg=Xg;var Jg=Math.min;var Qg=Yg(function(e,r){r=r.length==1&&$(r[0])?F(r[0],Vn(zl)):F(Ai(r,1),Vn(zl));var t=r.length;return Zt(function(n){var a=-1,i=Jg(n.length,t);while(++aib){return t}do{if(r%2){t+=e}r=ob(r/2);if(r){e+=e}}while(r);return t}var ub=baseRepeat;var sb=Nl("length");var cb=sb;var fb="\\ud800-\\udfff",lb="\\u0300-\\u036f",vb="\\ufe20-\\ufe2f",db="\\u20d0-\\u20ff",pb=lb+vb+db,hb="\\ufe0e\\ufe0f";var yb="["+fb+"]",gb="["+pb+"]",bb="\\ud83c[\\udffb-\\udfff]",mb="(?:"+gb+"|"+bb+")",_b="[^"+fb+"]",wb="(?:\\ud83c[\\udde6-\\uddff]){2}",xb="[\\ud800-\\udbff][\\udc00-\\udfff]",Sb="\\u200d";var Ob=mb+"?",jb="["+hb+"]?",Ib="(?:"+Sb+"(?:"+[_b,wb,xb].join("|")+")"+jb+Ob+")*",Ab=jb+Ob+Ib,Eb="(?:"+[_b+gb+"?",gb,wb,xb,yb].join("|")+")";var kb=RegExp(bb+"(?="+bb+")|"+Eb+Ab,"g");function unicodeSize(e){var r=kb.lastIndex=0;while(kb.test(e)){++r}return r}var Pb=unicodeSize;function stringSize(e){return yo(e)?Pb(e):cb(e)}var Cb=stringSize;var Rb=Math.ceil;function createPadding(e,r){r=r===undefined?" ":H(r);var t=r.length;if(t<2){return t?ub(r,e):r}var n=ub(r,Rb(e/Cb(r)));return yo(r)?oo(Fo(n),0,e).join(""):n.slice(0,e)}var Wb=createPadding;var Tb=Math.ceil,Mb=Math.floor;function pad(e,r,t){e=gi(e);r=oe(r);var n=r?Cb(e):0;if(!r||n>=r){return e}var a=(r-n)/2;return Wb(Mb(a),t)+e+Wb(Tb(a),t)}var Bb=pad;function padEnd(e,r,t){e=gi(e);r=oe(r);var n=r?Cb(e):0;return r&&n-1){if(u!==e){nm.call(u,s,1)}nm.call(e,s,1)}}return e}var am=basePullAll;function pullAll(e,r){return e&&e.length&&r&&r.length?am(e,r):e}var im=pullAll;var om=Zt(im);var um=om;function pullAllBy(e,r,t){return e&&e.length&&r&&r.length?am(e,r,zl(t,2)):e}var sm=pullAllBy;function pullAllWith(e,r,t){return e&&e.length&&r&&r.length?am(e,r,undefined,t):e}var cm=pullAllWith;var fm=Array.prototype;var lm=fm.splice;function basePullAt(e,r){var t=e?r.length:0,n=t-1;while(t--){var a=r[t];if(t==n||a!==i){var i=a;if(ot(a)){lm.call(e,a,1)}else{Pg(e,a)}}}return e}var vm=basePullAt;var dm=ki(function(e,r){var t=e==null?0:e.length,n=Si(e,r);vm(e,F(r,function(e){return ot(e,t)?+e:e}).sort(zg));return n});var pm=dm;var hm=Math.floor,ym=Math.random;function baseRandom(e,r){return e+hm(ym()*(r-e+1))}var gm=baseRandom;var bm=parseFloat;var mm=Math.min,_m=Math.random;function random(e,r,t){if(t&&typeof t!="boolean"&&Qt(e,r,t)){r=t=undefined}if(t===undefined){if(typeof r=="boolean"){t=r;r=undefined}else if(typeof e=="boolean"){t=e;e=undefined}}if(e===undefined&&r===undefined){e=0;r=1}else{e=ie(e);if(r===undefined){r=e;e=0}else{r=ie(r)}}if(e>r){var n=e;e=r;r=n}if(t||e%1||r%1){var a=_m();return mm(e+a*(r-e+bm("1e-"+((a+"").length-1))),r)}return gm(e,r)}var wm=random;var xm=Math.ceil,Sm=Math.max;function baseRange(e,r,t,n){var a=-1,i=Sm(xm((r-e)/(t||1)),0),o=Array(i);while(i--){o[n?i:++a]=e;e+=t}return o}var Om=baseRange;function createRange(e){return function(r,t,n){if(n&&typeof n!="number"&&Qt(r,t,n)){t=n=undefined}r=ie(r);if(t===undefined){t=r;r=0}else{t=ie(t)}n=n===undefined?r1&&Qt(e,r[0],r[1])){r=[]}else if(t>2&&Qt(r[0],r[1],r[2])){r=[r[0]]}return Hg(e,Ai(r,1),[])});var y_=h_;var g_=4294967295,b_=g_-1;var m_=Math.floor,__=Math.min;function baseSortedIndexBy(e,r,t,n){r=t(r);var a=0,i=e==null?0:e.length,o=r!==r,u=r===null,s=B(r),c=r===undefined;while(a>>1;function baseSortedIndex(e,r,t){var n=0,a=e==null?n:e.length;if(typeof r=="number"&&r===r&&a<=S_){while(n>>1,o=e[i];if(o!==null&&!B(o)&&(t?o<=r:o>>0;if(!t){return[]}e=gi(e);if(e&&(typeof r=="string"||r!=null&&!by(r))){r=H(r);if(!r&&yo(e)){return oo(Fo(e),0,t)}}return e.split(r,t)}var M_=split;var B_="Expected a function";var D_=Math.max;function spread(e,r){if(typeof e!="function"){throw new TypeError(B_)}r=r==null?0:D_(oe(r),0);return Zt(function(t){var n=t[r],a=oo(t,0,r);if(n){Oi(a,n)}return qe(e,this,a)})}var L_=spread;var F_=Yu(function(e,r,t){return e+(t?" ":"")+Uo(r)});var N_=F_;function startsWith(e,r,t){e=gi(e);t=t==null?0:fs(oe(t),0,e.length);r=H(r);return e.slice(t,t+r.length)==r}var $_=startsWith;function stubObject(){return{}}var U_=stubObject;function stubString(){return""}var z_=stubString;function stubTrue(){return true}var q_=stubTrue;var H_=V(function(e,r){return e-r},0);var V_=H_;function sum(e){return e&&e.length?ng(e,ce):0}var G_=sum;function sumBy(e,r){return e&&e.length?ng(e,zl(r,2)):0}var K_=sumBy;function tail(e){var r=e==null?0:e.length;return r?io(e,1,r):[]}var Z_=tail;function take(e,r,t){if(!(e&&e.length)){return[]}r=t||r===undefined?1:oe(r);return io(e,0,r<0?0:r)}var X_=take;function takeRight(e,r,t){var n=e==null?0:e.length;if(!n){return[]}r=t||r===undefined?1:oe(r);r=n-r;return io(e,r<0?0:r,n)}var Y_=takeRight;function takeRightWhile(e,r){return e&&e.length?ad(e,zl(r,3),false,true):[]}var J_=takeRightWhile;function takeWhile(e,r){return e&&e.length?ad(e,zl(r,3)):[]}var Q_=takeWhile;function tap(e,r){r(e);return e}var ew=tap;var rw=Object.prototype;var tw=rw.hasOwnProperty;function customDefaultsAssignIn(e,r,t,n){if(e===undefined||Ut(e,rw[t])&&!tw.call(n,t)){return r}return e}var nw=customDefaultsAssignIn;var aw={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function escapeStringChar(e){return"\\"+aw[e]}var iw=escapeStringChar;var ow=/<%=([\s\S]+?)%>/g;var uw=ow;var sw=/<%-([\s\S]+?)%>/g;var cw=sw;var fw=/<%([\s\S]+?)%>/g;var lw=fw;var vw={escape:cw,evaluate:lw,interpolate:uw,variable:"",imports:{_:{escape:Cd}}};var dw=vw;var pw=/\b__p \+= '';/g,hw=/\b(__p \+=) '' \+/g,yw=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var gw=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var bw=/($^)/;var mw=/['\n\r\u2028\u2029\\]/g;var _w=Object.prototype;var ww=_w.hasOwnProperty;function template(e,r,t){var n=dw.imports._.templateSettings||dw;if(t&&Qt(e,r,t)){r=undefined}e=gi(e);r=Oa({},r,n,nw);var a=Oa({},r.imports,n.imports,nw),i=la(a),o=rh(a,i);var u,s,c=0,f=r.interpolate||bw,l="__p += '";var v=RegExp((r.escape||bw).source+"|"+f.source+"|"+(f===uw?gw:bw).source+"|"+(r.evaluate||bw).source+"|$","g");var d=ww.call(r,"sourceURL")?"//# sourceURL="+(r.sourceURL+"").replace(/[\r\n]/g," ")+"\n":"";e.replace(v,function(r,t,n,a,i,o){n||(n=a);l+=e.slice(c,o).replace(mw,iw);if(t){u=true;l+="' +\n__e("+t+") +\n'"}if(i){s=true;l+="';\n"+i+";\n__p += '"}if(n){l+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"}c=o+r.length;return r});l+="';\n";var p=ww.call(r,"variable")&&r.variable;if(!p){l="with (obj) {\n"+l+"\n}\n"}l=(s?l.replace(pw,""):l).replace(hw,"$1").replace(yw,"$1;");l="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var h=Hi(function(){return Function(i,d+"return "+l).apply(undefined,o)});h.source=l;if(zi(h)){throw h}return h}var xw=template;var Sw="Expected a function";function throttle(e,r,t){var n=true,a=true;if(typeof e!="function"){throw new TypeError(Sw)}if(Z(t)){n="leading"in t?!!t.leading:n;a="trailing"in t?!!t.trailing:a}return wv(e,r,{leading:n,maxWait:r,trailing:a})}var Ow=throttle;function thru(e,r){return r(e)}var jw=thru;var Iw=9007199254740991;var Aw=4294967295;var Ew=Math.min;function times(e,r){e=oe(e);if(e<1||e>Iw){return[]}var t=Aw,n=Ew(e,Aw);r=ud(r);e-=Aw;var a=nn(n,r);while(++t-1){}return t}var Fw=charsEndIndex;function charsStartIndex(e,r){var t=-1,n=e.length;while(++t-1){}return t}var Nw=charsStartIndex;var $w=/^\s+|\s+$/g;function trim(e,r,t){e=gi(e);if(e&&(t||r===undefined)){return e.replace($w,"")}if(!e||!(r=H(r))){return e}var n=Fo(e),a=Fo(r),i=Nw(n,a),o=Fw(n,a)+1;return oo(n,i,o).join("")}var Uw=trim;var zw=/\s+$/;function trimEnd(e,r,t){e=gi(e);if(e&&(t||r===undefined)){return e.replace(zw,"")}if(!e||!(r=H(r))){return e}var n=Fo(e),a=Fw(n,Fo(r))+1;return oo(n,0,a).join("")}var qw=trimEnd;var Hw=/^\s+/;function trimStart(e,r,t){e=gi(e);if(e&&(t||r===undefined)){return e.replace(Hw,"")}if(!e||!(r=H(r))){return e}var n=Fo(e),a=Nw(n,Fo(r));return oo(n,a).join("")}var Vw=trimStart;var Gw=30,Kw="...";var Zw=/\w*$/;function truncate(e,r){var t=Gw,n=Kw;if(Z(r)){var a="separator"in r?r.separator:a;t="length"in r?oe(r.length):t;n="omission"in r?H(r.omission):n}e=gi(e);var i=e.length;if(yo(e)){var o=Fo(e);i=o.length}if(t>=i){return e}var u=t-Cb(n);if(u<1){return n}var s=o?oo(o,0,u).join(""):e.slice(0,u);if(a===undefined){return s+n}if(o){u+=s.length-u}if(by(a)){if(e.slice(u).search(a)){var c,f=s;if(!a.global){a=RegExp(a.source,gi(Zw.exec(a))+"g")}a.lastIndex=0;while(c=a.exec(f)){var l=c.index}s=s.slice(0,l===undefined?u:l)}}else if(e.indexOf(H(a),u)!=u){var v=s.lastIndexOf(a);if(v>-1){s=s.slice(0,v)}}return s+n}var Xw=truncate;function unary(e){return Nt(e,1)}var Yw=unary;var Jw={"&":"&","<":"<",">":">",""":'"',"'":"'"};var Qw=Ho(Jw);var ex=Qw;var rx=/&(?:amp|lt|gt|quot|#39);/g,tx=RegExp(rx.source);function unescape_unescape(e){e=gi(e);return e&&tx.test(e)?e.replace(rx,ex):e}var nx=unescape_unescape;var ax=1/0;var ix=!(Gs&&1/Jf(new Gs([,-0]))[1]==ax)?Qe:function(e){return new Gs(e)};var ox=ix;var ux=200;function baseUniq(e,r,t){var n=-1,a=Dr,i=e.length,o=true,u=[],s=u;if(t){o=false;a=qv}else if(i>=ux){var c=r?null:ox(e);if(c){return Jf(c)}o=false;a=Gf;s=new Hf}else{s=r?[]:u}e:while(++n1||this.__actions__.length||!(n instanceof Je)||!ot(t)){return this.thru(a)}n=n.slice(t,+t+(r?1:0));n.__actions__.push({func:jw,args:[a],thisArg:undefined});return new ur(n,this.__chain__).thru(function(e){if(r&&!e.length){e.push(undefined)}return e})});var Tx=Wx;function wrapperChain(){return os(this)}var Mx=wrapperChain;function wrapperReverse(){var e=this.__wrapped__;if(e instanceof Je){var r=e;if(this.__actions__.length){r=new Je(this)}r=r.reverse();r.__actions__.push({func:jw,args:[Vm],thisArg:undefined});return new ur(r,this.__chain__)}return this.thru(Vm)}var Bx=wrapperReverse;function baseXor(e,r,t){var n=e.length;if(n<2){return n?sx(e[0]):[]}var a=-1,i=Array(n);while(++a1?e[r-1]:undefined;t=typeof t=="function"?(e.pop(),t):undefined;return Sx(e,t)});var Xx=Zx;var Yx={chunk:cs,compact:Nf,concat:$f,difference:Kv,differenceBy:Yv,differenceWith:Qv,drop:td,dropRight:nd,dropRightWhile:id,dropWhile:od,fill:$d,findIndex:Vd,findLastIndex:Qd,first:np,flatten:Ei,flattenDeep:lp,flattenDepth:vp,fromPairs:Cp,head:np,indexOf:oh,initial:uh,intersection:vh,intersectionBy:ph,intersectionWith:yh,join:Py,last:Zv,lastIndexOf:Ly,nth:Eg,pull:um,pullAll:im,pullAllBy:sm,pullAllWith:cm,pullAt:pm,remove:Lm,reverse:Vm,slice:f_,sortedIndex:j_,sortedIndexBy:I_,sortedIndexOf:A_,sortedLastIndex:E_,sortedLastIndexBy:k_,sortedLastIndexOf:P_,sortedUniq:R_,sortedUniqBy:W_,tail:Z_,take:X_,takeRight:Y_,takeRightWhile:J_,takeWhile:Q_,union:fx,unionBy:vx,unionWith:px,uniq:hx,uniqBy:yx,uniqWith:gx,unzip:xx,unzipWith:Sx,without:Cx,xor:Fx,xorBy:$x,xorWith:zx,zip:Hx,zipObject:Gx,zipObjectDeep:Kx,zipWith:Xx};var Jx={countBy:fv,each:sd,eachRight:hd,every:Dd,filter:zd,find:Kd,findLast:rp,flatMap:op,flatMapDeep:sp,flatMapDepth:cp,forEach:sd,forEachRight:hd,groupBy:Lp,includes:ah,invokeMap:Wh,keyBy:Ty,map:ip,orderBy:Vg,partition:Zb,reduce:Tm,reduceRight:Bm,reject:Dm,sample:Ym,sampleSize:r_,shuffle:o_,size:c_,some:p_,sortBy:y_};var Qx={now:gv};var eS={after:se,ary:Nt,before:Gi,bind:Yi,bindKey:ao,curry:dv,curryRight:hv,debounce:wv,defer:$v,delay:zv,flip:pp,memoize:fi,negate:_g,once:$g,overArgs:eb,partial:qb,partialRight:Gb,rearg:Rm,rest:Um,spread:L_,throttle:Ow,unary:Yw,wrap:Rx};var rS={castArray:es,clone:Pf,cloneDeep:Wf,cloneDeepWith:Bf,cloneWith:Lf,conformsTo:Xl,eq:Ut,gt:Up,gte:qp,isArguments:ln,isArray:$,isArrayBuffer:Lh,isArrayLike:Jt,isArrayLikeObject:Ev,isBoolean:Nh,isBuffer:mn,isDate:Hh,isElement:Vh,isEmpty:Yh,isEqual:Jh,isEqualWith:Qh,isError:zi,isFinite:ry,isFunction:pe,isInteger:ty,isLength:Yt,isMap:Hc,isMatch:ny,isMatchWith:ay,isNaN:uy,isNative:ly,isNil:vy,isNull:dy,isNumber:oy,isObject:Z,isObjectLike:T,isPlainObject:Ni,isRegExp:by,isSafeInteger:_y,isSet:Xc,isString:eh,isSymbol:B,isTypedArray:ra,isUndefined:wy,isWeakMap:Sy,isWeakSet:jy,lt:Hy,lte:Gy,toArray:jg,toFinite:ie,toInteger:oe,toLength:Fd,toNumber:te,toPlainObject:Pv,toSafeInteger:Bw,toString:gi};var tS={add:K,ceil:is,divide:rd,floor:yp,max:rg,maxBy:tg,mean:og,meanBy:ug,min:pg,minBy:hg,multiply:bg,round:Km,subtract:V_,sum:G_,sumBy:K_};var nS={clamp:ls,inRange:Jp,random:wm};var aS={assign:ha,assignIn:xa,assignInWith:Oa,assignWith:Ia,at:Ci,create:lv,defaults:Iv,defaultsDeep:Dv,entries:Sd,entriesIn:jd,extend:xa,extendWith:Oa,findKey:Xd,findLastKey:tp,forIn:Ap,forInRight:Ep,forOwn:kp,forOwnRight:Pp,functions:Wp,functionsIn:Tp,get:xi,has:Kp,hasIn:Bl,invert:xh,invertBy:Ah,invoke:Ch,keys:la,keysIn:_a,mapKeys:Ky,mapValues:Zy,merge:cg,mergeWith:Mv,omit:Bg,omitBy:Ng,pick:Jb,pickBy:Fg,result:zm,set:t_,setWith:n_,toPairs:Sd,toPairsIn:jd,transform:Lw,unset:_x,update:jx,updateWith:Ix,values:th,valuesIn:kx};var iS={at:Tx,chain:os,commit:Ff,lodash:vr,next:Ig,plant:Qb,reverse:Bx,tap:ew,thru:jw,toIterator:Pw,toJSON:Rw,value:Rw,valueOf:Rw,wrapperChain:Mx};var oS={camelCase:Qu,capitalize:zo,deburr:tu,endsWith:yd,escape:Cd,escapeRegExp:Td,kebabCase:Ry,lowerCase:Ny,lowerFirst:Uy,pad:Bb,padEnd:Db,padStart:Lb,parseInt:$b,repeat:Fm,replace:Nm,snakeCase:v_,split:M_,startCase:N_,startsWith:$_,template:xw,templateSettings:dw,toLower:Ww,toUpper:Dw,trim:Uw,trimEnd:qw,trimStart:Vw,truncate:Xw,unescape:nx,upperCase:Ex,upperFirst:Uo,words:Ku};var uS={attempt:Hi,bindAll:Qi,cond:Hl,conforms:Zl,constant:jr,defaultTo:xv,flow:Op,flowRight:Ip,identity:ce,iteratee:Ay,matches:Yy,matchesProperty:Qy,method:lg,methodOf:dg,mixin:yg,noop:Qe,nthArg:kg,over:Zg,overEvery:tb,overSome:ab,property:Ul,propertyOf:em,range:Am,rangeRight:km,stubArray:Es,stubFalse:vn,stubObject:U_,stubString:z_,stubTrue:q_,times:kw,toPath:Tw,uniqueId:mx};function lazyClone(){var e=new Je(this.__wrapped__);e.__actions__=sr(this.__actions__);e.__dir__=this.__dir__;e.__filtered__=this.__filtered__;e.__iteratees__=sr(this.__iteratees__);e.__takeCount__=this.__takeCount__;e.__views__=sr(this.__views__);return e}var sS=lazyClone;function lazyReverse(){if(this.__filtered__){var e=new Je(this);e.__dir__=-1;e.__filtered__=true}else{e=this.clone();e.__dir__*=-1}return e}var cS=lazyReverse;var fS=Math.max,lS=Math.min;function getView(e,r,t){var n=-1,a=t.length;while(++n0||r<0)){return new Je(t)}if(e<0){t=t.takeRight(-e)}else if(e){t=t.drop(e)}if(r!==undefined){r=oe(r);t=r<0?t.dropRight(-r):t.take(r-e)}return t};Je.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()};Je.prototype.toArray=function(){return this.take(wS)};rv(Je.prototype,function(e,r){var t=/^(?:filter|find|map|reject)|While$/.test(r),n=/^(?:head|last)$/.test(r),a=vr[n?"take"+(r=="last"?"Right":""):r],i=n||/^find/.test(r);if(!a){return}vr.prototype[r]=function(){var r=this.__wrapped__,o=n?[1]:arguments,u=r instanceof Je,s=o[0],c=u||$(r);var f=function(e){var r=a.apply(vr,Oi([e],o));return n&&l?r[0]:r};if(c&&t&&typeof s=="function"&&s.length!=1){u=c=false}var l=this.__chain__,v=!!this.__actions__.length,d=i&&!l,p=u&&!v;if(!i&&c){r=p?r:new Je(this);var h=e.apply(r,o);h.__actions__.push({func:jw,args:[f],thisArg:undefined});return new ur(h,l)}if(d&&p){return e.apply(this,o)}h=this.thru(f);return d?n?h.value()[0]:h.value():h}});Rr(["pop","push","shift","sort","splice","unshift"],function(e){var r=xS[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);vr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var a=this.value();return r.apply($(a)?a:[],e)}return this[t](function(t){return r.apply($(t)?t:[],e)})}});rv(Je.prototype,function(e,r){var t=vr[r];if(t){var n=t.name+"";if(!OS.call(nr,n)){nr[n]=[]}nr[n].push({name:r,func:t})}});nr[gt(undefined,bS).name]=[{name:"wrapper",func:undefined}];Je.prototype.clone=sS;Je.prototype.reverse=cS;Je.prototype.value=yS;vr.prototype.at=iS.at;vr.prototype.chain=iS.wrapperChain;vr.prototype.commit=iS.commit;vr.prototype.next=iS.next;vr.prototype.plant=iS.plant;vr.prototype.reverse=iS.reverse;vr.prototype.toJSON=vr.prototype.valueOf=vr.prototype.value=iS.value;vr.prototype.first=vr.prototype.head;if(jS){vr.prototype[jS]=iS.toIterator}var kS=vr;class image_tag_ImageTag{constructor(e){const{repository:r="gableroux",name:t="unity3d",version:n="2019.2.11f1",platform:a}=e;if(!image_tag_ImageTag.versionPattern.test(n)){throw new Error(`Invalid version "${n}".`)}if(!Kp(image_tag_ImageTag.targetPlatformToImageSuffixMap,a)){throw new Error(`Platform "${a}" is currently not supported.`)}const i=xi(image_tag_ImageTag.targetPlatformToImageSuffixMap,a,image_tag_ImageTag.imageSuffixes.generic);Object.assign(this,{repository:r,name:t,version:n,platform:a,builderPlatform:i})}static get versionPattern(){return/^20\d{2}\.\d\.\w{3,4}|3$/}static get imageSuffixes(){return{generic:"",webgl:"webgl",mac:"mac",windows:"windows",android:"android",ios:"ios",facebook:"facebook"}}static get targetPlatformToImageSuffixMap(){const{generic:e,webgl:r,mac:t,windows:n,android:a,ios:i,facebook:u}=image_tag_ImageTag.imageSuffixes;return{[o.types.StandaloneOSX]:t,[o.types.StandaloneWindows]:n,[o.types.StandaloneWindows64]:n,[o.types.StandaloneLinux64]:n,[o.types.iOS]:i,[o.types.Android]:a,[o.types.WebGL]:r,[o.types.WSAPlayer]:n,[o.types.PS4]:n,[o.types.XboxOne]:n,[o.types.tvOS]:n,[o.types.Switch]:n,[o.types.Lumin]:n,[o.types.BJM]:n,[o.types.Stadia]:n,[o.types.Facebook]:u,[o.types.NoTarget]:e,[o.types.Test]:e}}get tag(){return qw(`${this.version}-${this.builderPlatform}`,"-")}get image(){return Vw(`${this.repository}/${this.name}`,"/")}toString(){const{image:e,tag:r}=this;return`${e}:${r}`}}var PS=image_tag_ImageTag;class docker_Docker{static async build(e,r=false){const{path:t,dockerfile:n,baseImage:a}=e;const{version:i,platform:o}=a;const u=new PS({repository:"",name:"unity-builder",version:i,platform:o});const s=`docker build ${t} --file ${n} --build-arg IMAGE=${a} --tag ${u}`;await Object(p.exec)(s,null,{silent:r});return u}static async run(e,r,t=false){const{version:n,workspace:a,platform:i,projectPath:o,buildName:u,buildPath:s,buildFile:c,buildMethod:f,buildVersion:l,customParameters:v}=r;const d=`docker run --workdir /github/workspace --rm --env UNITY_LICENSE --env UNITY_LICENSE_FILE --env UNITY_EMAIL --env UNITY_PASSWORD --env UNITY_SERIAL --env UNITY_VERSION="${n}" --env PROJECT_PATH="${o}" --env BUILD_TARGET="${i}" --env BUILD_NAME="${u}" --env BUILD_PATH="${s}" --env BUILD_FILE="${c}" --env BUILD_METHOD="${f}" --env VERSION="${l}" --env CUSTOM_PARAMETERS="${v}" --env HOME=/github/home --env GITHUB_REF --env GITHUB_SHA --env GITHUB_REPOSITORY --env GITHUB_ACTOR --env GITHUB_WORKFLOW --env GITHUB_HEAD_REF --env GITHUB_BASE_REF --env GITHUB_EVENT_NAME --env GITHUB_WORKSPACE=/github/workspace --env GITHUB_ACTION --env GITHUB_EVENT_PATH --env RUNNER_OS --env RUNNER_TOOL_CACHE --env RUNNER_TEMP --env RUNNER_WORKSPACE --volume "/var/run/docker.sock":"/var/run/docker.sock" --volume "/home/runner/work/_temp/_github_home":"/github/home" --volume "/home/runner/work/_temp/_github_workflow":"/github/workflow" --volume "${a}":"/github/workspace" ${e}`;await Object(p.exec)(d,null,{silent:t})}}var CS=docker_Docker;class NotImplementedException extends Error{constructor(e){super(e);this.name="NotImplementedException"}}var RS=NotImplementedException;class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError"}}var WS=ValidationError;class system_System{static async run(e,r,t){let n="";let a="";let i="";const o={stdout:e=>{n+=e.toString()},stderr:e=>{a+=e.toString()},debug:e=>{i+=e.toString()}};const u=await Object(p.exec)(e,r,{silent:true,listeners:o,...t});if(i!==""){Object(f.debug)(i)}if(n!==""){Object(f.info)(n)}if(u!==0){throw new Error(a)}if(a!==""){Object(f.warning)(a)}return n}}var TS=system_System;class versioning_Versioning{static get strategies(){return{None:"None",Semantic:"Semantic",Tag:"Tag",Custom:"Custom"}}static get branch(){return this.headRef||this.ref&&this.ref.slice(11)}static get headRef(){return process.env.GITHUB_HEAD_REF}static get ref(){return process.env.GITHUB_REF}static get descriptionRegex(){return/^v([\d.]+)-(\d+)-g(\w+)-?(\w+)*/g}static async determineVersion(e,r){if(!Object.hasOwnProperty.call(this.strategies,e)){throw new WS(`Versioning strategy should be one of ${Object.values(this.strategies).join(", ")}.`)}let t;switch(e){case this.strategies.None:t="none";break;case this.strategies.Custom:t=r;break;case this.strategies.Semantic:t=await this.generateSemanticVersion();break;case this.strategies.Tag:t=await this.generateTagVersion();break;default:throw new RS(`Strategy ${e} is not implemented.`)}return t}static async generateSemanticVersion(){await this.fetch();if(await this.isDirty()){throw new Error("Branch is dirty. Refusing to base semantic version on uncommitted changes")}if(!await this.hasAnyVersionTags()){const e=`0.0.${await this.getTotalNumberOfCommits()}`;Object(f.info)(`Generated version ${e} (no version tags found).`);return e}const{tag:e,commits:r,hash:t}=await this.parseSemanticVersion();Object(f.info)(`Found semantic version ${e}.${r} for ${this.branch}@${t}`);return`${e}.${r}`}static async generateTagVersion(){let e=await this.getTag();if(e.charAt(0)==="v"){e=e.slice(1)}return e}static async parseSemanticVersion(){const e=await this.getVersionDescription();try{const[r,t,n,a]=this.descriptionRegex.exec(e);return{match:r,tag:t,commits:n,hash:a}}catch(r){throw new Error(`Failed to parse git describe output: "${e}".`)}}static async fetch(){try{await TS.run("git",["fetch","--unshallow"])}catch(e){Object(f.warning)(e);await TS.run("git",["fetch"])}}static async getVersionDescription(){return TS.run("git",["describe","--long","--tags","--always","--debug",`origin/${this.branch}`])}static async isDirty(){const e=await TS.run("git",["status","--porcelain"]);return e!==""}static async getTag(){return TS.run("git",["tag","--points-at","HEAD"])}static async hasAnyVersionTags(){const e=await TS.run("git",["tag","--list","--merged","HEAD","|","grep v[0-9]*","|","wc -l"]);return e!=="0"}static async getTotalNumberOfCommits(){const e=await TS.run("git",["rev-list","--count","HEAD"]);return parseInt(e,10)}}const MS=t(470);class input_Input{static async getFromUser(){const e=MS.getInput("unityVersion");const r=MS.getInput("targetPlatform")||o.default;const t=MS.getInput("projectPath")||".";const n=MS.getInput("buildName")||r;const a=MS.getInput("buildsPath")||"build";const i=MS.getInput("buildMethod");const u=MS.getInput("versioning")||"Semantic";const s=MS.getInput("version")||"";const c=MS.getInput("customParameters")||"";const f=t.replace(/\/$/,"");const l=await versioning_Versioning.determineVersion(u,s);return{version:e,targetPlatform:r,projectPath:f,buildName:n,buildsPath:a,buildMethod:i,buildVersion:l,customParameters:c}}}var BS=input_Input;const DS=t(470);async function src_action(){i.checkCompatibility();d.verify();const{dockerfile:e,workspace:r,actionFolder:t}=i;const n=u.create(await BS.getFromUser());const a=new PS(n);const o=await CS.build({path:t,dockerfile:e,baseImage:a});await CS.run(o,{workspace:r,...n})}src_action().catch(e=>{DS.setFailed(e.message)})},87:function(e){e.exports=require("os")},129:function(e){e.exports=require("child_process")},357:function(e){e.exports=require("assert")},431:function(e,r,t){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(Object.hasOwnProperty.call(e,t))r[t]=e[t];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const a=n(t(87));function issueCommand(e,r,t){const n=new Command(e,r,t);process.stdout.write(n.toString()+a.EOL)}r.issueCommand=issueCommand;function issue(e,r=""){issueCommand(e,{},r)}r.issue=issue;const i="::";class Command{constructor(e,r,t){if(!e){e="missing.command"}this.command=e;this.properties=r;this.message=t}toString(){let e=i+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=true;for(const t in this.properties){if(this.properties.hasOwnProperty(t)){const n=this.properties[t];if(n){if(r){r=false}else{e+=","}e+=`${t}=${escapeProperty(n)}`}}}}e+=`${i}${escapeData(this.message)}`;return e}}function escapeData(e){return(e||"").replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return(e||"").replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},470:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(Object.hasOwnProperty.call(e,t))r[t]=e[t];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const i=t(431);const o=a(t(87));const u=a(t(622));var s;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(s=r.ExitCode||(r.ExitCode={}));function exportVariable(e,r){process.env[e]=r;i.issueCommand("set-env",{name:e},r)}r.exportVariable=exportVariable;function setSecret(e){i.issueCommand("add-mask",{},e)}r.setSecret=setSecret;function addPath(e){i.issueCommand("add-path",{},e);process.env["PATH"]=`${e}${u.delimiter}${process.env["PATH"]}`}r.addPath=addPath;function getInput(e,r){const t=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(r&&r.required&&!t){throw new Error(`Input required and not supplied: ${e}`)}return t.trim()}r.getInput=getInput;function setOutput(e,r){i.issueCommand("set-output",{name:e},r)}r.setOutput=setOutput;function setFailed(e){process.exitCode=s.Failure;error(e)}r.setFailed=setFailed;function debug(e){i.issueCommand("debug",{},e)}r.debug=debug;function error(e){i.issue("error",e)}r.error=error;function warning(e){i.issue("warning",e)}r.warning=warning;function info(e){process.stdout.write(e+o.EOL)}r.info=info;function startGroup(e){i.issue("group",e)}r.startGroup=startGroup;function endGroup(){i.issue("endgroup")}r.endGroup=endGroup;function group(e,r){return n(this,void 0,void 0,function*(){startGroup(e);let t;try{t=yield r()}finally{endGroup()}return t})}r.group=group;function saveState(e,r){i.issueCommand("save-state",{name:e},r)}r.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}r.getState=getState},614:function(e){e.exports=require("events")},622:function(e){e.exports=require("path")},669:function(e){e.exports=require("util")},672:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};var a;Object.defineProperty(r,"__esModule",{value:true});const i=t(357);const o=t(747);const u=t(622);a=o.promises,r.chmod=a.chmod,r.copyFile=a.copyFile,r.lstat=a.lstat,r.mkdir=a.mkdir,r.readdir=a.readdir,r.readlink=a.readlink,r.rename=a.rename,r.rmdir=a.rmdir,r.stat=a.stat,r.symlink=a.symlink,r.unlink=a.unlink;r.IS_WINDOWS=process.platform==="win32";function exists(e){return n(this,void 0,void 0,function*(){try{yield r.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true})}r.exists=exists;function isDirectory(e,t=false){return n(this,void 0,void 0,function*(){const n=t?yield r.stat(e):yield r.lstat(e);return n.isDirectory()})}r.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(r.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}r.isRooted=isRooted;function mkdirP(e,t=1e3,a=1){return n(this,void 0,void 0,function*(){i.ok(e,"a path argument must be provided");e=u.resolve(e);if(a>=t)return r.mkdir(e);try{yield r.mkdir(e);return}catch(n){switch(n.code){case"ENOENT":{yield mkdirP(u.dirname(e),t,a+1);yield r.mkdir(e);return}default:{let t;try{t=yield r.stat(e)}catch(e){throw n}if(!t.isDirectory())throw n}}}})}r.mkdirP=mkdirP;function tryGetExecutablePath(e,t){return n(this,void 0,void 0,function*(){let n=undefined;try{n=yield r.stat(e)}catch(r){if(r.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${r}`)}}if(n&&n.isFile()){if(r.IS_WINDOWS){const r=u.extname(e).toUpperCase();if(t.some(e=>e.toUpperCase()===r)){return e}}else{if(isUnixExecutable(n)){return e}}}const a=e;for(const i of t){e=a+i;n=undefined;try{n=yield r.stat(e)}catch(r){if(r.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${r}`)}}if(n&&n.isFile()){if(r.IS_WINDOWS){try{const t=u.dirname(e);const n=u.basename(e).toUpperCase();for(const a of yield r.readdir(t)){if(n===a.toUpperCase()){e=u.join(t,a);break}}}catch(r){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${r}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""})}r.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(r.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()}},747:function(e){e.exports=require("fs")},986:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});const a=t(9);function exec(e,r,t){return n(this,void 0,void 0,function*(){const n=a.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const i=n[0];r=n.slice(1).concat(r||[]);const o=new a.ToolRunner(i,r,t);return o.exec()})}r.exec=exec}},function(e){"use strict";!function(){e.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}}();!function(){var r=Object.prototype.hasOwnProperty;e.d=function(e,t,n){if(!r.call(e,t)){Object.defineProperty(e,t,{enumerable:true,get:n})}}}();!function(){e.t=function(r,t){if(t&1)r=this(r);if(t&8)return r;if(t&4&&typeof r==="object"&&r&&r.__esModule)return r;var n=Object.create(null);e.r(n);Object.defineProperty(n,"default",{enumerable:true,value:r});if(t&2&&typeof r!="string")for(var a in r)e.d(n,a,function(e){return r[e]}.bind(null,a));return n}}();!function(){e.n=function(r){var t=r&&r.__esModule?function getDefault(){return r["default"]}:function getModuleExports(){return r};e.d(t,"a",t);return t}}();!function(){e.hmd=function(e){e=Object.create(e);if(!e.children)e.children=[];Object.defineProperty(e,"loaded",{enumerable:true,get:function(){return e.l}});Object.defineProperty(e,"id",{enumerable:true,get:function(){return e.i}});Object.defineProperty(e,"exports",{enumerable:true,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}});return e}}()}); \ No newline at end of file diff --git a/src/model/system.js b/src/model/system.js index bfb2e862..6444eb70 100644 --- a/src/model/system.js +++ b/src/model/system.js @@ -19,7 +19,7 @@ class System { }, }; - const exitCode = await exec(command, arguments_, { ...options, listeners }); + const exitCode = await exec(command, arguments_, { silent: true, listeners, ...options }); if (debug !== '') { core.debug(debug); diff --git a/src/model/system.test.js b/src/model/system.test.js new file mode 100644 index 00000000..9bb672a7 --- /dev/null +++ b/src/model/system.test.js @@ -0,0 +1,45 @@ +import * as core from '@actions/core'; +import System from './system'; + +const info = jest.spyOn(core, 'info').mockImplementation(() => {}); + +afterEach(() => { + jest.clearAllMocks(); +}); + +describe('System', () => { + describe('run', () => { + it('runs a command successfully', async () => { + await expect(System.run('true')).resolves.not.toBeNull(); + }); + + it('outputs results', async () => { + await expect(System.run('echo test')).resolves.toStrictEqual('test\n'); + }); + + it('throws on when error code is not 0', async () => { + await expect(System.run('false')).rejects.toThrowError(); + }); + + it('throws when no arguments are given', async () => { + await expect(System.run()).rejects.toThrowError(); + }); + + it('outputs info', async () => { + await expect(System.run('echo test')).resolves.not.toBeNull(); + expect(info).toHaveBeenLastCalledWith('test\n'); + }); + + it('outputs info only once', async () => { + await expect(System.run('echo 1')).resolves.not.toBeNull(); + expect(info).toHaveBeenCalledTimes(1); + expect(info).toHaveBeenLastCalledWith('1\n'); + + info.mockClear(); + await expect(System.run('echo 2')).resolves.not.toBeNull(); + await expect(System.run('echo 3')).resolves.not.toBeNull(); + expect(info).toHaveBeenCalledTimes(2); + expect(info).toHaveBeenLastCalledWith('3\n'); + }); + }); +});