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__(712)}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,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(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 i=t(129);const a=t(622);const o=t(669);const u=t(672);const s=o.promisify(i.exec);function cp(e,r,t={}){return n(this,void 0,void 0,function*(){const{force:n,recursive:i}=readCopyOptions(t);const o=(yield u.exists(r))?yield u.stat(r):null;if(o&&o.isFile()&&!n){return}const s=o&&o.isDirectory()?a.join(r,a.basename(e)):r;if(!(yield u.exists(e))){throw new Error(`no such file or directory: ${e}`)}const f=yield u.stat(e);if(f.isDirectory()){if(!i){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(a.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=a.join(r,a.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(a.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(a.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(a.delimiter)){if(e){t.push(e)}}}for(const n of t){const t=yield u.tryGetExecutablePath(n+a.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,i){return n(this,void 0,void 0,function*(){if(t>=255)return;t++;yield mkdirP(r);const n=yield u.readdir(e);for(const a of n){const n=`${e}/${a}`;const o=`${r}/${a}`;const s=yield u.lstat(n);if(s.isDirectory()){yield cpDirRecursive(n,o,t,i)}else{yield copyFile(n,o,i)}}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,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};var i=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=i(t(87));const o=i(t(614));const u=i(t(129));const s=i(t(622));const f=i(t(1));const c=i(t(672));const l=process.platform==="win32";class ToolRunner extends o.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 i=r?"":"[command]";if(l){if(this._isCmdFile()){i+=t;for(const e of n){i+=` ${e}`}}else if(e.windowsVerbatimArguments){i+=`"${t}"`;for(const e of n){i+=` ${e}`}}else{i+=this._windowsQuoteCmdArg(t);for(const e of n){i+=` ${this._windowsQuoteCmdArg(e)}`}}}else{i+=t;for(const e of n){i+=` ${e}`}}return i}_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(l){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(l){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 i=true;for(let r=e.length;r>0;r--){n+=e[r-1];if(i&&e[r-1]==="\\"){n+="\\"}else if(e[r-1]==='"'){i=true;n+='"'}else{i=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("/")||l&&this.toolPath.includes("\\"))){this.toolPath=s.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield f.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 o=u.spawn(i,this._getSpawnArgs(t),this._getSpawnOptions(this.options,i));const s="";if(o.stdout){o.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 f="";if(o.stderr){o.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,f,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}o.on("error",e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()});o.on("exit",e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()});o.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(f.length>0){this.emit("errline",f)}o.removeAllListeners();if(t){r(t)}else{e(n)}});if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}})})}}r.ToolRunner=ToolRunner;function argStringToArray(e){const r=[];let t=false;let n=false;let i="";function append(e){if(n&&e!=='"'){i+="\\"}i+=e;n=false}for(let a=0;a0){r.push(i);i=""}continue}append(o)}if(i.length>0){r.push(i.trim())}return r}r.argStringToArray=argStringToArray;class ExecState extends o.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()}}},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 i=n(t(87));function issueCommand(e,r,t){const n=new Command(e,r,t);process.stdout.write(n.toString()+i.EOL)}r.issueCommand=issueCommand;function issue(e,r=""){issueCommand(e,{},r)}r.issue=issue;const a="::";class Command{constructor(e,r,t){if(!e){e="missing.command"}this.command=e;this.properties=r;this.message=t}toString(){let e=a+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+=`${a}${escapeData(this.message)}`;return e}}function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}r.toCommandValue=toCommandValue;function escapeData(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return toCommandValue(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,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};var i=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=t(431);const o=i(t(87));const u=i(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){const t=a.toCommandValue(r);process.env[e]=t;a.issueCommand("set-env",{name:e},t)}r.exportVariable=exportVariable;function setSecret(e){a.issueCommand("add-mask",{},e)}r.setSecret=setSecret;function addPath(e){a.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){a.issueCommand("set-output",{name:e},r)}r.setOutput=setOutput;function setCommandEcho(e){a.issue("echo",e?"on":"off")}r.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=s.Failure;error(e)}r.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}r.isDebug=isDebug;function debug(e){a.issueCommand("debug",{},e)}r.debug=debug;function error(e){a.issue("error",e instanceof Error?e.toString():e)}r.error=error;function warning(e){a.issue("warning",e instanceof Error?e.toString():e)}r.warning=warning;function info(e){process.stdout.write(e+o.EOL)}r.info=info;function startGroup(e){a.issue("group",e)}r.startGroup=startGroup;function endGroup(){a.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){a.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,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};var i;Object.defineProperty(r,"__esModule",{value:true});const a=t(357);const o=t(747);const u=t(622);i=o.promises,r.chmod=i.chmod,r.copyFile=i.copyFile,r.lstat=i.lstat,r.mkdir=i.mkdir,r.readdir=i.readdir,r.readlink=i.readlink,r.rename=i.rename,r.rmdir=i.rmdir,r.stat=i.stat,r.symlink=i.symlink,r.unlink=i.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,i=1){return n(this,void 0,void 0,function*(){a.ok(e,"a path argument must be provided");e=u.resolve(e);if(i>=t)return r.mkdir(e);try{yield r.mkdir(e);return}catch(n){switch(n.code){case"ENOENT":{yield mkdirP(u.dirname(e),t,i+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 i=e;for(const a of t){e=i+a;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 i of yield r.readdir(t)){if(n===i.toUpperCase()){e=u.join(t,i);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()}},712:function(e,r,t){"use strict";t.r(r);var n=t(622);var i=t.n(n);class action_Action{static get supportedPlatforms(){return["linux"]}static get isRunningLocally(){return process.env.RUNNER_WORKSPACE===undefined}static get isRunningFromSource(){return i().basename(__dirname)==="model"}static get name(){return"unity-builder"}static get rootFolder(){if(action_Action.isRunningFromSource){return i().dirname(i().dirname(i().dirname(__filename)))}return i().dirname(i().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 a=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;const u=t(470);class input_Input{static get unityVersion(){return u.getInput("unityVersion")}static get targetPlatform(){return u.getInput("targetPlatform")||o.default}static get projectPath(){const e=u.getInput("projectPath")||".";return e.replace(/\/$/,"")}static get buildName(){return u.getInput("buildName")||this.targetPlatform}static get buildsPath(){return u.getInput("buildsPath")||"build"}static get buildMethod(){return u.getInput("buildMethod")}static get versioningStrategy(){return u.getInput("versioning")||"Semantic"}static get specifiedVersion(){return u.getInput("version")||""}static get allowDirtyBuild(){const e=u.getInput("allowDirtyBuild")||"false";return e==="true"?"true":"false"}static get customParameters(){return u.getInput("customParameters")||""}}var s=input_Input;var f=t(470);class NotImplementedException extends Error{constructor(e){super(e);this.name="NotImplementedException"}}var c=NotImplementedException;class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError"}}var l=ValidationError;var v=t(986);class system_System{static async run(e,r,t){let n="";let i="";let a="";const o={stdout:e=>{n+=e.toString()},stderr:e=>{i+=e.toString()},debug:e=>{a+=e.toString()}};const u=()=>{if(a!==""){Object(f.debug)(a)}if(n!==""){Object(f.info)(n)}if(i!==""){Object(f.warning)(i)}};const s=t=>{let n=e;if(Array.isArray(r)){n+=` ${r.join(" ")}`}else if(typeof r==="string"){n+=` ${r}`}throw new Error(`Failed to run "${n}".\n ${t}`)};try{const n=await Object(v.exec)(e,r,{silent:true,listeners:o,...t});u();if(n!==0){s(`Command returned non-zero exit code.\nError: ${i}`)}}catch(e){u();s(`In-command error caught: ${e}`)}return n}}var d=system_System;class versioning_Versioning{static get projectPath(){return s.projectPath}static get isDirtyAllowed(){return s.allowDirtyBuild==="true"}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 l(`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 c(`Strategy ${e} is not implemented.`)}return t}static async generateSemanticVersion(){await this.fetch();if(await this.isDirty()&&!this.isDirtyAllowed){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,i]=this.descriptionRegex.exec(e);return{match:r,tag:t,commits:n,hash:i}}catch(r){throw new Error(`Failed to parse git describe output: "${e}".`)}}static async fetch(){try{await this.git(["fetch","--unshallow"])}catch(e){Object(f.warning)(`Fetch --unshallow caught: ${e}`);await this.git(["fetch"])}}static async getVersionDescription(){return this.git(["describe","--long","--tags","--always","--debug",this.ref])}static async isDirty(){const e=await this.git(["status","--porcelain"]);return e!==""}static async getTag(){return this.git(["tag","--points-at","HEAD"])}static async hasAnyVersionTags(){const e=await d.run("sh",undefined,{input:Buffer.from("git tag --list --merged HEAD | grep v[0-9]* | wc -l"),silent:false});const r=Number.parseInt(e,10);return r!==0}static async getTotalNumberOfCommits(){const e=await this.git(["rev-list","--count",`origin/${this.branch}`]);return Number.parseInt(e,10)}static async git(e,r={}){return d.run("git",e,{cwd:this.projectPath,...r})}}class build_parameters_BuildParameters{static async create(){const e=this.parseBuildFile(s.buildName,s.targetPlatform);const r=await versioning_Versioning.determineVersion(s.versioningStrategy,s.specifiedVersion);return{version:s.unityVersion,platform:s.targetPlatform,projectPath:s.projectPath,buildName:s.buildName,buildPath:`${s.buildsPath}/${s.targetPlatform}`,buildFile:e,buildMethod:s.buildMethod,buildVersion:r,customParameters:s.customParameters}}static parseBuildFile(e,r){if(o.isWindows(r)){return`${e}.exe`}if(o.isAndroid(r)){return`${e}.apk`}return e}}var p=build_parameters_BuildParameters;var h=t(747);var g=t.n(h);class Unity{static get libraryFolder(){return"Library"}}var y=Unity;class project_Project{static get relativePath(){const{projectPath:e}=s;return`${e}`}static get absolutePath(){const{workspace:e}=a;return`${e}/${this.relativePath}`}static get libraryFolder(){return`${this.relativePath}/${y.libraryFolder}`}}var b=project_Project;class cache_Cache{static verify(){if(!g().existsSync(b.libraryFolder)){this.notifyAboutCachingPossibility()}}static notifyAboutCachingPossibility(){if(a.isRunningLocally){return}Object(f.warning)(`\n Library folder does not exist.\n Consider setting up caching to speed up your workflow,\n if this is not your first build.\n `)}}var m=cache_Cache;var _=typeof global=="object"&&global&&global.Object===Object&&global;var w=_;var S=typeof self=="object"&&self&&self.Object===Object&&self;var O=w||S||Function("return this")();var x=O;var E=x.Symbol;var j=E;var I=Object.prototype;var A=I.hasOwnProperty;var R=I.toString;var k=j?j.toStringTag:undefined;function getRawTag(e){var r=A.call(e,k),t=e[k];try{e[k]=undefined;var n=true}catch(e){}var i=R.call(e);if(n){if(r){e[k]=t}else{delete e[k]}}return i}var W=getRawTag;var C=Object.prototype;var P=C.toString;function objectToString(e){return P.call(e)}var T=objectToString;var M="[object Null]",B="[object Undefined]";var D=j?j.toStringTag:undefined;function baseGetTag(e){if(e==null){return e===undefined?B:M}return D&&D in Object(e)?W(e):T(e)}var $=baseGetTag;function isObjectLike(e){return e!=null&&typeof e=="object"}var L=isObjectLike;var N="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||L(e)&&$(e)==N}var F=isSymbol;var z=0/0;function baseToNumber(e){if(typeof e=="number"){return e}if(F(e)){return z}return+e}var U=baseToNumber;function arrayMap(e,r){var t=-1,n=e==null?0:e.length,i=Array(n);while(++t0){if(++r>=mr){return arguments[0]}}else{r=0}return e.apply(undefined,arguments)}}var Sr=shortOut;var Or=Sr(ze);var xr=Or;var Er=/\{\n\/\* \[wrapped with (.+)\] \*/,jr=/,? & /;function getWrapDetails(e){var r=e.match(Er);return r?r[1].split(jr):[]}var Ir=getWrapDetails;var Ar=/\{(?:\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(Ar,"{\n/* [wrapped with "+r+"] */\n")}var Rr=insertWrapDetails;function constant(e){return function(){return e}}var kr=constant;var Wr=function(){try{var e=Be(Object,"defineProperty");e({},"",{});return e}catch(e){}}();var Cr=Wr;var Pr=!Cr?pe:function(e,r){return Cr(e,"toString",{configurable:true,enumerable:false,value:kr(r),writable:true})};var Tr=Pr;var Mr=Sr(Tr);var Br=Mr;function arrayEach(e,r){var t=-1,n=e==null?0:e.length;while(++t-1}var zr=arrayIncludes;var Ur=1,qr=2,Gr=8,Hr=16,Kr=32,Zr=64,Xr=128,Yr=256,Jr=512;var Qr=[["ary",Xr],["bind",Ur],["bindKey",qr],["curry",Gr],["curryRight",Hr],["flip",Jr],["partial",Kr],["partialRight",Zr],["rearg",Yr]];function updateWrapDetails(e,r){Dr(Qr,function(t){var n="_."+t[0];if(r&t[1]&&!zr(e,n)){e.push(n)}});return e.sort()}var Vr=updateWrapDetails;function setWrapToString(e,r,t){var n=r+"";return Br(e,Rr(n,Vr(Ir(n),t)))}var et=setWrapToString;var rt=1,tt=2,nt=4,it=8,at=32,ot=64;function createRecurry(e,r,t,n,i,a,o,u,s,f){var c=r&it,l=c?o:undefined,v=c?undefined:o,d=c?a:undefined,p=c?undefined:a;r|=c?at:ot;r&=~(c?ot:at);if(!(r&nt)){r&=~(rt|tt)}var h=[e,r,i,d,l,p,v,u,s,f];var g=t.apply(undefined,h);if(br(e)){xr(g,h)}g.placeholder=n;return et(g,e,r)}var ut=createRecurry;function getHolder(e){var r=e;return r.placeholder}var st=getHolder;var ft=9007199254740991;var ct=/^(?:0|[1-9]\d*)$/;function isIndex(e,r){var t=typeof e;r=r==null?ft:r;return!!r&&(t=="number"||t!="symbol"&&ct.test(e))&&(e>-1&&e%1==0&&e1){y.reverse()}if(c&&s-1&&e%1==0&&e<=rn}var tn=isLength;function isArrayLike(e){return e!=null&&tn(e.length)&&!me(e)}var nn=isArrayLike;function isIterateeCall(e,r,t){if(!ee(t)){return false}var n=typeof r;if(n=="number"?nn(t)&<(r,t.length):n=="string"&&r in t){return Kt(t[r],e)}return false}var an=isIterateeCall;function createAssigner(e){return en(function(r,t){var n=-1,i=t.length,a=i>1?t[i-1]:undefined,o=i>2?t[2]:undefined;a=e.length>3&&typeof a=="function"?(i--,a):undefined;if(o&&an(t[0],t[1],o)){a=i<3?undefined:a;i=1}r=Object(r);while(++n-1}var ra=listCacheHas;function listCacheSet(e,r){var t=this.__data__,n=Yi(t,e);if(n<0){++this.size;t.push([e,r])}else{t[n][1]=r}return this}var ta=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,i)}else{Ra(i,u)}}else if(!n){i[i.length]=u}}return i}var Ca=baseFlatten;function flatten(e){var r=e==null?0:e.length;return r?Ca(e,1):[]}var Pa=flatten;function flatRest(e){return Br(Vt(e,undefined,Pa),e+"")}var Ta=flatRest;var Ma=Ta(Aa);var Ba=Ma;var Da=ci(Object.getPrototypeOf,Object);var $a=Da;var La="[object Object]";var Na=Function.prototype,Fa=Object.prototype;var za=Na.toString;var Ua=Fa.hasOwnProperty;var qa=za.call(Object);function isPlainObject(e){if(!L(e)||$(e)!=La){return false}var r=$a(e);if(r===null){return true}var t=Ua.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&za.call(t)==qa}var Ga=isPlainObject;var Ha="[object DOMException]",Ka="[object Error]";function isError(e){if(!L(e)){return false}var r=$(e);return r==Ka||r==Ha||typeof e.message=="string"&&typeof e.name=="string"&&!Ga(e)}var Za=isError;var Xa=en(function(e,r){try{return Xe(e,undefined,r)}catch(e){return Za(e)?e:new Error(e)}});var Ya=Xa;var Ja="Expected a function";function before(e,r){var t;if(typeof r!="function"){throw new TypeError(Ja)}e=le(e);return function(){if(--e>0){t=r.apply(this,arguments)}if(e<=1){r=undefined}return t}}var Qa=before;var Va=1,eo=32;var ro=en(function(e,r,t){var n=Va;if(t.length){var i=ht(t,st(ro));n|=eo}return Ut(e,n,r,t,i)});ro.placeholder={};var to=ro;var no=Ta(function(e,r){Dr(r,function(r){r=Ea(r);Ht(e,r,to(e[r],e))});return e});var io=no;var ao=1,oo=2,uo=32;var so=en(function(e,r,t){var n=ao|oo;if(t.length){var i=ht(t,st(so));n|=uo}return Ut(r,n,e,t,i)});so.placeholder={};var fo=so;function baseSlice(e,r,t){var n=-1,i=e.length;if(r<0){r=-r>i?0:i+r}t=t>i?i:t;if(t<0){t+=i}i=r>t?0:t-r>>>0;r>>>=0;var a=Array(i);while(++n=n?e:co(e,r,t)}var lo=castSlice;var vo="\\ud800-\\udfff",po="\\u0300-\\u036f",ho="\\ufe20-\\ufe2f",go="\\u20d0-\\u20ff",yo=po+ho+go,bo="\\ufe0e\\ufe0f";var mo="\\u200d";var _o=RegExp("["+mo+vo+yo+bo+"]");function hasUnicode(e){return _o.test(e)}var wo=hasUnicode;function asciiToArray(e){return e.split("")}var So=asciiToArray;var Oo="\\ud800-\\udfff",xo="\\u0300-\\u036f",Eo="\\ufe20-\\ufe2f",jo="\\u20d0-\\u20ff",Io=xo+Eo+jo,Ao="\\ufe0e\\ufe0f";var Ro="["+Oo+"]",ko="["+Io+"]",Wo="\\ud83c[\\udffb-\\udfff]",Co="(?:"+ko+"|"+Wo+")",Po="[^"+Oo+"]",To="(?:\\ud83c[\\udde6-\\uddff]){2}",Mo="[\\ud800-\\udbff][\\udc00-\\udfff]",Bo="\\u200d";var Do=Co+"?",$o="["+Ao+"]?",Lo="(?:"+Bo+"(?:"+[Po,To,Mo].join("|")+")"+$o+Do+")*",No=$o+Do+Lo,Fo="(?:"+[Po+ko+"?",ko,To,Mo,Ro].join("|")+")";var zo=RegExp(Wo+"(?="+Wo+")|"+Fo+No,"g");function unicodeToArray(e){return e.match(zo)||[]}var Uo=unicodeToArray;function stringToArray(e){return wo(e)?Uo(e):So(e)}var qo=stringToArray;function createCaseFirst(e){return function(r){r=Sa(r);var t=wo(r)?qo(r):undefined;var n=t?t[0]:r.charAt(0);var i=t?lo(t,1).join(""):r.slice(1);return n[e]()+i}}var Go=createCaseFirst;var Ho=Go("toUpperCase");var Ko=Ho;function capitalize(e){return Ko(Sa(e).toLowerCase())}var Zo=capitalize;function arrayReduce(e,r,t,n){var i=-1,a=e==null?0:e.length;if(n&&a){t=e[++i]}while(++i=r?e:r}}return e}var hs=baseClamp;function clamp(e,r,t){if(t===undefined){t=r;r=undefined}if(t!==undefined){t=ue(t);t=t===t?t:0}if(r!==undefined){r=ue(r);r=r===r?r:0}return hs(ue(e),r,t)}var gs=clamp;function stackClear(){this.__data__=new na;this.size=0}var ys=stackClear;function stackDelete(e){var r=this.__data__,t=r["delete"](e);this.size=r.size;return t}var bs=stackDelete;function stackGet(e){return this.__data__.get(e)}var ms=stackGet;function stackHas(e){return this.__data__.has(e)}var _s=stackHas;var ws=200;function stackSet(e,r){var t=this.__data__;if(t instanceof na){var n=t.__data__;if(!aa||n.lengthu)){return false}var f=a.get(e);if(f&&a.get(r)){return f==r}var c=-1,l=true,v=t&el?new Yc:undefined;a.set(e,r);a.set(r,e);while(++c=r||t<0||l&&n>=a}function timerExpired(){var e=Sv();if(shouldInvoke(e)){return trailingEdge(e)}u=setTimeout(timerExpired,remainingWait(e))}function trailingEdge(e){u=undefined;if(v&&n){return invokeFunc(e)}n=i=undefined;return o}function cancel(){if(u!==undefined){clearTimeout(u)}f=0;n=s=i=u=undefined}function flush(){return u===undefined?o:trailingEdge(Sv())}function debounced(){var e=Sv(),t=shouldInvoke(e);n=arguments;i=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 jv=debounce;function defaultTo(e,r){return e==null||e!==e?r:e}var Iv=defaultTo;var Av=Object.prototype;var Rv=Av.hasOwnProperty;var kv=en(function(e,r){e=Object(e);var t=-1;var n=r.length;var i=n>2?r[2]:undefined;if(i&&an(r[0],r[1],i)){n=1}while(++t=Yv){a=Qc;o=false;r=new Yc(r)}e:while(++i=0&&e.slice(t,i)==r}var wd=endsWith;function baseToPairs(e,r){return q(r,function(r){return[r,e[r]]})}var Sd=baseToPairs;function setToPairs(e){var r=-1,t=Array(e.size);e.forEach(function(e){t[++r]=[e,e]});return t}var Od=setToPairs;var xd="[object Map]",Ed="[object Set]";function createToPairs(e){return function(r){var t=vf(r);if(t==xd){return tl(r)}if(t==Ed){return Od(r)}return Sd(r,e(r))}}var jd=createToPairs;var Id=jd(gi);var Ad=Id;var Rd=jd(Ei);var kd=Rd;var Wd={"&":"&","<":"<",">":">",'"':""","'":"'"};var Cd=Yo(Wd);var Pd=Cd;var Td=/[&<>"']/g,Md=RegExp(Td.source);function escape_escape(e){e=Sa(e);return e&&Md.test(e)?e.replace(Td,Pd):e}var Bd=escape_escape;var Dd=/[\\^$.*+?()[\]{}|]/g,$d=RegExp(Dd.source);function escapeRegExp(e){e=Sa(e);return e&&$d.test(e)?e.replace(Dd,"\\$&"):e}var Ld=escapeRegExp;function arrayEvery(e,r){var t=-1,n=e==null?0:e.length;while(++ti?0:i+t}n=n===undefined||n>i?i:le(n);if(n<0){n+=i}n=t>n?0:qd(n);while(t-1?i[a?r[o]:o]:undefined}}var Xd=createFind;var Yd=Math.max;function findIndex(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var i=t==null?0:le(t);if(i<0){i=Yd(n+i,0)}return $r(e,Zl(r,3),i)}var Jd=findIndex;var Qd=Xd(Jd);var Vd=Qd;function baseFindKey(e,r,t){var n;t(e,function(e,t,i){if(r(e,t,i)){n=t;return false}});return n}var ep=baseFindKey;function findKey(e,r){return ep(e,Zl(r,3),ov)}var rp=findKey;var tp=Math.max,np=Math.min;function findLastIndex(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var i=n-1;if(t!==undefined){i=le(t);i=t<0?tp(n+i,0):np(i,n-1)}return $r(e,Zl(r,3),i,true)}var ip=findLastIndex;var ap=Xd(ip);var op=ap;function findLastKey(e,r){return ep(e,Zl(r,3),yd)}var up=findLastKey;function head(e){return e&&e.length?e[0]:undefined}var sp=head;function baseMap(e,r){var t=-1,n=nn(e)?Array(e.length):[];fv(e,function(e,i,a){n[++t]=r(e,i,a)});return n}var fp=baseMap;function map_map(e,r){var t=H(e)?q:fp;return t(e,Zl(r,3))}var cp=map_map;function flatMap(e,r){return Ca(cp(e,r),1)}var lp=flatMap;var vp=1/0;function flatMapDeep(e,r){return Ca(cp(e,r),vp)}var dp=flatMapDeep;function flatMapDepth(e,r,t){t=t===undefined?1:le(t);return Ca(cp(e,r),t)}var pp=flatMapDepth;var hp=1/0;function flattenDeep(e){var r=e==null?0:e.length;return r?Ca(e,hp):[]}var gp=flattenDeep;function flattenDepth(e,r){var t=e==null?0:e.length;if(!t){return[]}r=r===undefined?1:le(r);return Ca(e,r)}var yp=flattenDepth;var bp=512;function flip(e){return Ut(e,bp)}var mp=flip;var _p=ss("floor");var wp=_p;var Sp="Expected a function";var Op=8,xp=32,Ep=128,jp=256;function createFlow(e){return Ta(function(r){var t=r.length,n=t,i=vr.prototype.thru;if(e){r.reverse()}while(n--){var a=r[n];if(typeof a!="function"){throw new TypeError(Sp)}if(i&&!o&&lr(a)=="wrapper"){var o=new vr([],true)}}n=o?n:t;while(++nr}var qp=baseGt;function createRelationalOperation(e){return function(r,t){if(!(typeof r=="string"&&typeof t=="string")){r=ue(r);t=ue(t)}return e(r,t)}}var Gp=createRelationalOperation;var Hp=Gp(qp);var Kp=Hp;var Zp=Gp(function(e,r){return e>=r});var Xp=Zp;var Yp=Object.prototype;var Jp=Yp.hasOwnProperty;function baseHas(e,r){return e!=null&&Jp.call(e,r)}var Qp=baseHas;function has(e,r){return e!=null&&Nl(e,r,Qp)}var Vp=has;var eh=Math.max,rh=Math.min;function baseInRange(e,r,t){return e>=rh(r,t)&&e-1:!!i&&Fr(e,r,t)>-1}var fh=includes_includes;var ch=Math.max;function indexOf_indexOf(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var i=t==null?0:le(t);if(i<0){i=ch(n+i,0)}return Fr(e,r,i)}var lh=indexOf_indexOf;function initial(e){var r=e==null?0:e.length;return r?co(e,0,-1):[]}var vh=initial;var dh=Math.min;function baseIntersection(e,r,t){var n=t?Xv:zr,i=e[0].length,a=e.length,o=a,u=Array(a),s=Infinity,f=[];while(o--){var c=e[o];if(o&&r){c=q(c,Jn(r))}s=dh(c.length,s);u[o]=!t&&(r||i>=120&&c.length>=120)?new Yc(o&&c):undefined}c=e[0];var l=-1,v=u[0];e:while(++l=-xg&&e<=xg}var Eg=isSafeInteger;function isUndefined(e){return e===undefined}var jg=isUndefined;var Ig="[object WeakMap]";function isWeakMap(e){return L(e)&&vf(e)==Ig}var Ag=isWeakMap;var Rg="[object WeakSet]";function isWeakSet(e){return L(e)&&$(e)==Rg}var kg=isWeakSet;var Wg=1;function iteratee_iteratee(e){return Zl(typeof e=="function"?e:Pc(e,Wg))}var Cg=iteratee_iteratee;var Pg=Array.prototype;var Tg=Pg.join;function join(e,r){return e==null?"":Tg.call(e,r)}var Mg=join;var Bg=ts(function(e,r,t){return e+(t?"-":"")+r.toLowerCase()});var Dg=Bg;var $g=lv(function(e,r,t){Ht(e,t,r)});var Lg=$g;function strictLastIndexOf(e,r,t){var n=t+1;while(n--){if(e[n]===r){return n}}return n}var Ng=strictLastIndexOf;var Fg=Math.max,zg=Math.min;function lastIndexOf(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var i=n;if(t!==undefined){i=le(t);i=i<0?Fg(n+i,0):zg(i,n-1)}return r===r?Ng(e,r,i):$r(e,Lr,i,true)}var Ug=lastIndexOf;var qg=ts(function(e,r,t){return e+(t?" ":"")+r.toLowerCase()});var Gg=qg;var Hg=Go("toLowerCase");var Kg=Hg;function baseLt(e,r){return e=this.__values__.length,r=e?undefined:this.__values__[this.__index__++];return{done:e,value:r}}var Wy=wrapperNext;function baseNth(e,r){var t=e.length;if(!t){return}r+=r<0?t:0;return lt(r,t)?e[r]:undefined}var Cy=baseNth;function nth(e,r){return e&&e.length?Cy(e,le(r)):undefined}var Py=nth;function nthArg(e){e=le(e);return en(function(r){return Cy(r,e)})}var Ty=nthArg;function baseUnset(e,r){r=Oa(r,e);e=Ph(e,r);return e==null||delete e[Ea(ed(r))]}var My=baseUnset;function customOmitClone(e){return Ga(e)?undefined:e}var By=customOmitClone;var Dy=1,$y=2,Ly=4;var Ny=Ta(function(e,r){var t={};if(e==null){return t}var n=false;r=q(r,function(r){r=Oa(r,e);n||(n=r.length>1);return r});Jt(e,Hs(e),t);if(n){t=Pc(t,Dy|$y|Ly,By)}var i=r.length;while(i--){My(t,r[i])}return t});var Fy=Ny;function baseSet(e,r,t,n){if(!ee(e)){return e}r=Oa(r,e);var i=-1,a=r.length,o=a-1,u=e;while(u!=null&&++ir||a&&o&&s&&!u&&!f||n&&o&&s||!t&&s||!i){return 1}if(!n&&!a&&!f&&e=u){return s}var f=t[n];return s*(f=="desc"?-1:1)}}return e.index-r.index}var Xy=compareMultiple;function baseOrderBy(e,r,t){var n=-1;r=q(r.length?r:[pe],Jn(Zl));var i=fp(e,function(e,t,i){var a=q(r,function(r){return r(e)});return{criteria:a,index:++n,value:e}});return Ky(i,function(e,r){return Xy(e,r,t)})}var Yy=baseOrderBy;function orderBy(e,r,t,n){if(e==null){return[]}if(!H(r)){r=r==null?[]:[r]}t=n?undefined:t;if(!H(t)){t=t==null?[]:[t]}return Yy(e,r,t)}var Jy=orderBy;function createOver(e){return Ta(function(r){r=q(r,Jn(Zl));return en(function(t){var n=this;return e(r,function(e){return Xe(e,n,t)})})})}var Qy=createOver;var Vy=Qy(q);var eb=Vy;var rb=en;var tb=rb;var nb=Math.min;var ib=tb(function(e,r){r=r.length==1&&H(r[0])?q(r[0],Jn(Zl)):q(Ca(r,1),Jn(Zl));var t=r.length;return en(function(n){var i=-1,a=nb(n.length,t);while(++icb){return t}do{if(r%2){t+=e}r=lb(r/2);if(r){e+=e}}while(r);return t}var vb=baseRepeat;var db=Gl("length");var pb=db;var hb="\\ud800-\\udfff",gb="\\u0300-\\u036f",yb="\\ufe20-\\ufe2f",bb="\\u20d0-\\u20ff",mb=gb+yb+bb,_b="\\ufe0e\\ufe0f";var wb="["+hb+"]",Sb="["+mb+"]",Ob="\\ud83c[\\udffb-\\udfff]",xb="(?:"+Sb+"|"+Ob+")",Eb="[^"+hb+"]",jb="(?:\\ud83c[\\udde6-\\uddff]){2}",Ib="[\\ud800-\\udbff][\\udc00-\\udfff]",Ab="\\u200d";var Rb=xb+"?",kb="["+_b+"]?",Wb="(?:"+Ab+"(?:"+[Eb,jb,Ib].join("|")+")"+kb+Rb+")*",Cb=kb+Rb+Wb,Pb="(?:"+[Eb+Sb+"?",Sb,jb,Ib,wb].join("|")+")";var Tb=RegExp(Ob+"(?="+Ob+")|"+Pb+Cb,"g");function unicodeSize(e){var r=Tb.lastIndex=0;while(Tb.test(e)){++r}return r}var Mb=unicodeSize;function stringSize(e){return wo(e)?Mb(e):pb(e)}var Bb=stringSize;var Db=Math.ceil;function createPadding(e,r){r=r===undefined?" ":Y(r);var t=r.length;if(t<2){return t?vb(r,e):r}var n=vb(r,Db(e/Bb(r)));return wo(r)?lo(qo(n),0,e).join(""):n.slice(0,e)}var $b=createPadding;var Lb=Math.ceil,Nb=Math.floor;function pad(e,r,t){e=Sa(e);r=le(r);var n=r?Bb(e):0;if(!r||n>=r){return e}var i=(r-n)/2;return $b(Nb(i),t)+e+$b(Lb(i),t)}var Fb=pad;function padEnd(e,r,t){e=Sa(e);r=le(r);var n=r?Bb(e):0;return r&&n-1){if(u!==e){sm.call(u,s,1)}sm.call(e,s,1)}}return e}var fm=basePullAll;function pullAll(e,r){return e&&e.length&&r&&r.length?fm(e,r):e}var cm=pullAll;var lm=en(cm);var vm=lm;function pullAllBy(e,r,t){return e&&e.length&&r&&r.length?fm(e,r,Zl(t,2)):e}var dm=pullAllBy;function pullAllWith(e,r,t){return e&&e.length&&r&&r.length?fm(e,r,undefined,t):e}var pm=pullAllWith;var hm=Array.prototype;var gm=hm.splice;function basePullAt(e,r){var t=e?r.length:0,n=t-1;while(t--){var i=r[t];if(t==n||i!==a){var a=i;if(lt(i)){gm.call(e,i,1)}else{My(e,i)}}}return e}var ym=basePullAt;var bm=Ta(function(e,r){var t=e==null?0:e.length,n=Aa(e,r);ym(e,q(r,function(e){return lt(e,t)?+e:e}).sort(Zy));return n});var mm=bm;var _m=Math.floor,wm=Math.random;function baseRandom(e,r){return e+_m(wm()*(r-e+1))}var Sm=baseRandom;var Om=parseFloat;var xm=Math.min,Em=Math.random;function random(e,r,t){if(t&&typeof t!="boolean"&&an(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=ce(e);if(r===undefined){r=e;e=0}else{r=ce(r)}}if(e>r){var n=e;e=r;r=n}if(t||e%1||r%1){var i=Em();return xm(e+i*(r-e+Om("1e-"+((i+"").length-1))),r)}return Sm(e,r)}var jm=random;var Im=Math.ceil,Am=Math.max;function baseRange(e,r,t,n){var i=-1,a=Am(Im((r-e)/(t||1)),0),o=Array(a);while(a--){o[n?a:++i]=e;e+=t}return o}var Rm=baseRange;function createRange(e){return function(r,t,n){if(n&&typeof n!="number"&&an(r,t,n)){t=n=undefined}r=ce(r);if(t===undefined){t=r;r=0}else{t=ce(t)}n=n===undefined?r1&&an(e,r[0],r[1])){r=[]}else if(t>2&&an(r[0],r[1],r[2])){r=[r[0]]}return Yy(e,Ca(r,1),[])});var w_=__;var S_=4294967295,O_=S_-1;var x_=Math.floor,E_=Math.min;function baseSortedIndexBy(e,r,t,n){r=t(r);var i=0,a=e==null?0:e.length,o=r!==r,u=r===null,s=F(r),f=r===undefined;while(i>>1;function baseSortedIndex(e,r,t){var n=0,i=e==null?n:e.length;if(typeof r=="number"&&r===r&&i<=A_){while(n>>1,o=e[a];if(o!==null&&!F(o)&&(t?o<=r:o>>0;if(!t){return[]}e=Sa(e);if(e&&(typeof r=="string"||r!=null&&!Og(r))){r=Y(r);if(!r&&wo(e)){return lo(qo(e),0,t)}}return e.split(r,t)}var N_=split;var F_="Expected a function";var z_=Math.max;function spread(e,r){if(typeof e!="function"){throw new TypeError(F_)}r=r==null?0:z_(le(r),0);return en(function(t){var n=t[r],i=lo(t,0,r);if(n){Ra(i,n)}return Xe(e,this,i)})}var U_=spread;var q_=ts(function(e,r,t){return e+(t?" ":"")+Ko(r)});var G_=q_;function startsWith(e,r,t){e=Sa(e);t=t==null?0:hs(le(t),0,e.length);r=Y(r);return e.slice(t,t+r.length)==r}var H_=startsWith;function stubObject(){return{}}var K_=stubObject;function stubString(){return""}var Z_=stubString;function stubTrue(){return true}var X_=stubTrue;var Y_=J(function(e,r){return e-r},0);var J_=Y_;function sum(e){return e&&e.length?sy(e,pe):0}var Q_=sum;function sumBy(e,r){return e&&e.length?sy(e,Zl(r,2)):0}var V_=sumBy;function tail(e){var r=e==null?0:e.length;return r?co(e,1,r):[]}var ew=tail;function take(e,r,t){if(!(e&&e.length)){return[]}r=t||r===undefined?1:le(r);return co(e,0,r<0?0:r)}var rw=take;function takeRight(e,r,t){var n=e==null?0:e.length;if(!n){return[]}r=t||r===undefined?1:le(r);r=n-r;return co(e,r<0?0:r,n)}var tw=takeRight;function takeRightWhile(e,r){return e&&e.length?fd(e,Zl(r,3),false,true):[]}var nw=takeRightWhile;function takeWhile(e,r){return e&&e.length?fd(e,Zl(r,3)):[]}var iw=takeWhile;function tap(e,r){r(e);return e}var aw=tap;var ow=Object.prototype;var uw=ow.hasOwnProperty;function customDefaultsAssignIn(e,r,t,n){if(e===undefined||Kt(e,ow[t])&&!uw.call(n,t)){return r}return e}var sw=customDefaultsAssignIn;var fw={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function escapeStringChar(e){return"\\"+fw[e]}var cw=escapeStringChar;var lw=/<%=([\s\S]+?)%>/g;var vw=lw;var dw=/<%-([\s\S]+?)%>/g;var pw=dw;var hw=/<%([\s\S]+?)%>/g;var gw=hw;var yw={escape:pw,evaluate:gw,interpolate:vw,variable:"",imports:{_:{escape:Bd}}};var bw=yw;var mw=/\b__p \+= '';/g,_w=/\b(__p \+=) '' \+/g,ww=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var Sw=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var Ow=/($^)/;var xw=/['\n\r\u2028\u2029\\]/g;var Ew=Object.prototype;var jw=Ew.hasOwnProperty;function template(e,r,t){var n=bw.imports._.templateSettings||bw;if(t&&an(e,r,t)){r=undefined}e=Sa(e);r=Ri({},r,n,sw);var i=Ri({},r.imports,n.imports,sw),a=gi(i),o=oh(i,a);var u,s,f=0,c=r.interpolate||Ow,l="__p += '";var v=RegExp((r.escape||Ow).source+"|"+c.source+"|"+(c===vw?Sw:Ow).source+"|"+(r.evaluate||Ow).source+"|$","g");var d=jw.call(r,"sourceURL")?"//# sourceURL="+(r.sourceURL+"").replace(/[\r\n]/g," ")+"\n":"";e.replace(v,function(r,t,n,i,a,o){n||(n=i);l+=e.slice(f,o).replace(xw,cw);if(t){u=true;l+="' +\n__e("+t+") +\n'"}if(a){s=true;l+="';\n"+a+";\n__p += '"}if(n){l+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"}f=o+r.length;return r});l+="';\n";var p=jw.call(r,"variable")&&r.variable;if(!p){l="with (obj) {\n"+l+"\n}\n"}l=(s?l.replace(mw,""):l).replace(_w,"$1").replace(ww,"$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=Ya(function(){return Function(a,d+"return "+l).apply(undefined,o)});h.source=l;if(Za(h)){throw h}return h}var Iw=template;var Aw="Expected a function";function throttle(e,r,t){var n=true,i=true;if(typeof e!="function"){throw new TypeError(Aw)}if(ee(t)){n="leading"in t?!!t.leading:n;i="trailing"in t?!!t.trailing:i}return jv(e,r,{leading:n,maxWait:r,trailing:i})}var Rw=throttle;function thru(e,r){return r(e)}var kw=thru;var Ww=9007199254740991;var Cw=4294967295;var Pw=Math.min;function times(e,r){e=le(e);if(e<1||e>Ww){return[]}var t=Cw,n=Pw(e,Cw);r=vd(r);e-=Cw;var i=fn(n,r);while(++t-1){}return t}var qw=charsEndIndex;function charsStartIndex(e,r){var t=-1,n=e.length;while(++t-1){}return t}var Gw=charsStartIndex;var Hw=/^\s+|\s+$/g;function trim(e,r,t){e=Sa(e);if(e&&(t||r===undefined)){return e.replace(Hw,"")}if(!e||!(r=Y(r))){return e}var n=qo(e),i=qo(r),a=Gw(n,i),o=qw(n,i)+1;return lo(n,a,o).join("")}var Kw=trim;var Zw=/\s+$/;function trimEnd(e,r,t){e=Sa(e);if(e&&(t||r===undefined)){return e.replace(Zw,"")}if(!e||!(r=Y(r))){return e}var n=qo(e),i=qw(n,qo(r))+1;return lo(n,0,i).join("")}var Xw=trimEnd;var Yw=/^\s+/;function trimStart(e,r,t){e=Sa(e);if(e&&(t||r===undefined)){return e.replace(Yw,"")}if(!e||!(r=Y(r))){return e}var n=qo(e),i=Gw(n,qo(r));return lo(n,i).join("")}var Jw=trimStart;var Qw=30,Vw="...";var eS=/\w*$/;function truncate(e,r){var t=Qw,n=Vw;if(ee(r)){var i="separator"in r?r.separator:i;t="length"in r?le(r.length):t;n="omission"in r?Y(r.omission):n}e=Sa(e);var a=e.length;if(wo(e)){var o=qo(e);a=o.length}if(t>=a){return e}var u=t-Bb(n);if(u<1){return n}var s=o?lo(o,0,u).join(""):e.slice(0,u);if(i===undefined){return s+n}if(o){u+=s.length-u}if(Og(i)){if(e.slice(u).search(i)){var f,c=s;if(!i.global){i=RegExp(i.source,Sa(eS.exec(i))+"g")}i.lastIndex=0;while(f=i.exec(c)){var l=f.index}s=s.slice(0,l===undefined?u:l)}}else if(e.indexOf(Y(i),u)!=u){var v=s.lastIndexOf(i);if(v>-1){s=s.slice(0,v)}}return s+n}var rS=truncate;function unary(e){return Gt(e,1)}var tS=unary;var nS={"&":"&","<":"<",">":">",""":'"',"'":"'"};var iS=Yo(nS);var aS=iS;var oS=/&(?:amp|lt|gt|quot|#39);/g,uS=RegExp(oS.source);function unescape_unescape(e){e=Sa(e);return e&&uS.test(e)?e.replace(oS,aS):e}var sS=unescape_unescape;var fS=1/0;var cS=!(Qs&&1/nl(new Qs([,-0]))[1]==fS)?ir:function(e){return new Qs(e)};var lS=cS;var vS=200;function baseUniq(e,r,t){var n=-1,i=zr,a=e.length,o=true,u=[],s=u;if(t){o=false;i=Xv}else if(a>=vS){var f=r?null:lS(e);if(f){return nl(f)}o=false;i=Qc;s=new Yc}else{s=r?[]:u}e:while(++n1||this.__actions__.length||!(n instanceof nr)||!lt(t)){return this.thru(i)}n=n.slice(t,+t+(r?1:0));n.__actions__.push({func:kw,args:[i],thisArg:undefined});return new vr(n,this.__chain__).thru(function(e){if(r&&!e.length){e.push(undefined)}return e})});var LS=$S;function wrapperChain(){return ls(this)}var NS=wrapperChain;function wrapperReverse(){var e=this.__wrapped__;if(e instanceof nr){var r=e;if(this.__actions__.length){r=new nr(this)}r=r.reverse();r.__actions__.push({func:kw,args:[Jm],thisArg:undefined});return new vr(r,this.__chain__)}return this.thru(Jm)}var FS=wrapperReverse;function baseXor(e,r,t){var n=e.length;if(n<2){return n?dS(e[0]):[]}var i=-1,a=Array(n);while(++i1?e[r-1]:undefined;t=typeof t=="function"?(e.pop(),t):undefined;return AS(e,t)});var rO=eO;var tO={chunk:ps,compact:Gc,concat:Hc,difference:Vv,differenceBy:td,differenceWith:id,drop:ud,dropRight:sd,dropRightWhile:cd,dropWhile:ld,fill:Hd,findIndex:Jd,findLastIndex:ip,first:sp,flatten:Pa,flattenDeep:gp,flattenDepth:yp,fromPairs:Bp,head:sp,indexOf:lh,initial:vh,intersection:yh,intersectionBy:mh,intersectionWith:wh,join:Mg,last:ed,lastIndexOf:Ug,nth:Py,pull:vm,pullAll:cm,pullAllBy:dm,pullAllWith:pm,pullAt:mm,remove:Um,reverse:Jm,slice:h_,sortedIndex:k_,sortedIndexBy:W_,sortedIndexOf:C_,sortedLastIndex:P_,sortedLastIndexBy:T_,sortedLastIndexOf:M_,sortedUniq:D_,sortedUniqBy:$_,tail:ew,take:rw,takeRight:tw,takeRightWhile:nw,takeWhile:iw,union:hS,unionBy:yS,unionWith:mS,uniq:_S,uniqBy:wS,uniqWith:SS,unzip:IS,unzipWith:AS,without:BS,xor:qS,xorBy:HS,xorWith:ZS,zip:YS,zipObject:QS,zipObjectDeep:VS,zipWith:rO};var nO={countBy:hv,each:dd,eachRight:_d,every:zd,filter:Zd,find:Vd,findLast:op,flatMap:lp,flatMapDeep:dp,flatMapDepth:pp,forEach:dd,forEachRight:_d,groupBy:Up,includes:fh,invokeMap:$h,keyBy:Lg,map:cp,orderBy:Jy,partition:em,reduce:Lm,reduceRight:Fm,reject:zm,sample:t_,sampleSize:o_,shuffle:l_,size:p_,some:m_,sortBy:w_};var iO={now:Sv};var aO={after:de,ary:Gt,before:Qa,bind:to,bindKey:fo,curry:bv,curryRight:_v,debounce:jv,defer:Hv,delay:Zv,flip:mp,memoize:ha,negate:Ey,once:Hy,overArgs:ab,partial:Xb,partialRight:Qb,rearg:Dm,rest:Km,spread:U_,throttle:Rw,unary:tS,wrap:DS};var oO={castArray:as,clone:Mc,cloneDeep:$c,cloneDeepWith:Fc,cloneWith:Uc,conformsTo:rv,eq:Kt,gt:Kp,gte:Xp,isArguments:gn,isArray:H,isArrayBuffer:Uh,isArrayLike:nn,isArrayLikeObject:Pv,isBoolean:Gh,isBuffer:xn,isDate:Yh,isElement:Jh,isEmpty:tg,isEqual:ng,isEqualWith:ig,isError:Za,isFinite:og,isFunction:me,isInteger:ug,isLength:tn,isMap:Jf,isMatch:sg,isMatchWith:fg,isNaN:vg,isNative:gg,isNil:yg,isNull:bg,isNumber:lg,isObject:ee,isObjectLike:L,isPlainObject:Ga,isRegExp:Og,isSafeInteger:Eg,isSet:tc,isString:ah,isSymbol:F,isTypedArray:oi,isUndefined:jg,isWeakMap:Ag,isWeakSet:kg,lt:Yg,lte:Qg,toArray:ky,toFinite:ce,toInteger:le,toLength:qd,toNumber:ue,toPlainObject:Mv,toSafeInteger:Fw,toString:Sa};var uO={add:V,ceil:cs,divide:od,floor:wp,max:oy,maxBy:uy,mean:ly,meanBy:vy,min:my,minBy:_y,multiply:Oy,round:Vm,subtract:J_,sum:Q_,sumBy:V_};var sO={clamp:gs,inRange:nh,random:jm};var fO={assign:_i,assignIn:Ii,assignInWith:Ri,assignWith:Wi,at:Ba,create:gv,defaults:Wv,defaultsDeep:zv,entries:Ad,entriesIn:kd,extend:Ii,extendWith:Ri,findKey:rp,findLastKey:up,forIn:Cp,forInRight:Pp,forOwn:Tp,forOwnRight:Mp,functions:$p,functionsIn:Lp,get:Ia,has:Vp,hasIn:Fl,invert:Ih,invertBy:Ch,invoke:Bh,keys:gi,keysIn:Ei,mapKeys:Vg,mapValues:ey,merge:py,mergeWith:Nv,omit:Fy,omitBy:Gy,pick:nm,pickBy:qy,result:Zm,set:u_,setWith:s_,toPairs:Ad,toPairsIn:kd,transform:Uw,unset:ES,update:kS,updateWith:WS,values:uh,valuesIn:TS};var cO={at:LS,chain:ls,commit:qc,lodash:yr,next:Wy,plant:im,reverse:FS,tap:aw,thru:kw,toIterator:Mw,toJSON:Dw,value:Dw,valueOf:Dw,wrapperChain:NS};var lO={camelCase:is,capitalize:Zo,deburr:uu,endsWith:wd,escape:Bd,escapeRegExp:Ld,kebabCase:Dg,lowerCase:Gg,lowerFirst:Kg,pad:Fb,padEnd:zb,padStart:Ub,parseInt:Hb,repeat:qm,replace:Gm,snakeCase:y_,split:N_,startCase:G_,startsWith:H_,template:Iw,templateSettings:bw,toLower:$w,toUpper:zw,trim:Kw,trimEnd:Xw,trimStart:Jw,truncate:rS,unescape:sS,upperCase:PS,upperFirst:Ko,words:Vu};var vO={attempt:Ya,bindAll:io,cond:Yl,conforms:ev,constant:kr,defaultTo:Iv,flow:Rp,flowRight:Wp,identity:pe,iteratee:Cg,matches:ty,matchesProperty:iy,method:gy,methodOf:by,mixin:wy,noop:ir,nthArg:Ty,over:eb,overEvery:ub,overSome:fb,property:Kl,propertyOf:am,range:Cm,rangeRight:Tm,stubArray:Ps,stubFalse:yn,stubObject:K_,stubString:Z_,stubTrue:X_,times:Tw,toPath:Lw,uniqueId:xS};function lazyClone(){var e=new nr(this.__wrapped__);e.__actions__=dr(this.__actions__);e.__dir__=this.__dir__;e.__filtered__=this.__filtered__;e.__iteratees__=dr(this.__iteratees__);e.__takeCount__=this.__takeCount__;e.__views__=dr(this.__views__);return e}var dO=lazyClone;function lazyReverse(){if(this.__filtered__){var e=new nr(this);e.__dir__=-1;e.__filtered__=true}else{e=this.clone();e.__dir__*=-1}return e}var pO=lazyReverse;var hO=Math.max,gO=Math.min;function getView(e,r,t){var n=-1,i=t.length;while(++n0||r<0)){return new nr(t)}if(e<0){t=t.takeRight(-e)}else if(e){t=t.drop(e)}if(r!==undefined){r=le(r);t=r<0?t.dropRight(-r):t.take(r-e)}return t};nr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()};nr.prototype.toArray=function(){return this.take(jO)};ov(nr.prototype,function(e,r){var t=/^(?:filter|find|map|reject)|While$/.test(r),n=/^(?:head|last)$/.test(r),i=yr[n?"take"+(r=="last"?"Right":""):r],a=n||/^find/.test(r);if(!i){return}yr.prototype[r]=function(){var r=this.__wrapped__,o=n?[1]:arguments,u=r instanceof nr,s=o[0],f=u||H(r);var c=function(e){var r=i.apply(yr,Ra([e],o));return n&&l?r[0]:r};if(f&&t&&typeof s=="function"&&s.length!=1){u=f=false}var l=this.__chain__,v=!!this.__actions__.length,d=a&&!l,p=u&&!v;if(!a&&f){r=p?r:new nr(this);var h=e.apply(r,o);h.__actions__.push({func:kw,args:[c],thisArg:undefined});return new vr(h,l)}if(d&&p){return e.apply(this,o)}h=this.thru(c);return d?n?h.value()[0]:h.value():h}});Dr(["pop","push","shift","sort","splice","unshift"],function(e){var r=IO[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);yr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return r.apply(H(i)?i:[],e)}return this[t](function(t){return r.apply(H(t)?t:[],e)})}});ov(nr.prototype,function(e,r){var t=yr[r];if(t){var n=t.name+"";if(!RO.call(sr,n)){sr[n]=[]}sr[n].push({name:r,func:t})}});sr[St(undefined,OO).name]=[{name:"wrapper",func:undefined}];nr.prototype.clone=dO;nr.prototype.reverse=pO;nr.prototype.value=wO;yr.prototype.at=cO.at;yr.prototype.chain=cO.wrapperChain;yr.prototype.commit=cO.commit;yr.prototype.next=cO.next;yr.prototype.plant=cO.plant;yr.prototype.reverse=cO.reverse;yr.prototype.toJSON=yr.prototype.valueOf=yr.prototype.value=cO.value;yr.prototype.first=yr.prototype.head;if(kO){yr.prototype[kO]=cO.toIterator}var TO=yr;class image_tag_ImageTag{constructor(e){const{repository:r="gableroux",name:t="unity3d",version:n="2019.2.11f1",platform:i}=e;if(!image_tag_ImageTag.versionPattern.test(n)){throw new Error(`Invalid version "${n}".`)}if(!Vp(image_tag_ImageTag.targetPlatformToImageSuffixMap,i)){throw new Error(`Platform "${i}" is currently not supported.`)}const a=Ia(image_tag_ImageTag.targetPlatformToImageSuffixMap,i,image_tag_ImageTag.imageSuffixes.generic);Object.assign(this,{repository:r,name:t,version:n,platform:i,builderPlatform:a})}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:i,ios:a,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]:a,[o.types.Android]:i,[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 Xw(`${this.version}-${this.builderPlatform}`,"-")}get image(){return Jw(`${this.repository}/${this.name}`,"/")}toString(){const{image:e,tag:r}=this;return`${e}:${r}`}}var MO=image_tag_ImageTag;class docker_Docker{static async build(e,r=false){const{path:t,dockerfile:n,baseImage:i}=e;const{version:a,platform:o}=i;const u=new MO({repository:"",name:"unity-builder",version:a,platform:o});const s=`docker build ${t} --file ${n} --build-arg IMAGE=${i} --tag ${u}`;await Object(v.exec)(s,undefined,{silent:r});return u}static async run(e,r,t=false){const{version:n,workspace:i,platform:a,projectPath:o,buildName:u,buildPath:s,buildFile:f,buildMethod:c,buildVersion:l,customParameters:d}=r;const p=`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="${a}" --env BUILD_NAME="${u}" --env BUILD_PATH="${s}" --env BUILD_FILE="${f}" --env BUILD_METHOD="${c}" --env VERSION="${l}" --env CUSTOM_PARAMETERS="${d}" --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 "${i}":"/github/workspace" ${e}`;await Object(v.exec)(p,undefined,{silent:t})}}var BO=docker_Docker;const DO=t(470);async function src_action(){a.checkCompatibility();m.verify();const{dockerfile:e,workspace:r,actionFolder:t}=a;const n=await p.create();const i=new MO(n);const o=await BO.build({path:t,dockerfile:e,baseImage:i});await BO.run(o,{workspace:r,...n})}src_action().catch(e=>{DO.setFailed(e.message)})},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,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};var i=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=i(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 i in r)e.d(n,i,function(e){return r[e]}.bind(null,i));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}}()});