@capgo/cli 7.0.14 → 7.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -201,7 +201,7 @@ GFS4: `),console.error(t)});Ke[_t]||(ZI=global[_t]||[],ej(Ke,ZI),Ke.close=functi
|
|
|
201
201
|
`;function aj(t,e){var r=[],n="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var i=e.whitespace?" = ":"=";return Object.keys(t).forEach(function(o,s,a){var u=t[o];u&&Array.isArray(u)?u.forEach(function(l){n+=ha(o+"[]")+i+ha(l)+`
|
|
202
202
|
`}):u&&typeof u=="object"?r.push(o):n+=ha(o)+i+ha(u)+Tv}),e.section&&n.length&&(n="["+ha(e.section)+"]"+Tv+n),r.forEach(function(o,s,a){var u=uj(o).join("\\."),l=(e.section?e.section+".":"")+u,c=aj(t[o],{section:l,whitespace:e.whitespace});n.length&&c.length&&(n+=Tv),n+=c}),n}function uj(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function Xne(t){var e={},r=e,n=null,i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,o=t.split(/[\r\n]+/g);return o.forEach(function(s,a,u){if(!(!s||s.match(/^\s*[;#]/))){var l=s.match(i);if(l){if(l[1]!==void 0){if(n=yh(l[1]),n==="__proto__"){r={};return}r=e[n]=e[n]||{};return}var c=yh(l[2]);if(c!=="__proto__"){var f=l[3]?yh(l[4]):!0;switch(f){case"true":case"false":case"null":f=JSON.parse(f)}if(c.length>2&&c.slice(-2)==="[]"){if(c=c.substring(0,c.length-2),c==="__proto__")return;r[c]?Array.isArray(r[c])||(r[c]=[r[c]]):r[c]=[]}Array.isArray(r[c])?r[c].push(f):r[c]=f}}}}),Object.keys(e).filter(function(s,a,u){if(!e[s]||typeof e[s]!="object"||Array.isArray(e[s]))return!1;var l=uj(s),c=e,f=l.pop(),h=f.replace(/\\\./g,".");return l.forEach(function(d,m,b){d!=="__proto__"&&((!c[d]||typeof c[d]!="object")&&(c[d]={}),c=c[d])}),c===e&&h===f?!1:(c[h]=e[s],!0)}).forEach(function(s,a,u){delete e[s]}),e}function lj(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function ha(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&lj(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function yh(t,e){if(t=(t||"").trim(),lj(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,n="",i=0,o=t.length;i<o;i++){var s=t.charAt(i);if(r)"\\;#".indexOf(s)!==-1?n+=s:n+="\\"+s,r=!1;else{if(";#".indexOf(s)!==-1)break;s==="\\"?r=!0:n+=s}}return r&&(n+="\\"),n.trim()}return t}});var pj=D((An,hj)=>{var fj=sj(),xl=require("path"),Dh=require("fs"),Pv=cj(),Rv=require("events").EventEmitter,Zne=require("url"),Qne=require("http"),An=hj.exports=function(){for(var t=[].slice.call(arguments),e=new At;t.length;){var r=t.shift();r&&e.push(typeof r=="string"?tie(r):r)}return e},dpe=An.find=function(){var t=xl.join.apply(null,[].slice.call(arguments));function e(r,n){var i=xl.join(r,n);try{return Dh.statSync(i),i}catch{if(xl.dirname(r)!==r)return e(xl.dirname(r),n)}}return e(__dirname,t)},eie=An.parse=function(t,e,r){if(t=""+t,r)if(r==="json")if(this.emit)try{return JSON.parse(t)}catch(n){this.emit("error",n)}else return JSON.parse(t);else return Pv.parse(t);else try{return JSON.parse(t)}catch{return Pv.parse(t)}},tie=An.json=function(){var t=[].slice.call(arguments).filter(function(n){return n!=null}),e=xl.join.apply(null,t),r;try{r=Dh.readFileSync(e,"utf-8")}catch{return}return eie(r,e,"json")},hpe=An.env=function(t,e){e=e||process.env;var r={},n=t.length;for(var i in e)i.indexOf(t)===0&&(r[i.substring(n)]=e[i]);return r};An.ConfigChain=At;function At(){Rv.apply(this),fj.apply(this,arguments),this._awaiting=0,this._saving=0,this.sources={}}var dj={constructor:{value:At}};Object.keys(Rv.prototype).forEach(function(t){dj[t]=Object.getOwnPropertyDescriptor(Rv.prototype,t)});At.prototype=Object.create(fj.prototype,dj);At.prototype.del=function(t,e){if(e){var r=this.sources[e];if(r=r&&r.data,!r)return this.emit("error",new Error("not found "+e));delete r[t]}else for(var n=0,i=this.list.length;n<i;n++)delete this.list[n][t];return this};At.prototype.set=function(t,e,r){var n;if(r){if(n=this.sources[r],n=n&&n.data,!n)return this.emit("error",new Error("not found "+r))}else if(n=this.list[0],!n)return this.emit("error",new Error("cannot set, no confs!"));return n[t]=e,this};At.prototype.get=function(t,e){return e?(e=this.sources[e],e&&(e=e.data),e&&Object.hasOwnProperty.call(e,t)?e[t]:void 0):this.list[0][t]};At.prototype.save=function(t,o,r){typeof o=="function"&&(r=o,o=null);var n=this.sources[t];if(!n||!(n.path||n.source)||!n.data)return this.emit("error",new Error("bad save target: "+t));if(n.source){var i=n.prefix||"";return Object.keys(n.data).forEach(function(a){n.source[i+a]=n.data[a]}),this}var o=o||n.type,s=n.data;return n.type==="json"?s=JSON.stringify(s):s=Pv.stringify(s),this._saving++,Dh.writeFile(n.path,s,"utf8",function(a){if(this._saving--,a)return r?r(a):this.emit("error",a);this._saving===0&&(r&&r(),this.emit("save"))}.bind(this)),this};At.prototype.addFile=function(t,e,r){r=r||t;var n={__source__:r};return this.sources[r]={path:t,type:e},this.push(n),this._await(),Dh.readFile(t,"utf8",function(i,o){i&&this.emit("error",i),this.addString(o,t,e,n)}.bind(this)),this};At.prototype.addEnv=function(t,e,r){r=r||"env";var n=An.env(t,e);return this.sources[r]={data:n,source:e,prefix:t},this.add(n,r)};At.prototype.addUrl=function(t,e,r){this._await();var n=Zne.format(t);r=r||n;var i={__source__:r};return this.sources[r]={href:n,type:e},this.push(i),Qne.request(t,function(o){var s=[],a=o.headers["content-type"];e||(e=a.indexOf("json")!==-1?"json":a.indexOf("ini")!==-1?"ini":n.match(/\.json$/)?"json":n.match(/\.ini$/)?"ini":null,i.type=e),o.on("data",s.push.bind(s)).on("end",function(){this.addString(Buffer.concat(s),n,e,i)}.bind(this)).on("error",this.emit.bind(this,"error"))}.bind(this)).on("error",this.emit.bind(this,"error")).end(),this};At.prototype.addString=function(t,e,r,n){return t=this.parse(t,e,r),this.add(t,n),this};At.prototype.add=function(t,e){if(e&&typeof e=="object"){var r=this.list.indexOf(e);if(r===-1)return this.emit("error",new Error("bad marker"));this.splice(r,1,t),e=e.__source__,this.sources[e]=this.sources[e]||{},this.sources[e].data=t,this._resolve()}else typeof e=="string"&&(this.sources[e]=this.sources[e]||{},this.sources[e].data=t),this._await(),this.push(t),process.nextTick(this._resolve.bind(this));return this};At.prototype.parse=An.parse;At.prototype._await=function(){this._awaiting++};At.prototype._resolve=function(){this._awaiting--,this._awaiting===0&&this.emit("load",this)}});var gj=D((ppe,mj)=>{mj.exports=function(t){let e=t.indexOf(":");if(e===-1)return $v(t);let r=t.substr(0,e),n=t.substr(e+1);return`${$v(r)}:${$v(n)}`};function $v(t){if(t=t.toLowerCase(),t==="_authtoken")return"_authToken";let e=t[0];for(let r=1;r<t.length;r++)e+=t[r]==="_"?"-":t[r];return e}});var yj=D(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});vh.envReplace=void 0;var rie=/(?<!\\)(\\*)\$\{([^${}]+)\}/g;function nie(t,e){return t.replace(rie,iie.bind(null,e))}vh.envReplace=nie;function iie(t,e,r,n){if(r.length%2)return e.slice((r.length+1)/2);let i=sie(t,n);if(i===void 0)throw new Error(`Failed to replace env in config: ${e}`);return`${r.slice(r.length/2)}${i}`}var oie=/([^:-]+)(:?)-(.+)/;function sie(t,e){let r=e.match(oie);if(!r)return t[e];let[,n,i,o]=r;return Object.prototype.hasOwnProperty.call(t,n)?!t[n]&&i?o:t[n]:o}});var Dj=D(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});bh.envReplace=void 0;var aie=yj();Object.defineProperty(bh,"envReplace",{enumerable:!0,get:function(){return aie.envReplace}})});var vj=D(Fl=>{"use strict";var uie=require("fs"),wo=require("path"),{envReplace:Iv}=Dj(),lie=t=>typeof t!="string"?t:Iv(t,process.env),cie=(t,e,r)=>{if(typeof e!="string")return e;let n=[].concat(t[r]),i=n.indexOf(wo)!==-1,o=n.indexOf(Boolean)!==-1,s=n.indexOf(String)!==-1,a=n.indexOf(Number)!==-1;if(e=`${e}`.trim(),/^".*"$/.test(e))try{e=JSON.parse(e)}catch{throw new Error(`Failed parsing JSON config key ${r}: ${e}`)}if(o&&!s&&e==="")return!0;switch(e){case"true":return!0;case"false":return!1;case"null":return null;case"undefined":return}return e=Iv(e,process.env),i&&((process.platform==="win32"?/^~(\/|\\)/:/^~\//).test(e)&&process.env.HOME&&(e=wo.resolve(process.env.HOME,e.substr(2))),e=wo.resolve(e)),a&&!isNaN(e)&&(e=Number(e)),e},fie=t=>{t=wo.resolve(t);let e=!1;for(;wo.basename(t)==="node_modules";)t=wo.dirname(t),e=!0;if(e)return t;let r=(n,i)=>{let o=/^[a-zA-Z]:(\\|\/)?$/;if(n==="/"||process.platform==="win32"&&o.test(n))return i;try{let s=uie.readdirSync(n);if(s.includes("node_modules")||s.includes("package.json")||s.includes("package.json5")||s.includes("package.yaml")||s.includes("pnpm-workspace.yaml"))return n;let a=wo.dirname(n);return a===n?i:r(a,i)}catch(s){if(n===i){if(s.code==="ENOENT")return i;throw s}return i}};return r(t,t)};Fl.envReplace=Iv;Fl.findPrefix=fie;Fl.parseField=cie;Fl.parseKey=lie});var _j=D(wj=>{"use strict";var _o=require("path"),die=require("stream").Stream,wh=require("url"),hie=()=>{},pie=()=>[],bj=()=>{};wj.types={access:[null,"restricted","public"],"allow-same-version":Boolean,"always-auth":Boolean,also:[null,"dev","development"],audit:Boolean,"auth-type":["legacy","sso","saml","oauth"],"bin-links":Boolean,browser:[null,String],ca:[null,String,Array],cafile:_o,cache:_o,"cache-lock-stale":Number,"cache-lock-retries":Number,"cache-lock-wait":Number,"cache-max":Number,"cache-min":Number,cert:[null,String],cidr:[null,String,Array],color:["always",Boolean],depth:Number,description:Boolean,dev:Boolean,"dry-run":Boolean,editor:String,"engine-strict":Boolean,force:Boolean,"fetch-retries":Number,"fetch-retry-factor":Number,"fetch-retry-mintimeout":Number,"fetch-retry-maxtimeout":Number,git:String,"git-tag-version":Boolean,"commit-hooks":Boolean,global:Boolean,globalconfig:_o,"global-style":Boolean,group:[Number,String],"https-proxy":[null,wh],"user-agent":String,"ham-it-up":Boolean,heading:String,"if-present":Boolean,"ignore-prepublish":Boolean,"ignore-scripts":Boolean,"init-module":_o,"init-author-name":String,"init-author-email":String,"init-author-url":["",wh],"init-license":String,"init-version":bj,json:Boolean,key:[null,String],"legacy-bundling":Boolean,link:Boolean,"local-address":pie(),loglevel:["silent","error","warn","notice","http","timing","info","verbose","silly"],logstream:die,"logs-max":Number,long:Boolean,maxsockets:Number,message:String,"metrics-registry":[null,String],"node-options":[null,String],"node-version":[null,bj],"no-proxy":[null,String,Array],offline:Boolean,"onload-script":[null,String],only:[null,"dev","development","prod","production"],optional:Boolean,"package-lock":Boolean,otp:[null,String],"package-lock-only":Boolean,parseable:Boolean,"prefer-offline":Boolean,"prefer-online":Boolean,prefix:_o,production:Boolean,progress:Boolean,proxy:[null,!1,wh],provenance:Boolean,"read-only":Boolean,"rebuild-bundle":Boolean,registry:[null,wh],rollback:Boolean,save:Boolean,"save-bundle":Boolean,"save-dev":Boolean,"save-exact":Boolean,"save-optional":Boolean,"save-prefix":String,"save-prod":Boolean,scope:String,"script-shell":[null,String],"scripts-prepend-node-path":[!1,!0,"auto","warn-only"],searchopts:String,searchexclude:[null,String],searchlimit:Number,searchstaleness:Number,"send-metrics":Boolean,shell:String,shrinkwrap:Boolean,"sign-git-tag":Boolean,"sso-poll-frequency":Number,"sso-type":[null,"oauth","saml"],"strict-ssl":Boolean,tag:String,timing:Boolean,tmp:_o,unicode:Boolean,"unsafe-perm":Boolean,usage:Boolean,user:[Number,String],userconfig:_o,umask:hie,version:Boolean,"tag-version-prefix":String,versions:Boolean,viewer:String,_exit:Boolean}});var Sj=D((vpe,Cj)=>{"use strict";var{readCAFileSync:mie}=nj(),Ej=require("fs"),jv=require("path"),{ConfigChain:gie}=pj(),yie=gj(),Nv=vj(),Lv=class extends gie{constructor(e,r){super(e),this.root=e,this._parseField=Nv.parseField.bind(null,r||_j())}add(e,r){try{for(let[n,i]of Object.entries(e)){let o=Nv.parseKey(n);o!==n&&delete e[n],e[o]=this._parseField(i,o)}}catch(n){throw n}return super.add(e,r)}addFile(e,r){r=r||e;let n={__source__:r};this.sources[r]={path:e,type:"ini"},this.push(n),this._await();try{let i=Ej.readFileSync(e,"utf8");this.addString(i,e,"ini",n)}catch(i){if(i.code==="ENOENT")this.add({},n);else if(i.code!=="EISDIR")return`Issue while reading "${e}". ${i.message}`}}addEnv(e){e=e||process.env;let r={};return Object.keys(e).filter(n=>/^npm_config_/i.test(n)).forEach(n=>{if(!e[n])return;let i=yie(n.substr(11)),o=e[n];r[i]=Die(i,o)}),super.addEnv("",r,"env")}loadPrefix(){let e=this.list[0];Object.defineProperty(this,"prefix",{enumerable:!0,set:n=>{let i=this.get("global");this[i?"globalPrefix":"localPrefix"]=n},get:()=>this.get("global")?this.globalPrefix:this.localPrefix}),Object.defineProperty(this,"globalPrefix",{enumerable:!0,set:n=>{this.set("prefix",n)},get:()=>jv.resolve(this.get("prefix"))});let r;if(Object.defineProperty(this,"localPrefix",{enumerable:!0,set:n=>{r=n},get:()=>r}),Object.prototype.hasOwnProperty.call(e,"prefix"))r=jv.resolve(e.prefix);else try{r=Nv.findPrefix(process.cwd())}catch(n){throw n}return r}loadCAFile(e){if(!e)return;let r=mie(e);r&&this.set("ca",r)}loadUser(){let e=this.root;if(this.get("global"))return;if(process.env.SUDO_UID){e.user=Number(process.env.SUDO_UID);return}let r=jv.resolve(this.get("prefix"));try{let n=Ej.statSync(r);e.user=n.uid}catch(n){if(n.code==="ENOENT")return;throw n}}};function Die(t,e){function r(n){let i=`
|
|
203
203
|
|
|
204
|
-
`;return n.indexOf(i)?n.split(i):n.split(",")}switch(t){case"hoist-pattern":case"public-hoist-pattern":return r(e)}return e}Cj.exports=Lv});var Tj=D(kj=>{"use strict";var Oj=require("os"),kn=require("path"),Aj=Oj.tmpdir(),vie=process.getuid?process.getuid():process.pid,bie=()=>!0,xj=process.platform==="win32",Fj={editor:()=>process.env.EDITOR||process.env.VISUAL||(xj?"notepad.exe":"vi"),shell:()=>xj?process.env.COMSPEC||"cmd.exe":process.env.SHELL||"/bin/bash"},wie={fromString:()=>process.umask()},pa=Oj.homedir();pa?process.env.HOME=pa:pa=kn.resolve(Aj,"npm-"+vie);var _ie=process.platform==="win32"?"npm-cache":".npm",Eie=process.platform==="win32"&&process.env.APPDATA||pa,Cie=kn.resolve(Eie,_ie),_h,Eo;Object.defineProperty(kj,"defaults",{get:function(){return _h||(process.env.PREFIX?Eo=process.env.PREFIX:process.platform==="win32"?Eo=kn.dirname(process.execPath):(Eo=kn.dirname(kn.dirname(process.execPath)),process.env.DESTDIR&&(Eo=kn.join(process.env.DESTDIR,Eo))),_h={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":"legacy","bin-links":!0,browser:null,ca:null,cafile:null,cache:Cie,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:Fj.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:"git","git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:kn.resolve(Eo,"etc","npmrc"),"global-style":!1,group:process.platform==="win32"?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:"npm","if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":kn.resolve(pa,".npm-init.js"),"init-author-name":"","init-author-email":"","init-author-url":"","init-version":"1.0.0","init-license":"ISC",json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:"notice",logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:"%s","metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:Eo,production:process.env.NODE_ENV==="production",progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":"npm/{npm-version} node/{node-version} {platform} {arch}","read-only":!1,"rebuild-bundle":!0,registry:"https://registry.npmjs.org/",rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":"^","save-prod":!1,scope:"","script-shell":null,"scripts-prepend-node-path":"warn-only",searchopts:"",searchexclude:null,searchlimit:20,searchstaleness:15*60,"send-metrics":!1,shell:Fj.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":"oauth","strict-ssl":!0,tag:"latest","tag-version-prefix":"v",timing:!1,tmp:Aj,unicode:bie(),"unsafe-perm":process.platform==="win32"||process.platform==="cygwin"||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform==="win32"?0:"nobody",userconfig:kn.resolve(pa,".npmrc"),umask:process.umask?process.umask():wie.fromString("022"),version:!1,versions:!1,viewer:process.platform==="win32"?"browser":"man",_exit:!0},_h)}})});var Rj=D((wpe,Bv)=>{"use strict";var Co=require("path"),Sie=Sj(),Pj=Tj();Bv.exports=(t,e,r)=>{let n=new Sie(Object.assign({},Pj.defaults,r),e);n.add(Object.assign({},t),"cli");let i=[],o=!1;if(require.resolve.paths){let l=require.resolve.paths("npm"),c;try{c=require.resolve("npm",{paths:l.slice(-1)})}catch{o=!0}c&&i.push(n.addFile(Co.resolve(Co.dirname(c),"..","npmrc"),"builtin"))}n.addEnv(),n.loadPrefix();let s=Co.resolve(n.localPrefix,".npmrc"),a=n.get("userconfig");if(!n.get("global")&&s!==a?i.push(n.addFile(s,"project")):n.add({},"project"),n.get("workspace-prefix")&&n.get("workspace-prefix")!==s){let l=Co.resolve(n.get("workspace-prefix"),".npmrc");i.push(n.addFile(l,"workspace"))}if(i.push(n.addFile(n.get("userconfig"),"user")),n.get("prefix")){let l=Co.resolve(n.get("prefix"),"etc");n.root.globalconfig=Co.resolve(l,"npmrc"),n.root.globalignorefile=Co.resolve(l,"npmignore")}i.push(n.addFile(n.get("globalconfig"),"global")),n.loadUser();let u=n.get("cafile");return u&&n.loadCAFile(u),{config:n,warnings:i.filter(Boolean),failedToLoadBuiltInConfig:o}};Object.defineProperty(Bv.exports,"defaults",{get(){return Pj.defaults},enumerable:!0})});var Mj=D((_pe,qj)=>{var qv=require("url"),$j=Rj(),Ij=":_authToken",jj=":_auth",Nj=":username",Lj=":_password";qj.exports=function(){let e,r;arguments.length>=2?(e=arguments[0],r=Object.assign({},arguments[1])):typeof arguments[0]=="string"?e=arguments[0]:r=Object.assign({},arguments[0]),r=r||{};let n=r.npmrc;return r.npmrc=(r.npmrc?{config:{get:i=>n[i]}}:$j()).config,e=e||r.npmrc.get("registry")||$j.defaults.registry,Bj(e,r)||xie(r.npmrc)};function Bj(t,e){let r=qv.parse(t,!1,!0),n;for(;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";let i="//"+r.host+n.replace(/\/$/,""),o=Oie(i,e.npmrc);if(o)return o;if(!e.recursive)return/\/$/.test(t)?void 0:Bj(qv.resolve(t,"."),e);r.pathname=qv.resolve(Fie(n),"..")||"/"}}function xie(t){return t.get("_auth")?{token:Eh(t.get("_auth")),type:"Basic"}:void 0}function Fie(t){return t[t.length-1]==="/"?t:t+"/"}function Oie(t,e){let r=Aie(e.get(t+Ij)||e.get(t+"/"+Ij));if(r)return r;let n=e.get(t+Nj)||e.get(t+"/"+Nj),i=e.get(t+Lj)||e.get(t+"/"+Lj),o=kie(n,i);if(o)return o;let s=Tie(e.get(t+jj)||e.get(t+"/"+jj));if(s)return s}function Eh(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function Aie(t){return t?{token:Eh(t),type:"Bearer"}:void 0}function kie(t,e){if(!t||!e)return;let r=Buffer.from(Eh(e),"base64").toString("utf8");return{token:Buffer.from(t+":"+r,"utf8").toString("base64"),type:"Basic",password:r,username:t}}function Tie(t){return t?{token:Eh(t),type:"Basic"}:void 0}});var I8=D((v0e,jn)=>{var ot=require("fs"),_b=require("os"),ur=require("path"),b8=require("crypto"),sn={fs:ot.constants,os:_b.constants},w8="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",E8=/XXXXXX/,_oe=3,C8=(sn.O_CREAT||sn.fs.O_CREAT)|(sn.O_EXCL||sn.fs.O_EXCL)|(sn.O_RDWR||sn.fs.O_RDWR),Eoe=_b.platform()==="win32",Coe=sn.EBADF||sn.os.errno.EBADF,Soe=sn.ENOENT||sn.os.errno.ENOENT,S8=448,x8=384,xoe="exit",Ca=[],F8=ot.rmdirSync.bind(ot),O8=!1;function Foe(t,e){return ot.rm(t,{recursive:!0},e)}function A8(t){return ot.rmSync(t,{recursive:!0})}function Eb(t,e){let r=Sa(t,e),n=r[0],i=r[1];try{P8(n)}catch(s){return i(s)}let o=n.tries;(function s(){try{let a=T8(n);ot.stat(a,function(u){if(!u)return o-- >0?s():i(new Error("Could not get a unique tmp filename, max tries reached "+a));i(null,a)})}catch(a){i(a)}})()}function Cb(t){let e=Sa(t),r=e[0];P8(r);let n=r.tries;do{let i=T8(r);try{ot.statSync(i)}catch{return i}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function Ooe(t,e){let r=Sa(t,e),n=r[0],i=r[1];Eb(n,function(s,a){if(s)return i(s);ot.open(a,C8,n.mode||x8,function(l,c){if(l)return i(l);if(n.discardDescriptor)return ot.close(c,function(h){return i(h,a,void 0,vb(a,-1,n,!1))});{let f=n.discardDescriptor||n.detachDescriptor;i(null,a,c,vb(a,f?-1:c,n,!1))}})})}function Aoe(t){let e=Sa(t),r=e[0],n=r.discardDescriptor||r.detachDescriptor,i=Cb(r);var o=ot.openSync(i,C8,r.mode||x8);return r.discardDescriptor&&(ot.closeSync(o),o=void 0),{name:i,fd:o,removeCallback:vb(i,n?-1:o,r,!0)}}function koe(t,e){let r=Sa(t,e),n=r[0],i=r[1];Eb(n,function(s,a){if(s)return i(s);ot.mkdir(a,n.mode||S8,function(l){if(l)return i(l);i(null,a,k8(a,n,!1))})})}function Toe(t){let e=Sa(t),r=e[0],n=Cb(r);return ot.mkdirSync(n,r.mode||S8),{name:n,removeCallback:k8(n,r,!0)}}function Poe(t,e){let r=function(n){if(n&&!wb(n))return e(n);e()};0<=t[0]?ot.close(t[0],function(){ot.unlink(t[1],r)}):ot.unlink(t[1],r)}function Roe(t){let e=null;try{0<=t[0]&&ot.closeSync(t[0])}catch(r){if(!joe(r)&&!wb(r))throw r}finally{try{ot.unlinkSync(t[1])}catch(r){wb(r)||(e=r)}}if(e!==null)throw e}function vb(t,e,r,n){let i=Hh(Roe,[e,t],n),o=Hh(Poe,[e,t],n,i);return r.keep||Ca.unshift(i),n?i:o}function k8(t,e,r){let n=e.unsafeCleanup?Foe:ot.rmdir.bind(ot),i=e.unsafeCleanup?A8:F8,o=Hh(i,t,r),s=Hh(n,t,r,o);return e.keep||Ca.unshift(o),r?o:s}function Hh(t,e,r,n){let i=!1;return function o(s){if(!i){let a=n||o,u=Ca.indexOf(a);return u>=0&&Ca.splice(u,1),i=!0,r||t===F8||t===A8?t(e):t(e,s||function(){})}}}function $oe(){if(O8)for(;Ca.length;)try{Ca[0]()}catch{}}function _8(t){let e=[],r=null;try{r=b8.randomBytes(t)}catch{r=b8.pseudoRandomBytes(t)}for(var n=0;n<t;n++)e.push(w8[r[n]%w8.length]);return e.join("")}function Ioe(t){return t===null||Zt(t)||!t.trim()}function Zt(t){return typeof t>"u"}function Sa(t,e){if(typeof t=="function")return[{},t];if(Zt(t))return[{},e];let r={};for(let n of Object.getOwnPropertyNames(t))r[n]=t[n];return[r,e]}function T8(t){let e=t.tmpdir;if(!Zt(t.name))return ur.join(e,t.dir,t.name);if(!Zt(t.template))return ur.join(e,t.dir,t.template).replace(E8,_8(6));let r=[t.prefix?t.prefix:"tmp","-",process.pid,"-",_8(12),t.postfix?"-"+t.postfix:""].join("");return ur.join(e,t.dir,r)}function P8(t){t.tmpdir=$8(t);let e=t.tmpdir;if(Zt(t.name)||Db(t.name,"name",e),Zt(t.dir)||Db(t.dir,"dir",e),!Zt(t.template)&&(Db(t.template,"template",e),!t.template.match(E8)))throw new Error(`Invalid template, found "${t.template}".`);if(!Zt(t.tries)&&isNaN(t.tries)||t.tries<0)throw new Error(`Invalid tries, found "${t.tries}".`);t.tries=Zt(t.name)?t.tries||_oe:1,t.keep=!!t.keep,t.detachDescriptor=!!t.detachDescriptor,t.discardDescriptor=!!t.discardDescriptor,t.unsafeCleanup=!!t.unsafeCleanup,t.dir=Zt(t.dir)?"":ur.relative(e,bb(t.dir,e)),t.template=Zt(t.template)?void 0:ur.relative(e,bb(t.template,e)),t.template=Ioe(t.template)?void 0:ur.relative(t.dir,t.template),t.name=Zt(t.name)?void 0:t.name,t.prefix=Zt(t.prefix)?"":t.prefix,t.postfix=Zt(t.postfix)?"":t.postfix}function bb(t,e){return t.startsWith(e)?ur.resolve(t):ur.resolve(ur.join(e,t))}function Db(t,e,r){if(e==="name"){if(ur.isAbsolute(t))throw new Error(`${e} option must not contain an absolute path, found "${t}".`);let n=ur.basename(t);if(n===".."||n==="."||n!==t)throw new Error(`${e} option must not contain a path, found "${t}".`)}else{if(ur.isAbsolute(t)&&!t.startsWith(r))throw new Error(`${e} option must be relative to "${r}", found "${t}".`);let n=bb(t,r);if(!n.startsWith(r))throw new Error(`${e} option must be relative to "${r}", found "${n}".`)}}function joe(t){return R8(t,-Coe,"EBADF")}function wb(t){return R8(t,-Soe,"ENOENT")}function R8(t,e,r){return Eoe?t.code===r:t.code===r&&t.errno===e}function Noe(){O8=!0}function $8(t){return ur.resolve(t&&t.tmpdir||_b.tmpdir())}process.addListener(xoe,$oe);Object.defineProperty(jn.exports,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return $8()}});jn.exports.dir=koe;jn.exports.dirSync=Toe;jn.exports.file=Ooe;jn.exports.fileSync=Aoe;jn.exports.tmpName=Eb;jn.exports.tmpNameSync=Cb;jn.exports.setGracefulCleanup=Noe});var Hb=ue(Ub(),1),{program:k,createCommand:cse,createArgument:fse,createOption:dse,CommanderError:hse,InvalidArgumentError:pse,InvalidOptionArgumentError:mse,Command:gse,Argument:yse,Option:Dse,Help:vse}=Hb.default;var Cr={name:"@capgo/cli",version:"7.0.14",description:"A CLI to upload to capgo servers",author:"github.com/riderx",license:"Apache 2.0",homepage:"https://github.com/Cap-go/CLIl#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/CLI.git"},bugs:{url:"https://github.com/Cap-go/CLI/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli"],main:"dist/index.js",bin:{capgo:"dist/index.js"},engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && node build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js",test:"npx --yes ts-node -T src/index.ts","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"npx --yes supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",test_rls:"ts-node ./test/test_headers_rls.ts",lint:'eslint "src/**/*.ts" --fix',"check-posix-paths":"node test/check-posix-paths.js"},devDependencies:{"@antfu/eslint-config":"^4.1.1","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client","@capacitor/cli":"^7.0.1","@capgo/find-package-manager":"^0.0.17","@clack/prompts":"^0.10.0","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver","@supabase/supabase-js":"^2.48.1","@tomasklaen/checksum":"^1.1.0","@types/adm-zip":"^0.5.7","@types/node":"^22.13.1","@types/prettyjson":"^0.0.33","@types/semver":"^7.5.8","@types/tmp":"^0.2.6","@vercel/ncc":"^0.38.3","adm-zip":"^0.5.16","ci-info":"^4.1.0",commander:"13.0.0",esbuild:"^0.25.0",eslint:"9.20.1","git-format-staged":"3.1.1",husky:"^9.1.7","is-wsl":"^3.1.0",ky:"^1.7.4","latest-version":"^9.0.0",open:"^10.1.0",pkg:"5.8.1",prettyjson:"^1.2.5",semver:"^7.7.1",tmp:"^0.2.3","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"4.2.0","tus-js-client":"^4.3.1",typescript:"5.7.3"}};var ma=require("node:fs"),Vj=require("node:process");var St=ue(Te(),1),$o=require("node:process"),Ln=ue(require("node:readline"),1),gp=ue(require("node:readline"),1),ew=require("node:tty"),tw=ue(hp(),1);function vN({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}var bN=vN();function rw(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(bN,"")}function nw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var iw={exports:{}};(function(t){var e={};t.exports=e,e.eastAsianWidth=function(n){var i=n.charCodeAt(0),o=n.length==2?n.charCodeAt(1):0,s=i;return 55296<=i&&i<=56319&&56320<=o&&o<=57343&&(i&=1023,o&=1023,s=i<<10|o,s+=65536),s==12288||65281<=s&&s<=65376||65504<=s&&s<=65510?"F":s==8361||65377<=s&&s<=65470||65474<=s&&s<=65479||65482<=s&&s<=65487||65490<=s&&s<=65495||65498<=s&&s<=65500||65512<=s&&s<=65518?"H":4352<=s&&s<=4447||4515<=s&&s<=4519||4602<=s&&s<=4607||9001<=s&&s<=9002||11904<=s&&s<=11929||11931<=s&&s<=12019||12032<=s&&s<=12245||12272<=s&&s<=12283||12289<=s&&s<=12350||12353<=s&&s<=12438||12441<=s&&s<=12543||12549<=s&&s<=12589||12593<=s&&s<=12686||12688<=s&&s<=12730||12736<=s&&s<=12771||12784<=s&&s<=12830||12832<=s&&s<=12871||12880<=s&&s<=13054||13056<=s&&s<=19903||19968<=s&&s<=42124||42128<=s&&s<=42182||43360<=s&&s<=43388||44032<=s&&s<=55203||55216<=s&&s<=55238||55243<=s&&s<=55291||63744<=s&&s<=64255||65040<=s&&s<=65049||65072<=s&&s<=65106||65108<=s&&s<=65126||65128<=s&&s<=65131||110592<=s&&s<=110593||127488<=s&&s<=127490||127504<=s&&s<=127546||127552<=s&&s<=127560||127568<=s&&s<=127569||131072<=s&&s<=194367||177984<=s&&s<=196605||196608<=s&&s<=262141?"W":32<=s&&s<=126||162<=s&&s<=163||165<=s&&s<=166||s==172||s==175||10214<=s&&s<=10221||10629<=s&&s<=10630?"Na":s==161||s==164||167<=s&&s<=168||s==170||173<=s&&s<=174||176<=s&&s<=180||182<=s&&s<=186||188<=s&&s<=191||s==198||s==208||215<=s&&s<=216||222<=s&&s<=225||s==230||232<=s&&s<=234||236<=s&&s<=237||s==240||242<=s&&s<=243||247<=s&&s<=250||s==252||s==254||s==257||s==273||s==275||s==283||294<=s&&s<=295||s==299||305<=s&&s<=307||s==312||319<=s&&s<=322||s==324||328<=s&&s<=331||s==333||338<=s&&s<=339||358<=s&&s<=359||s==363||s==462||s==464||s==466||s==468||s==470||s==472||s==474||s==476||s==593||s==609||s==708||s==711||713<=s&&s<=715||s==717||s==720||728<=s&&s<=731||s==733||s==735||768<=s&&s<=879||913<=s&&s<=929||931<=s&&s<=937||945<=s&&s<=961||963<=s&&s<=969||s==1025||1040<=s&&s<=1103||s==1105||s==8208||8211<=s&&s<=8214||8216<=s&&s<=8217||8220<=s&&s<=8221||8224<=s&&s<=8226||8228<=s&&s<=8231||s==8240||8242<=s&&s<=8243||s==8245||s==8251||s==8254||s==8308||s==8319||8321<=s&&s<=8324||s==8364||s==8451||s==8453||s==8457||s==8467||s==8470||8481<=s&&s<=8482||s==8486||s==8491||8531<=s&&s<=8532||8539<=s&&s<=8542||8544<=s&&s<=8555||8560<=s&&s<=8569||s==8585||8592<=s&&s<=8601||8632<=s&&s<=8633||s==8658||s==8660||s==8679||s==8704||8706<=s&&s<=8707||8711<=s&&s<=8712||s==8715||s==8719||s==8721||s==8725||s==8730||8733<=s&&s<=8736||s==8739||s==8741||8743<=s&&s<=8748||s==8750||8756<=s&&s<=8759||8764<=s&&s<=8765||s==8776||s==8780||s==8786||8800<=s&&s<=8801||8804<=s&&s<=8807||8810<=s&&s<=8811||8814<=s&&s<=8815||8834<=s&&s<=8835||8838<=s&&s<=8839||s==8853||s==8857||s==8869||s==8895||s==8978||9312<=s&&s<=9449||9451<=s&&s<=9547||9552<=s&&s<=9587||9600<=s&&s<=9615||9618<=s&&s<=9621||9632<=s&&s<=9633||9635<=s&&s<=9641||9650<=s&&s<=9651||9654<=s&&s<=9655||9660<=s&&s<=9661||9664<=s&&s<=9665||9670<=s&&s<=9672||s==9675||9678<=s&&s<=9681||9698<=s&&s<=9701||s==9711||9733<=s&&s<=9734||s==9737||9742<=s&&s<=9743||9748<=s&&s<=9749||s==9756||s==9758||s==9792||s==9794||9824<=s&&s<=9825||9827<=s&&s<=9829||9831<=s&&s<=9834||9836<=s&&s<=9837||s==9839||9886<=s&&s<=9887||9918<=s&&s<=9919||9924<=s&&s<=9933||9935<=s&&s<=9953||s==9955||9960<=s&&s<=9983||s==10045||s==10071||10102<=s&&s<=10111||11093<=s&&s<=11097||12872<=s&&s<=12879||57344<=s&&s<=63743||65024<=s&&s<=65039||s==65533||127232<=s&&s<=127242||127248<=s&&s<=127277||127280<=s&&s<=127337||127344<=s&&s<=127386||917760<=s&&s<=917999||983040<=s&&s<=1048573||1048576<=s&&s<=1114109?"A":"N"},e.characterLength=function(n){var i=this.eastAsianWidth(n);return i=="F"||i=="W"||i=="A"?2:1};function r(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var i=r(n),o=0,s=0;s<i.length;s++)o=o+this.characterLength(i[s]);return o},e.slice=function(n,i,o){textLen=e.length(n),i=i||0,o=o||1,i<0&&(i=textLen+i),o<0&&(o=textLen+o);for(var s="",a=0,u=r(n),l=0;l<u.length;l++){var c=u[l],f=e.length(c);if(a>=i-(f==2?1:0))if(a+f<=o)s+=c;else break;a+=f}return s}})(iw);var wN=iw.exports,_N=nw(wN),EN=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},CN=nw(EN);function Aa(t,e={}){if(typeof t!="string"||t.length===0||(e={ambiguousIsNarrow:!0,...e},t=rw(t),t.length===0))return 0;t=t.replace(CN()," ");let r=e.ambiguousIsNarrow?1:2,n=0;for(let i of t){let o=i.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch(_N.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var pp=10,Wb=(t=0)=>e=>`\x1B[${e+t}m`,Kb=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Yb=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,Ne={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(Ne.modifier);var SN=Object.keys(Ne.color),xN=Object.keys(Ne.bgColor);[...SN,...xN];function FN(){let t=new Map;for(let[e,r]of Object.entries(Ne)){for(let[n,i]of Object.entries(r))Ne[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Ne[n],t.set(i[0],i[1]);Object.defineProperty(Ne,e,{value:r,enumerable:!1})}return Object.defineProperty(Ne,"codes",{value:t,enumerable:!1}),Ne.color.close="\x1B[39m",Ne.bgColor.close="\x1B[49m",Ne.color.ansi=Wb(),Ne.color.ansi256=Kb(),Ne.color.ansi16m=Yb(),Ne.bgColor.ansi=Wb(pp),Ne.bgColor.ansi256=Kb(pp),Ne.bgColor.ansi16m=Yb(pp),Object.defineProperties(Ne,{rgbToAnsi256:{value:(e,r,n)=>e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(o=>o+o).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>Ne.rgbToAnsi256(...Ne.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,i;if(e>=232)r=((e-232)*10+8)/255,n=r,i=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let o=Math.max(r,n,i)*2;if(o===0)return 30;let s=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>Ne.ansi256ToAnsi(Ne.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>Ne.ansi256ToAnsi(Ne.hexToAnsi256(e)),enumerable:!1}}),Ne}var ON=FN(),Zl=new Set(["\x1B","\x9B"]),AN=39,Dp="\x07",ow="[",kN="]",sw="m",vp=`${kN}8;;`,Jb=t=>`${Zl.values().next().value}${ow}${t}${sw}`,Xb=t=>`${Zl.values().next().value}${vp}${t}${Dp}`,TN=t=>t.split(" ").map(e=>Aa(e)),mp=(t,e,r)=>{let n=[...e],i=!1,o=!1,s=Aa(rw(t[t.length-1]));for(let[a,u]of n.entries()){let l=Aa(u);if(s+l<=r?t[t.length-1]+=u:(t.push(u),s=0),Zl.has(u)&&(i=!0,o=n.slice(a+1).join("").startsWith(vp)),i){o?u===Dp&&(i=!1,o=!1):u===sw&&(i=!1);continue}s+=l,s===r&&a<n.length-1&&(t.push(""),s=0)}!s&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},PN=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(Aa(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},RN=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let n="",i,o,s=TN(t),a=[""];for(let[l,c]of t.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let f=Aa(a[a.length-1]);if(l!==0&&(f>=e&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),f=0),(f>0||r.trim===!1)&&(a[a.length-1]+=" ",f++)),r.hard&&s[l]>e){let h=e-f,d=1+Math.floor((s[l]-h-1)/e);Math.floor((s[l]-1)/e)<d&&a.push(""),mp(a,c,e);continue}if(f+s[l]>e&&f>0&&s[l]>0){if(r.wordWrap===!1&&f<e){mp(a,c,e);continue}a.push("")}if(f+s[l]>e&&r.wordWrap===!1){mp(a,c,e);continue}a[a.length-1]+=c}r.trim!==!1&&(a=a.map(l=>PN(l)));let u=[...a.join(`
|
|
204
|
+
`;return n.indexOf(i)?n.split(i):n.split(",")}switch(t){case"hoist-pattern":case"public-hoist-pattern":return r(e)}return e}Cj.exports=Lv});var Tj=D(kj=>{"use strict";var Oj=require("os"),kn=require("path"),Aj=Oj.tmpdir(),vie=process.getuid?process.getuid():process.pid,bie=()=>!0,xj=process.platform==="win32",Fj={editor:()=>process.env.EDITOR||process.env.VISUAL||(xj?"notepad.exe":"vi"),shell:()=>xj?process.env.COMSPEC||"cmd.exe":process.env.SHELL||"/bin/bash"},wie={fromString:()=>process.umask()},pa=Oj.homedir();pa?process.env.HOME=pa:pa=kn.resolve(Aj,"npm-"+vie);var _ie=process.platform==="win32"?"npm-cache":".npm",Eie=process.platform==="win32"&&process.env.APPDATA||pa,Cie=kn.resolve(Eie,_ie),_h,Eo;Object.defineProperty(kj,"defaults",{get:function(){return _h||(process.env.PREFIX?Eo=process.env.PREFIX:process.platform==="win32"?Eo=kn.dirname(process.execPath):(Eo=kn.dirname(kn.dirname(process.execPath)),process.env.DESTDIR&&(Eo=kn.join(process.env.DESTDIR,Eo))),_h={access:null,"allow-same-version":!1,"always-auth":!1,also:null,audit:!0,"auth-type":"legacy","bin-links":!0,browser:null,ca:null,cafile:null,cache:Cie,"cache-lock-stale":6e4,"cache-lock-retries":10,"cache-lock-wait":1e4,"cache-max":1/0,"cache-min":10,cert:null,cidr:null,color:process.env.NO_COLOR==null,depth:1/0,description:!0,dev:!1,"dry-run":!1,editor:Fj.editor(),"engine-strict":!1,force:!1,"fetch-retries":2,"fetch-retry-factor":10,"fetch-retry-mintimeout":1e4,"fetch-retry-maxtimeout":6e4,git:"git","git-tag-version":!0,"commit-hooks":!0,global:!1,globalconfig:kn.resolve(Eo,"etc","npmrc"),"global-style":!1,group:process.platform==="win32"?0:process.env.SUDO_GID||process.getgid&&process.getgid(),"ham-it-up":!1,heading:"npm","if-present":!1,"ignore-prepublish":!1,"ignore-scripts":!1,"init-module":kn.resolve(pa,".npm-init.js"),"init-author-name":"","init-author-email":"","init-author-url":"","init-version":"1.0.0","init-license":"ISC",json:!1,key:null,"legacy-bundling":!1,link:!1,"local-address":void 0,loglevel:"notice",logstream:process.stderr,"logs-max":10,long:!1,maxsockets:50,message:"%s","metrics-registry":null,"node-options":null,offline:!1,"onload-script":!1,only:null,optional:!0,otp:null,"package-lock":!0,"package-lock-only":!1,parseable:!1,"prefer-offline":!1,"prefer-online":!1,prefix:Eo,production:process.env.NODE_ENV==="production",progress:!process.env.TRAVIS&&!process.env.CI,provenance:!1,proxy:null,"https-proxy":null,"no-proxy":null,"user-agent":"npm/{npm-version} node/{node-version} {platform} {arch}","read-only":!1,"rebuild-bundle":!0,registry:"https://registry.npmjs.org/",rollback:!0,save:!0,"save-bundle":!1,"save-dev":!1,"save-exact":!1,"save-optional":!1,"save-prefix":"^","save-prod":!1,scope:"","script-shell":null,"scripts-prepend-node-path":"warn-only",searchopts:"",searchexclude:null,searchlimit:20,searchstaleness:15*60,"send-metrics":!1,shell:Fj.shell(),shrinkwrap:!0,"sign-git-tag":!1,"sso-poll-frequency":500,"sso-type":"oauth","strict-ssl":!0,tag:"latest","tag-version-prefix":"v",timing:!1,tmp:Aj,unicode:bie(),"unsafe-perm":process.platform==="win32"||process.platform==="cygwin"||!(process.getuid&&process.setuid&&process.getgid&&process.setgid)||process.getuid()!==0,usage:!1,user:process.platform==="win32"?0:"nobody",userconfig:kn.resolve(pa,".npmrc"),umask:process.umask?process.umask():wie.fromString("022"),version:!1,versions:!1,viewer:process.platform==="win32"?"browser":"man",_exit:!0},_h)}})});var Rj=D((wpe,Bv)=>{"use strict";var Co=require("path"),Sie=Sj(),Pj=Tj();Bv.exports=(t,e,r)=>{let n=new Sie(Object.assign({},Pj.defaults,r),e);n.add(Object.assign({},t),"cli");let i=[],o=!1;if(require.resolve.paths){let l=require.resolve.paths("npm"),c;try{c=require.resolve("npm",{paths:l.slice(-1)})}catch{o=!0}c&&i.push(n.addFile(Co.resolve(Co.dirname(c),"..","npmrc"),"builtin"))}n.addEnv(),n.loadPrefix();let s=Co.resolve(n.localPrefix,".npmrc"),a=n.get("userconfig");if(!n.get("global")&&s!==a?i.push(n.addFile(s,"project")):n.add({},"project"),n.get("workspace-prefix")&&n.get("workspace-prefix")!==s){let l=Co.resolve(n.get("workspace-prefix"),".npmrc");i.push(n.addFile(l,"workspace"))}if(i.push(n.addFile(n.get("userconfig"),"user")),n.get("prefix")){let l=Co.resolve(n.get("prefix"),"etc");n.root.globalconfig=Co.resolve(l,"npmrc"),n.root.globalignorefile=Co.resolve(l,"npmignore")}i.push(n.addFile(n.get("globalconfig"),"global")),n.loadUser();let u=n.get("cafile");return u&&n.loadCAFile(u),{config:n,warnings:i.filter(Boolean),failedToLoadBuiltInConfig:o}};Object.defineProperty(Bv.exports,"defaults",{get(){return Pj.defaults},enumerable:!0})});var Mj=D((_pe,qj)=>{var qv=require("url"),$j=Rj(),Ij=":_authToken",jj=":_auth",Nj=":username",Lj=":_password";qj.exports=function(){let e,r;arguments.length>=2?(e=arguments[0],r=Object.assign({},arguments[1])):typeof arguments[0]=="string"?e=arguments[0]:r=Object.assign({},arguments[0]),r=r||{};let n=r.npmrc;return r.npmrc=(r.npmrc?{config:{get:i=>n[i]}}:$j()).config,e=e||r.npmrc.get("registry")||$j.defaults.registry,Bj(e,r)||xie(r.npmrc)};function Bj(t,e){let r=qv.parse(t,!1,!0),n;for(;n!=="/"&&r.pathname!==n;){n=r.pathname||"/";let i="//"+r.host+n.replace(/\/$/,""),o=Oie(i,e.npmrc);if(o)return o;if(!e.recursive)return/\/$/.test(t)?void 0:Bj(qv.resolve(t,"."),e);r.pathname=qv.resolve(Fie(n),"..")||"/"}}function xie(t){return t.get("_auth")?{token:Eh(t.get("_auth")),type:"Basic"}:void 0}function Fie(t){return t[t.length-1]==="/"?t:t+"/"}function Oie(t,e){let r=Aie(e.get(t+Ij)||e.get(t+"/"+Ij));if(r)return r;let n=e.get(t+Nj)||e.get(t+"/"+Nj),i=e.get(t+Lj)||e.get(t+"/"+Lj),o=kie(n,i);if(o)return o;let s=Tie(e.get(t+jj)||e.get(t+"/"+jj));if(s)return s}function Eh(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function Aie(t){return t?{token:Eh(t),type:"Bearer"}:void 0}function kie(t,e){if(!t||!e)return;let r=Buffer.from(Eh(e),"base64").toString("utf8");return{token:Buffer.from(t+":"+r,"utf8").toString("base64"),type:"Basic",password:r,username:t}}function Tie(t){return t?{token:Eh(t),type:"Basic"}:void 0}});var I8=D((v0e,jn)=>{var ot=require("fs"),_b=require("os"),ur=require("path"),b8=require("crypto"),sn={fs:ot.constants,os:_b.constants},w8="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",E8=/XXXXXX/,_oe=3,C8=(sn.O_CREAT||sn.fs.O_CREAT)|(sn.O_EXCL||sn.fs.O_EXCL)|(sn.O_RDWR||sn.fs.O_RDWR),Eoe=_b.platform()==="win32",Coe=sn.EBADF||sn.os.errno.EBADF,Soe=sn.ENOENT||sn.os.errno.ENOENT,S8=448,x8=384,xoe="exit",Ca=[],F8=ot.rmdirSync.bind(ot),O8=!1;function Foe(t,e){return ot.rm(t,{recursive:!0},e)}function A8(t){return ot.rmSync(t,{recursive:!0})}function Eb(t,e){let r=Sa(t,e),n=r[0],i=r[1];try{P8(n)}catch(s){return i(s)}let o=n.tries;(function s(){try{let a=T8(n);ot.stat(a,function(u){if(!u)return o-- >0?s():i(new Error("Could not get a unique tmp filename, max tries reached "+a));i(null,a)})}catch(a){i(a)}})()}function Cb(t){let e=Sa(t),r=e[0];P8(r);let n=r.tries;do{let i=T8(r);try{ot.statSync(i)}catch{return i}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function Ooe(t,e){let r=Sa(t,e),n=r[0],i=r[1];Eb(n,function(s,a){if(s)return i(s);ot.open(a,C8,n.mode||x8,function(l,c){if(l)return i(l);if(n.discardDescriptor)return ot.close(c,function(h){return i(h,a,void 0,vb(a,-1,n,!1))});{let f=n.discardDescriptor||n.detachDescriptor;i(null,a,c,vb(a,f?-1:c,n,!1))}})})}function Aoe(t){let e=Sa(t),r=e[0],n=r.discardDescriptor||r.detachDescriptor,i=Cb(r);var o=ot.openSync(i,C8,r.mode||x8);return r.discardDescriptor&&(ot.closeSync(o),o=void 0),{name:i,fd:o,removeCallback:vb(i,n?-1:o,r,!0)}}function koe(t,e){let r=Sa(t,e),n=r[0],i=r[1];Eb(n,function(s,a){if(s)return i(s);ot.mkdir(a,n.mode||S8,function(l){if(l)return i(l);i(null,a,k8(a,n,!1))})})}function Toe(t){let e=Sa(t),r=e[0],n=Cb(r);return ot.mkdirSync(n,r.mode||S8),{name:n,removeCallback:k8(n,r,!0)}}function Poe(t,e){let r=function(n){if(n&&!wb(n))return e(n);e()};0<=t[0]?ot.close(t[0],function(){ot.unlink(t[1],r)}):ot.unlink(t[1],r)}function Roe(t){let e=null;try{0<=t[0]&&ot.closeSync(t[0])}catch(r){if(!joe(r)&&!wb(r))throw r}finally{try{ot.unlinkSync(t[1])}catch(r){wb(r)||(e=r)}}if(e!==null)throw e}function vb(t,e,r,n){let i=Hh(Roe,[e,t],n),o=Hh(Poe,[e,t],n,i);return r.keep||Ca.unshift(i),n?i:o}function k8(t,e,r){let n=e.unsafeCleanup?Foe:ot.rmdir.bind(ot),i=e.unsafeCleanup?A8:F8,o=Hh(i,t,r),s=Hh(n,t,r,o);return e.keep||Ca.unshift(o),r?o:s}function Hh(t,e,r,n){let i=!1;return function o(s){if(!i){let a=n||o,u=Ca.indexOf(a);return u>=0&&Ca.splice(u,1),i=!0,r||t===F8||t===A8?t(e):t(e,s||function(){})}}}function $oe(){if(O8)for(;Ca.length;)try{Ca[0]()}catch{}}function _8(t){let e=[],r=null;try{r=b8.randomBytes(t)}catch{r=b8.pseudoRandomBytes(t)}for(var n=0;n<t;n++)e.push(w8[r[n]%w8.length]);return e.join("")}function Ioe(t){return t===null||Zt(t)||!t.trim()}function Zt(t){return typeof t>"u"}function Sa(t,e){if(typeof t=="function")return[{},t];if(Zt(t))return[{},e];let r={};for(let n of Object.getOwnPropertyNames(t))r[n]=t[n];return[r,e]}function T8(t){let e=t.tmpdir;if(!Zt(t.name))return ur.join(e,t.dir,t.name);if(!Zt(t.template))return ur.join(e,t.dir,t.template).replace(E8,_8(6));let r=[t.prefix?t.prefix:"tmp","-",process.pid,"-",_8(12),t.postfix?"-"+t.postfix:""].join("");return ur.join(e,t.dir,r)}function P8(t){t.tmpdir=$8(t);let e=t.tmpdir;if(Zt(t.name)||Db(t.name,"name",e),Zt(t.dir)||Db(t.dir,"dir",e),!Zt(t.template)&&(Db(t.template,"template",e),!t.template.match(E8)))throw new Error(`Invalid template, found "${t.template}".`);if(!Zt(t.tries)&&isNaN(t.tries)||t.tries<0)throw new Error(`Invalid tries, found "${t.tries}".`);t.tries=Zt(t.name)?t.tries||_oe:1,t.keep=!!t.keep,t.detachDescriptor=!!t.detachDescriptor,t.discardDescriptor=!!t.discardDescriptor,t.unsafeCleanup=!!t.unsafeCleanup,t.dir=Zt(t.dir)?"":ur.relative(e,bb(t.dir,e)),t.template=Zt(t.template)?void 0:ur.relative(e,bb(t.template,e)),t.template=Ioe(t.template)?void 0:ur.relative(t.dir,t.template),t.name=Zt(t.name)?void 0:t.name,t.prefix=Zt(t.prefix)?"":t.prefix,t.postfix=Zt(t.postfix)?"":t.postfix}function bb(t,e){return t.startsWith(e)?ur.resolve(t):ur.resolve(ur.join(e,t))}function Db(t,e,r){if(e==="name"){if(ur.isAbsolute(t))throw new Error(`${e} option must not contain an absolute path, found "${t}".`);let n=ur.basename(t);if(n===".."||n==="."||n!==t)throw new Error(`${e} option must not contain a path, found "${t}".`)}else{if(ur.isAbsolute(t)&&!t.startsWith(r))throw new Error(`${e} option must be relative to "${r}", found "${t}".`);let n=bb(t,r);if(!n.startsWith(r))throw new Error(`${e} option must be relative to "${r}", found "${n}".`)}}function joe(t){return R8(t,-Coe,"EBADF")}function wb(t){return R8(t,-Soe,"ENOENT")}function R8(t,e,r){return Eoe?t.code===r:t.code===r&&t.errno===e}function Noe(){O8=!0}function $8(t){return ur.resolve(t&&t.tmpdir||_b.tmpdir())}process.addListener(xoe,$oe);Object.defineProperty(jn.exports,"tmpdir",{enumerable:!0,configurable:!1,get:function(){return $8()}});jn.exports.dir=koe;jn.exports.dirSync=Toe;jn.exports.file=Ooe;jn.exports.fileSync=Aoe;jn.exports.tmpName=Eb;jn.exports.tmpNameSync=Cb;jn.exports.setGracefulCleanup=Noe});var Hb=ue(Ub(),1),{program:k,createCommand:cse,createArgument:fse,createOption:dse,CommanderError:hse,InvalidArgumentError:pse,InvalidOptionArgumentError:mse,Command:gse,Argument:yse,Option:Dse,Help:vse}=Hb.default;var Cr={name:"@capgo/cli",version:"7.0.16",description:"A CLI to upload to capgo servers",author:"github.com/riderx",license:"Apache 2.0",homepage:"https://github.com/Cap-go/CLIl#readme",repository:{type:"git",url:"git+https://github.com/Cap-go/CLI.git"},bugs:{url:"https://github.com/Cap-go/CLI/issues"},keywords:["appflow alternative","ionic","capacitor","auto update","live update","capgo","cli","upload","capgo-cli"],main:"dist/index.js",bin:{capgo:"dist/index.js"},engines:{npm:">=8.0.0",node:">=20.0.0"},scripts:{build:"tsc && node build.mjs",dev:"NODE_ENV=development ncc build","no-debug":"node dist/index.js",test:"npx --yes ts-node -T src/index.ts","dev-build":"SUPA_DB=development ncc build",pack:"pkg",types:"npx --yes supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",test_rls:"ts-node ./test/test_headers_rls.ts",lint:'eslint "src/**/*.ts" --fix',"check-posix-paths":"node test/check-posix-paths.js"},devDependencies:{"@antfu/eslint-config":"^4.1.1","@bradenmacdonald/s3-lite-client":"npm:@jsr/bradenmacdonald__s3-lite-client","@capacitor/cli":"^7.0.1","@capgo/find-package-manager":"^0.0.17","@clack/prompts":"^0.10.0","@sauber/table":"npm:@jsr/sauber__table","@std/semver":"npm:@jsr/std__semver","@supabase/supabase-js":"^2.48.1","@tomasklaen/checksum":"^1.1.0","@types/adm-zip":"^0.5.7","@types/node":"^22.13.1","@types/prettyjson":"^0.0.33","@types/semver":"^7.5.8","@types/tmp":"^0.2.6","@vercel/ncc":"^0.38.3","adm-zip":"^0.5.16","ci-info":"^4.1.0",commander:"13.0.0",esbuild:"^0.25.0",eslint:"9.20.1","git-format-staged":"3.1.1",husky:"^9.1.7","is-wsl":"^3.1.0",ky:"^1.7.4","latest-version":"^9.0.0",open:"^10.1.0",pkg:"5.8.1",prettyjson:"^1.2.5",semver:"^7.7.1",tmp:"^0.2.3","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"4.2.0","tus-js-client":"^4.3.1",typescript:"5.7.3"}};var ma=require("node:fs"),Vj=require("node:process");var St=ue(Te(),1),$o=require("node:process"),Ln=ue(require("node:readline"),1),gp=ue(require("node:readline"),1),ew=require("node:tty"),tw=ue(hp(),1);function vN({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}var bN=vN();function rw(t){if(typeof t!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof t}\``);return t.replace(bN,"")}function nw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var iw={exports:{}};(function(t){var e={};t.exports=e,e.eastAsianWidth=function(n){var i=n.charCodeAt(0),o=n.length==2?n.charCodeAt(1):0,s=i;return 55296<=i&&i<=56319&&56320<=o&&o<=57343&&(i&=1023,o&=1023,s=i<<10|o,s+=65536),s==12288||65281<=s&&s<=65376||65504<=s&&s<=65510?"F":s==8361||65377<=s&&s<=65470||65474<=s&&s<=65479||65482<=s&&s<=65487||65490<=s&&s<=65495||65498<=s&&s<=65500||65512<=s&&s<=65518?"H":4352<=s&&s<=4447||4515<=s&&s<=4519||4602<=s&&s<=4607||9001<=s&&s<=9002||11904<=s&&s<=11929||11931<=s&&s<=12019||12032<=s&&s<=12245||12272<=s&&s<=12283||12289<=s&&s<=12350||12353<=s&&s<=12438||12441<=s&&s<=12543||12549<=s&&s<=12589||12593<=s&&s<=12686||12688<=s&&s<=12730||12736<=s&&s<=12771||12784<=s&&s<=12830||12832<=s&&s<=12871||12880<=s&&s<=13054||13056<=s&&s<=19903||19968<=s&&s<=42124||42128<=s&&s<=42182||43360<=s&&s<=43388||44032<=s&&s<=55203||55216<=s&&s<=55238||55243<=s&&s<=55291||63744<=s&&s<=64255||65040<=s&&s<=65049||65072<=s&&s<=65106||65108<=s&&s<=65126||65128<=s&&s<=65131||110592<=s&&s<=110593||127488<=s&&s<=127490||127504<=s&&s<=127546||127552<=s&&s<=127560||127568<=s&&s<=127569||131072<=s&&s<=194367||177984<=s&&s<=196605||196608<=s&&s<=262141?"W":32<=s&&s<=126||162<=s&&s<=163||165<=s&&s<=166||s==172||s==175||10214<=s&&s<=10221||10629<=s&&s<=10630?"Na":s==161||s==164||167<=s&&s<=168||s==170||173<=s&&s<=174||176<=s&&s<=180||182<=s&&s<=186||188<=s&&s<=191||s==198||s==208||215<=s&&s<=216||222<=s&&s<=225||s==230||232<=s&&s<=234||236<=s&&s<=237||s==240||242<=s&&s<=243||247<=s&&s<=250||s==252||s==254||s==257||s==273||s==275||s==283||294<=s&&s<=295||s==299||305<=s&&s<=307||s==312||319<=s&&s<=322||s==324||328<=s&&s<=331||s==333||338<=s&&s<=339||358<=s&&s<=359||s==363||s==462||s==464||s==466||s==468||s==470||s==472||s==474||s==476||s==593||s==609||s==708||s==711||713<=s&&s<=715||s==717||s==720||728<=s&&s<=731||s==733||s==735||768<=s&&s<=879||913<=s&&s<=929||931<=s&&s<=937||945<=s&&s<=961||963<=s&&s<=969||s==1025||1040<=s&&s<=1103||s==1105||s==8208||8211<=s&&s<=8214||8216<=s&&s<=8217||8220<=s&&s<=8221||8224<=s&&s<=8226||8228<=s&&s<=8231||s==8240||8242<=s&&s<=8243||s==8245||s==8251||s==8254||s==8308||s==8319||8321<=s&&s<=8324||s==8364||s==8451||s==8453||s==8457||s==8467||s==8470||8481<=s&&s<=8482||s==8486||s==8491||8531<=s&&s<=8532||8539<=s&&s<=8542||8544<=s&&s<=8555||8560<=s&&s<=8569||s==8585||8592<=s&&s<=8601||8632<=s&&s<=8633||s==8658||s==8660||s==8679||s==8704||8706<=s&&s<=8707||8711<=s&&s<=8712||s==8715||s==8719||s==8721||s==8725||s==8730||8733<=s&&s<=8736||s==8739||s==8741||8743<=s&&s<=8748||s==8750||8756<=s&&s<=8759||8764<=s&&s<=8765||s==8776||s==8780||s==8786||8800<=s&&s<=8801||8804<=s&&s<=8807||8810<=s&&s<=8811||8814<=s&&s<=8815||8834<=s&&s<=8835||8838<=s&&s<=8839||s==8853||s==8857||s==8869||s==8895||s==8978||9312<=s&&s<=9449||9451<=s&&s<=9547||9552<=s&&s<=9587||9600<=s&&s<=9615||9618<=s&&s<=9621||9632<=s&&s<=9633||9635<=s&&s<=9641||9650<=s&&s<=9651||9654<=s&&s<=9655||9660<=s&&s<=9661||9664<=s&&s<=9665||9670<=s&&s<=9672||s==9675||9678<=s&&s<=9681||9698<=s&&s<=9701||s==9711||9733<=s&&s<=9734||s==9737||9742<=s&&s<=9743||9748<=s&&s<=9749||s==9756||s==9758||s==9792||s==9794||9824<=s&&s<=9825||9827<=s&&s<=9829||9831<=s&&s<=9834||9836<=s&&s<=9837||s==9839||9886<=s&&s<=9887||9918<=s&&s<=9919||9924<=s&&s<=9933||9935<=s&&s<=9953||s==9955||9960<=s&&s<=9983||s==10045||s==10071||10102<=s&&s<=10111||11093<=s&&s<=11097||12872<=s&&s<=12879||57344<=s&&s<=63743||65024<=s&&s<=65039||s==65533||127232<=s&&s<=127242||127248<=s&&s<=127277||127280<=s&&s<=127337||127344<=s&&s<=127386||917760<=s&&s<=917999||983040<=s&&s<=1048573||1048576<=s&&s<=1114109?"A":"N"},e.characterLength=function(n){var i=this.eastAsianWidth(n);return i=="F"||i=="W"||i=="A"?2:1};function r(n){return n.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}e.length=function(n){for(var i=r(n),o=0,s=0;s<i.length;s++)o=o+this.characterLength(i[s]);return o},e.slice=function(n,i,o){textLen=e.length(n),i=i||0,o=o||1,i<0&&(i=textLen+i),o<0&&(o=textLen+o);for(var s="",a=0,u=r(n),l=0;l<u.length;l++){var c=u[l],f=e.length(c);if(a>=i-(f==2?1:0))if(a+f<=o)s+=c;else break;a+=f}return s}})(iw);var wN=iw.exports,_N=nw(wN),EN=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g},CN=nw(EN);function Aa(t,e={}){if(typeof t!="string"||t.length===0||(e={ambiguousIsNarrow:!0,...e},t=rw(t),t.length===0))return 0;t=t.replace(CN()," ");let r=e.ambiguousIsNarrow?1:2,n=0;for(let i of t){let o=i.codePointAt(0);if(!(o<=31||o>=127&&o<=159||o>=768&&o<=879))switch(_N.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var pp=10,Wb=(t=0)=>e=>`\x1B[${e+t}m`,Kb=(t=0)=>e=>`\x1B[${38+t};5;${e}m`,Yb=(t=0)=>(e,r,n)=>`\x1B[${38+t};2;${e};${r};${n}m`,Ne={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(Ne.modifier);var SN=Object.keys(Ne.color),xN=Object.keys(Ne.bgColor);[...SN,...xN];function FN(){let t=new Map;for(let[e,r]of Object.entries(Ne)){for(let[n,i]of Object.entries(r))Ne[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Ne[n],t.set(i[0],i[1]);Object.defineProperty(Ne,e,{value:r,enumerable:!1})}return Object.defineProperty(Ne,"codes",{value:t,enumerable:!1}),Ne.color.close="\x1B[39m",Ne.bgColor.close="\x1B[49m",Ne.color.ansi=Wb(),Ne.color.ansi256=Kb(),Ne.color.ansi16m=Yb(),Ne.bgColor.ansi=Wb(pp),Ne.bgColor.ansi256=Kb(pp),Ne.bgColor.ansi16m=Yb(pp),Object.defineProperties(Ne,{rgbToAnsi256:{value:(e,r,n)=>e===r&&r===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:e=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(e.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(o=>o+o).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:e=>Ne.rgbToAnsi256(...Ne.hexToRgb(e)),enumerable:!1},ansi256ToAnsi:{value:e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let r,n,i;if(e>=232)r=((e-232)*10+8)/255,n=r,i=r;else{e-=16;let a=e%36;r=Math.floor(e/36)/5,n=Math.floor(a/6)/5,i=a%6/5}let o=Math.max(r,n,i)*2;if(o===0)return 30;let s=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return o===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(e,r,n)=>Ne.ansi256ToAnsi(Ne.rgbToAnsi256(e,r,n)),enumerable:!1},hexToAnsi:{value:e=>Ne.ansi256ToAnsi(Ne.hexToAnsi256(e)),enumerable:!1}}),Ne}var ON=FN(),Zl=new Set(["\x1B","\x9B"]),AN=39,Dp="\x07",ow="[",kN="]",sw="m",vp=`${kN}8;;`,Jb=t=>`${Zl.values().next().value}${ow}${t}${sw}`,Xb=t=>`${Zl.values().next().value}${vp}${t}${Dp}`,TN=t=>t.split(" ").map(e=>Aa(e)),mp=(t,e,r)=>{let n=[...e],i=!1,o=!1,s=Aa(rw(t[t.length-1]));for(let[a,u]of n.entries()){let l=Aa(u);if(s+l<=r?t[t.length-1]+=u:(t.push(u),s=0),Zl.has(u)&&(i=!0,o=n.slice(a+1).join("").startsWith(vp)),i){o?u===Dp&&(i=!1,o=!1):u===sw&&(i=!1);continue}s+=l,s===r&&a<n.length-1&&(t.push(""),s=0)}!s&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},PN=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(Aa(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},RN=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let n="",i,o,s=TN(t),a=[""];for(let[l,c]of t.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let f=Aa(a[a.length-1]);if(l!==0&&(f>=e&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),f=0),(f>0||r.trim===!1)&&(a[a.length-1]+=" ",f++)),r.hard&&s[l]>e){let h=e-f,d=1+Math.floor((s[l]-h-1)/e);Math.floor((s[l]-1)/e)<d&&a.push(""),mp(a,c,e);continue}if(f+s[l]>e&&f>0&&s[l]>0){if(r.wordWrap===!1&&f<e){mp(a,c,e);continue}a.push("")}if(f+s[l]>e&&r.wordWrap===!1){mp(a,c,e);continue}a[a.length-1]+=c}r.trim!==!1&&(a=a.map(l=>PN(l)));let u=[...a.join(`
|
|
205
205
|
`)];for(let[l,c]of u.entries()){if(n+=c,Zl.has(c)){let{groups:h}=new RegExp(`(?:\\${ow}(?<code>\\d+)m|\\${vp}(?<uri>.*)${Dp})`).exec(u.slice(l).join(""))||{groups:{}};if(h.code!==void 0){let d=Number.parseFloat(h.code);i=d===AN?void 0:d}else h.uri!==void 0&&(o=h.uri.length===0?void 0:h.uri)}let f=ON.codes.get(Number(i));u[l+1]===`
|
|
206
206
|
`?(o&&(n+=Xb("")),i&&f&&(n+=Jb(f))):c===`
|
|
207
207
|
`&&(i&&f&&(n+=Jb(i)),o&&(n+=Xb(o)))}return n};function Zb(t,e,r){return String(t).normalize().replace(/\r\n/g,`
|
|
@@ -303,7 +303,7 @@ ${Q(n)}`),k.error("")),r))}function D6(t,e){return t.from("channels").insert(e).
|
|
|
303
303
|
`),u.push(n.join(";").toLowerCase()),u.push(i),u.join(`
|
|
304
304
|
`)}async function K6(t,e,r){let n=await jh(t),i=ub(r,e),o=[];return o.push(lb),o.push($l(e)),o.push(i),o.push(n),o.join(`
|
|
305
305
|
`)}async function Y6(t,e,r){let n=ab(t),i=await Ea("AWS4"+r,n),o=await Ea(i,e),s=await Ea(o,"s3");return await Ea(s,"aws4_request")}function J6(t,e,r){return`${t}/${ub(e,r)}`}async function Ea(t,e){let r=new TextEncoder,n=await crypto.subtle.importKey("raw",t instanceof Uint8Array?t:r.encode(t),{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign","verify"]),i=await crypto.subtle.sign("HMAC",n,e instanceof Uint8Array?e:r.encode(e));return new Uint8Array(i)}var noe=["Content-Type","Cache-Control","Content-Disposition","Content-Encoding","Content-Language","Expires","x-amz-grant-full-control","x-amz-grant-read","x-amz-grant-read-acp","x-amz-grant-write-acp","x-amz-server-side-encryption","x-amz-storage-class","x-amz-website-redirect-location","x-amz-server-side-encryption-customer-algorithm","x-amz-server-side-encryption-customer-key","x-amz-server-side-encryption-customer-key-MD5","x-amz-server-side-encryption-aws-kms-key-id","x-amz-server-side-encryption-context","x-amz-server-side-encryption-bucket-key-enabled","x-amz-request-payer","x-amz-tagging","x-amz-object-lock-mode","x-amz-object-lock-retain-until-date","x-amz-object-lock-legal-hold","x-amz-expected-bucket-owner"],ioe=5*1024*1024,ooe=5*1024*1024*1024,cb=5*1024*1024*1024*1024,Il=class{host;port;protocol;accessKey;#e;sessionToken;defaultBucket;region;userAgent="s3-lite-client";pathStyle;constructor(e){if(e.useSSL===void 0&&(e.useSSL=!0),typeof e.endPoint!="string"||e.endPoint.length===0||e.endPoint.indexOf("/")!==-1)throw new Rh(`Invalid endPoint : ${e.endPoint}`);if(e.port!==void 0&&!U6(e.port))throw new Er(`Invalid port : ${e.port}`);if(e.accessKey&&!e.secretKey)throw new Er("If specifying access key, secret key must also be provided.");if(e.accessKey&&e.accessKey.startsWith("ASIA")&&!e.sessionToken)throw new Er("If specifying temporary access key, session token must also be provided.");let r=e.useSSL?443:80;this.port=e.port??r,this.host=e.endPoint.toLowerCase()+(this.port!==r?`:${e.port}`:""),this.protocol=e.useSSL?"https:":"http:",this.accessKey=e.accessKey,this.#e=e.secretKey??"",this.sessionToken=e.sessionToken,this.pathStyle=e.pathStyle??!0,this.defaultBucket=e.bucket,this.region=e.region}getBucketName(e){let r=e?.bucketName??this.defaultBucket;if(r===void 0||!H6(r))throw new $h(`Invalid bucket name: ${r}`);return r}buildRequestOptions(e){let r=this.getBucketName(e),n=this.pathStyle?this.host:`${r}.${this.host}`,i=e.headers??new Headers;i.set("host",n);let o=typeof e.query=="object"?new URLSearchParams(e.query).toString().replace("+","%20"):e.query,s=(this.pathStyle?`/${r}/${e.objectName}`:`/${e.objectName}`)+(o?`?${o}`:"");return{headers:i,host:n,path:s}}async makeRequest({method:e,payload:r,...n}){let i=new Date,{headers:o,host:s,path:a}=this.buildRequestOptions(n),u=n.statusCode??200;if(e==="POST"||e==="PUT"||e==="DELETE")r===void 0?r=new Uint8Array:typeof r=="string"&&(r=new TextEncoder().encode(r)),o.set("Content-Length",String(r.length));else if(r)throw new Error(`Unexpected payload on ${e} request.`);let l=await jh(r??new Uint8Array);o.set("x-amz-date",$l(i)),o.set("x-amz-content-sha256",l),this.accessKey&&(this.sessionToken&&o.set("x-amz-security-token",this.sessionToken),o.set("authorization",await V6({headers:o,method:e,path:a,accessKey:this.accessKey,secretKey:this.#e,region:this.region,date:i})));let c=`${this.protocol}//${s}${a}`,f=await fetch(c,{method:e,headers:o,body:r});if(f.status!==u)throw f.status>=400?await M6(f):f.status===301?new In(f.status,"UnexpectedRedirect",'The server unexpectedly returned a redirect response. With AWS S3, this usually means you need to use a region-specific endpoint like "s3.us-west-2.amazonaws.com" instead of "s3.amazonaws.com"'):new In(f.status,"UnexpectedStatusCode",`Unexpected response code from the server (expected ${u}, got ${f.status} ${f.statusText}).`);return n.returnBody||await f.body?.getReader().read(),f}async deleteObject(e,r={}){let n=this.getBucketName(r);if(!Fo(e))throw new $n(`Invalid object name: ${e}`);let i=r.versionId?{versionId:r.versionId}:{},o=new Headers;r.governanceBypass&&o.set("X-Amz-Bypass-Governance-Retention","true"),await this.makeRequest({method:"DELETE",bucketName:n,objectName:e,headers:o,query:i,statusCode:204})}async exists(e,r){try{return await this.statObject(e,r),!0}catch(n){if(n instanceof In&&n.statusCode===404)return!1;throw n}}getObject(e,r){return this.getPartialObject(e,{...r,offset:0,length:0})}async getPartialObject(e,{offset:r,length:n,...i}){let o=this.getBucketName(i);if(!Fo(e))throw new $n(`Invalid object name: ${e}`);let s=new Headers(Object.entries(i.metadata??{})),a=200;if(r||n){let l="";r?l=`bytes=${+r}-`:(l="bytes=0-",r=0),n&&(l+=`${+n+r-1}`),s.set("Range",l),a=206}let u={...i.responseParams,...i.versionId?{versionId:i.versionId}:{}};return await this.makeRequest({method:"GET",bucketName:o,objectName:e,headers:s,query:u,statusCode:a,returnBody:!0})}getPresignedUrl(e,r,n={}){if(!this.accessKey)throw new xo(`Presigned ${e} URLs cannot be generated for anonymous requests. Specify an accessKey and secretKey.`);if(!Fo(r))throw new $n(`Invalid object name: ${r}`);let{headers:i,path:o}=this.buildRequestOptions({objectName:r,bucketName:n.bucketName,query:n.parameters}),s=n.requestDate??new Date,a=n.expirySeconds??24*60*60*7;return z6({protocol:this.protocol,headers:i,method:e,path:o,accessKey:this.accessKey,secretKey:this.#e,region:this.region,date:s,expirySeconds:a})}presignedGetObject(e,r={}){let{versionId:n,responseParams:i,...o}=r,s={...i,...n?{versionId:n}:{}};return this.getPresignedUrl("GET",e,{parameters:s,...o})}async*listObjects(e={}){for await(let r of this.listObjectsGrouped({...e,delimiter:""}))if(r.type==="Object")yield r;else throw new Error(`Unexpected result from listObjectsGrouped(): ${r}`)}async*listObjectsGrouped(e){let r=this.getBucketName(e),n="",i=e.pageSize??1e3;if(i<1||i>1e3)throw new Er("pageSize must be between 1 and 1,000.");let o=0;for(;;){let s=e.maxResults?Math.min(i,e.maxResults-o):i;if(s===0)return;let u=await(await this.makeRequest({method:"GET",bucketName:r,objectName:"",query:{"list-type":"2",prefix:e.prefix??"",delimiter:e.delimiter,"max-keys":String(s),...n?{"continuation-token":n}:{}},returnBody:!0})).text(),l=hi(u).root;if(!l||l.name!=="ListBucketResult")throw new Error(`Unexpected response: ${u}`);let c=l.children.filter(d=>d.name==="CommonPrefixes").flatMap(d=>d.children),f=[];for(let d of c)f.push({type:"CommonPrefix",prefix:d.content??""}),o++;for(let d of l.children.filter(m=>m.name==="Contents"))f.push({type:"Object",key:d.children.find(m=>m.name==="Key")?.content??"",etag:Oo(d.children.find(m=>m.name==="ETag")?.content??""),size:parseInt(d.children.find(m=>m.name==="Size")?.content??"",10),lastModified:new Date(d.children.find(m=>m.name==="LastModified")?.content??"invalid")}),o++;f.sort((d,m)=>{let b=d.type==="Object"?d.key:d.prefix,y=m.type==="Object"?m.key:m.prefix;return b>y?1:b<y?-1:0});for(let d of f)yield d;if(l.children.find(d=>d.name==="IsTruncated")?.content==="true"){let d=l.children.find(m=>m.name==="NextContinuationToken")?.content;if(!d)throw new Error("Unexpectedly missing continuation token, but server said there are more results.");n=d}else return}}async putObject(e,r,n){let i=this.getBucketName(n);if(!Fo(e))throw new $n(`Invalid object name: ${e}`);let o,s;if(typeof r=="string"){let c=new TextEncoder().encode(r);typeof ReadableStream.from<"u"?s=ReadableStream.from([c]):s=new ReadableStream({start(f){f.enqueue(c),f.close()}}),o=c.length}else if(r instanceof Uint8Array)typeof ReadableStream.from<"u"?s=ReadableStream.from([r]):s=new ReadableStream({start(c){c.enqueue(r),c.close()}}),o=r.byteLength;else if(r instanceof ReadableStream)s=r;else throw new Er("Invalid stream/data type provided.");if(n?.size!==void 0){if(o!==void 0&&n?.size!==o)throw new Er(`size was specified (${n.size}) but doesn't match auto-detected size (${o}).`);if(typeof n.size!="number"||n.size<0||isNaN(n.size))throw new Er(`invalid size specified: ${n.size}`);o=n.size}let a=n?.partSize??this.calculatePartSize(o);if(a<ioe)throw new Er("Part size should be greater than 5MB");if(a>ooe)throw new Er("Part size should be less than 6MB");let u=new Ph(a),l=new Nh({client:this,bucketName:i,objectName:e,partSize:a,metadata:n?.metadata??{}});return await s.pipeThrough(u).pipeTo(l),l.getResult()}calculatePartSize(e){if(e===void 0&&(e=cb),e>cb)throw new TypeError(`size should not be more than ${cb}`);let r=64*1024*1024;for(;;){if(r*1e4>e)return r;r+=16*1024*1024}}async statObject(e,r){let n=this.getBucketName(r);if(!Fo(e))throw new $n(`Invalid object name: ${e}`);let i={};r?.versionId&&(i.versionId=r.versionId);let o=await this.makeRequest({method:"HEAD",bucketName:n,objectName:e,query:i}),s={};for(let a of noe)o.headers.has(a)&&(s[a]=o.headers.get(a));return o.headers.forEach((a,u)=>{u.startsWith("x-amz-meta-")&&(s[u]=o.headers.get(u))}),{type:"Object",key:e,size:parseInt(o.headers.get("content-length")??"",10),metadata:s,lastModified:new Date(o.headers.get("Last-Modified")??"error: missing last modified"),versionId:o.headers.get("x-amz-version-id")||null,etag:Oo(o.headers.get("ETag")??"")}}async copyObject(e,r,n){let i=this.getBucketName(n),o=e.sourceBucketName??i;if(!Fo(r))throw new $n(`Invalid object name: ${r}`);let s=`${o}/${e.sourceKey}`;e.sourceVersionId&&(s+=`?versionId=${e.sourceVersionId}`);let a=new Headers(n?.metadata);n?.metadata!==void 0&&a.set("x-amz-metadata-directive","REPLACE"),a.set("x-amz-copy-source",s);let u=await this.makeRequest({method:"PUT",bucketName:i,objectName:r,headers:a,returnBody:!0}),l=await u.text(),c=hi(l).root;if(!c||c.name!=="CopyObjectResult")throw new Error(`Unexpected response: ${l}`);let f=c.children.find(d=>d.name==="ETag")?.content??"",h=c.children.find(d=>d.name==="LastModified")?.content;if(h===void 0)throw new Error("Unable to find <LastModified>...</LastModified> from the server.");return{copySourceVersionId:u.headers.get("x-amz-copy-source-version-id")||null,etag:Oo(f),lastModified:new Date(h),versionId:u.headers.get("x-amz-version-id")||null}}async bucketExists(e){try{return await this.listObjects({bucketName:e}).next(),!0}catch(r){if(r instanceof In&&r.statusCode===404)return!1;throw r}}async makeBucket(e){await this.makeRequest({method:"PUT",bucketName:this.getBucketName({bucketName:e}),objectName:"",statusCode:200})}async removeBucket(e){await this.makeRequest({method:"DELETE",bucketName:this.getBucketName({bucketName:e}),objectName:"",statusCode:204})}};var pb=ue(fu());var ko=require("node:fs"),Lh=require("node:path");function soe(t,e){return(0,ko.readFileSync)(t,"utf8").includes(e)}function jl(t,e){let r=(0,ko.readdirSync)(t);for(let n of r){let i=(0,Lh.join)(t,n),o=(0,ko.statSync)(i);if(o.isDirectory()){if(jl(i,e))return!0}else if(o.isFile()&&(0,Lh.extname)(i)===".js"&&soe(i,e))return!0}return!1}function Bh(t){return(0,ko.readdirSync)(t).indexOf("index.html")>-1}var fb=require("node:buffer"),qh=require("node:fs"),X6=require("node:os"),To=require("node:path"),Z6=require("node:stream"),db=require("node:stream/consumers"),Q6=require("node:zlib");var e8=ue(ky());var hb=class extends Z6.Transform{isFirstChunk=!0;_transform(e,r,n){this.isFirstChunk&&(this.push(fb.Buffer.from([139,0,128])),this.isFirstChunk=!1),this.push(e),n()}_flush(e){this.push(fb.Buffer.from([3])),e()}};async function t8(t,e,r,n,i,o){let s=_e();s.start(i!=="v2"?"Generating the update manifest":"Generating the update manifest with v2 encryption");let a=await mI(t);return i==="v2"&&a.forEach(u=>{u.hash=_a(u.hash,o)}),s.stop("Manifest generated successfully"),await Oe(e,{channel:"partial-update",event:"Generate manifest",icon:"\u{1F4C2}",user_id:r,tags:{"app-id":n},notify:!1}),a}function aoe(t){return(0,X6.platform)()!=="win32"?t:To.win32.normalize(t).split(To.win32.sep).join(To.posix.sep)}async function r8(t,e,r,n,i,o,s,a){let u=_e();u.start("Preparing partial update with TUS protocol");let l=performance.now(),c=await br(),f=0,h=e.length,d=e.map(async m=>{let b=(0,To.join)(r,m.file),y=aoe(m.file),F=(await(0,db.buffer)((0,qh.createReadStream)(b))).length<16?(0,qh.createReadStream)(b).pipe(new hb):(0,qh.createReadStream)(b).pipe((0,Q6.createBrotliCompress)()),g=await(0,db.buffer)(F),C=g;return s&&(C=wa(g,s.sessionKey,s.ivSessionKey)),new Promise((A,T)=>{new e8.Upload(C,{endpoint:`${c.hostFilesApi}/files/upload/attachments/`,chunkSize:a,metadata:{filename:`orgs/${o}/apps/${n}/${i}/${y}`},headers:{Authorization:t},onError(L){p.info(`Failed to upload ${y}: ${L}`),T(L)},onProgress(){let L=(f/h*100).toFixed(2);u.message(`Uploading partial update: ${L}%`)},onSuccess(){f++,A({file_name:y,s3_path:`orgs/${o}/apps/${n}/${i}/${y}`,file_hash:m.hash})}}).start()})});try{let m=await Promise.all(d),y=((performance.now()-l)/1e3).toFixed(2);return u.stop(`Partial update uploaded successfully \u{1F4AA} in (${y} seconds)`),await Oe(t,{channel:"app",event:"App Partial TUS done",icon:"\u23EB",user_id:o,tags:{"app-id":n},notify:!1}),await Oe(t,{channel:"performance",event:"Partial upload performance",icon:"\u{1F684}",user_id:o,tags:{"app-id":n,time:y},notify:!1}),m}catch(m){let y=((performance.now()-l)/1e3).toFixed(2);return u.stop(`Failed to upload Partial bundle ( after ${y} seconds)`),p.info(`Error uploading partial update: ${m}, This is not a critical error, the bundle has been uploaded without the partial files`),null}}async function uoe(t,e){let r=await vr("",e.packageJson),n=e.bundle||t?.plugins?.CapacitorUpdater?.version||r?.version||`0.0.1-beta.${(0,n8.randomUUID)().split("-")[0]}`;return ia.test(n)||(p.error(`Your bundle name ${n}, is not valid it should follow semver convention : https://semver.org/`),k.error("")),n}function loe(t){let e=t.apikey||de();return e||(p.error("Missing API key, you need to provide a API key to upload your bundle"),k.error("")),e}function coe(t,e,r){let n=pe(t,r),i=e.path||r?.webDir;return n||(p.error("Missing argument, you need to provide a appid or be in a capacitor project"),k.error("")),i||(p.error("Missing argument, you need to provide a path (--path), or be in a capacitor project"),k.error("")),(0,Po.existsSync)(i)||(p.error(`Path ${i} does not exist, build your app first, or provide a valid path`),k.error("")),{appid:n,path:i}}function foe(t,e){let r=t.codeCheck;(typeof r>"u"||r)&&(jl(e,"notifyAppReady")||(p.error("notifyAppReady() is missing in the build folder of your app. see: https://capgo.app/docs/plugin/api/#notifyappready"),k.error("")),Bh(e)||(p.error(`index.html is missing in the root folder of ${e}`),k.error("")))}async function doe(t,e,r,n,i,o){let s=r.ignoreMetadataCheck,a=r.autoMinUpdateVersion,u=r.minUpdateVersion,{data:l,error:c}=await t.from("channels").select("disable_auto_update, version ( min_update_version, native_packages )").eq("name",n).eq("app_id",i).single(),f=!!l&&l.disable_auto_update==="version_number",h,d;if(!c&&l&&l.version&&l.version.native_packages&&!s){let y=_e();y.start(`Checking bundle compatibility with channel ${n}`);let{finalCompatibility:E,localDependencies:F}=await fh(t,i,n,r.packageJson,r.nodeModules);if(d=E,h=F,d.find(g=>g.localVersion!==g.remoteVersion))y.stop(`Bundle NOT compatible with ${n} channel`),p.warn(`You can check compatibility with "${e.runner} @capgo/cli bundle compatibility"`),a&&(u=o,p.info(`Auto set min-update-version to ${u}`));else if(a)try{let{min_update_version:g}=l.version;(!g||!ia.test(g))&&(p.error("Invalid remote min update version, skipping auto setting compatibility"),k.error("")),u=g,y.stop(`Auto set min-update-version to ${u}`)}catch{p.error(`Cannot auto set compatibility, invalid data ${l}`),k.error("")}else y.stop(`Bundle compatible with ${n} channel`)}else s||(p.warn(`Channel ${n} is new or it's your first upload with compatibility check, it will be ignored this time`),h=await _v(r.packageJson,r.nodeModules),a&&(u=o,p.info(`Auto set min-update-version to ${u}`)));f&&!u&&!s&&(p.error("You need to provide a min-update-version to upload a bundle to this channel"),k.error("")),u&&(ia.test(u)||(p.error(`Your minimal version update ${u}, is not valid it should follow semver convention : https://semver.org/`),k.error("")));let m=h?new Map(h.filter(y=>!!y.native&&y.native!==void 0).map(y=>[y.name,y])):new Map;return{nativePackages:m.size>0||!r.ignoreMetadataCheck?Array.from(m,([y,E])=>({name:y,version:E.version})):void 0,minUpdateVersion:u}}async function hoe(t,e,r){let{data:n,error:i}=await t.rpc("is_trial_org",{orgid:e}).single();(n&&n>0||i)&&(p.warn(`WARNING !!
|
|
306
|
-
Trial expires in ${n} days`),p.warn(`Upgrade here: ${r.hostWeb}/dashboard/settings/plans?oid=${e}`))}async function poe(t,e,r){let{data:n,error:i}=await t.rpc("exist_app_versions",{appid:e,apikey:"",name_version:r}).single();(n||i)&&(p.error(`Version ${r} already exists ${Q(i)}`),k.error(""))}async function moe(t,e,r,n,i,o,s){let a,u,l="",c=null,f="none",h="",d=e.keyV2,m=e.key===!1;c=await lh(t);let b=_e();b.start("Calculating checksum");let y=(0,i8.join)(On((0,Mh.cwd)()),"package.json"),F=(await kr(void 0,e.packageJson||y)).get("@capgo/capacitor-updater");F=F?.replace("^","").replace("~","");let g=!1;if(F?g=m6(Xt(F),Xt("7.0.0")):(p.warn("Cannot find @capgo/capacitor-updater in your package.json, assuming it is v7"),g=!0),(d||e.keyDataV2||(0,Po.existsSync)(or))&&!m||g?l=await(0,pb.checksum)(c,"sha256"):l=await(0,pb.checksum)(c,"crc32"),b.stop(`Checksum: ${l}`),m
|
|
306
|
+
Trial expires in ${n} days`),p.warn(`Upgrade here: ${r.hostWeb}/dashboard/settings/plans?oid=${e}`))}async function poe(t,e,r){let{data:n,error:i}=await t.rpc("exist_app_versions",{appid:e,apikey:"",name_version:r}).single();(n||i)&&(p.error(`Version ${r} already exists ${Q(i)}`),k.error(""))}async function moe(t,e,r,n,i,o,s){let a,u,l="",c=null,f="none",h="",d=e.keyV2,m=e.key===!1;c=await lh(t);let b=_e();b.start("Calculating checksum");let y=(0,i8.join)(On((0,Mh.cwd)()),"package.json"),F=(await kr(void 0,e.packageJson||y)).get("@capgo/capacitor-updater");F=F?.replace("^","").replace("~","");let g=!1;if(F?g=m6(Xt(F),Xt("7.0.0")):(p.warn("Cannot find @capgo/capacitor-updater in your package.json, assuming it is v7"),g=!0),(d||e.keyDataV2||(0,Po.existsSync)(or))&&!m||g?l=await(0,pb.checksum)(c,"sha256"):l=await(0,pb.checksum)(c,"crc32"),b.stop(`Checksum: ${l}`),m)p.info("Encryption ignored");else if((d||(0,Po.existsSync)(or)||e.keyDataV2)&&!e.oldEncryption){let T=typeof d=="string"?d:or,x=e.keyDataV2||"";!x&&!(0,Po.existsSync)(T)&&(p.error(`Cannot find private key ${T}`),k.error("")),await Oe(r,{channel:"app",event:"App encryption v2",icon:"\u{1F511}",user_id:n,tags:{"app-id":i},notify:!1}),x||(x=(0,Po.readFileSync)(T).toString()),p.info("Encrypting your bundle with V2");let{sessionKey:L,ivSessionKey:S}=Th(x),I=wa(c,L,S);l=_a(l,x),a=S,u=L,f="v2",h=x,e.displayIvSession&&p.info(`Your Iv Session key is ${a},
|
|
307
307
|
keep it safe, you will need it to decrypt your bundle.
|
|
308
308
|
It will be also visible in your dashboard
|
|
309
309
|
`),c=I}let C=Math.floor((c?.byteLength??0)/1024/1024),A=Math.floor(o/1024/1024);return c?.byteLength>o?(p.error(`The bundle size is ${C} Mb, this is greater than the maximum upload length ${A} Mb, please reduce the size of your bundle`),k.error("")):c?.byteLength>s&&(p.warn(`WARNING !!
|
|
@@ -335,7 +335,7 @@ ${Vh};
|
|
|
335
335
|
${M8};
|
|
336
336
|
|
|
337
337
|
${Vh};
|
|
338
|
-
`)}async function Joe(t,e,r){let n=await kr(),i=Xt(n.get("@capacitor/core")?.replace("^","").replace("~","")??"");i||p.warn("Cannot find @capacitor/core in package.json. It is likely that you are using a monorepo. Please NOTE that encryption is not supported in Capacitor V5.");let o=Jt(),s=await Pe({message:`Automatic configure end-to-end encryption in ${r} updates?`});if(await un(s,t,e),s){if(i&&So(i,Xt("6.0.0"))){p.warn("Encryption is not supported in Capacitor V5.");return}let a=_e();a.start(`Running: ${o.runner} @capgo/cli@latest key create`),await Sb({force:!0},!1)?a.stop("key created \u{1F511}"):(a.stop("Error"),p.warn("Cannot create key \u274C"),J("Bye \u{1F44B}"),(0,ke.exit)(1)),Tn("onboarding-v2",t,e,"Use encryption v2")}await Tr(t,e,6)}async function Xoe(t,e,r){let n=Jt(),i=await Pe({message:`Automatic build ${r} with "${n.pm} run build" ?`});if(await un(i,t,e),i){let o=_e(),s=await bv(),a=await fI(s);o.start(`Running: ${n.pm} run ${a} && ${n.runner} cap sync`),(await vr()).scripts[a]||(o.stop("Error"),p.warn(`Cannot find ${a} script in package.json, please add it and run \`capgo init\` again`),J("Bye \u{1F44B}"),(0,ke.exit)()),(0,Ll.execSync)(`${n.pm} run ${a} && ${n.runner} cap sync`,U8),o.stop("Build & Sync Done \u2705")}else p.info(`Build yourself with command: ${n.pm} run build && ${n.runner} cap sync`);await Tr(t,e,7)}async function Zoe(t,e,r){let n=Jt(),i=await Pe({message:`Automatic upload ${r} bundle to Capgo?`});if(await un(i,t,e),i){let o=_e(),s;o.start(`Running: ${n.runner} @capgo/cli@latest bundle upload`);let a=nI((0,ke.cwd)());Ro&&a&&(p.warn("You are most likely using a monorepo, please provide the path to your package.json file AND node_modules path folder when uploading your bundle"),p.warn(`Example: ${n.runner} @capgo/cli@latest bundle upload --package-json ./packages/my-app/package.json --node-modules ./packages/my-app/node_modules`),s=(0,pi.join)(On((0,ke.cwd)()),"node_modules"),p.warn(`Guessed node modules path at: ${s}`),(0,Ie.existsSync)(s)||(p.error("Node modules path does not exist, upload skipped"),J("Bye \u{1F44B}"),(0,ke.exit)(1))),await mb(r,{channel:Nl,apikey:e,packageJson:a?Ro:void 0,nodeModules:a?s:void 0},!1)?o.stop("Upload Done \u2705"):(o.stop("Error"),p.warn("Upload failed \u274C"),J("Bye \u{1F44B}"),(0,ke.exit)())}else p.info(`Upload yourself with command: ${n.runner} @capgo/cli@latest bundle upload`);await Tr(t,e,8)}async function Qoe(t,e){let r=Jt(),n=await Pe({message:"Run in device now ?"});if(await un(n,t,e),n){let i=await yi({message:"Pick a platform to run your app",options:[{value:"ios",label:"IOS"},{value:"android",label:"Android"}]});st(i)&&(J("Bye \u{1F44B}"),(0,ke.exit)());let o=i,s=_e();s.start(`Running: ${r.runner} cap run ${o}`),await(0,Ll.spawnSync)(r.runner,["cap","run",o],{stdio:"inherit"}),s.stop("Started Done \u2705")}else p.info(`If you change your mind, run it for yourself with: ${r.runner} cap run <ios|android>`);await Tr(t,e,9)}async function ese(t,e,r,n){let i=await Pe({message:"Automatic check if update working in device ?"});if(await un(i,t,e),i)p.info(`Wait logs sent to Capgo from ${r} device, Please open your app \u{1F4AA}`),await Gv("onboarding-v2",e,r,e,t);else{let o=mo(r);p.info(`Check logs in ${n}/app/p/${o}/logs to see if update works.`)}await Tr(t,e,10)}async function V8(t,e,r){let n=Jt();Z("Capgo onboarding \u{1F6EB}"),await Ae();let i=!r.supaAnon||!r.supaHost?await te():await _l({statsUrl:`${r.supaHost}/functions/v1/stats`,channelUrl:`${r.supaHost}/functions/v1/channel_self`,updateUrl:`${r.supaHost}/functions/v1/updates`,localApiFiles:`${r.supaHost}/functions/v1`,localS3:!0,localSupa:r.supaHost,localSupaAnon:r.supaAnon}),o=await br();e=pe(e,i?.config),r.apikey=t||de(),e===void 0&&(e=await ec({message:"Enter your appId:"}),st(e)&&(Di("Operation cancelled."),(0,ke.exit)(1)));let s=_e();(!B8()||t)&&(s.start(`Running: ${n.runner} @capgo/cli@latest login ***`),await Ob(r.apikey,r,!1),s.stop("Login Done \u2705"));let a=await fe(r.apikey);await he(a,r.apikey,["upload","all","read","write"]);let u=await sa(a,["admin","super_admin"]),l=u.gid,c=await Moe(l,r.apikey)??0;try{c<1&&await Tr(l,r.apikey,1),c<2&&(await Hoe(u,r.apikey,e,r),an(2)),c<3&&(await Voe(l,r.apikey,e),an(3)),c<4&&(await Koe(l,r.apikey,e),an(4)),c<5&&(await Yoe(l,r.apikey,e),an(5)),c<6&&(await Joe(l,r.apikey,e),an(6)),c<7&&(await Xoe(l,r.apikey,e),an(7)),c<8&&(await Zoe(l,r.apikey,e),an(8)),c<9&&(await Qoe(l,r.apikey),an(9)),await ese(l,r.apikey,e,o.hostWeb),await Tr(l,r.apikey,0),Uoe()}catch(f){console.error(f),p.error("Error during onboarding, please try again later"),(0,ke.exit)(1)}p.info("Welcome onboard \u2708\uFE0F!"),p.info("Your Capgo update system is setup"),p.info(`Next time use \`${n.runner} @capgo/cli@latest bundle upload\` to only upload your bundle`),p.info(`If you have any issue try to use the debug command \`${n.runner} @capgo/cli@latest app debug\``),J("Bye \u{1F44B}"),(0,ke.exit)()}async function z8(t){Z("Getting user id"),t.apikey=t.apikey||de();let e=await fe(t.apikey),r=await he(e,t.apikey,["read","all","write"]);J(`Done \u2705: ${r}`)}k.name(Cr.name).description("Manage packages and bundle versions in Capgo Cloud").version(Cr.version,"-v, --version","output the current version");k.command("login [apikey]").alias("l").description("Save apikey to your machine or folder").action(q8).option("--local","Only save in local folder");k.command("doctor").description("Get info about your Capgo app install").option("--package-json <packageJson>","A list of path to package.json. Usefull for monorepos (comma separated ex: ../../package.json,./package.json)").action(Yj);k.command("init [apikey] [appId]").alias("i").description("Init a new app").action(V8).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("--supa-host <supaHost>","Supabase host URL").option("--supa-anon <supaAnon>","Supabase anon token");var Fa=k.command("app").description("Manage app");Fa.command("add [appId]").alias("a").description("Add a new app in Capgo Cloud").action(zj).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("-a, --apikey <apikey>","apikey to link to your account");Fa.command("delete [appId]").description("Delete an app in Capgo Cloud").action(Kj).option("-a, --apikey <apikey>","apikey to link to your account");Fa.command("list").alias("l").description("list apps in Capgo Cloud").action(Xj).option("-a, --apikey <apikey>","apikey to link to your account");Fa.command("debug [appId]").description("Listen for live updates event in Capgo Cloud to debug your app").option("-a, --apikey <apikey>","apikey to link to your account").option("-d, --device <device>","the specific device to debug").action(Gj);Fa.command("setting [path]").description("Modifies capacitor config programmatically").option("--bool <bool>","A value for the setting to modify as a boolean").option("--string <string>","A value for the setting to modify as a string").action(t6);Fa.command("set [appId]").alias("s").description("Set an app in Capgo Cloud").action(e6).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("-a, --apikey <apikey>","apikey to link to your account").option("-r, --retention <retention>","retention period of app bundle in days");var mi=k.command("bundle").description("Manage bundle");mi.command("upload [appId]").alias("u").description("Upload a new bundle in Capgo Cloud").action(o8).option("-a, --apikey <apikey>","apikey to link to your account").option("-p, --path <path>","path of the folder to upload, if not provided it will use the webDir set in capacitor.config").option("-c, --channel <channel>","channel to link to").option("-e, --external <url>","link to external url intead of upload to Capgo Cloud").option("--iv-session-key <key>","Set the iv and session key for bundle url external").option("--s3-region <region>","Region for your S3 bucket").option("--s3-apikey <apikey>","Apikey for your S3 endpoint").option("--s3-apisecret <apisecret>","Api secret for your S3 endpoint").option("--s3-endoint <s3Endpoint>","Url of S3 endpoint").option("--s3-bucket-name <bucketName>","Name for your AWS S3 bucket").option("--s3-port <port>","Port for your S3 endpoint").option("--no-s3-ssl","Disable SSL for S3 upload").option("--key-v2 <key>","custom path for private signing key (v2 system)").option("--key-data-v2 <keyDataV2>","private signing key (v2 system)").option("--bundle-url","prints bundle url into stdout").option("--no-key","ignore signing key and send clear update").option("--no-code-check","Ignore checking if notifyAppReady() is called in soure code and index present in root folder").option("--display-iv-session","Show in the console the iv and session key used to encrypt the update").option("-b, --bundle <bundle>","bundle version number of the bundle to upload").option("--min-update-version <minUpdateVersion>","Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel").option("--auto-min-update-version","Set the min update version based on native packages").option("--ignore-metadata-check","Ignores the metadata (node_modules) check when uploading").option("--ignore-checksum-check","Ignores the checksum check when uploading").option("--timeout <timeout>","Timeout for the upload process in seconds").option("--multipart","Uses multipart protocol to upload data to S3, Deprecated, use tus instead").option("--tus","Upload the bundle using TUS to Capgo cloud").option("--tus-chunk-size <tusChunkSize>","Chunk size for the TUS upload").option("--partial","Upload partial files to Capgo cloud").option("--partial-only","Upload only partial files to Capgo cloud, skip the zipped file, useful for big bundle").option("--encrypted-checksum <encryptedChecksum>","An encrypted checksum (signature). Used only when uploading an external bundle.").option("--auto-set-bundle","Set the bundle in capacitor.config.json").option("--dry-upload","Dry upload the bundle process, mean it will not upload the files but add the row in database (useful for testing)").option("--package-json <packageJson>","A list of path to package.json. Usefull for monorepos (comma separated ex: ../../package.json,./package.json)").option("--node-modules <nodeModules>","A list of path to node_modules. Usefull for monorepos (comma separated ex: ../../node_modules,./node_modules)").option("--encrypt-partial","Encrypt the partial update files").option("--delete-linked-bundle-on-upload","Locates the currently linked bundle in the channel you are trying to upload to, and deletes it");mi.command("compatibility [appId]").action(F6).option("-a, --apikey <apikey>","apikey to link to your account").option("-c, --channel <channel>","channel to check the compatibility with").option("--text","output text instead of emojis").option("--package-json <packageJson>","A list of path to package.json. Usefull for monorepos (comma separated ex: ../../package.json,./package.json)").option("--node-modules <nodeModules>","A list of path to node_modules. Usefull for monorepos (comma separated ex: ../../node_modules,./node_modules)");mi.command("delete [bundleId] [appId]").alias("d").description("Delete a bundle in Capgo Cloud").action(j6).option("-a, --apikey <apikey>","apikey to link to your account");mi.command("list [appId]").alias("l").description("List bundle in Capgo Cloud").action(q6).option("-a, --apikey <apikey>","apikey to link to your account");mi.command("cleanup [appId]").alias("c").action(S6).description("Cleanup bundle in Capgo Cloud").option("-b, --bundle <bundle>","bundle version number of the app to delete").option("-a, --apikey <apikey>","apikey to link to your account").option("-k, --keep <keep>","number of version to keep").option("-f, --force","force removal");mi.command("encrypt [zipPath] [checksum]").description("Encrypt a zip bundle using the new encryption method").action(L6).option("--key <key>","custom path for private signing key").option("--key-data <keyData>","private signing key").option("-j, --json","output in JSON");mi.command("decrypt [zipPath] [checksum]").description("Decrypt a zip bundle using the new encryption method").action($6).option("--key <key>","custom path for private signing key").option("--key-data <keyData>","private signing key").option("--checksum <checksum>","checksum of the bundle, to verify the integrity of the bundle");mi.command("zip [appId]").description("Zip a bundle").action(u8).option("-p, --path <path>","path of the folder to upload, if not provided it will use the webDir set in capacitor.config").option("-b, --bundle <bundle>","bundle version number to name the zip file").option("-n, --name <name>","name of the zip file").option("-j, --json","output in JSON").option("--no-code-check","Ignore checking if notifyAppReady() is called in soure code and index present in root folder").option("--key-v2","use encryption v2").option("--package-json <packageJson>","A list of path to package.json. Usefull for monorepos (comma separated ex: ../../package.json,./package.json)");var Bl=k.command("channel").description("Manage channel");Bl.command("add [channelId] [appId]").alias("a").description("Create channel").action(c8).option("-d, --default","set the channel as default").option("-a, --apikey <apikey>","apikey to link to your account");Bl.command("delete [channelId] [appId]").alias("d").description("Delete channel").action(p8).option("-a, --apikey <apikey>","apikey to link to your account").option("--delete-bundle","delete the bundle associated with the channel");Bl.command("list [appId]").alias("l").description("List channel").action(g8).option("-a, --apikey <apikey>","apikey to link to your account");Bl.command("currentBundle [channel] [appId]").description("Get current bundle for specific channel in Capgo Cloud").action(d8).option("-c, --channel <channel>","channel to get the current bundle from").option("-a, --apikey <apikey>","apikey to link to your account").option("--quiet","only print the bundle version");Bl.command("set [channelId] [appId]").alias("s").description("Set channel").action(v8).option("-a, --apikey <apikey>","apikey to link to your account").option("-b, --bundle <bundle>","bundle version number of the file to set").option("-s, --state <state>","set the state of the channel, default or normal").option("--latest","get the latest version key in the package.json to set it to the channel").option("--downgrade","Allow to downgrade to version under native one").option("--no-downgrade","Disable downgrade to version under native one").option("--upgrade","Allow to upgrade to version above native one").option("--no-upgrade","Disable upgrade to version above native one").option("--ios","Allow sending update to ios devices").option("--no-ios","Disable sending update to ios devices").option("--android","Allow sending update to android devices").option("--no-android","Disable sending update to android devices").option("--self-assign","Allow to device to self assign to this channel").option("--no-self-assign","Disable devices to self assign to this channel").option("--disable-auto-update <disableAutoUpdate>","Disable auto update strategy for this channel.The possible options are: major, minor, metadata, patch, none").option("--dev","Allow sending update to development devices").option("--no-dev","Disable sending update to development devices").option("--emulator","Allow sending update to emulator devices").option("--no-emulator","Disable sending update to emulator devices").option("--package-json <packageJson>","A list of path to package.json. Usefull for monorepos (comma separated ex: ../../package.json,./package.json)");var Ab=k.command("key").description("Manage encryption key");Ab.command("save").description("Save base64 encryption key in capacitor config, usefull for CI").action(j8).option("-f, --force","force generate a new one").option("--key","key path to save in capacitor config").option("--key-data","key data to save in capacitor config");Ab.command("create").description("Create a new encryption key").action(N8).option("-f, --force","force generate a new one");Ab.command("delete_old").description("Delete the old encryption key").action(L8);var tse=k.command("account").description("Manage account");tse.command("id").description("Get your account ID, it's safe to share it in discord or other places").action(z8).option("-a, --apikey <apikey>","apikey to link to your account");k.parseAsync();
|
|
338
|
+
`)}async function Joe(t,e,r){let n=await kr(),i=Xt(n.get("@capacitor/core")?.replace("^","").replace("~","")??"");i||p.warn("Cannot find @capacitor/core in package.json. It is likely that you are using a monorepo. Please NOTE that encryption is not supported in Capacitor V5.");let o=Jt(),s=await Pe({message:`Automatic configure end-to-end encryption in ${r} updates?`});if(await un(s,t,e),s){if(i&&So(i,Xt("6.0.0"))){p.warn("Encryption is not supported in Capacitor V5.");return}let a=_e();a.start(`Running: ${o.runner} @capgo/cli@latest key create`),await Sb({force:!0},!1)?a.stop("key created \u{1F511}"):(a.stop("Error"),p.warn("Cannot create key \u274C"),J("Bye \u{1F44B}"),(0,ke.exit)(1)),Tn("onboarding-v2",t,e,"Use encryption v2")}await Tr(t,e,6)}async function Xoe(t,e,r){let n=Jt(),i=await Pe({message:`Automatic build ${r} with "${n.pm} run build" ?`});if(await un(i,t,e),i){let o=_e(),s=await bv(),a=await fI(s);o.start(`Running: ${n.pm} run ${a} && ${n.runner} cap sync`),(await vr()).scripts[a]||(o.stop("Error"),p.warn(`Cannot find ${a} script in package.json, please add it and run \`capgo init\` again`),J("Bye \u{1F44B}"),(0,ke.exit)()),(0,Ll.execSync)(`${n.pm} run ${a} && ${n.runner} cap sync`,U8),o.stop("Build & Sync Done \u2705")}else p.info(`Build yourself with command: ${n.pm} run build && ${n.runner} cap sync`);await Tr(t,e,7)}async function Zoe(t,e,r){let n=Jt(),i=await Pe({message:`Automatic upload ${r} bundle to Capgo?`});if(await un(i,t,e),i){let o=_e(),s;o.start(`Running: ${n.runner} @capgo/cli@latest bundle upload`);let a=nI((0,ke.cwd)());Ro&&a&&(p.warn("You are most likely using a monorepo, please provide the path to your package.json file AND node_modules path folder when uploading your bundle"),p.warn(`Example: ${n.runner} @capgo/cli@latest bundle upload --package-json ./packages/my-app/package.json --node-modules ./packages/my-app/node_modules`),s=(0,pi.join)(On((0,ke.cwd)()),"node_modules"),p.warn(`Guessed node modules path at: ${s}`),(0,Ie.existsSync)(s)||(p.error("Node modules path does not exist, upload skipped"),J("Bye \u{1F44B}"),(0,ke.exit)(1))),await mb(r,{channel:Nl,apikey:e,packageJson:a?Ro:void 0,nodeModules:a?s:void 0},!1)?o.stop("Upload Done \u2705"):(o.stop("Error"),p.warn("Upload failed \u274C"),J("Bye \u{1F44B}"),(0,ke.exit)())}else p.info(`Upload yourself with command: ${n.runner} @capgo/cli@latest bundle upload`);await Tr(t,e,8)}async function Qoe(t,e){let r=Jt(),n=await Pe({message:"Run in device now ?"});if(await un(n,t,e),n){let i=await yi({message:"Pick a platform to run your app",options:[{value:"ios",label:"IOS"},{value:"android",label:"Android"}]});st(i)&&(J("Bye \u{1F44B}"),(0,ke.exit)());let o=i,s=_e();s.start(`Running: ${r.runner} cap run ${o}`),await(0,Ll.spawnSync)(r.runner,["cap","run",o],{stdio:"inherit"}),s.stop("Started Done \u2705")}else p.info(`If you change your mind, run it for yourself with: ${r.runner} cap run <ios|android>`);await Tr(t,e,9)}async function ese(t,e,r,n){let i=await Pe({message:"Automatic check if update working in device ?"});if(await un(i,t,e),i)p.info(`Wait logs sent to Capgo from ${r} device, Please open your app \u{1F4AA}`),await Gv("onboarding-v2",e,r,e,t);else{let o=mo(r);p.info(`Check logs in ${n}/app/p/${o}/logs to see if update works.`)}await Tr(t,e,10)}async function V8(t,e,r){let n=Jt();Z("Capgo onboarding \u{1F6EB}"),await Ae();let i=!r.supaAnon||!r.supaHost?await te():await _l({statsUrl:`${r.supaHost}/functions/v1/stats`,channelUrl:`${r.supaHost}/functions/v1/channel_self`,updateUrl:`${r.supaHost}/functions/v1/updates`,localApiFiles:`${r.supaHost}/functions/v1`,localS3:!0,localSupa:r.supaHost,localSupaAnon:r.supaAnon}),o=await br();e=pe(e,i?.config),r.apikey=t||de(),e===void 0&&(e=await ec({message:"Enter your appId:"}),st(e)&&(Di("Operation cancelled."),(0,ke.exit)(1)));let s=_e();(!B8()||t)&&(s.start(`Running: ${n.runner} @capgo/cli@latest login ***`),await Ob(r.apikey,r,!1),s.stop("Login Done \u2705"));let a=await fe(r.apikey);await he(a,r.apikey,["upload","all","read","write"]);let u=await sa(a,["admin","super_admin"]),l=u.gid,c=await Moe(l,r.apikey)??0;try{c<1&&await Tr(l,r.apikey,1),c<2&&(await Hoe(u,r.apikey,e,r),an(2)),c<3&&(await Voe(l,r.apikey,e),an(3)),c<4&&(await Koe(l,r.apikey,e),an(4)),c<5&&(await Yoe(l,r.apikey,e),an(5)),c<6&&(await Joe(l,r.apikey,e),an(6)),c<7&&(await Xoe(l,r.apikey,e),an(7)),c<8&&(await Zoe(l,r.apikey,e),an(8)),c<9&&(await Qoe(l,r.apikey),an(9)),await ese(l,r.apikey,e,o.hostWeb),await Tr(l,r.apikey,0),Uoe()}catch(f){console.error(f),p.error("Error during onboarding, please try again later"),(0,ke.exit)(1)}p.info("Welcome onboard \u2708\uFE0F!"),p.info("Your Capgo update system is setup"),p.info(`Next time use \`${n.runner} @capgo/cli@latest bundle upload\` to only upload your bundle`),p.info(`If you have any issue try to use the debug command \`${n.runner} @capgo/cli@latest app debug\``),J("Bye \u{1F44B}"),(0,ke.exit)()}async function z8(t){Z("Getting user id"),t.apikey=t.apikey||de();let e=await fe(t.apikey),r=await he(e,t.apikey,["read","all","write"]);J(`Done \u2705: ${r}`)}k.name(Cr.name).description("Manage packages and bundle versions in Capgo Cloud").version(Cr.version,"-v, --version","output the current version");k.command("login [apikey]").alias("l").description("Save apikey to your machine or folder").action(q8).option("--local","Only save in local folder");k.command("doctor").description("Get info about your Capgo app install").option("--package-json <packageJson>","A list of path to package.json. Usefull for monorepos (comma separated ex: ../../package.json,./package.json)").action(Yj);k.command("init [apikey] [appId]").alias("i").description("Init a new app").action(V8).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("--supa-host <supaHost>","Supabase host URL").option("--supa-anon <supaAnon>","Supabase anon token");var Fa=k.command("app").description("Manage app");Fa.command("add [appId]").alias("a").description("Add a new app in Capgo Cloud").action(zj).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("-a, --apikey <apikey>","apikey to link to your account");Fa.command("delete [appId]").description("Delete an app in Capgo Cloud").action(Kj).option("-a, --apikey <apikey>","apikey to link to your account");Fa.command("list").alias("l").description("list apps in Capgo Cloud").action(Xj).option("-a, --apikey <apikey>","apikey to link to your account");Fa.command("debug [appId]").description("Listen for live updates event in Capgo Cloud to debug your app").option("-a, --apikey <apikey>","apikey to link to your account").option("-d, --device <device>","the specific device to debug").action(Gj);Fa.command("setting [path]").description("Modifies capacitor config programmatically").option("--bool <bool>","A value for the setting to modify as a boolean").option("--string <string>","A value for the setting to modify as a string").action(t6);Fa.command("set [appId]").alias("s").description("Set an app in Capgo Cloud").action(e6).option("-n, --name <name>","app name").option("-i, --icon <icon>","app icon path").option("-a, --apikey <apikey>","apikey to link to your account").option("-r, --retention <retention>","retention period of app bundle in days");var mi=k.command("bundle").description("Manage bundle");mi.command("upload [appId]").alias("u").description("Upload a new bundle in Capgo Cloud").action(o8).option("-a, --apikey <apikey>","apikey to link to your account").option("-p, --path <path>","path of the folder to upload, if not provided it will use the webDir set in capacitor.config").option("-c, --channel <channel>","channel to link to").option("-e, --external <url>","link to external url intead of upload to Capgo Cloud").option("--iv-session-key <key>","Set the iv and session key for bundle url external").option("--s3-region <region>","Region for your S3 bucket").option("--s3-apikey <apikey>","Apikey for your S3 endpoint").option("--s3-apisecret <apisecret>","Api secret for your S3 endpoint").option("--s3-endoint <s3Endpoint>","Url of S3 endpoint").option("--s3-bucket-name <bucketName>","Name for your AWS S3 bucket").option("--s3-port <port>","Port for your S3 endpoint").option("--no-s3-ssl","Disable SSL for S3 upload").option("--key-v2 <key>","custom path for private signing key (v2 system)").option("--key-data-v2 <keyDataV2>","private signing key (v2 system)").option("--bundle-url","prints bundle url into stdout").option("--no-key","ignore signing key and send clear update").option("--no-code-check","Ignore checking if notifyAppReady() is called in soure code and index present in root folder").option("--display-iv-session","Show in the console the iv and session key used to encrypt the update").option("-b, --bundle <bundle>","bundle version number of the bundle to upload").option("--min-update-version <minUpdateVersion>","Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel").option("--auto-min-update-version","Set the min update version based on native packages").option("--ignore-metadata-check","Ignores the metadata (node_modules) check when uploading").option("--ignore-checksum-check","Ignores the checksum check when uploading").option("--timeout <timeout>","Timeout for the upload process in seconds").option("--multipart","Uses multipart protocol to upload data to S3, Deprecated, use tus instead").option("--tus","Upload the bundle using TUS to Capgo cloud").option("--tus-chunk-size <tusChunkSize>","Chunk size for the TUS upload").option("--partial","Upload partial files to Capgo cloud").option("--partial-only","Upload only partial files to Capgo cloud, skip the zipped file, useful for big bundle").option("--encrypted-checksum <encryptedChecksum>","An encrypted checksum (signature). Used only when uploading an external bundle.").option("--auto-set-bundle","Set the bundle in capacitor.config.json").option("--dry-upload","Dry upload the bundle process, mean it will not upload the files but add the row in database (useful for testing)").option("--package-json <packageJson>","A list of path to package.json. Usefull for monorepos (comma separated ex: ../../package.json,./package.json)").option("--node-modules <nodeModules>","A list of path to node_modules. Usefull for monorepos (comma separated ex: ../../node_modules,./node_modules)").option("--encrypt-partial","Encrypt the partial update files").option("--delete-linked-bundle-on-upload","Locates the currently linked bundle in the channel you are trying to upload to, and deletes it");mi.command("compatibility [appId]").action(F6).option("-a, --apikey <apikey>","apikey to link to your account").option("-c, --channel <channel>","channel to check the compatibility with").option("--text","output text instead of emojis").option("--package-json <packageJson>","A list of path to package.json. Usefull for monorepos (comma separated ex: ../../package.json,./package.json)").option("--node-modules <nodeModules>","A list of path to node_modules. Usefull for monorepos (comma separated ex: ../../node_modules,./node_modules)");mi.command("delete [bundleId] [appId]").alias("d").description("Delete a bundle in Capgo Cloud").action(j6).option("-a, --apikey <apikey>","apikey to link to your account");mi.command("list [appId]").alias("l").description("List bundle in Capgo Cloud").action(q6).option("-a, --apikey <apikey>","apikey to link to your account");mi.command("cleanup [appId]").alias("c").action(S6).description("Cleanup bundle in Capgo Cloud").option("-b, --bundle <bundle>","bundle version number of the app to delete").option("-a, --apikey <apikey>","apikey to link to your account").option("-k, --keep <keep>","number of version to keep").option("-f, --force","force removal");mi.command("encrypt [zipPath] [checksum]").description("Encrypt a zip bundle using the new encryption method").action(L6).option("--key <key>","custom path for private signing key").option("--key-data <keyData>","private signing key").option("-j, --json","output in JSON");mi.command("decrypt [zipPath] [checksum]").description("Decrypt a zip bundle using the new encryption method").action($6).option("--key <key>","custom path for private signing key").option("--key-data <keyData>","private signing key").option("--checksum <checksum>","checksum of the bundle, to verify the integrity of the bundle");mi.command("zip [appId]").description("Zip a bundle").action(u8).option("-p, --path <path>","path of the folder to upload, if not provided it will use the webDir set in capacitor.config").option("-b, --bundle <bundle>","bundle version number to name the zip file").option("-n, --name <name>","name of the zip file").option("-j, --json","output in JSON").option("--no-code-check","Ignore checking if notifyAppReady() is called in soure code and index present in root folder").option("--key-v2","use encryption v2").option("--package-json <packageJson>","A list of path to package.json. Usefull for monorepos (comma separated ex: ../../package.json,./package.json)");var Bl=k.command("channel").description("Manage channel");Bl.command("add [channelId] [appId]").alias("a").description("Create channel").action(c8).option("-d, --default","set the channel as default").option("-a, --apikey <apikey>","apikey to link to your account");Bl.command("delete [channelId] [appId]").alias("d").description("Delete channel").action(p8).option("-a, --apikey <apikey>","apikey to link to your account").option("--delete-bundle","delete the bundle associated with the channel");Bl.command("list [appId]").alias("l").description("List channel").action(g8).option("-a, --apikey <apikey>","apikey to link to your account");Bl.command("currentBundle [channel] [appId]").description("Get current bundle for specific channel in Capgo Cloud").action(d8).option("-c, --channel <channel>","channel to get the current bundle from").option("-a, --apikey <apikey>","apikey to link to your account").option("--quiet","only print the bundle version");Bl.command("set [channelId] [appId]").alias("s").description("Set channel").action(v8).option("-a, --apikey <apikey>","apikey to link to your account").option("-b, --bundle <bundle>","bundle version number of the file to set").option("-s, --state <state>","set the state of the channel, default or normal").option("--latest","get the latest version key in the package.json to set it to the channel").option("--downgrade","Allow to downgrade to version under native one").option("--no-downgrade","Disable downgrade to version under native one").option("--upgrade","Allow to upgrade to version above native one").option("--no-upgrade","Disable upgrade to version above native one").option("--ios","Allow sending update to ios devices").option("--no-ios","Disable sending update to ios devices").option("--android","Allow sending update to android devices").option("--no-android","Disable sending update to android devices").option("--self-assign","Allow to device to self assign to this channel").option("--no-self-assign","Disable devices to self assign to this channel").option("--disable-auto-update <disableAutoUpdate>","Disable auto update strategy for this channel.The possible options are: major, minor, metadata, patch, none").option("--dev","Allow sending update to development devices").option("--no-dev","Disable sending update to development devices").option("--emulator","Allow sending update to emulator devices").option("--no-emulator","Disable sending update to emulator devices").option("--package-json <packageJson>","A list of path to package.json. Usefull for monorepos (comma separated ex: ../../package.json,./package.json)");var Ab=k.command("key").description("Manage encryption key");Ab.command("save").description("Save base64 encryption key in capacitor config, usefull for CI").action(j8).option("-f, --force","force generate a new one").option("--key <key>","key path to save in capacitor config").option("--key-data <keyData>","key data to save in capacitor config");Ab.command("create").description("Create a new encryption key").action(N8).option("-f, --force","force generate a new one");Ab.command("delete_old").description("Delete the old encryption key").action(L8);var tse=k.command("account").description("Manage account");tse.command("id").description("Get your account ID, it's safe to share it in discord or other places").action(z8).option("-a, --apikey <apikey>","apikey to link to your account");k.parseAsync();
|
|
339
339
|
/*! Bundled license information:
|
|
340
340
|
|
|
341
341
|
safe-buffer/index.js:
|
package/dist/package.json
CHANGED