From 39a160b7896bae577242b645dea5781895e560e9 Mon Sep 17 00:00:00 2001 From: Webber Date: Wed, 22 Apr 2020 22:12:04 +0200 Subject: [PATCH] Allow `versioning` and `version` parameters. --- action/index.js | 2 +- action/steps/build.sh | 2 ++ src/index.js | 2 +- src/model/build-parameters.js | 6 +++++- src/model/build-parameters.test.js | 2 +- src/model/docker.js | 8 ++++++-- src/model/error/validation-error.js | 8 ++++++++ src/model/input.js | 14 ++++++++++++++ 8 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 src/model/error/validation-error.js diff --git a/action/index.js b/action/index.js index 6d2c8ba1..ff68e5b9 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__(384)}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()}}},87:function(e){e.exports=require("os")},129:function(e){e.exports=require("child_process")},357:function(e){e.exports=require("assert")},384: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{unityVersion:r,targetPlatform:t,projectPath:n,buildName:a,buildsPath:i,buildMethod:o,versioning:u,version:s,customParameters:c}=e;return{unityVersion:r,platform:t,projectPath:n,buildName:a,buildPath:`${i}/${t}`,buildFile:this.parseBuildFile(a,t),buildMethod:o,versioning:u,version:s,customParameters:c}}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);class Unity{static get libraryFolder(){return"Library"}}var f=Unity;const l=t(470);class input_Input{static getFromUser(){const e=l.getInput("unityVersion");const r=l.getInput("targetPlatform")||o.default;const t=l.getInput("projectPath")||".";const n=l.getInput("buildName")||r;const a=l.getInput("buildsPath")||"build";const i=l.getInput("buildMethod");const u=l.getInput("versioning")||"default";const s=l.getInput("version")||"";const c=l.getInput("customParameters")||"";const f=t.replace(/\/$/,"");return{unityVersion:e,targetPlatform:r,projectPath:f,buildName:n,buildsPath:a,buildMethod:i,versioning:u,version:s,customParameters:c}}}var v=input_Input;class project_Project{static get relativePath(){const{projectPath:e}=v.getFromUser();return`${e}`}static get absolutePath(){const{workspace:e}=i;return`${e}/${this.relativePath}`}static get libraryFolder(){return`${this.relativePath}/${f.libraryFolder}`}}var d=project_Project;class cache_Cache{static verify(){if(!c().existsSync(d.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 p=cache_Cache;var h=t(986);var y=typeof global=="object"&&global&&global.Object===Object&&global;var g=y;var b=typeof self=="object"&&self&&self.Object===Object&&self;var m=g||b||Function("return this")();var _=m;var w=_.Symbol;var x=w;var S=Object.prototype;var j=S.hasOwnProperty;var O=S.toString;var I=x?x.toStringTag:undefined;function getRawTag(e){var r=j.call(e,I),t=e[I];try{e[I]=undefined;var n=true}catch(e){}var a=O.call(e);if(n){if(r){e[I]=t}else{delete e[I]}}return a}var A=getRawTag;var E=Object.prototype;var P=E.toString;function objectToString(e){return P.call(e)}var k=objectToString;var C="[object Null]",R="[object Undefined]";var W=x?x.toStringTag:undefined;function baseGetTag(e){if(e==null){return e===undefined?R:C}return W&&W in Object(e)?A(e):k(e)}var T=baseGetTag;function isObjectLike(e){return e!=null&&typeof e=="object"}var M=isObjectLike;var B="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||M(e)&&T(e)==B}var L=isSymbol;var D=0/0;function baseToNumber(e){if(typeof e=="number"){return e}if(L(e)){return D}return+e}var F=baseToNumber;function arrayMap(e,r){var t=-1,n=e==null?0:e.length,a=Array(n);while(++t0){if(++r>=hr){return arguments[0]}}else{r=0}return e.apply(undefined,arguments)}}var br=shortOut;var mr=br(De);var _r=mr;var wr=/\{\n\/\* \[wrapped with (.+)\] \*/,xr=/,? & /;function getWrapDetails(e){var r=e.match(wr);return r?r[1].split(xr):[]}var Sr=getWrapDetails;var jr=/\{(?:\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(jr,"{\n/* [wrapped with "+r+"] */\n")}var Or=insertWrapDetails;function constant(e){return function(){return e}}var Ir=constant;var Ar=function(){try{var e=Re(Object,"defineProperty");e({},"",{});return e}catch(e){}}();var Er=Ar;var Pr=!Er?fe:function(e,r){return Er(e,"toString",{configurable:true,enumerable:false,value:Ir(r),writable:true})};var kr=Pr;var Cr=br(kr);var Rr=Cr;function arrayEach(e,r){var t=-1,n=e==null?0:e.length;while(++t-1}var Dr=arrayIncludes;var Fr=1,Nr=2,$r=8,Ur=16,zr=32,qr=64,Hr=128,Gr=256,Vr=512;var Kr=[["ary",Hr],["bind",Fr],["bindKey",Nr],["curry",$r],["curryRight",Ur],["flip",Vr],["partial",zr],["partialRight",qr],["rearg",Gr]];function updateWrapDetails(e,r){Wr(Kr,function(t){var n="_."+t[0];if(r&t[1]&&!Dr(e,n)){e.push(n)}});return e.sort()}var Zr=updateWrapDetails;function setWrapToString(e,r,t){var n=r+"";return Rr(e,Or(n,Zr(Sr(n),t)))}var Xr=setWrapToString;var Yr=1,Jr=2,Qr=4,et=8,rt=32,tt=64;function createRecurry(e,r,t,n,a,i,o,u,s,c){var f=r&et,l=f?o:undefined,v=f?undefined:o,d=f?i:undefined,p=f?undefined:i;r|=f?rt:tt;r&=~(f?tt:rt);if(!(r&Qr)){r&=~(Yr|Jr)}var h=[e,r,a,d,l,p,v,u,s,c];var y=t.apply(undefined,h);if(pr(e)){_r(y,h)}y.placeholder=n;return Xr(y,e,r)}var nt=createRecurry;function getHolder(e){var r=e;return r.placeholder}var at=getHolder;var it=9007199254740991;var ot=/^(?:0|[1-9]\d*)$/;function isIndex(e,r){var t=typeof e;r=r==null?it:r;return!!r&&(t=="number"||t!="symbol"&&ot.test(e))&&(e>-1&&e%1==0&&e1){g.reverse()}if(f&&s-1&&e%1==0&&e<=Yt}var Jt=isLength;function isArrayLike(e){return e!=null&&Jt(e.length)&&!he(e)}var Qt=isArrayLike;function isIterateeCall(e,r,t){if(!X(t)){return false}var n=typeof r;if(n=="number"?Qt(t)&&ut(r,t.length):n=="string"&&r in t){return zt(t[r],e)}return false}var en=isIterateeCall;function createAssigner(e){return Xt(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&&en(t[0],t[1],o)){i=a<3?undefined:i;a=1}r=Object(r);while(++n-1}var Ya=listCacheHas;function listCacheSet(e,r){var t=this.__data__,n=Ga(t,e);if(n<0){++this.size;t.push([e,r])}else{t[n][1]=r}return this}var Ja=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 Ei=baseFlatten;function flatten(e){var r=e==null?0:e.length;return r?Ei(e,1):[]}var Pi=flatten;function flatRest(e){return Rr(Zt(e,undefined,Pi),e+"")}var ki=flatRest;var Ci=ki(ji);var Ri=Ci;var Wi=oa(Object.getPrototypeOf,Object);var Ti=Wi;var Mi="[object Object]";var Bi=Function.prototype,Li=Object.prototype;var Di=Bi.toString;var Fi=Li.hasOwnProperty;var Ni=Di.call(Object);function isPlainObject(e){if(!M(e)||T(e)!=Mi){return false}var r=Ti(e);if(r===null){return true}var t=Fi.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&Di.call(t)==Ni}var $i=isPlainObject;var Ui="[object DOMException]",zi="[object Error]";function isError(e){if(!M(e)){return false}var r=T(e);return r==zi||r==Ui||typeof e.message=="string"&&typeof e.name=="string"&&!$i(e)}var qi=isError;var Hi=Xt(function(e,r){try{return He(e,undefined,r)}catch(e){return qi(e)?e:new Error(e)}});var Gi=Hi;var Vi="Expected a function";function before(e,r){var t;if(typeof r!="function"){throw new TypeError(Vi)}e=ue(e);return function(){if(--e>0){t=r.apply(this,arguments)}if(e<=1){r=undefined}return t}}var Ki=before;var Zi=1,Xi=32;var Yi=Xt(function(e,r,t){var n=Zi;if(t.length){var a=lt(t,at(Yi));n|=Xi}return Ft(e,n,r,t,a)});Yi.placeholder={};var Ji=Yi;var Qi=ki(function(e,r){Wr(r,function(r){r=wi(r);Ut(e,r,Ji(e[r],e))});return e});var eo=Qi;var ro=1,to=2,no=32;var ao=Xt(function(e,r,t){var n=ro|to;if(t.length){var a=lt(t,at(ao));n|=no}return Ft(r,n,e,t,a)});ao.placeholder={};var io=ao;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:oo(e,r,t)}var uo=castSlice;var so="\\ud800-\\udfff",co="\\u0300-\\u036f",fo="\\ufe20-\\ufe2f",lo="\\u20d0-\\u20ff",vo=co+fo+lo,po="\\ufe0e\\ufe0f";var ho="\\u200d";var yo=RegExp("["+ho+so+vo+po+"]");function hasUnicode(e){return yo.test(e)}var go=hasUnicode;function asciiToArray(e){return e.split("")}var bo=asciiToArray;var mo="\\ud800-\\udfff",_o="\\u0300-\\u036f",wo="\\ufe20-\\ufe2f",xo="\\u20d0-\\u20ff",So=_o+wo+xo,jo="\\ufe0e\\ufe0f";var Oo="["+mo+"]",Io="["+So+"]",Ao="\\ud83c[\\udffb-\\udfff]",Eo="(?:"+Io+"|"+Ao+")",Po="[^"+mo+"]",ko="(?:\\ud83c[\\udde6-\\uddff]){2}",Co="[\\ud800-\\udbff][\\udc00-\\udfff]",Ro="\\u200d";var Wo=Eo+"?",To="["+jo+"]?",Mo="(?:"+Ro+"(?:"+[Po,ko,Co].join("|")+")"+To+Wo+")*",Bo=To+Wo+Mo,Lo="(?:"+[Po+Io+"?",Io,ko,Co,Oo].join("|")+")";var Do=RegExp(Ao+"(?="+Ao+")|"+Lo+Bo,"g");function unicodeToArray(e){return e.match(Do)||[]}var Fo=unicodeToArray;function stringToArray(e){return go(e)?Fo(e):bo(e)}var No=stringToArray;function createCaseFirst(e){return function(r){r=bi(r);var t=go(r)?No(r):undefined;var n=t?t[0]:r.charAt(0);var a=t?uo(t,1).join(""):r.slice(1);return n[e]()+a}}var $o=createCaseFirst;var Uo=$o("toUpperCase");var zo=Uo;function capitalize(e){return zo(bi(e).toLowerCase())}var qo=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 ls=baseClamp;function clamp(e,r,t){if(t===undefined){t=r;r=undefined}if(t!==undefined){t=ne(t);t=t===t?t:0}if(r!==undefined){r=ne(r);r=r===r?r:0}return ls(ne(e),r,t)}var vs=clamp;function stackClear(){this.__data__=new Qa;this.size=0}var ds=stackClear;function stackDelete(e){var r=this.__data__,t=r["delete"](e);this.size=r.size;return t}var ps=stackDelete;function stackGet(e){return this.__data__.get(e)}var hs=stackGet;function stackHas(e){return this.__data__.has(e)}var ys=stackHas;var gs=200;function stackSet(e,r){var t=this.__data__;if(t instanceof Qa){var n=t.__data__;if(!ri||n.lengthu)){return false}var c=i.get(e);if(c&&i.get(r)){return c==r}var f=-1,l=true,v=t&Xf?new Gf:undefined;i.set(e,r);i.set(r,e);while(++f=r||t<0||l&&n>=i}function timerExpired(){var e=bv();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(bv())}function debounced(){var e=bv(),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 xv=debounce;function defaultTo(e,r){return e==null||e!==e?r:e}var Sv=defaultTo;var jv=Object.prototype;var Ov=jv.hasOwnProperty;var Iv=Xt(function(e,r){e=Object(e);var t=-1;var n=r.length;var a=n>2?r[2]:undefined;if(a&&en(r[0],r[1],a)){n=1}while(++t=Gv){i=Kf;o=false;r=new Gf(r)}e:while(++a=0&&e.slice(t,a)==r}var gd=endsWith;function baseToPairs(e,r){return N(r,function(r){return[r,e[r]]})}var bd=baseToPairs;function setToPairs(e){var r=-1,t=Array(e.size);e.forEach(function(e){t[++r]=[e,e]});return t}var md=setToPairs;var _d="[object Map]",wd="[object Set]";function createToPairs(e){return function(r){var t=uc(r);if(t==_d){return Jf(r)}if(t==wd){return md(r)}return bd(r,e(r))}}var xd=createToPairs;var Sd=xd(va);var jd=Sd;var Od=xd(wa);var Id=Od;var Ad={"&":"&","<":"<",">":">",'"':""","'":"'"};var Ed=Go(Ad);var Pd=Ed;var kd=/[&<>"']/g,Cd=RegExp(kd.source);function escape_escape(e){e=bi(e);return e&&Cd.test(e)?e.replace(kd,Pd):e}var Rd=escape_escape;var Wd=/[\\^$.*+?()[\]{}|]/g,Td=RegExp(Wd.source);function escapeRegExp(e){e=bi(e);return e&&Td.test(e)?e.replace(Wd,"\\$&"):e}var Md=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:ue(n);if(n<0){n+=a}n=t>n?0:Nd(n);while(t-1?a[i?r[o]:o]:undefined}}var Hd=createFind;var Gd=Math.max;function findIndex(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=t==null?0:ue(t);if(a<0){a=Gd(n+a,0)}return Tr(e,ql(r,3),a)}var Vd=findIndex;var Kd=Hd(Vd);var Zd=Kd;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 Xd=baseFindKey;function findKey(e,r){return Xd(e,ql(r,3),tv)}var Yd=findKey;var Jd=Math.max,Qd=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=ue(t);a=t<0?Jd(n+a,0):Qd(a,n-1)}return Tr(e,ql(r,3),a,true)}var ep=findLastIndex;var rp=Hd(ep);var tp=rp;function findLastKey(e,r){return Xd(e,ql(r,3),dd)}var np=findLastKey;function head(e){return e&&e.length?e[0]:undefined}var ap=head;function baseMap(e,r){var t=-1,n=Qt(e)?Array(e.length):[];iv(e,function(e,a,i){n[++t]=r(e,a,i)});return n}var ip=baseMap;function map_map(e,r){var t=U(e)?N:ip;return t(e,ql(r,3))}var op=map_map;function flatMap(e,r){return Ei(op(e,r),1)}var up=flatMap;var sp=1/0;function flatMapDeep(e,r){return Ei(op(e,r),sp)}var cp=flatMapDeep;function flatMapDepth(e,r,t){t=t===undefined?1:ue(t);return Ei(op(e,r),t)}var fp=flatMapDepth;var lp=1/0;function flattenDeep(e){var r=e==null?0:e.length;return r?Ei(e,lp):[]}var vp=flattenDeep;function flattenDepth(e,r){var t=e==null?0:e.length;if(!t){return[]}r=r===undefined?1:ue(r);return Ei(e,r)}var dp=flattenDepth;var pp=512;function flip(e){return Ft(e,pp)}var hp=flip;var yp=as("floor");var gp=yp;var bp="Expected a function";var mp=8,_p=32,wp=128,xp=256;function createFlow(e){return ki(function(r){var t=r.length,n=t,a=sr.prototype.thru;if(e){r.reverse()}while(n--){var i=r[n];if(typeof i!="function"){throw new TypeError(bp)}if(a&&!o&&ur(i)=="wrapper"){var o=new sr([],true)}}n=o?n:t;while(++nr}var Np=baseGt;function createRelationalOperation(e){return function(r,t){if(!(typeof r=="string"&&typeof t=="string")){r=ne(r);t=ne(t)}return e(r,t)}}var $p=createRelationalOperation;var Up=$p(Np);var zp=Up;var qp=$p(function(e,r){return e>=r});var Hp=qp;var Gp=Object.prototype;var Vp=Gp.hasOwnProperty;function baseHas(e,r){return e!=null&&Vp.call(e,r)}var Kp=baseHas;function has(e,r){return e!=null&&Bl(e,r,Kp)}var Zp=has;var Xp=Math.max,Yp=Math.min;function baseInRange(e,r,t){return e>=Yp(r,t)&&e-1:!!a&&Lr(e,r,t)>-1}var ih=includes_includes;var oh=Math.max;function indexOf_indexOf(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=t==null?0:ue(t);if(a<0){a=oh(n+a,0)}return Lr(e,r,a)}var uh=indexOf_indexOf;function initial(e){var r=e==null?0:e.length;return r?oo(e,0,-1):[]}var sh=initial;var ch=Math.min;function baseIntersection(e,r,t){var n=t?Hv: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=N(f,Vn(r))}s=ch(f.length,s);u[o]=!t&&(r||a>=120&&f.length>=120)?new Gf(o&&f):undefined}f=e[0];var l=-1,v=u[0];e:while(++l=-_y&&e<=_y}var wy=isSafeInteger;function isUndefined(e){return e===undefined}var xy=isUndefined;var Sy="[object WeakMap]";function isWeakMap(e){return M(e)&&uc(e)==Sy}var jy=isWeakMap;var Oy="[object WeakSet]";function isWeakSet(e){return M(e)&&T(e)==Oy}var Iy=isWeakSet;var Ay=1;function iteratee_iteratee(e){return ql(typeof e=="function"?e:Pf(e,Ay))}var Ey=iteratee_iteratee;var Py=Array.prototype;var ky=Py.join;function join(e,r){return e==null?"":ky.call(e,r)}var Cy=join;var Ry=Ju(function(e,r,t){return e+(t?"-":"")+r.toLowerCase()});var Wy=Ry;var Ty=uv(function(e,r,t){Ut(e,t,r)});var My=Ty;function strictLastIndexOf(e,r,t){var n=t+1;while(n--){if(e[n]===r){return n}}return n}var By=strictLastIndexOf;var Ly=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=ue(t);a=a<0?Ly(n+a,0):Dy(a,n-1)}return r===r?By(e,r,a):Tr(e,Mr,a,true)}var Fy=lastIndexOf;var Ny=Ju(function(e,r,t){return e+(t?" ":"")+r.toLowerCase()});var $y=Ny;var Uy=$o("toLowerCase");var zy=Uy;function baseLt(e,r){return e=this.__values__.length,r=e?undefined:this.__values__[this.__index__++];return{done:e,value:r}}var Ag=wrapperNext;function baseNth(e,r){var t=e.length;if(!t){return}r+=r<0?t:0;return ut(r,t)?e[r]:undefined}var Eg=baseNth;function nth(e,r){return e&&e.length?Eg(e,ue(r)):undefined}var Pg=nth;function nthArg(e){e=ue(e);return Xt(function(r){return Eg(r,e)})}var kg=nthArg;function baseUnset(e,r){r=mi(r,e);e=Ph(e,r);return e==null||delete e[wi(Xv(r))]}var Cg=baseUnset;function customOmitClone(e){return $i(e)?undefined:e}var Rg=customOmitClone;var Wg=1,Tg=2,Mg=4;var Bg=ki(function(e,r){var t={};if(e==null){return t}var n=false;r=N(r,function(r){r=mi(r,e);n||(n=r.length>1);return r});Vt(e,Us(e),t);if(n){t=Pf(t,Wg|Tg|Mg,Rg)}var a=r.length;while(a--){Cg(t,r[a])}return t});var Lg=Bg;function baseSet(e,r,t,n){if(!X(e)){return e}r=mi(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 Hg=compareMultiple;function baseOrderBy(e,r,t){var n=-1;r=N(r.length?r:[fe],Vn(ql));var a=ip(e,function(e,t,a){var i=N(r,function(r){return r(e)});return{criteria:i,index:++n,value:e}});return zg(a,function(e,r){return Hg(e,r,t)})}var Gg=baseOrderBy;function orderBy(e,r,t,n){if(e==null){return[]}if(!U(r)){r=r==null?[]:[r]}t=n?undefined:t;if(!U(t)){t=t==null?[]:[t]}return Gg(e,r,t)}var Vg=orderBy;function createOver(e){return ki(function(r){r=N(r,Vn(ql));return Xt(function(t){var n=this;return e(r,function(e){return He(e,n,t)})})})}var Kg=createOver;var Zg=Kg(N);var Xg=Zg;var Yg=Xt;var Jg=Yg;var Qg=Math.min;var eb=Jg(function(e,r){r=r.length==1&&U(r[0])?N(r[0],Vn(ql)):N(Ei(r,1),Vn(ql));var t=r.length;return Xt(function(n){var a=-1,i=Qg(n.length,t);while(++aob){return t}do{if(r%2){t+=e}r=ub(r/2);if(r){e+=e}}while(r);return t}var sb=baseRepeat;var cb=$l("length");var fb=cb;var lb="\\ud800-\\udfff",vb="\\u0300-\\u036f",db="\\ufe20-\\ufe2f",pb="\\u20d0-\\u20ff",hb=vb+db+pb,yb="\\ufe0e\\ufe0f";var gb="["+lb+"]",bb="["+hb+"]",mb="\\ud83c[\\udffb-\\udfff]",_b="(?:"+bb+"|"+mb+")",wb="[^"+lb+"]",xb="(?:\\ud83c[\\udde6-\\uddff]){2}",Sb="[\\ud800-\\udbff][\\udc00-\\udfff]",jb="\\u200d";var Ob=_b+"?",Ib="["+yb+"]?",Ab="(?:"+jb+"(?:"+[wb,xb,Sb].join("|")+")"+Ib+Ob+")*",Eb=Ib+Ob+Ab,Pb="(?:"+[wb+bb+"?",bb,xb,Sb,gb].join("|")+")";var kb=RegExp(mb+"(?="+mb+")|"+Pb+Eb,"g");function unicodeSize(e){var r=kb.lastIndex=0;while(kb.test(e)){++r}return r}var Cb=unicodeSize;function stringSize(e){return go(e)?Cb(e):fb(e)}var Rb=stringSize;var Wb=Math.ceil;function createPadding(e,r){r=r===undefined?" ":G(r);var t=r.length;if(t<2){return t?sb(r,e):r}var n=sb(r,Wb(e/Rb(r)));return go(r)?uo(No(n),0,e).join(""):n.slice(0,e)}var Tb=createPadding;var Mb=Math.ceil,Bb=Math.floor;function pad(e,r,t){e=bi(e);r=ue(r);var n=r?Rb(e):0;if(!r||n>=r){return e}var a=(r-n)/2;return Tb(Bb(a),t)+e+Tb(Mb(a),t)}var Lb=pad;function padEnd(e,r,t){e=bi(e);r=ue(r);var n=r?Rb(e):0;return r&&n-1){if(u!==e){am.call(u,s,1)}am.call(e,s,1)}}return e}var im=basePullAll;function pullAll(e,r){return e&&e.length&&r&&r.length?im(e,r):e}var om=pullAll;var um=Xt(om);var sm=um;function pullAllBy(e,r,t){return e&&e.length&&r&&r.length?im(e,r,ql(t,2)):e}var cm=pullAllBy;function pullAllWith(e,r,t){return e&&e.length&&r&&r.length?im(e,r,undefined,t):e}var fm=pullAllWith;var lm=Array.prototype;var vm=lm.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(ut(a)){vm.call(e,a,1)}else{Cg(e,a)}}}return e}var dm=basePullAt;var pm=ki(function(e,r){var t=e==null?0:e.length,n=ji(e,r);dm(e,N(r,function(e){return ut(e,t)?+e:e}).sort(qg));return n});var hm=pm;var ym=Math.floor,gm=Math.random;function baseRandom(e,r){return e+ym(gm()*(r-e+1))}var bm=baseRandom;var mm=parseFloat;var _m=Math.min,wm=Math.random;function random(e,r,t){if(t&&typeof t!="boolean"&&en(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=oe(e);if(r===undefined){r=e;e=0}else{r=oe(r)}}if(e>r){var n=e;e=r;r=n}if(t||e%1||r%1){var a=wm();return _m(e+a*(r-e+mm("1e-"+((a+"").length-1))),r)}return bm(e,r)}var xm=random;var Sm=Math.ceil,jm=Math.max;function baseRange(e,r,t,n){var a=-1,i=jm(Sm((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"&&en(r,t,n)){t=n=undefined}r=oe(r);if(t===undefined){t=r;r=0}else{t=oe(t)}n=n===undefined?r1&&en(e,r[0],r[1])){r=[]}else if(t>2&&en(r[0],r[1],r[2])){r=[r[0]]}return Gg(e,Ei(r,1),[])});var g_=y_;var b_=4294967295,m_=b_-1;var __=Math.floor,w_=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=L(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<=j_){while(n>>1,o=e[i];if(o!==null&&!L(o)&&(t?o<=r:o>>0;if(!t){return[]}e=bi(e);if(e&&(typeof r=="string"||r!=null&&!my(r))){r=G(r);if(!r&&go(e)){return uo(No(e),0,t)}}return e.split(r,t)}var B_=split;var L_="Expected a function";var D_=Math.max;function spread(e,r){if(typeof e!="function"){throw new TypeError(L_)}r=r==null?0:D_(ue(r),0);return Xt(function(t){var n=t[r],a=uo(t,0,r);if(n){Oi(a,n)}return He(e,this,a)})}var F_=spread;var N_=Ju(function(e,r,t){return e+(t?" ":"")+zo(r)});var $_=N_;function startsWith(e,r,t){e=bi(e);t=t==null?0:ls(ue(t),0,e.length);r=G(r);return e.slice(t,t+r.length)==r}var U_=startsWith;function stubObject(){return{}}var z_=stubObject;function stubString(){return""}var q_=stubString;function stubTrue(){return true}var H_=stubTrue;var G_=V(function(e,r){return e-r},0);var V_=G_;function sum(e){return e&&e.length?ag(e,fe):0}var K_=sum;function sumBy(e,r){return e&&e.length?ag(e,ql(r,2)):0}var Z_=sumBy;function tail(e){var r=e==null?0:e.length;return r?oo(e,1,r):[]}var X_=tail;function take(e,r,t){if(!(e&&e.length)){return[]}r=t||r===undefined?1:ue(r);return oo(e,0,r<0?0:r)}var Y_=take;function takeRight(e,r,t){var n=e==null?0:e.length;if(!n){return[]}r=t||r===undefined?1:ue(r);r=n-r;return oo(e,r<0?0:r,n)}var J_=takeRight;function takeRightWhile(e,r){return e&&e.length?id(e,ql(r,3),false,true):[]}var Q_=takeRightWhile;function takeWhile(e,r){return e&&e.length?id(e,ql(r,3)):[]}var ew=takeWhile;function tap(e,r){r(e);return e}var rw=tap;var tw=Object.prototype;var nw=tw.hasOwnProperty;function customDefaultsAssignIn(e,r,t,n){if(e===undefined||zt(e,tw[t])&&!nw.call(n,t)){return r}return e}var aw=customDefaultsAssignIn;var iw={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function escapeStringChar(e){return"\\"+iw[e]}var ow=escapeStringChar;var uw=/<%=([\s\S]+?)%>/g;var sw=uw;var cw=/<%-([\s\S]+?)%>/g;var fw=cw;var lw=/<%([\s\S]+?)%>/g;var vw=lw;var dw={escape:fw,evaluate:vw,interpolate:sw,variable:"",imports:{_:{escape:Rd}}};var pw=dw;var hw=/\b__p \+= '';/g,yw=/\b(__p \+=) '' \+/g,gw=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var bw=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var mw=/($^)/;var _w=/['\n\r\u2028\u2029\\]/g;var ww=Object.prototype;var xw=ww.hasOwnProperty;function template(e,r,t){var n=pw.imports._.templateSettings||pw;if(t&&en(e,r,t)){r=undefined}e=bi(e);r=Oa({},r,n,aw);var a=Oa({},r.imports,n.imports,aw),i=va(a),o=th(a,i);var u,s,c=0,f=r.interpolate||mw,l="__p += '";var v=RegExp((r.escape||mw).source+"|"+f.source+"|"+(f===sw?bw:mw).source+"|"+(r.evaluate||mw).source+"|$","g");var d=xw.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(_w,ow);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=xw.call(r,"variable")&&r.variable;if(!p){l="with (obj) {\n"+l+"\n}\n"}l=(s?l.replace(hw,""):l).replace(yw,"$1").replace(gw,"$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=Gi(function(){return Function(i,d+"return "+l).apply(undefined,o)});h.source=l;if(qi(h)){throw h}return h}var Sw=template;var jw="Expected a function";function throttle(e,r,t){var n=true,a=true;if(typeof e!="function"){throw new TypeError(jw)}if(X(t)){n="leading"in t?!!t.leading:n;a="trailing"in t?!!t.trailing:a}return xv(e,r,{leading:n,maxWait:r,trailing:a})}var Ow=throttle;function thru(e,r){return r(e)}var Iw=thru;var Aw=9007199254740991;var Ew=4294967295;var Pw=Math.min;function times(e,r){e=ue(e);if(e<1||e>Aw){return[]}var t=Ew,n=Pw(e,Ew);r=sd(r);e-=Ew;var a=an(n,r);while(++t-1){}return t}var Nw=charsEndIndex;function charsStartIndex(e,r){var t=-1,n=e.length;while(++t-1){}return t}var $w=charsStartIndex;var Uw=/^\s+|\s+$/g;function trim(e,r,t){e=bi(e);if(e&&(t||r===undefined)){return e.replace(Uw,"")}if(!e||!(r=G(r))){return e}var n=No(e),a=No(r),i=$w(n,a),o=Nw(n,a)+1;return uo(n,i,o).join("")}var zw=trim;var qw=/\s+$/;function trimEnd(e,r,t){e=bi(e);if(e&&(t||r===undefined)){return e.replace(qw,"")}if(!e||!(r=G(r))){return e}var n=No(e),a=Nw(n,No(r))+1;return uo(n,0,a).join("")}var Hw=trimEnd;var Gw=/^\s+/;function trimStart(e,r,t){e=bi(e);if(e&&(t||r===undefined)){return e.replace(Gw,"")}if(!e||!(r=G(r))){return e}var n=No(e),a=$w(n,No(r));return uo(n,a).join("")}var Vw=trimStart;var Kw=30,Zw="...";var Xw=/\w*$/;function truncate(e,r){var t=Kw,n=Zw;if(X(r)){var a="separator"in r?r.separator:a;t="length"in r?ue(r.length):t;n="omission"in r?G(r.omission):n}e=bi(e);var i=e.length;if(go(e)){var o=No(e);i=o.length}if(t>=i){return e}var u=t-Rb(n);if(u<1){return n}var s=o?uo(o,0,u).join(""):e.slice(0,u);if(a===undefined){return s+n}if(o){u+=s.length-u}if(my(a)){if(e.slice(u).search(a)){var c,f=s;if(!a.global){a=RegExp(a.source,bi(Xw.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(G(a),u)!=u){var v=s.lastIndexOf(a);if(v>-1){s=s.slice(0,v)}}return s+n}var Yw=truncate;function unary(e){return $t(e,1)}var Jw=unary;var Qw={"&":"&","<":"<",">":">",""":'"',"'":"'"};var ex=Go(Qw);var rx=ex;var tx=/&(?:amp|lt|gt|quot|#39);/g,nx=RegExp(tx.source);function unescape_unescape(e){e=bi(e);return e&&nx.test(e)?e.replace(tx,rx):e}var ax=unescape_unescape;var ix=1/0;var ox=!(Ks&&1/Qf(new Ks([,-0]))[1]==ix)?er:function(e){return new Ks(e)};var ux=ox;var sx=200;function baseUniq(e,r,t){var n=-1,a=Dr,i=e.length,o=true,u=[],s=u;if(t){o=false;a=Hv}else if(i>=sx){var c=r?null:ux(e);if(c){return Qf(c)}o=false;a=Kf;s=new Gf}else{s=r?[]:u}e:while(++n1||this.__actions__.length||!(n instanceof Qe)||!ut(t)){return this.thru(a)}n=n.slice(t,+t+(r?1:0));n.__actions__.push({func:Iw,args:[a],thisArg:undefined});return new sr(n,this.__chain__).thru(function(e){if(r&&!e.length){e.push(undefined)}return e})});var Mx=Tx;function wrapperChain(){return us(this)}var Bx=wrapperChain;function wrapperReverse(){var e=this.__wrapped__;if(e instanceof Qe){var r=e;if(this.__actions__.length){r=new Qe(this)}r=r.reverse();r.__actions__.push({func:Iw,args:[Vm],thisArg:undefined});return new sr(r,this.__chain__)}return this.thru(Vm)}var Lx=wrapperReverse;function baseXor(e,r,t){var n=e.length;if(n<2){return n?cx(e[0]):[]}var a=-1,i=Array(n);while(++a1?e[r-1]:undefined;t=typeof t=="function"?(e.pop(),t):undefined;return jx(e,t)});var Yx=Xx;var Jx={chunk:fs,compact:$f,concat:Uf,difference:Zv,differenceBy:Jv,differenceWith:ed,drop:nd,dropRight:ad,dropRightWhile:od,dropWhile:ud,fill:Ud,findIndex:Vd,findLastIndex:ep,first:ap,flatten:Pi,flattenDeep:vp,flattenDepth:dp,fromPairs:Rp,head:ap,indexOf:uh,initial:sh,intersection:dh,intersectionBy:hh,intersectionWith:gh,join:Cy,last:Xv,lastIndexOf:Fy,nth:Pg,pull:sm,pullAll:om,pullAllBy:cm,pullAllWith:fm,pullAt:hm,remove:Fm,reverse:Vm,slice:l_,sortedIndex:I_,sortedIndexBy:A_,sortedIndexOf:E_,sortedLastIndex:P_,sortedLastIndexBy:k_,sortedLastIndexOf:C_,sortedUniq:W_,sortedUniqBy:T_,tail:X_,take:Y_,takeRight:J_,takeRightWhile:Q_,takeWhile:ew,union:lx,unionBy:dx,unionWith:hx,uniq:yx,uniqBy:gx,uniqWith:bx,unzip:Sx,unzipWith:jx,without:Rx,xor:Nx,xorBy:Ux,xorWith:qx,zip:Gx,zipObject:Kx,zipObjectDeep:Zx,zipWith:Yx};var Qx={countBy:lv,each:cd,eachRight:yd,every:Dd,filter:qd,find:Zd,findLast:tp,flatMap:up,flatMapDeep:cp,flatMapDepth:fp,forEach:cd,forEachRight:yd,groupBy:Fp,includes:ih,invokeMap:Th,keyBy:My,map:op,orderBy:Vg,partition:Xb,reduce:Mm,reduceRight:Lm,reject:Dm,sample:Jm,sampleSize:t_,shuffle:u_,size:f_,some:h_,sortBy:g_};var eS={now:bv};var rS={after:ce,ary:$t,before:Ki,bind:Ji,bindKey:io,curry:pv,curryRight:yv,debounce:xv,defer:Uv,delay:qv,flip:hp,memoize:li,negate:wg,once:Ug,overArgs:rb,partial:Hb,partialRight:Kb,rearg:Wm,rest:zm,spread:F_,throttle:Ow,unary:Jw,wrap:Wx};var tS={castArray:rs,clone:Cf,cloneDeep:Tf,cloneDeepWith:Lf,cloneWith:Ff,conformsTo:Yl,eq:zt,gt:zp,gte:Hp,isArguments:vn,isArray:U,isArrayBuffer:Fh,isArrayLike:Qt,isArrayLikeObject:Pv,isBoolean:$h,isBuffer:_n,isDate:Gh,isElement:Vh,isEmpty:Jh,isEqual:Qh,isEqualWith:ey,isError:qi,isFinite:ty,isFunction:he,isInteger:ny,isLength:Jt,isMap:Gc,isMatch:ay,isMatchWith:iy,isNaN:sy,isNative:vy,isNil:dy,isNull:py,isNumber:uy,isObject:X,isObjectLike:M,isPlainObject:$i,isRegExp:my,isSafeInteger:wy,isSet:Yc,isString:rh,isSymbol:L,isTypedArray:ta,isUndefined:xy,isWeakMap:jy,isWeakSet:Iy,lt:Gy,lte:Ky,toArray:Ig,toFinite:oe,toInteger:ue,toLength:Nd,toNumber:ne,toPlainObject:Cv,toSafeInteger:Lw,toString:bi};var nS={add:Z,ceil:os,divide:td,floor:gp,max:tg,maxBy:ng,mean:ug,meanBy:sg,min:hg,minBy:yg,multiply:mg,round:Zm,subtract:V_,sum:K_,sumBy:Z_};var aS={clamp:vs,inRange:Qp,random:xm};var iS={assign:ya,assignIn:Sa,assignInWith:Oa,assignWith:Aa,at:Ri,create:vv,defaults:Av,defaultsDeep:Dv,entries:jd,entriesIn:Id,extend:Sa,extendWith:Oa,findKey:Yd,findLastKey:np,forIn:Ep,forInRight:Pp,forOwn:kp,forOwnRight:Cp,functions:Tp,functionsIn:Mp,get:Si,has:Zp,hasIn:Ll,invert:Sh,invertBy:Eh,invoke:Rh,keys:va,keysIn:wa,mapKeys:Zy,mapValues:Xy,merge:fg,mergeWith:Bv,omit:Lg,omitBy:$g,pick:Qb,pickBy:Ng,result:qm,set:n_,setWith:a_,toPairs:jd,toPairsIn:Id,transform:Fw,unset:wx,update:Ix,updateWith:Ax,values:nh,valuesIn:kx};var oS={at:Mx,chain:us,commit:Nf,lodash:dr,next:Ag,plant:em,reverse:Lx,tap:rw,thru:Iw,toIterator:Cw,toJSON:Ww,value:Ww,valueOf:Ww,wrapperChain:Bx};var uS={camelCase:es,capitalize:qo,deburr:nu,endsWith:gd,escape:Rd,escapeRegExp:Md,kebabCase:Wy,lowerCase:$y,lowerFirst:zy,pad:Lb,padEnd:Db,padStart:Fb,parseInt:Ub,repeat:Nm,replace:$m,snakeCase:d_,split:B_,startCase:$_,startsWith:U_,template:Sw,templateSettings:pw,toLower:Tw,toUpper:Dw,trim:zw,trimEnd:Hw,trimStart:Vw,truncate:Yw,unescape:ax,upperCase:Px,upperFirst:zo,words:Zu};var sS={attempt:Gi,bindAll:eo,cond:Gl,conforms:Xl,constant:Ir,defaultTo:Sv,flow:Op,flowRight:Ap,identity:fe,iteratee:Ey,matches:Jy,matchesProperty:eg,method:vg,methodOf:pg,mixin:gg,noop:er,nthArg:kg,over:Xg,overEvery:nb,overSome:ib,property:zl,propertyOf:rm,range:Em,rangeRight:km,stubArray:Ps,stubFalse:dn,stubObject:z_,stubString:q_,stubTrue:H_,times:kw,toPath:Mw,uniqueId:_x};function lazyClone(){var e=new Qe(this.__wrapped__);e.__actions__=cr(this.__actions__);e.__dir__=this.__dir__;e.__filtered__=this.__filtered__;e.__iteratees__=cr(this.__iteratees__);e.__takeCount__=this.__takeCount__;e.__views__=cr(this.__views__);return e}var cS=lazyClone;function lazyReverse(){if(this.__filtered__){var e=new Qe(this);e.__dir__=-1;e.__filtered__=true}else{e=this.clone();e.__dir__*=-1}return e}var fS=lazyReverse;var lS=Math.max,vS=Math.min;function getView(e,r,t){var n=-1,a=t.length;while(++n0||r<0)){return new Qe(t)}if(e<0){t=t.takeRight(-e)}else if(e){t=t.drop(e)}if(r!==undefined){r=ue(r);t=r<0?t.dropRight(-r):t.take(r-e)}return t};Qe.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()};Qe.prototype.toArray=function(){return this.take(xS)};tv(Qe.prototype,function(e,r){var t=/^(?:filter|find|map|reject)|While$/.test(r),n=/^(?:head|last)$/.test(r),a=dr[n?"take"+(r=="last"?"Right":""):r],i=n||/^find/.test(r);if(!a){return}dr.prototype[r]=function(){var r=this.__wrapped__,o=n?[1]:arguments,u=r instanceof Qe,s=o[0],c=u||U(r);var f=function(e){var r=a.apply(dr,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 Qe(this);var h=e.apply(r,o);h.__actions__.push({func:Iw,args:[f],thisArg:undefined});return new sr(h,l)}if(d&&p){return e.apply(this,o)}h=this.thru(f);return d?n?h.value()[0]:h.value():h}});Wr(["pop","push","shift","sort","splice","unshift"],function(e){var r=SS[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);dr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var a=this.value();return r.apply(U(a)?a:[],e)}return this[t](function(t){return r.apply(U(t)?t:[],e)})}});tv(Qe.prototype,function(e,r){var t=dr[r];if(t){var n=t.name+"";if(!OS.call(ar,n)){ar[n]=[]}ar[n].push({name:r,func:t})}});ar[bt(undefined,mS).name]=[{name:"wrapper",func:undefined}];Qe.prototype.clone=cS;Qe.prototype.reverse=fS;Qe.prototype.value=gS;dr.prototype.at=oS.at;dr.prototype.chain=oS.wrapperChain;dr.prototype.commit=oS.commit;dr.prototype.next=oS.next;dr.prototype.plant=oS.plant;dr.prototype.reverse=oS.reverse;dr.prototype.toJSON=dr.prototype.valueOf=dr.prototype.value=oS.value;dr.prototype.first=dr.prototype.head;if(IS){dr.prototype[IS]=oS.toIterator}var kS=dr;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(!Zp(image_tag_ImageTag.targetPlatformToImageSuffixMap,a)){throw new Error(`Platform "${a}" is currently not supported.`)}const i=Si(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 Hw(`${this.version}-${this.builderPlatform}`,"-")}get image(){return Vw(`${this.repository}/${this.name}`,"/")}toString(){const{image:e,tag:r}=this;return`${e}:${r}`}}var CS=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 CS({repository:"",name:"unity-builder",version:i,platform:o});const s=`docker build ${t} --file ${n} --build-arg IMAGE=${a} --tag ${u}`;await Object(h.exec)(s,null,{silent:r});return u}static async run(e,r,t=false){const{unityVersion:n,workspace:a,platform:i,projectPath:o,buildName:u,buildPath:s,buildFile:c,buildMethod:f,versioning:l,version:v,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="${i}" --env BUILD_NAME="${u}" --env BUILD_PATH="${s}" --env BUILD_FILE="${c}" --env BUILD_METHOD="${f}" --env VERSIONING="${l}" --env VERSION="${v}" --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 "${a}":"/github/workspace" ${e}`;await Object(h.exec)(p,null,{silent:t})}}var RS=docker_Docker;const WS=t(470);async function src_action(){i.checkCompatibility();p.verify();const{dockerfile:e,workspace:r,actionFolder:t}=i;const n=u.create(v.getFromUser());const a=new CS(n);const o=await RS.build({path:t,dockerfile:e,baseImage:a});await RS.run(o,{workspace:r,...n})}src_action().catch(e=>{WS.setFailed(e.message)})},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__(939)}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()}}},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")},939: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{unityVersion:r,targetPlatform:t,projectPath:n,buildName:a,buildsPath:i,buildMethod:o,versioning:u,version:s,customParameters:c}=e;return{unityVersion:r,platform:t,projectPath:n,buildName:a,buildPath:`${i}/${t}`,buildFile:this.parseBuildFile(a,t),buildMethod:o,versioning:u,version:s,customParameters:c}}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);class Unity{static get libraryFolder(){return"Library"}}var f=Unity;class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError"}}var l=ValidationError;const v=t(470);const d=["None","Semantic","Tag","Custom"];class input_Input{static getFromUser(){const e=v.getInput("unityVersion");const r=v.getInput("targetPlatform")||o.default;const t=v.getInput("projectPath")||".";const n=v.getInput("buildName")||r;const a=v.getInput("buildsPath")||"build";const i=v.getInput("buildMethod");const u=v.getInput("versioning")||"Semantic";const s=v.getInput("version")||"";const c=v.getInput("customParameters")||"";const f=t.replace(/\/$/,"");if(!d.includes(u)){throw new l(`Versioning strategy should be one of ${d.join(", ")}.`)}return{unityVersion:e,targetPlatform:r,projectPath:f,buildName:n,buildsPath:a,buildMethod:i,versioning:u,version:s,customParameters:c}}}var p=input_Input;class project_Project{static get relativePath(){const{projectPath:e}=p.getFromUser();return`${e}`}static get absolutePath(){const{workspace:e}=i;return`${e}/${this.relativePath}`}static get libraryFolder(){return`${this.relativePath}/${f.libraryFolder}`}}var h=project_Project;class cache_Cache{static verify(){if(!c().existsSync(h.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 y=cache_Cache;var g=t(986);var b=typeof global=="object"&&global&&global.Object===Object&&global;var m=b;var _=typeof self=="object"&&self&&self.Object===Object&&self;var w=m||_||Function("return this")();var x=w;var S=x.Symbol;var j=S;var O=Object.prototype;var I=O.hasOwnProperty;var A=O.toString;var E=j?j.toStringTag:undefined;function getRawTag(e){var r=I.call(e,E),t=e[E];try{e[E]=undefined;var n=true}catch(e){}var a=A.call(e);if(n){if(r){e[E]=t}else{delete e[E]}}return a}var P=getRawTag;var k=Object.prototype;var C=k.toString;function objectToString(e){return C.call(e)}var R=objectToString;var W="[object Null]",T="[object Undefined]";var M=j?j.toStringTag:undefined;function baseGetTag(e){if(e==null){return e===undefined?T:W}return M&&M in Object(e)?P(e):R(e)}var B=baseGetTag;function isObjectLike(e){return e!=null&&typeof e=="object"}var L=isObjectLike;var D="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||L(e)&&B(e)==D}var F=isSymbol;var N=0/0;function baseToNumber(e){if(typeof e=="number"){return e}if(F(e)){return N}return+e}var $=baseToNumber;function arrayMap(e,r){var t=-1,n=e==null?0:e.length,a=Array(n);while(++t0){if(++r>=gr){return arguments[0]}}else{r=0}return e.apply(undefined,arguments)}}var _r=shortOut;var wr=_r(Ne);var xr=wr;var Sr=/\{\n\/\* \[wrapped with (.+)\] \*/,jr=/,? & /;function getWrapDetails(e){var r=e.match(Sr);return r?r[1].split(jr):[]}var Or=getWrapDetails;var Ir=/\{(?:\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(Ir,"{\n/* [wrapped with "+r+"] */\n")}var Ar=insertWrapDetails;function constant(e){return function(){return e}}var Er=constant;var Pr=function(){try{var e=Te(Object,"defineProperty");e({},"",{});return e}catch(e){}}();var kr=Pr;var Cr=!kr?ve:function(e,r){return kr(e,"toString",{configurable:true,enumerable:false,value:Er(r),writable:true})};var Rr=Cr;var Wr=_r(Rr);var Tr=Wr;function arrayEach(e,r){var t=-1,n=e==null?0:e.length;while(++t-1}var Nr=arrayIncludes;var $r=1,Ur=2,zr=8,qr=16,Hr=32,Vr=64,Gr=128,Kr=256,Zr=512;var Xr=[["ary",Gr],["bind",$r],["bindKey",Ur],["curry",zr],["curryRight",qr],["flip",Zr],["partial",Hr],["partialRight",Vr],["rearg",Kr]];function updateWrapDetails(e,r){Mr(Xr,function(t){var n="_."+t[0];if(r&t[1]&&!Nr(e,n)){e.push(n)}});return e.sort()}var Yr=updateWrapDetails;function setWrapToString(e,r,t){var n=r+"";return Tr(e,Ar(n,Yr(Or(n),t)))}var Jr=setWrapToString;var Qr=1,et=2,rt=4,tt=8,nt=32,at=64;function createRecurry(e,r,t,n,a,i,o,u,s,c){var f=r&tt,l=f?o:undefined,v=f?undefined:o,d=f?i:undefined,p=f?undefined:i;r|=f?nt:at;r&=~(f?at:nt);if(!(r&rt)){r&=~(Qr|et)}var h=[e,r,a,d,l,p,v,u,s,c];var y=t.apply(undefined,h);if(yr(e)){xr(y,h)}y.placeholder=n;return Jr(y,e,r)}var it=createRecurry;function getHolder(e){var r=e;return r.placeholder}var ot=getHolder;var ut=9007199254740991;var st=/^(?:0|[1-9]\d*)$/;function isIndex(e,r){var t=typeof e;r=r==null?ut:r;return!!r&&(t=="number"||t!="symbol"&&st.test(e))&&(e>-1&&e%1==0&&e1){g.reverse()}if(f&&s-1&&e%1==0&&e<=Qt}var en=isLength;function isArrayLike(e){return e!=null&&en(e.length)&&!ge(e)}var rn=isArrayLike;function isIterateeCall(e,r,t){if(!J(t)){return false}var n=typeof r;if(n=="number"?rn(t)&&ct(r,t.length):n=="string"&&r in t){return Ht(t[r],e)}return false}var tn=isIterateeCall;function createAssigner(e){return Jt(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&&tn(t[0],t[1],o)){i=a<3?undefined:i;a=1}r=Object(r);while(++n-1}var Qa=listCacheHas;function listCacheSet(e,r){var t=this.__data__,n=Ka(t,e);if(n<0){++this.size;t.push([e,r])}else{t[n][1]=r}return this}var ei=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{Ai(a,u)}}else if(!n){a[a.length]=u}}return a}var ki=baseFlatten;function flatten(e){var r=e==null?0:e.length;return r?ki(e,1):[]}var Ci=flatten;function flatRest(e){return Tr(Yt(e,undefined,Ci),e+"")}var Ri=flatRest;var Wi=Ri(Ii);var Ti=Wi;var Mi=sa(Object.getPrototypeOf,Object);var Bi=Mi;var Li="[object Object]";var Di=Function.prototype,Fi=Object.prototype;var Ni=Di.toString;var $i=Fi.hasOwnProperty;var Ui=Ni.call(Object);function isPlainObject(e){if(!L(e)||B(e)!=Li){return false}var r=Bi(e);if(r===null){return true}var t=$i.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&Ni.call(t)==Ui}var zi=isPlainObject;var qi="[object DOMException]",Hi="[object Error]";function isError(e){if(!L(e)){return false}var r=B(e);return r==Hi||r==qi||typeof e.message=="string"&&typeof e.name=="string"&&!zi(e)}var Vi=isError;var Gi=Jt(function(e,r){try{return Ge(e,undefined,r)}catch(e){return Vi(e)?e:new Error(e)}});var Ki=Gi;var Zi="Expected a function";function before(e,r){var t;if(typeof r!="function"){throw new TypeError(Zi)}e=ce(e);return function(){if(--e>0){t=r.apply(this,arguments)}if(e<=1){r=undefined}return t}}var Xi=before;var Yi=1,Ji=32;var Qi=Jt(function(e,r,t){var n=Yi;if(t.length){var a=dt(t,ot(Qi));n|=Ji}return $t(e,n,r,t,a)});Qi.placeholder={};var eo=Qi;var ro=Ri(function(e,r){Mr(r,function(r){r=Si(r);qt(e,r,eo(e[r],e))});return e});var to=ro;var no=1,ao=2,io=32;var oo=Jt(function(e,r,t){var n=no|ao;if(t.length){var a=dt(t,ot(oo));n|=io}return $t(r,n,e,t,a)});oo.placeholder={};var uo=oo;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:so(e,r,t)}var co=castSlice;var fo="\\ud800-\\udfff",lo="\\u0300-\\u036f",vo="\\ufe20-\\ufe2f",po="\\u20d0-\\u20ff",ho=lo+vo+po,yo="\\ufe0e\\ufe0f";var go="\\u200d";var bo=RegExp("["+go+fo+ho+yo+"]");function hasUnicode(e){return bo.test(e)}var mo=hasUnicode;function asciiToArray(e){return e.split("")}var _o=asciiToArray;var wo="\\ud800-\\udfff",xo="\\u0300-\\u036f",So="\\ufe20-\\ufe2f",jo="\\u20d0-\\u20ff",Oo=xo+So+jo,Io="\\ufe0e\\ufe0f";var Ao="["+wo+"]",Eo="["+Oo+"]",Po="\\ud83c[\\udffb-\\udfff]",ko="(?:"+Eo+"|"+Po+")",Co="[^"+wo+"]",Ro="(?:\\ud83c[\\udde6-\\uddff]){2}",Wo="[\\ud800-\\udbff][\\udc00-\\udfff]",To="\\u200d";var Mo=ko+"?",Bo="["+Io+"]?",Lo="(?:"+To+"(?:"+[Co,Ro,Wo].join("|")+")"+Bo+Mo+")*",Do=Bo+Mo+Lo,Fo="(?:"+[Co+Eo+"?",Eo,Ro,Wo,Ao].join("|")+")";var No=RegExp(Po+"(?="+Po+")|"+Fo+Do,"g");function unicodeToArray(e){return e.match(No)||[]}var $o=unicodeToArray;function stringToArray(e){return mo(e)?$o(e):_o(e)}var Uo=stringToArray;function createCaseFirst(e){return function(r){r=_i(r);var t=mo(r)?Uo(r):undefined;var n=t?t[0]:r.charAt(0);var a=t?co(t,1).join(""):r.slice(1);return n[e]()+a}}var zo=createCaseFirst;var qo=zo("toUpperCase");var Ho=qo;function capitalize(e){return Ho(_i(e).toLowerCase())}var Vo=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 ds=baseClamp;function clamp(e,r,t){if(t===undefined){t=r;r=undefined}if(t!==undefined){t=ie(t);t=t===t?t:0}if(r!==undefined){r=ie(r);r=r===r?r:0}return ds(ie(e),r,t)}var ps=clamp;function stackClear(){this.__data__=new ri;this.size=0}var hs=stackClear;function stackDelete(e){var r=this.__data__,t=r["delete"](e);this.size=r.size;return t}var ys=stackDelete;function stackGet(e){return this.__data__.get(e)}var gs=stackGet;function stackHas(e){return this.__data__.has(e)}var bs=stackHas;var ms=200;function stackSet(e,r){var t=this.__data__;if(t instanceof ri){var n=t.__data__;if(!ni||n.lengthu)){return false}var c=i.get(e);if(c&&i.get(r)){return c==r}var f=-1,l=true,v=t&Jf?new Kf:undefined;i.set(e,r);i.set(r,e);while(++f=r||t<0||l&&n>=i}function timerExpired(){var e=_v();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(_v())}function debounced(){var e=_v(),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 jv=debounce;function defaultTo(e,r){return e==null||e!==e?r:e}var Ov=defaultTo;var Iv=Object.prototype;var Av=Iv.hasOwnProperty;var Ev=Jt(function(e,r){e=Object(e);var t=-1;var n=r.length;var a=n>2?r[2]:undefined;if(a&&tn(r[0],r[1],a)){n=1}while(++t=Kv){i=Xf;o=false;r=new Kf(r)}e:while(++a=0&&e.slice(t,a)==r}var md=endsWith;function baseToPairs(e,r){return U(r,function(r){return[r,e[r]]})}var _d=baseToPairs;function setToPairs(e){var r=-1,t=Array(e.size);e.forEach(function(e){t[++r]=[e,e]});return t}var wd=setToPairs;var xd="[object Map]",Sd="[object Set]";function createToPairs(e){return function(r){var t=cc(r);if(t==xd){return el(r)}if(t==Sd){return wd(r)}return _d(r,e(r))}}var jd=createToPairs;var Od=jd(pa);var Id=Od;var Ad=jd(Sa);var Ed=Ad;var Pd={"&":"&","<":"<",">":">",'"':""","'":"'"};var kd=Ko(Pd);var Cd=kd;var Rd=/[&<>"']/g,Wd=RegExp(Rd.source);function escape_escape(e){e=_i(e);return e&&Wd.test(e)?e.replace(Rd,Cd):e}var Td=escape_escape;var Md=/[\\^$.*+?()[\]{}|]/g,Bd=RegExp(Md.source);function escapeRegExp(e){e=_i(e);return e&&Bd.test(e)?e.replace(Md,"\\$&"):e}var Ld=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:ce(n);if(n<0){n+=a}n=t>n?0:Ud(n);while(t-1?a[i?r[o]:o]:undefined}}var Gd=createFind;var Kd=Math.max;function findIndex(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=t==null?0:ce(t);if(a<0){a=Kd(n+a,0)}return Br(e,Vl(r,3),a)}var Zd=findIndex;var Xd=Gd(Zd);var Yd=Xd;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 Jd=baseFindKey;function findKey(e,r){return Jd(e,Vl(r,3),av)}var Qd=findKey;var ep=Math.max,rp=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=ce(t);a=t<0?ep(n+a,0):rp(a,n-1)}return Br(e,Vl(r,3),a,true)}var tp=findLastIndex;var np=Gd(tp);var ap=np;function findLastKey(e,r){return Jd(e,Vl(r,3),hd)}var ip=findLastKey;function head(e){return e&&e.length?e[0]:undefined}var op=head;function baseMap(e,r){var t=-1,n=rn(e)?Array(e.length):[];uv(e,function(e,a,i){n[++t]=r(e,a,i)});return n}var up=baseMap;function map_map(e,r){var t=q(e)?U:up;return t(e,Vl(r,3))}var sp=map_map;function flatMap(e,r){return ki(sp(e,r),1)}var cp=flatMap;var fp=1/0;function flatMapDeep(e,r){return ki(sp(e,r),fp)}var lp=flatMapDeep;function flatMapDepth(e,r,t){t=t===undefined?1:ce(t);return ki(sp(e,r),t)}var vp=flatMapDepth;var dp=1/0;function flattenDeep(e){var r=e==null?0:e.length;return r?ki(e,dp):[]}var pp=flattenDeep;function flattenDepth(e,r){var t=e==null?0:e.length;if(!t){return[]}r=r===undefined?1:ce(r);return ki(e,r)}var hp=flattenDepth;var yp=512;function flip(e){return $t(e,yp)}var gp=flip;var bp=os("floor");var mp=bp;var _p="Expected a function";var wp=8,xp=32,Sp=128,jp=256;function createFlow(e){return Ri(function(r){var t=r.length,n=t,a=fr.prototype.thru;if(e){r.reverse()}while(n--){var i=r[n];if(typeof i!="function"){throw new TypeError(_p)}if(a&&!o&&cr(i)=="wrapper"){var o=new fr([],true)}}n=o?n:t;while(++nr}var Up=baseGt;function createRelationalOperation(e){return function(r,t){if(!(typeof r=="string"&&typeof t=="string")){r=ie(r);t=ie(t)}return e(r,t)}}var zp=createRelationalOperation;var qp=zp(Up);var Hp=qp;var Vp=zp(function(e,r){return e>=r});var Gp=Vp;var Kp=Object.prototype;var Zp=Kp.hasOwnProperty;function baseHas(e,r){return e!=null&&Zp.call(e,r)}var Xp=baseHas;function has(e,r){return e!=null&&Dl(e,r,Xp)}var Yp=has;var Jp=Math.max,Qp=Math.min;function baseInRange(e,r,t){return e>=Qp(r,t)&&e-1:!!a&&Fr(e,r,t)>-1}var uh=includes_includes;var sh=Math.max;function indexOf_indexOf(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=t==null?0:ce(t);if(a<0){a=sh(n+a,0)}return Fr(e,r,a)}var ch=indexOf_indexOf;function initial(e){var r=e==null?0:e.length;return r?so(e,0,-1):[]}var fh=initial;var lh=Math.min;function baseIntersection(e,r,t){var n=t?Gv:Nr,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=U(f,Zn(r))}s=lh(f.length,s);u[o]=!t&&(r||a>=120&&f.length>=120)?new Kf(o&&f):undefined}f=e[0];var l=-1,v=u[0];e:while(++l=-xy&&e<=xy}var Sy=isSafeInteger;function isUndefined(e){return e===undefined}var jy=isUndefined;var Oy="[object WeakMap]";function isWeakMap(e){return L(e)&&cc(e)==Oy}var Iy=isWeakMap;var Ay="[object WeakSet]";function isWeakSet(e){return L(e)&&B(e)==Ay}var Ey=isWeakSet;var Py=1;function iteratee_iteratee(e){return Vl(typeof e=="function"?e:Cf(e,Py))}var ky=iteratee_iteratee;var Cy=Array.prototype;var Ry=Cy.join;function join(e,r){return e==null?"":Ry.call(e,r)}var Wy=join;var Ty=es(function(e,r,t){return e+(t?"-":"")+r.toLowerCase()});var My=Ty;var By=cv(function(e,r,t){qt(e,t,r)});var Ly=By;function strictLastIndexOf(e,r,t){var n=t+1;while(n--){if(e[n]===r){return n}}return n}var Dy=strictLastIndexOf;var Fy=Math.max,Ny=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=ce(t);a=a<0?Fy(n+a,0):Ny(a,n-1)}return r===r?Dy(e,r,a):Br(e,Lr,a,true)}var $y=lastIndexOf;var Uy=es(function(e,r,t){return e+(t?" ":"")+r.toLowerCase()});var zy=Uy;var qy=zo("toLowerCase");var Hy=qy;function baseLt(e,r){return e=this.__values__.length,r=e?undefined:this.__values__[this.__index__++];return{done:e,value:r}}var Pg=wrapperNext;function baseNth(e,r){var t=e.length;if(!t){return}r+=r<0?t:0;return ct(r,t)?e[r]:undefined}var kg=baseNth;function nth(e,r){return e&&e.length?kg(e,ce(r)):undefined}var Cg=nth;function nthArg(e){e=ce(e);return Jt(function(r){return kg(r,e)})}var Rg=nthArg;function baseUnset(e,r){r=wi(r,e);e=Ch(e,r);return e==null||delete e[Si(Jv(r))]}var Wg=baseUnset;function customOmitClone(e){return zi(e)?undefined:e}var Tg=customOmitClone;var Mg=1,Bg=2,Lg=4;var Dg=Ri(function(e,r){var t={};if(e==null){return t}var n=false;r=U(r,function(r){r=wi(r,e);n||(n=r.length>1);return r});Zt(e,qs(e),t);if(n){t=Cf(t,Mg|Bg|Lg,Tg)}var a=r.length;while(a--){Wg(t,r[a])}return t});var Fg=Dg;function baseSet(e,r,t,n){if(!J(e)){return e}r=wi(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 Gg=compareMultiple;function baseOrderBy(e,r,t){var n=-1;r=U(r.length?r:[ve],Zn(Vl));var a=up(e,function(e,t,a){var i=U(r,function(r){return r(e)});return{criteria:i,index:++n,value:e}});return Hg(a,function(e,r){return Gg(e,r,t)})}var Kg=baseOrderBy;function orderBy(e,r,t,n){if(e==null){return[]}if(!q(r)){r=r==null?[]:[r]}t=n?undefined:t;if(!q(t)){t=t==null?[]:[t]}return Kg(e,r,t)}var Zg=orderBy;function createOver(e){return Ri(function(r){r=U(r,Zn(Vl));return Jt(function(t){var n=this;return e(r,function(e){return Ge(e,n,t)})})})}var Xg=createOver;var Yg=Xg(U);var Jg=Yg;var Qg=Jt;var eb=Qg;var rb=Math.min;var tb=eb(function(e,r){r=r.length==1&&q(r[0])?U(r[0],Zn(Vl)):U(ki(r,1),Zn(Vl));var t=r.length;return Jt(function(n){var a=-1,i=rb(n.length,t);while(++asb){return t}do{if(r%2){t+=e}r=cb(r/2);if(r){e+=e}}while(r);return t}var fb=baseRepeat;var lb=zl("length");var vb=lb;var db="\\ud800-\\udfff",pb="\\u0300-\\u036f",hb="\\ufe20-\\ufe2f",yb="\\u20d0-\\u20ff",gb=pb+hb+yb,bb="\\ufe0e\\ufe0f";var mb="["+db+"]",_b="["+gb+"]",wb="\\ud83c[\\udffb-\\udfff]",xb="(?:"+_b+"|"+wb+")",Sb="[^"+db+"]",jb="(?:\\ud83c[\\udde6-\\uddff]){2}",Ob="[\\ud800-\\udbff][\\udc00-\\udfff]",Ib="\\u200d";var Ab=xb+"?",Eb="["+bb+"]?",Pb="(?:"+Ib+"(?:"+[Sb,jb,Ob].join("|")+")"+Eb+Ab+")*",kb=Eb+Ab+Pb,Cb="(?:"+[Sb+_b+"?",_b,jb,Ob,mb].join("|")+")";var Rb=RegExp(wb+"(?="+wb+")|"+Cb+kb,"g");function unicodeSize(e){var r=Rb.lastIndex=0;while(Rb.test(e)){++r}return r}var Wb=unicodeSize;function stringSize(e){return mo(e)?Wb(e):vb(e)}var Tb=stringSize;var Mb=Math.ceil;function createPadding(e,r){r=r===undefined?" ":K(r);var t=r.length;if(t<2){return t?fb(r,e):r}var n=fb(r,Mb(e/Tb(r)));return mo(r)?co(Uo(n),0,e).join(""):n.slice(0,e)}var Bb=createPadding;var Lb=Math.ceil,Db=Math.floor;function pad(e,r,t){e=_i(e);r=ce(r);var n=r?Tb(e):0;if(!r||n>=r){return e}var a=(r-n)/2;return Bb(Db(a),t)+e+Bb(Lb(a),t)}var Fb=pad;function padEnd(e,r,t){e=_i(e);r=ce(r);var n=r?Tb(e):0;return r&&n-1){if(u!==e){om.call(u,s,1)}om.call(e,s,1)}}return e}var um=basePullAll;function pullAll(e,r){return e&&e.length&&r&&r.length?um(e,r):e}var sm=pullAll;var cm=Jt(sm);var fm=cm;function pullAllBy(e,r,t){return e&&e.length&&r&&r.length?um(e,r,Vl(t,2)):e}var lm=pullAllBy;function pullAllWith(e,r,t){return e&&e.length&&r&&r.length?um(e,r,undefined,t):e}var vm=pullAllWith;var dm=Array.prototype;var pm=dm.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(ct(a)){pm.call(e,a,1)}else{Wg(e,a)}}}return e}var hm=basePullAt;var ym=Ri(function(e,r){var t=e==null?0:e.length,n=Ii(e,r);hm(e,U(r,function(e){return ct(e,t)?+e:e}).sort(Vg));return n});var gm=ym;var bm=Math.floor,mm=Math.random;function baseRandom(e,r){return e+bm(mm()*(r-e+1))}var _m=baseRandom;var wm=parseFloat;var xm=Math.min,Sm=Math.random;function random(e,r,t){if(t&&typeof t!="boolean"&&tn(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=se(e);if(r===undefined){r=e;e=0}else{r=se(r)}}if(e>r){var n=e;e=r;r=n}if(t||e%1||r%1){var a=Sm();return xm(e+a*(r-e+wm("1e-"+((a+"").length-1))),r)}return _m(e,r)}var jm=random;var Om=Math.ceil,Im=Math.max;function baseRange(e,r,t,n){var a=-1,i=Im(Om((r-e)/(t||1)),0),o=Array(i);while(i--){o[n?i:++a]=e;e+=t}return o}var Am=baseRange;function createRange(e){return function(r,t,n){if(n&&typeof n!="number"&&tn(r,t,n)){t=n=undefined}r=se(r);if(t===undefined){t=r;r=0}else{t=se(t)}n=n===undefined?r1&&tn(e,r[0],r[1])){r=[]}else if(t>2&&tn(r[0],r[1],r[2])){r=[r[0]]}return Kg(e,ki(r,1),[])});var m_=b_;var __=4294967295,w_=__-1;var x_=Math.floor,S_=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=F(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<=I_){while(n>>1,o=e[i];if(o!==null&&!F(o)&&(t?o<=r:o>>0;if(!t){return[]}e=_i(e);if(e&&(typeof r=="string"||r!=null&&!wy(r))){r=K(r);if(!r&&mo(e)){return co(Uo(e),0,t)}}return e.split(r,t)}var D_=split;var F_="Expected a function";var N_=Math.max;function spread(e,r){if(typeof e!="function"){throw new TypeError(F_)}r=r==null?0:N_(ce(r),0);return Jt(function(t){var n=t[r],a=co(t,0,r);if(n){Ai(a,n)}return Ge(e,this,a)})}var $_=spread;var U_=es(function(e,r,t){return e+(t?" ":"")+Ho(r)});var z_=U_;function startsWith(e,r,t){e=_i(e);t=t==null?0:ds(ce(t),0,e.length);r=K(r);return e.slice(t,t+r.length)==r}var q_=startsWith;function stubObject(){return{}}var H_=stubObject;function stubString(){return""}var V_=stubString;function stubTrue(){return true}var G_=stubTrue;var K_=Z(function(e,r){return e-r},0);var Z_=K_;function sum(e){return e&&e.length?og(e,ve):0}var X_=sum;function sumBy(e,r){return e&&e.length?og(e,Vl(r,2)):0}var Y_=sumBy;function tail(e){var r=e==null?0:e.length;return r?so(e,1,r):[]}var J_=tail;function take(e,r,t){if(!(e&&e.length)){return[]}r=t||r===undefined?1:ce(r);return so(e,0,r<0?0:r)}var Q_=take;function takeRight(e,r,t){var n=e==null?0:e.length;if(!n){return[]}r=t||r===undefined?1:ce(r);r=n-r;return so(e,r<0?0:r,n)}var ew=takeRight;function takeRightWhile(e,r){return e&&e.length?ud(e,Vl(r,3),false,true):[]}var rw=takeRightWhile;function takeWhile(e,r){return e&&e.length?ud(e,Vl(r,3)):[]}var tw=takeWhile;function tap(e,r){r(e);return e}var nw=tap;var aw=Object.prototype;var iw=aw.hasOwnProperty;function customDefaultsAssignIn(e,r,t,n){if(e===undefined||Ht(e,aw[t])&&!iw.call(n,t)){return r}return e}var ow=customDefaultsAssignIn;var uw={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function escapeStringChar(e){return"\\"+uw[e]}var sw=escapeStringChar;var cw=/<%=([\s\S]+?)%>/g;var fw=cw;var lw=/<%-([\s\S]+?)%>/g;var vw=lw;var dw=/<%([\s\S]+?)%>/g;var pw=dw;var hw={escape:vw,evaluate:pw,interpolate:fw,variable:"",imports:{_:{escape:Td}}};var yw=hw;var gw=/\b__p \+= '';/g,bw=/\b(__p \+=) '' \+/g,mw=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var _w=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var ww=/($^)/;var xw=/['\n\r\u2028\u2029\\]/g;var Sw=Object.prototype;var jw=Sw.hasOwnProperty;function template(e,r,t){var n=yw.imports._.templateSettings||yw;if(t&&tn(e,r,t)){r=undefined}e=_i(e);r=Aa({},r,n,ow);var a=Aa({},r.imports,n.imports,ow),i=pa(a),o=ah(a,i);var u,s,c=0,f=r.interpolate||ww,l="__p += '";var v=RegExp((r.escape||ww).source+"|"+f.source+"|"+(f===fw?_w:ww).source+"|"+(r.evaluate||ww).source+"|$","g");var d=jw.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(xw,sw);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=jw.call(r,"variable")&&r.variable;if(!p){l="with (obj) {\n"+l+"\n}\n"}l=(s?l.replace(gw,""):l).replace(bw,"$1").replace(mw,"$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=Ki(function(){return Function(i,d+"return "+l).apply(undefined,o)});h.source=l;if(Vi(h)){throw h}return h}var Ow=template;var Iw="Expected a function";function throttle(e,r,t){var n=true,a=true;if(typeof e!="function"){throw new TypeError(Iw)}if(J(t)){n="leading"in t?!!t.leading:n;a="trailing"in t?!!t.trailing:a}return jv(e,r,{leading:n,maxWait:r,trailing:a})}var Aw=throttle;function thru(e,r){return r(e)}var Ew=thru;var Pw=9007199254740991;var kw=4294967295;var Cw=Math.min;function times(e,r){e=ce(e);if(e<1||e>Pw){return[]}var t=kw,n=Cw(e,kw);r=fd(r);e-=kw;var a=un(n,r);while(++t-1){}return t}var Uw=charsEndIndex;function charsStartIndex(e,r){var t=-1,n=e.length;while(++t-1){}return t}var zw=charsStartIndex;var qw=/^\s+|\s+$/g;function trim(e,r,t){e=_i(e);if(e&&(t||r===undefined)){return e.replace(qw,"")}if(!e||!(r=K(r))){return e}var n=Uo(e),a=Uo(r),i=zw(n,a),o=Uw(n,a)+1;return co(n,i,o).join("")}var Hw=trim;var Vw=/\s+$/;function trimEnd(e,r,t){e=_i(e);if(e&&(t||r===undefined)){return e.replace(Vw,"")}if(!e||!(r=K(r))){return e}var n=Uo(e),a=Uw(n,Uo(r))+1;return co(n,0,a).join("")}var Gw=trimEnd;var Kw=/^\s+/;function trimStart(e,r,t){e=_i(e);if(e&&(t||r===undefined)){return e.replace(Kw,"")}if(!e||!(r=K(r))){return e}var n=Uo(e),a=zw(n,Uo(r));return co(n,a).join("")}var Zw=trimStart;var Xw=30,Yw="...";var Jw=/\w*$/;function truncate(e,r){var t=Xw,n=Yw;if(J(r)){var a="separator"in r?r.separator:a;t="length"in r?ce(r.length):t;n="omission"in r?K(r.omission):n}e=_i(e);var i=e.length;if(mo(e)){var o=Uo(e);i=o.length}if(t>=i){return e}var u=t-Tb(n);if(u<1){return n}var s=o?co(o,0,u).join(""):e.slice(0,u);if(a===undefined){return s+n}if(o){u+=s.length-u}if(wy(a)){if(e.slice(u).search(a)){var c,f=s;if(!a.global){a=RegExp(a.source,_i(Jw.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(K(a),u)!=u){var v=s.lastIndexOf(a);if(v>-1){s=s.slice(0,v)}}return s+n}var Qw=truncate;function unary(e){return zt(e,1)}var ex=unary;var rx={"&":"&","<":"<",">":">",""":'"',"'":"'"};var tx=Ko(rx);var nx=tx;var ax=/&(?:amp|lt|gt|quot|#39);/g,ix=RegExp(ax.source);function unescape_unescape(e){e=_i(e);return e&&ix.test(e)?e.replace(ax,nx):e}var ox=unescape_unescape;var ux=1/0;var sx=!(Xs&&1/rl(new Xs([,-0]))[1]==ux)?tr:function(e){return new Xs(e)};var cx=sx;var fx=200;function baseUniq(e,r,t){var n=-1,a=Nr,i=e.length,o=true,u=[],s=u;if(t){o=false;a=Gv}else if(i>=fx){var c=r?null:cx(e);if(c){return rl(c)}o=false;a=Xf;s=new Kf}else{s=r?[]:u}e:while(++n1||this.__actions__.length||!(n instanceof rr)||!ct(t)){return this.thru(a)}n=n.slice(t,+t+(r?1:0));n.__actions__.push({func:Ew,args:[a],thisArg:undefined});return new fr(n,this.__chain__).thru(function(e){if(r&&!e.length){e.push(undefined)}return e})});var Lx=Bx;function wrapperChain(){return cs(this)}var Dx=wrapperChain;function wrapperReverse(){var e=this.__wrapped__;if(e instanceof rr){var r=e;if(this.__actions__.length){r=new rr(this)}r=r.reverse();r.__actions__.push({func:Ew,args:[Zm],thisArg:undefined});return new fr(r,this.__chain__)}return this.thru(Zm)}var Fx=wrapperReverse;function baseXor(e,r,t){var n=e.length;if(n<2){return n?lx(e[0]):[]}var a=-1,i=Array(n);while(++a1?e[r-1]:undefined;t=typeof t=="function"?(e.pop(),t):undefined;return Ix(e,t)});var Qx=Jx;var eS={chunk:vs,compact:zf,concat:qf,difference:Yv,differenceBy:ed,differenceWith:td,drop:id,dropRight:od,dropRightWhile:sd,dropWhile:cd,fill:qd,findIndex:Zd,findLastIndex:tp,first:op,flatten:Ci,flattenDeep:pp,flattenDepth:hp,fromPairs:Tp,head:op,indexOf:ch,initial:fh,intersection:hh,intersectionBy:gh,intersectionWith:mh,join:Wy,last:Jv,lastIndexOf:$y,nth:Cg,pull:fm,pullAll:sm,pullAllBy:lm,pullAllWith:vm,pullAt:gm,remove:$m,reverse:Zm,slice:d_,sortedIndex:E_,sortedIndexBy:P_,sortedIndexOf:k_,sortedLastIndex:C_,sortedLastIndexBy:R_,sortedLastIndexOf:W_,sortedUniq:M_,sortedUniqBy:B_,tail:J_,take:Q_,takeRight:ew,takeRightWhile:rw,takeWhile:tw,union:dx,unionBy:hx,unionWith:gx,uniq:bx,uniqBy:mx,uniqWith:_x,unzip:Ox,unzipWith:Ix,without:Tx,xor:Ux,xorBy:qx,xorWith:Vx,zip:Kx,zipObject:Xx,zipObjectDeep:Yx,zipWith:Qx};var rS={countBy:dv,each:ld,eachRight:bd,every:Nd,filter:Vd,find:Yd,findLast:ap,flatMap:cp,flatMapDeep:lp,flatMapDepth:vp,forEach:ld,forEachRight:bd,groupBy:$p,includes:uh,invokeMap:Bh,keyBy:Ly,map:sp,orderBy:Zg,partition:Jb,reduce:Lm,reduceRight:Fm,reject:Nm,sample:e_,sampleSize:a_,shuffle:c_,size:v_,some:g_,sortBy:m_};var tS={now:_v};var nS={after:le,ary:zt,before:Xi,bind:eo,bindKey:uo,curry:yv,curryRight:bv,debounce:jv,defer:qv,delay:Vv,flip:gp,memoize:di,negate:Sg,once:qg,overArgs:nb,partial:Gb,partialRight:Xb,rearg:Mm,rest:Hm,spread:$_,throttle:Aw,unary:ex,wrap:Mx};var aS={castArray:ns,clone:Wf,cloneDeep:Bf,cloneDeepWith:Ff,cloneWith:$f,conformsTo:Ql,eq:Ht,gt:Hp,gte:Gp,isArguments:pn,isArray:q,isArrayBuffer:$h,isArrayLike:rn,isArrayLikeObject:Cv,isBoolean:zh,isBuffer:xn,isDate:Kh,isElement:Zh,isEmpty:ey,isEqual:ry,isEqualWith:ty,isError:Vi,isFinite:ay,isFunction:ge,isInteger:iy,isLength:en,isMap:Kc,isMatch:oy,isMatchWith:uy,isNaN:fy,isNative:py,isNil:hy,isNull:yy,isNumber:cy,isObject:J,isObjectLike:L,isPlainObject:zi,isRegExp:wy,isSafeInteger:Sy,isSet:Qc,isString:nh,isSymbol:F,isTypedArray:aa,isUndefined:jy,isWeakMap:Iy,isWeakSet:Ey,lt:Ky,lte:Xy,toArray:Eg,toFinite:se,toInteger:ce,toLength:Ud,toNumber:ie,toPlainObject:Wv,toSafeInteger:Fw,toString:_i};var iS={add:Y,ceil:ss,divide:ad,floor:mp,max:ag,maxBy:ig,mean:cg,meanBy:fg,min:gg,minBy:bg,multiply:wg,round:Ym,subtract:Z_,sum:X_,sumBy:Y_};var oS={clamp:ps,inRange:rh,random:jm};var uS={assign:ba,assignIn:Oa,assignInWith:Aa,assignWith:Pa,at:Ti,create:pv,defaults:Pv,defaultsDeep:Nv,entries:Id,entriesIn:Ed,extend:Oa,extendWith:Aa,findKey:Qd,findLastKey:ip,forIn:kp,forInRight:Cp,forOwn:Rp,forOwnRight:Wp,functions:Bp,functionsIn:Lp,get:Oi,has:Yp,hasIn:Fl,invert:Oh,invertBy:kh,invoke:Th,keys:pa,keysIn:Sa,mapKeys:Yy,mapValues:Jy,merge:vg,mergeWith:Dv,omit:Fg,omitBy:zg,pick:rm,pickBy:Ug,result:Vm,set:i_,setWith:o_,toPairs:Id,toPairsIn:Ed,transform:$w,unset:Sx,update:Ex,updateWith:Px,values:ih,valuesIn:Rx};var sS={at:Lx,chain:cs,commit:Uf,lodash:hr,next:Pg,plant:tm,reverse:Fx,tap:nw,thru:Ew,toIterator:Ww,toJSON:Mw,value:Mw,valueOf:Mw,wrapperChain:Dx};var cS={camelCase:ts,capitalize:Vo,deburr:iu,endsWith:md,escape:Td,escapeRegExp:Ld,kebabCase:My,lowerCase:zy,lowerFirst:Hy,pad:Fb,padEnd:Nb,padStart:$b,parseInt:qb,repeat:Um,replace:zm,snakeCase:h_,split:D_,startCase:z_,startsWith:q_,template:Ow,templateSettings:yw,toLower:Bw,toUpper:Nw,trim:Hw,trimEnd:Gw,trimStart:Zw,truncate:Qw,unescape:ox,upperCase:Cx,upperFirst:Ho,words:Yu};var fS={attempt:Ki,bindAll:to,cond:Kl,conforms:Jl,constant:Er,defaultTo:Ov,flow:Ap,flowRight:Pp,identity:ve,iteratee:ky,matches:eg,matchesProperty:tg,method:pg,methodOf:yg,mixin:mg,noop:tr,nthArg:Rg,over:Jg,overEvery:ib,overSome:ub,property:Hl,propertyOf:nm,range:km,rangeRight:Rm,stubArray:Cs,stubFalse:hn,stubObject:H_,stubString:V_,stubTrue:G_,times:Rw,toPath:Lw,uniqueId:xx};function lazyClone(){var e=new rr(this.__wrapped__);e.__actions__=lr(this.__actions__);e.__dir__=this.__dir__;e.__filtered__=this.__filtered__;e.__iteratees__=lr(this.__iteratees__);e.__takeCount__=this.__takeCount__;e.__views__=lr(this.__views__);return e}var lS=lazyClone;function lazyReverse(){if(this.__filtered__){var e=new rr(this);e.__dir__=-1;e.__filtered__=true}else{e=this.clone();e.__dir__*=-1}return e}var vS=lazyReverse;var dS=Math.max,pS=Math.min;function getView(e,r,t){var n=-1,a=t.length;while(++n0||r<0)){return new rr(t)}if(e<0){t=t.takeRight(-e)}else if(e){t=t.drop(e)}if(r!==undefined){r=ce(r);t=r<0?t.dropRight(-r):t.take(r-e)}return t};rr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()};rr.prototype.toArray=function(){return this.take(jS)};av(rr.prototype,function(e,r){var t=/^(?:filter|find|map|reject)|While$/.test(r),n=/^(?:head|last)$/.test(r),a=hr[n?"take"+(r=="last"?"Right":""):r],i=n||/^find/.test(r);if(!a){return}hr.prototype[r]=function(){var r=this.__wrapped__,o=n?[1]:arguments,u=r instanceof rr,s=o[0],c=u||q(r);var f=function(e){var r=a.apply(hr,Ai([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 rr(this);var h=e.apply(r,o);h.__actions__.push({func:Ew,args:[f],thisArg:undefined});return new fr(h,l)}if(d&&p){return e.apply(this,o)}h=this.thru(f);return d?n?h.value()[0]:h.value():h}});Mr(["pop","push","shift","sort","splice","unshift"],function(e){var r=OS[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);hr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var a=this.value();return r.apply(q(a)?a:[],e)}return this[t](function(t){return r.apply(q(t)?t:[],e)})}});av(rr.prototype,function(e,r){var t=hr[r];if(t){var n=t.name+"";if(!AS.call(or,n)){or[n]=[]}or[n].push({name:r,func:t})}});or[_t(undefined,wS).name]=[{name:"wrapper",func:undefined}];rr.prototype.clone=lS;rr.prototype.reverse=vS;rr.prototype.value=mS;hr.prototype.at=sS.at;hr.prototype.chain=sS.wrapperChain;hr.prototype.commit=sS.commit;hr.prototype.next=sS.next;hr.prototype.plant=sS.plant;hr.prototype.reverse=sS.reverse;hr.prototype.toJSON=hr.prototype.valueOf=hr.prototype.value=sS.value;hr.prototype.first=hr.prototype.head;if(ES){hr.prototype[ES]=sS.toIterator}var RS=hr;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(!Yp(image_tag_ImageTag.targetPlatformToImageSuffixMap,a)){throw new Error(`Platform "${a}" is currently not supported.`)}const i=Oi(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 Gw(`${this.version}-${this.builderPlatform}`,"-")}get image(){return Zw(`${this.repository}/${this.name}`,"/")}toString(){const{image:e,tag:r}=this;return`${e}:${r}`}}var WS=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 WS({repository:"",name:"unity-builder",version:i,platform:o});const s=`docker build ${t} --file ${n} --build-arg IMAGE=${a} --tag ${u}`;await Object(g.exec)(s,null,{silent:r});return u}static async run(e,r,t=false){const{unityVersion:n,workspace:a,platform:i,projectPath:o,buildName:u,buildPath:s,buildFile:c,buildMethod:f,versioning:l,version:v,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="${i}" --env BUILD_NAME="${u}" --env BUILD_PATH="${s}" --env BUILD_FILE="${c}" --env BUILD_METHOD="${f}" --env VERSIONING="${l}" --env VERSION="${v}" --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 "${a}":"/github/workspace" ${e}`;await Object(g.exec)(p,null,{silent:t})}}var TS=docker_Docker;const MS=t(470);async function src_action(){i.checkCompatibility();y.verify();const{dockerfile:e,workspace:r,actionFolder:t}=i;const n=u.create(p.getFromUser());const a=new WS({...n,version:n.unityVersion});const o=await TS.build({path:t,dockerfile:e,baseImage:a});await TS.run(o,{workspace:r,...n})}src_action().catch(e=>{MS.setFailed(e.message)})},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/action/steps/build.sh b/action/steps/build.sh index 8a2fd6ef..43e02669 100644 --- a/action/steps/build.sh +++ b/action/steps/build.sh @@ -109,6 +109,8 @@ xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \ -customBuildTarget "$BUILD_TARGET" \ -customBuildPath "$CUSTOM_BUILD_PATH" \ -executeMethod "$BUILD_METHOD" \ + -versioning "$VERSIONING" \ + -version "$VERSION" \ $CUSTOM_PARAMETERS # Catch exit code diff --git a/src/index.js b/src/index.js index c883f3b3..47cd11fa 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,7 @@ async function action() { const { dockerfile, workspace, actionFolder } = Action; const buildParameters = BuildParameters.create(Input.getFromUser()); - const baseImage = new ImageTag(buildParameters); + const baseImage = new ImageTag({ ...buildParameters, version: buildParameters.unityVersion }); // Build docker image const builtImage = await Docker.build({ path: actionFolder, dockerfile, baseImage }); diff --git a/src/model/build-parameters.js b/src/model/build-parameters.js index 034d9a23..b8abac96 100644 --- a/src/model/build-parameters.js +++ b/src/model/build-parameters.js @@ -9,17 +9,21 @@ class BuildParameters { buildName, buildsPath, buildMethod, + versioning, + version, customParameters, } = parameters; return { - version: unityVersion, + unityVersion, platform: targetPlatform, projectPath, buildName, buildPath: `${buildsPath}/${targetPlatform}`, buildFile: this.parseBuildFile(buildName, targetPlatform), buildMethod, + versioning, + version, customParameters, }; } diff --git a/src/model/build-parameters.test.js b/src/model/build-parameters.test.js index 0e480c88..2acd0839 100644 --- a/src/model/build-parameters.test.js +++ b/src/model/build-parameters.test.js @@ -18,7 +18,7 @@ describe('BuildParameters', () => { }); it('returns the version', () => { - expect(BuildParameters.create(someParameters).version).toStrictEqual( + expect(BuildParameters.create(someParameters).unityVersion).toStrictEqual( someParameters.unityVersion, ); }); diff --git a/src/model/docker.js b/src/model/docker.js index cd891f30..6062ba33 100644 --- a/src/model/docker.js +++ b/src/model/docker.js @@ -19,7 +19,7 @@ class Docker { static async run(image, parameters, silent = false) { const { - version, + unityVersion, workspace, platform, projectPath, @@ -27,6 +27,8 @@ class Docker { buildPath, buildFile, buildMethod, + versioning, + version, customParameters, } = parameters; @@ -38,13 +40,15 @@ class Docker { --env UNITY_EMAIL \ --env UNITY_PASSWORD \ --env UNITY_SERIAL \ - --env UNITY_VERSION="${version}" \ + --env UNITY_VERSION="${unityVersion}" \ --env PROJECT_PATH="${projectPath}" \ --env BUILD_TARGET="${platform}" \ --env BUILD_NAME="${buildName}" \ --env BUILD_PATH="${buildPath}" \ --env BUILD_FILE="${buildFile}" \ --env BUILD_METHOD="${buildMethod}" \ + --env VERSIONING="${versioning}" \ + --env VERSION="${version}" \ --env CUSTOM_PARAMETERS="${customParameters}" \ --env HOME=/github/home \ --env GITHUB_REF \ diff --git a/src/model/error/validation-error.js b/src/model/error/validation-error.js new file mode 100644 index 00000000..485915cf --- /dev/null +++ b/src/model/error/validation-error.js @@ -0,0 +1,8 @@ +class ValidationError extends Error { + constructor(message) { + super(message); + this.name = 'ValidationError'; + } +} + +export default ValidationError; diff --git a/src/model/input.js b/src/model/input.js index e9034ba3..73a849e1 100644 --- a/src/model/input.js +++ b/src/model/input.js @@ -1,7 +1,10 @@ import Platform from './platform'; +import ValidationError from './error/validation-error'; const core = require('@actions/core'); +const versioningStrategies = ['None', 'Semantic', 'Tag', 'Custom']; + class Input { static getFromUser() { // Input variables specified in workflows using "with" prop. @@ -11,11 +14,20 @@ class Input { const buildName = core.getInput('buildName') || targetPlatform; const buildsPath = core.getInput('buildsPath') || 'build'; const buildMethod = core.getInput('buildMethod'); // processed in docker file + const versioning = core.getInput('versioning') || 'Semantic'; + const version = core.getInput('version') || ''; const customParameters = core.getInput('customParameters') || ''; // Sanitise input const projectPath = rawProjectPath.replace(/\/$/, ''); + // Validate input + if (!versioningStrategies.includes(versioning)) { + throw new ValidationError( + `Versioning strategy should be one of ${versioningStrategies.join(', ')}.`, + ); + } + // Return sanitised input return { unityVersion, @@ -24,6 +36,8 @@ class Input { buildName, buildsPath, buildMethod, + versioning, + version, customParameters, }; }