@northflank/js-client 0.7.13 → 0.7.14

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.
@@ -1 +1 @@
1
- import e,{EventEmitter as t}from"events";import*as n from"stream";import r,{Transform as o}from"stream";import i from"http";import s,{fileURLToPath as a}from"url";import u from"punycode";import c from"https";import d from"zlib";import l from"os";import*as p from"net";import f,{Socket as h}from"net";import{spawn as v,execSync as m}from"child_process";import g from"fs";import b from"path";import y from"buffer";import w from"tls";import j from"crypto";import I from"dgram";var E=function(e,t){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},E(e,t)};function _(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}E(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var S=function(){return S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},S.apply(this,arguments)};function P(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))}function A(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function R(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var C="object"==typeof global&&global&&global.Object===Object&&global,k="object"==typeof self&&self&&self.Object===Object&&self,U=C||k||Function("return this")(),O=U.Symbol,x=Object.prototype,q=x.hasOwnProperty,D=x.toString,T=O?O.toStringTag:void 0;var N=Object.prototype.toString;var B="[object Null]",L="[object Undefined]",F=O?O.toStringTag:void 0;function G(e){return null==e?void 0===e?L:B:F&&F in Object(e)?function(e){var t=q.call(e,T),n=e[T];try{e[T]=void 0;var r=!0}catch(e){}var o=D.call(e);return r&&(t?e[T]=n:delete e[T]),o}(e):function(e){return N.call(e)}(e)}function M(e){return null!=e&&"object"==typeof e}var J="[object Symbol]";function z(e){return"symbol"==typeof e||M(e)&&G(e)==J}function W(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var V=Array.isArray,$=1/0,H=O?O.prototype:void 0,Y=H?H.toString:void 0;function Z(e){if("string"==typeof e)return e;if(V(e))return W(e,Z)+"";if(z(e))return Y?Y.call(e):"";var t=e+"";return"0"==t&&1/e==-$?"-0":t}function K(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function X(e){return e}var Q="[object AsyncFunction]",ee="[object Function]",te="[object GeneratorFunction]",ne="[object Proxy]";function re(e){if(!K(e))return!1;var t=G(e);return t==ee||t==te||t==Q||t==ne}var oe,ie=U["__core-js_shared__"],se=(oe=/[^.]+$/.exec(ie&&ie.keys&&ie.keys.IE_PROTO||""))?"Symbol(src)_1."+oe:"";var ae=Function.prototype.toString;function ue(e){if(null!=e){try{return ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var ce=/^\[object .+?Constructor\]$/,de=Function.prototype,le=Object.prototype,pe=de.toString,fe=le.hasOwnProperty,he=RegExp("^"+pe.call(fe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ve(e){return!(!K(e)||(t=e,se&&se in t))&&(re(e)?he:ce).test(ue(e));var t}function me(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ve(n)?n:void 0}var ge=me(U,"WeakMap"),be=Object.create,ye=function(){function e(){}return function(t){if(!K(t))return{};if(be)return be(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var we=Date.now;var je,Ie,Ee,_e=function(){try{var e=me(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Se=_e,Pe=Se?function(e,t){return Se(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:X,Ae=(je=Pe,Ie=0,Ee=0,function(){var e=we(),t=16-(e-Ee);if(Ee=e,t>0){if(++Ie>=800)return arguments[0]}else Ie=0;return je.apply(void 0,arguments)}),Re=9007199254740991,Ce=/^(?:0|[1-9]\d*)$/;function ke(e,t){var n=typeof e;return!!(t=null==t?Re:t)&&("number"==n||"symbol"!=n&&Ce.test(e))&&e>-1&&e%1==0&&e<t}function Ue(e,t,n){"__proto__"==t&&Se?Se(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Oe(e,t){return e===t||e!=e&&t!=t}var xe=Object.prototype.hasOwnProperty;function qe(e,t,n){var r=e[t];xe.call(e,t)&&Oe(r,n)&&(void 0!==n||t in e)||Ue(e,t,n)}var De=Math.max;function Te(e,t){return Ae(function(e,t,n){return t=De(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=De(r.length-t,0),s=Array(i);++o<i;)s[o]=r[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=r[o];return a[t]=n(s),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,a)}}(e,t,X),e+"")}var Ne=9007199254740991;function Be(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Ne}function Le(e){return null!=e&&Be(e.length)&&!re(e)}var Fe=Object.prototype;function Ge(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Fe)}function Me(e){return M(e)&&"[object Arguments]"==G(e)}var Je=Object.prototype,ze=Je.hasOwnProperty,We=Je.propertyIsEnumerable,Ve=Me(function(){return arguments}())?Me:function(e){return M(e)&&ze.call(e,"callee")&&!We.call(e,"callee")};var $e="object"==typeof exports&&exports&&!exports.nodeType&&exports,He=$e&&"object"==typeof module&&module&&!module.nodeType&&module,Ye=He&&He.exports===$e?U.Buffer:void 0,Ze=(Ye?Ye.isBuffer:void 0)||function(){return!1},Ke={};Ke["[object Float32Array]"]=Ke["[object Float64Array]"]=Ke["[object Int8Array]"]=Ke["[object Int16Array]"]=Ke["[object Int32Array]"]=Ke["[object Uint8Array]"]=Ke["[object Uint8ClampedArray]"]=Ke["[object Uint16Array]"]=Ke["[object Uint32Array]"]=!0,Ke["[object Arguments]"]=Ke["[object Array]"]=Ke["[object ArrayBuffer]"]=Ke["[object Boolean]"]=Ke["[object DataView]"]=Ke["[object Date]"]=Ke["[object Error]"]=Ke["[object Function]"]=Ke["[object Map]"]=Ke["[object Number]"]=Ke["[object Object]"]=Ke["[object RegExp]"]=Ke["[object Set]"]=Ke["[object String]"]=Ke["[object WeakMap]"]=!1;var Xe="object"==typeof exports&&exports&&!exports.nodeType&&exports,Qe=Xe&&"object"==typeof module&&module&&!module.nodeType&&module,et=Qe&&Qe.exports===Xe&&C.process,tt=function(){try{var e=Qe&&Qe.require&&Qe.require("util").types;return e||et&&et.binding&&et.binding("util")}catch(e){}}(),nt=tt&&tt.isTypedArray,rt=nt?function(e){return function(t){return e(t)}}(nt):function(e){return M(e)&&Be(e.length)&&!!Ke[G(e)]},ot=rt,it=Object.prototype.hasOwnProperty;function st(e,t){var n=V(e),r=!n&&Ve(e),o=!n&&!r&&Ze(e),i=!n&&!r&&!o&&ot(e),s=n||r||o||i,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=a.length;for(var c in e)!t&&!it.call(e,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ke(c,u))||a.push(c);return a}function at(e,t){return function(n){return e(t(n))}}var ut=at(Object.keys,Object),ct=Object.prototype.hasOwnProperty;function dt(e){return Le(e)?st(e):function(e){if(!Ge(e))return ut(e);var t=[];for(var n in Object(e))ct.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var lt=Object.prototype.hasOwnProperty;function pt(e){if(!K(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Ge(e),n=[];for(var r in e)("constructor"!=r||!t&&lt.call(e,r))&&n.push(r);return n}function ft(e){return Le(e)?st(e,!0):pt(e)}var ht=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vt=/^\w*$/;function mt(e,t){if(V(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!z(e))||(vt.test(e)||!ht.test(e)||null!=t&&e in Object(t))}var gt=me(Object,"create");var bt=Object.prototype.hasOwnProperty;var yt=Object.prototype.hasOwnProperty;function wt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function jt(e,t){for(var n=e.length;n--;)if(Oe(e[n][0],t))return n;return-1}wt.prototype.clear=function(){this.__data__=gt?gt(null):{},this.size=0},wt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},wt.prototype.get=function(e){var t=this.__data__;if(gt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return bt.call(t,e)?t[e]:void 0},wt.prototype.has=function(e){var t=this.__data__;return gt?void 0!==t[e]:yt.call(t,e)},wt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=gt&&void 0===t?"__lodash_hash_undefined__":t,this};var It=Array.prototype.splice;function Et(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Et.prototype.clear=function(){this.__data__=[],this.size=0},Et.prototype.delete=function(e){var t=this.__data__,n=jt(t,e);return!(n<0)&&(n==t.length-1?t.pop():It.call(t,n,1),--this.size,!0)},Et.prototype.get=function(e){var t=this.__data__,n=jt(t,e);return n<0?void 0:t[n][1]},Et.prototype.has=function(e){return jt(this.__data__,e)>-1},Et.prototype.set=function(e,t){var n=this.__data__,r=jt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var _t=me(U,"Map");function St(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Pt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Pt.prototype.clear=function(){this.size=0,this.__data__={hash:new wt,map:new(_t||Et),string:new wt}},Pt.prototype.delete=function(e){var t=St(this,e).delete(e);return this.size-=t?1:0,t},Pt.prototype.get=function(e){return St(this,e).get(e)},Pt.prototype.has=function(e){return St(this,e).has(e)},Pt.prototype.set=function(e,t){var n=St(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var At="Expected a function";function Rt(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(At);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(Rt.Cache||Pt),n}Rt.Cache=Pt;var Ct=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kt=/\\(\\)?/g,Ut=function(e){var t=Rt(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ct,(function(e,n,r,o){t.push(r?o.replace(kt,"$1"):n||e)})),t})),Ot=Ut;function xt(e){return null==e?"":Z(e)}function qt(e,t){return V(e)?e:mt(e,t)?[e]:Ot(xt(e))}var Dt=1/0;function Tt(e){if("string"==typeof e||z(e))return e;var t=e+"";return"0"==t&&1/e==-Dt?"-0":t}function Nt(e,t){for(var n=0,r=(t=qt(t,e)).length;null!=e&&n<r;)e=e[Tt(t[n++])];return n&&n==r?e:void 0}function Bt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Lt=O?O.isConcatSpreadable:void 0;function Ft(e){return V(e)||Ve(e)||!!(Lt&&e&&e[Lt])}function Gt(e,t,n,r,o){var i=-1,s=e.length;for(n||(n=Ft),o||(o=[]);++i<s;){var a=e[i];t>0&&n(a)?t>1?Gt(a,t-1,n,r,o):Bt(o,a):r||(o[o.length]=a)}return o}var Mt=at(Object.getPrototypeOf,Object),Jt="[object Object]",zt=Function.prototype,Wt=Object.prototype,Vt=zt.toString,$t=Wt.hasOwnProperty,Ht=Vt.call(Object);function Yt(e){var t=this.__data__=new Et(e);this.size=t.size}Yt.prototype.clear=function(){this.__data__=new Et,this.size=0},Yt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yt.prototype.get=function(e){return this.__data__.get(e)},Yt.prototype.has=function(e){return this.__data__.has(e)},Yt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Et){var r=n.__data__;if(!_t||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Pt(r)}return n.set(e,t),this.size=n.size,this};var Zt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Kt=Zt&&"object"==typeof module&&module&&!module.nodeType&&module,Xt=Kt&&Kt.exports===Zt?U.Buffer:void 0,Qt=Xt?Xt.allocUnsafe:void 0;var en=Object.prototype.propertyIsEnumerable,tn=Object.getOwnPropertySymbols,nn=tn?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}(tn(e),(function(t){return en.call(e,t)})))}:function(){return[]};function rn(e){return function(e,t,n){var r=t(e);return V(e)?r:Bt(r,n(e))}(e,dt,nn)}var on=me(U,"DataView"),sn=me(U,"Promise"),an=me(U,"Set"),un="[object Map]",cn="[object Promise]",dn="[object Set]",ln="[object WeakMap]",pn="[object DataView]",fn=ue(on),hn=ue(_t),vn=ue(sn),mn=ue(an),gn=ue(ge),bn=G;(on&&bn(new on(new ArrayBuffer(1)))!=pn||_t&&bn(new _t)!=un||sn&&bn(sn.resolve())!=cn||an&&bn(new an)!=dn||ge&&bn(new ge)!=ln)&&(bn=function(e){var t=G(e),n="[object Object]"==t?e.constructor:void 0,r=n?ue(n):"";if(r)switch(r){case fn:return pn;case hn:return un;case vn:return cn;case mn:return dn;case gn:return ln}return t});var yn=bn,wn=U.Uint8Array;function jn(e,t){var n,r,o=t?(n=e.buffer,r=new n.constructor(n.byteLength),new wn(r).set(new wn(n)),r):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function In(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Pt;++t<n;)this.add(e[t])}function En(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}In.prototype.add=In.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},In.prototype.has=function(e){return this.__data__.has(e)};var _n=1,Sn=2;function Pn(e,t,n,r,o,i){var s=n&_n,a=e.length,u=t.length;if(a!=u&&!(s&&u>a))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var l=-1,p=!0,f=n&Sn?new In:void 0;for(i.set(e,t),i.set(t,e);++l<a;){var h=e[l],v=t[l];if(r)var m=s?r(v,h,l,t,e,i):r(h,v,l,e,t,i);if(void 0!==m){if(m)continue;p=!1;break}if(f){if(!En(t,(function(e,t){if(s=t,!f.has(s)&&(h===e||o(h,e,n,r,i)))return f.push(t);var s}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(e),i.delete(t),p}function An(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Cn=1,kn=2,Un="[object Boolean]",On="[object Date]",xn="[object Error]",qn="[object Map]",Dn="[object Number]",Tn="[object RegExp]",Nn="[object Set]",Bn="[object String]",Ln="[object Symbol]",Fn="[object ArrayBuffer]",Gn="[object DataView]",Mn=O?O.prototype:void 0,Jn=Mn?Mn.valueOf:void 0;var zn=1,Wn=Object.prototype.hasOwnProperty;var Vn=1,$n="[object Arguments]",Hn="[object Array]",Yn="[object Object]",Zn=Object.prototype.hasOwnProperty;function Kn(e,t,n,r,o,i){var s=V(e),a=V(t),u=s?Hn:yn(e),c=a?Hn:yn(t),d=(u=u==$n?Yn:u)==Yn,l=(c=c==$n?Yn:c)==Yn,p=u==c;if(p&&Ze(e)){if(!Ze(t))return!1;s=!0,d=!1}if(p&&!d)return i||(i=new Yt),s||ot(e)?Pn(e,t,n,r,o,i):function(e,t,n,r,o,i,s){switch(n){case Gn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Fn:return!(e.byteLength!=t.byteLength||!i(new wn(e),new wn(t)));case Un:case On:case Dn:return Oe(+e,+t);case xn:return e.name==t.name&&e.message==t.message;case Tn:case Bn:return e==t+"";case qn:var a=An;case Nn:var u=r&Cn;if(a||(a=Rn),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;r|=kn,s.set(e,t);var d=Pn(a(e),a(t),r,o,i,s);return s.delete(e),d;case Ln:if(Jn)return Jn.call(e)==Jn.call(t)}return!1}(e,t,u,n,r,o,i);if(!(n&Vn)){var f=d&&Zn.call(e,"__wrapped__"),h=l&&Zn.call(t,"__wrapped__");if(f||h){var v=f?e.value():e,m=h?t.value():t;return i||(i=new Yt),o(v,m,n,r,i)}}return!!p&&(i||(i=new Yt),function(e,t,n,r,o,i){var s=n&zn,a=rn(e),u=a.length;if(u!=rn(t).length&&!s)return!1;for(var c=u;c--;){var d=a[c];if(!(s?d in t:Wn.call(t,d)))return!1}var l=i.get(e),p=i.get(t);if(l&&p)return l==t&&p==e;var f=!0;i.set(e,t),i.set(t,e);for(var h=s;++c<u;){var v=e[d=a[c]],m=t[d];if(r)var g=s?r(m,v,d,t,e,i):r(v,m,d,e,t,i);if(!(void 0===g?v===m||o(v,m,n,r,i):g)){f=!1;break}h||(h="constructor"==d)}if(f&&!h){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(f=!1)}return i.delete(e),i.delete(t),f}(e,t,n,r,o,i))}function Xn(e,t,n,r,o){return e===t||(null==e||null==t||!M(e)&&!M(t)?e!=e&&t!=t:Kn(e,t,n,r,Xn,o))}var Qn=1,er=2;function tr(e){return e==e&&!K(e)}function nr(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function rr(e){var t=function(e){for(var t=dt(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,tr(o)]}return t}(e);return 1==t.length&&t[0][2]?nr(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var o=n.length,i=o,s=!r;if(null==e)return!i;for(e=Object(e);o--;){var a=n[o];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){var u=(a=n[o])[0],c=e[u],d=a[1];if(s&&a[2]){if(void 0===c&&!(u in e))return!1}else{var l=new Yt;if(r)var p=r(c,d,u,e,t,l);if(!(void 0===p?Xn(d,c,Qn|er,r,l):p))return!1}}return!0}(n,e,t)}}function or(e,t){return null!=e&&t in Object(e)}function ir(e,t){return null!=e&&function(e,t,n){for(var r=-1,o=(t=qt(t,e)).length,i=!1;++r<o;){var s=Tt(t[r]);if(!(i=null!=e&&n(e,s)))break;e=e[s]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Be(o)&&ke(s,o)&&(V(e)||Ve(e))}(e,t,or)}var sr=1,ar=2;function ur(e,t){return mt(e)&&tr(t)?nr(Tt(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Nt(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?ir(n,e):Xn(t,r,sr|ar)}}function cr(e){return mt(e)?(t=Tt(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Nt(t,e)}}(e);var t}function dr(e){return"function"==typeof e?e:null==e?X:"object"==typeof e?V(e)?ur(e[0],e[1]):rr(e):cr(e)}var lr,pr=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),s=i.length;s--;){var a=i[lr?s:++r];if(!1===t(o[a],a,o))break}return e};var fr=function(e,t){return function(n,r){if(null==n)return n;if(!Le(n))return e(n,r);for(var o=n.length,i=t?o:-1,s=Object(n);(t?i--:++i<o)&&!1!==r(s[i],i,s););return n}}((function(e,t){return e&&pr(e,t,dt)})),hr=fr;function vr(e,t,n){(void 0!==n&&!Oe(e[t],n)||void 0===n&&!(t in e))&&Ue(e,t,n)}function mr(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function gr(e){return function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,s=t.length;++i<s;){var a=t[i],u=r?r(n[a],e[a],a,n,e):void 0;void 0===u&&(u=e[a]),o?Ue(n,a,u):qe(n,a,u)}return n}(e,ft(e))}function br(e,t,n,r,o,i,s){var a=mr(e,n),u=mr(t,n),c=s.get(u);if(c)vr(e,n,c);else{var d,l=i?i(a,u,n+"",e,t,s):void 0,p=void 0===l;if(p){var f=V(u),h=!f&&Ze(u),v=!f&&!h&&ot(u);l=u,f||h||v?V(a)?l=a:M(d=a)&&Le(d)?l=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(a):h?(p=!1,l=function(e,t){if(t)return e.slice();var n=e.length,r=Qt?Qt(n):new e.constructor(n);return e.copy(r),r}(u,!0)):v?(p=!1,l=jn(u,!0)):l=[]:function(e){if(!M(e)||G(e)!=Jt)return!1;var t=Mt(e);if(null===t)return!0;var n=$t.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Vt.call(n)==Ht}(u)||Ve(u)?(l=a,Ve(a)?l=gr(a):K(a)&&!re(a)||(l=function(e){return"function"!=typeof e.constructor||Ge(e)?{}:ye(Mt(e))}(u))):p=!1}p&&(s.set(u,l),o(l,u,r,i,s),s.delete(u)),vr(e,n,l)}}function yr(e,t,n,r,o){e!==t&&pr(t,(function(i,s){if(o||(o=new Yt),K(i))br(e,t,s,n,yr,r,o);else{var a=r?r(mr(e,s),i,s+"",e,t,o):void 0;void 0===a&&(a=i),vr(e,s,a)}}),ft)}var wr=/[\\^$.*+?()[\]{}|]/g,jr=RegExp(wr.source);function Ir(e,t){var n=-1,r=Le(e)?Array(e.length):[];return hr(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function Er(e,t){return Gt(function(e,t){return(V(e)?W:Ir)(e,dr(t))}(e,t),1)}function _r(e,t){return e>t}function Sr(e){return"string"==typeof e||!V(e)&&M(e)&&"[object String]"==G(e)}function Pr(e,t){return e&&e.length?function(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],s=t(i);if(null!=s&&(void 0===a?s==s&&!z(s):n(s,a)))var a=s,u=i}return u}(e,dr(t),_r):void 0}var Ar,Rr=(Ar=function(e,t,n){yr(e,t,n)},Te((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=Ar.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!K(n))return!1;var r=typeof t;return!!("number"==r?Le(n)&&ke(t,n.length):"string"==r&&t in n)&&Oe(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var s=t[n];s&&Ar(e,s,n,o)}return e})));function Cr(e,t){return e(t={exports:{}},t.exports),t.exports}var kr={},Ur=kr;function Or(e){return e<0?-1:1}function xr(e,t){t.unsigned||--e;const n=t.unsigned?0:-Math.pow(2,e),r=Math.pow(2,e)-1,o=t.moduloBitLength?Math.pow(2,t.moduloBitLength):Math.pow(2,e),i=t.moduloBitLength?Math.pow(2,t.moduloBitLength-1):Math.pow(2,e-1);return function(e,s){s||(s={});let a=+e;if(s.enforceRange){if(!Number.isFinite(a))throw new TypeError("Argument is not a finite number");if(a=Or(a)*Math.floor(Math.abs(a)),a<n||a>r)throw new TypeError("Argument is not in byte range");return a}if(!isNaN(a)&&s.clamp)return a=function(e){return e%1==.5&&0==(1&e)?Math.floor(e):Math.round(e)}(a),a<n&&(a=n),a>r&&(a=r),a;if(!Number.isFinite(a)||0===a)return 0;if(a=Or(a)*Math.floor(Math.abs(a)),a%=o,!t.unsigned&&a>=i)return a-o;if(t.unsigned)if(a<0)a+=o;else if(-0===a)return 0;return a}}kr.void=function(){},kr.boolean=function(e){return!!e},kr.byte=xr(8,{unsigned:!1}),kr.octet=xr(8,{unsigned:!0}),kr.short=xr(16,{unsigned:!1}),kr["unsigned short"]=xr(16,{unsigned:!0}),kr.long=xr(32,{unsigned:!1}),kr["unsigned long"]=xr(32,{unsigned:!0}),kr["long long"]=xr(32,{unsigned:!1,moduloBitLength:64}),kr["unsigned long long"]=xr(32,{unsigned:!0,moduloBitLength:64}),kr.double=function(e){const t=+e;if(!Number.isFinite(t))throw new TypeError("Argument is not a finite floating-point value");return t},kr["unrestricted double"]=function(e){const t=+e;if(isNaN(t))throw new TypeError("Argument is NaN");return t},kr.float=kr.double,kr["unrestricted float"]=kr["unrestricted double"],kr.DOMString=function(e,t){return t||(t={}),t.treatNullAsEmptyString&&null===e?"":String(e)},kr.ByteString=function(e,t){const n=String(e);let r;for(let e=0;void 0!==(r=n.codePointAt(e));++e)if(r>255)throw new TypeError("Argument is not a valid bytestring");return n},kr.USVString=function(e){const t=String(e),n=t.length,r=[];for(let e=0;e<n;++e){const o=t.charCodeAt(e);if(o<55296||o>57343)r.push(String.fromCodePoint(o));else if(56320<=o&&o<=57343)r.push(String.fromCodePoint(65533));else if(e===n-1)r.push(String.fromCodePoint(65533));else{const n=t.charCodeAt(e+1);if(56320<=n&&n<=57343){const t=1023&o,i=1023&n;r.push(String.fromCodePoint(65536+1024*t+i)),++e}else r.push(String.fromCodePoint(65533))}}return r.join("")},kr.Date=function(e,t){if(!(e instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(e))return e},kr.RegExp=function(e,t){return e instanceof RegExp||(e=new RegExp(e)),e};var qr=Cr((function(e){e.exports.mixin=function(e,t){const n=Object.getOwnPropertyNames(t);for(let r=0;r<n.length;++r)Object.defineProperty(e,n[r],Object.getOwnPropertyDescriptor(t,n[r]))},e.exports.wrapperSymbol=Symbol("wrapper"),e.exports.implSymbol=Symbol("impl"),e.exports.wrapperForImpl=function(t){return t[e.exports.wrapperSymbol]},e.exports.implForWrapper=function(t){return t[e.exports.implSymbol]}}));qr.mixin,qr.wrapperSymbol,qr.implSymbol,qr.wrapperForImpl,qr.implForWrapper;var Dr,Tr=(Dr=Object.freeze({__proto__:null}))&&Dr.default||Dr,Nr={TRANSITIONAL:0,NONTRANSITIONAL:1};function Br(e){return e.split("\0").map((function(e){return e.normalize("NFC")})).join("\0")}function Lr(e){for(var t=0,n=Tr.length-1;t<=n;){var r=Math.floor((t+n)/2),o=Tr[r];if(o[0][0]<=e&&o[0][1]>=e)return o;o[0][0]>e?n=r-1:t=r+1}return null}var Fr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function Gr(e){return e.replace(Fr,"_").length}var Mr=/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/;function Jr(e,t){"xn--"===e.substr(0,4)&&(e=u.toUnicode(e));var n=!1;(Br(e)!==e||"-"===e[3]&&"-"===e[4]||"-"===e[0]||"-"===e[e.length-1]||-1!==e.indexOf(".")||0===e.search(Mr))&&(n=!0);for(var r=Gr(e),o=0;o<r;++o){var i=Lr(e.codePointAt(o));if(zr===Nr.TRANSITIONAL&&"valid"!==i[1]||zr===Nr.NONTRANSITIONAL&&"valid"!==i[1]&&"deviation"!==i[1]){n=!0;break}}return{label:e,error:n}}function zr(e,t,n){var r=function(e,t,n){for(var r=!1,o="",i=Gr(e),s=0;s<i;++s){var a=e.codePointAt(s),u=Lr(a);switch(u[1]){case"disallowed":r=!0,o+=String.fromCodePoint(a);break;case"ignored":break;case"mapped":o+=String.fromCodePoint.apply(String,u[2]);break;case"deviation":n===Nr.TRANSITIONAL?o+=String.fromCodePoint.apply(String,u[2]):o+=String.fromCodePoint(a);break;case"valid":o+=String.fromCodePoint(a);break;case"disallowed_STD3_mapped":t?(r=!0,o+=String.fromCodePoint(a)):o+=String.fromCodePoint.apply(String,u[2]);break;case"disallowed_STD3_valid":t&&(r=!0),o+=String.fromCodePoint(a)}}return{string:o,error:r}}(e,t,n);r.string=Br(r.string);for(var o=r.string.split("."),i=0;i<o.length;++i)try{var s=Jr(o[i]);o[i]=s.label,r.error=r.error||s.error}catch(e){r.error=!0}return{string:o.join("."),error:r.error}}var Wr={toASCII:function(e,t,n,r){var o=zr(e,t,n),i=o.string.split(".");if(i=i.map((function(e){try{return u.toASCII(e)}catch(t){return o.error=!0,e}})),r){var s=i.slice(0,i.length-1).join(".").length;(s.length>253||0===s.length)&&(o.error=!0);for(var a=0;a<i.length;++a)if(i.length>63||0===i.length){o.error=!0;break}}return o.error?null:i.join(".")},toUnicode:function(e,t){var n=zr(e,t,Nr.NONTRANSITIONAL);return{domain:n.string,error:n.error}},PROCESSING_OPTIONS:Nr},Vr=Cr((function(e){const t={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},n=Symbol("failure");function r(e){return u.ucs2.decode(e).length}function o(e,t){const n=e[t];return isNaN(n)?void 0:String.fromCodePoint(n)}function i(e){return e>=48&&e<=57}function s(e){return e>=65&&e<=90||e>=97&&e<=122}function a(e){return i(e)||e>=65&&e<=70||e>=97&&e<=102}function c(e){return"."===e||"%2e"===e.toLowerCase()}function d(e){return 2===e.length&&s(e.codePointAt(0))&&(":"===e[1]||"|"===e[1])}function l(e){return void 0!==t[e]}function p(e){return l(e.scheme)}function f(e){let t=e.toString(16).toUpperCase();return 1===t.length&&(t="0"+t),"%"+t}function h(e){return e<=31||e>126}const v=new Set([32,34,35,60,62,63,96,123,125]);function m(e){return h(e)||v.has(e)}const g=new Set([47,58,59,61,64,91,92,93,94,124]);function b(e){return m(e)||g.has(e)}function y(e,t){const n=String.fromCodePoint(e);return t(e)?function(e){const t=new Buffer(e);let n="";for(let e=0;e<t.length;++e)n+=f(t[e]);return n}(n):n}function w(e){let t=10;if(e.length>=2&&"0"===e.charAt(0)&&"x"===e.charAt(1).toLowerCase()?(e=e.substring(2),t=16):e.length>=2&&"0"===e.charAt(0)&&(e=e.substring(1),t=8),""===e)return 0;return(10===t?/[^0-9]/:16===t?/[^0-9A-Fa-f]/:/[^0-7]/).test(e)?n:parseInt(e,t)}function j(e,t){if("["===e[0])return"]"!==e[e.length-1]?n:function(e){const t=[0,0,0,0,0,0,0,0];let r=0,s=null,c=0;if(58===(e=u.ucs2.decode(e))[c]){if(58!==e[c+1])return n;c+=2,++r,s=r}for(;c<e.length;){if(8===r)return n;if(58===e[c]){if(null!==s)return n;++c,++r,s=r;continue}let u=0,d=0;for(;d<4&&a(e[c]);)u=16*u+parseInt(o(e,c),16),++c,++d;if(46===e[c]){if(0===d)return n;if(c-=d,r>6)return n;let s=0;for(;void 0!==e[c];){let a=null;if(s>0){if(!(46===e[c]&&s<4))return n;++c}if(!i(e[c]))return n;for(;i(e[c]);){const t=parseInt(o(e,c));if(null===a)a=t;else{if(0===a)return n;a=10*a+t}if(a>255)return n;++c}t[r]=256*t[r]+a,++s,2!==s&&4!==s||++r}if(4!==s)return n;break}if(58===e[c]){if(++c,void 0===e[c])return n}else if(void 0!==e[c])return n;t[r]=u,++r}if(null!==s){let e=r-s;for(r=7;0!==r&&e>0;){const n=t[s+e-1];t[s+e-1]=t[r],t[r]=n,--r,--e}}else if(null===s&&8!==r)return n;return t}(e.substring(1,e.length-1));if(!t)return function(e){if(t=e,-1!==t.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/))return n;var t;let r="";const o=u.ucs2.decode(e);for(let e=0;e<o.length;++e)r+=y(o[e],h);return r}(e);const r=function(e){const t=new Buffer(e),n=[];for(let e=0;e<t.length;++e)37!==t[e]?n.push(t[e]):37===t[e]&&a(t[e+1])&&a(t[e+2])?(n.push(parseInt(t.slice(e+1,e+3).toString(),16)),e+=2):n.push(t[e]);return new Buffer(n).toString()}(e),s=Wr.toASCII(r,!1,Wr.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===s)return n;if(-1!==s.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return n;const c=function(e){const t=e.split(".");if(""===t[t.length-1]&&t.length>1&&t.pop(),t.length>4)return e;const r=[];for(const o of t){if(""===o)return e;const t=w(o);if(t===n)return e;r.push(t)}for(let e=0;e<r.length-1;++e)if(r[e]>255)return n;if(r[r.length-1]>=Math.pow(256,5-r.length))return n;let o=r.pop(),i=0;for(const e of r)o+=e*Math.pow(256,3-i),++i;return o}(s);return"number"==typeof c||c===n?c:s}function I(e){return"number"==typeof e?function(e){let t="",n=e;for(let e=1;e<=4;++e)t=String(n%256)+t,4!==e&&(t="."+t),n=Math.floor(n/256);return t}(e):e instanceof Array?"["+function(e){let t="";const n=function(e){let t=null,n=1,r=null,o=0;for(let i=0;i<e.length;++i)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(t=r,n=o),{idx:t,len:n}}(e).idx;let r=!1;for(let o=0;o<=7;++o)r&&0===e[o]||(r&&(r=!1),n!==o?(t+=e[o].toString(16),7!==o&&(t+=":")):(t+=0===o?"::":":",r=!0));return t}(e)+"]":e}function E(e){const t=e.path;var n;0!==t.length&&("file"===e.scheme&&1===t.length&&(n=t[0],/^[A-Za-z]:$/.test(n))||t.pop())}function _(e){return""!==e.username||""!==e.password}function S(e,t,r,o,i){if(this.pointer=0,this.input=e,this.base=t||null,this.encodingOverride=r||"utf-8",this.stateOverride=i,this.url=o,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,cannotBeABaseURL:!1};const e=function(e){return e.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}(this.input);e!==this.input&&(this.parseError=!0),this.input=e}const s=function(e){return e.replace(/\u0009|\u000A|\u000D/g,"")}(this.input);for(s!==this.input&&(this.parseError=!0),this.input=s,this.state=i||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=u.ucs2.decode(this.input);this.pointer<=this.input.length;++this.pointer){const e=this.input[this.pointer],t=isNaN(e)?void 0:String.fromCodePoint(e),r=this["parse "+this.state](e,t);if(!r)break;if(r===n){this.failure=!0;break}}}S.prototype["parse scheme start"]=function(e,t){if(s(e))this.buffer+=t.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,n;this.state="no scheme",--this.pointer}return!0},S.prototype["parse scheme"]=function(e,t){if(function(e){return s(e)||i(e)}(e)||43===e||45===e||46===e)this.buffer+=t.toLowerCase();else if(58===e){if(this.stateOverride){if(p(this.url)&&!l(this.buffer))return!1;if(!p(this.url)&&l(this.buffer))return!1;if((_(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&(""===this.url.host||null===this.url.host))return!1}if(this.url.scheme=this.buffer,this.buffer="",this.stateOverride)return!1;"file"===this.url.scheme?(47===this.input[this.pointer+1]&&47===this.input[this.pointer+2]||(this.parseError=!0),this.state="file"):p(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":p(this.url)?this.state="special authority slashes":47===this.input[this.pointer+1]?(this.state="path or authority",++this.pointer):(this.url.cannotBeABaseURL=!0,this.url.path.push(""),this.state="cannot-be-a-base-URL path")}else{if(this.stateOverride)return this.parseError=!0,n;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},S.prototype["parse no scheme"]=function(e){return null===this.base||this.base.cannotBeABaseURL&&35!==e?n:(this.base.cannotBeABaseURL&&35===e?(this.url.scheme=this.base.scheme,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.url.cannotBeABaseURL=!0,this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},S.prototype["parse special relative or authority"]=function(e){return 47===e&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},S.prototype["parse path or authority"]=function(e){return 47===e?this.state="authority":(this.state="path",--this.pointer),!0},S.prototype["parse relative"]=function(e){return this.url.scheme=this.base.scheme,isNaN(e)?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query):47===e?this.state="relative slash":63===e?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===e?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):p(this.url)&&92===e?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(0,this.base.path.length-1),this.state="path",--this.pointer),!0},S.prototype["parse relative slash"]=function(e){return!p(this.url)||47!==e&&92!==e?47===e?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(92===e&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},S.prototype["parse special authority slashes"]=function(e){return 47===e&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},S.prototype["parse special authority ignore slashes"]=function(e){return 47!==e&&92!==e?(this.state="authority",--this.pointer):this.parseError=!0,!0},S.prototype["parse authority"]=function(e,t){if(64===e){this.parseError=!0,this.atFlag&&(this.buffer="%40"+this.buffer),this.atFlag=!0;const e=r(this.buffer);for(let t=0;t<e;++t){const e=this.buffer.codePointAt(t);if(58===e&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const n=y(e,b);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(e)||47===e||63===e||35===e||p(this.url)&&92===e){if(this.atFlag&&""===this.buffer)return this.parseError=!0,n;this.pointer-=r(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=t;return!0},S.prototype["parse hostname"]=S.prototype["parse host"]=function(e,t){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(58!==e||this.arrFlag)if(isNaN(e)||47===e||63===e||35===e||p(this.url)&&92===e){if(--this.pointer,p(this.url)&&""===this.buffer)return this.parseError=!0,n;if(this.stateOverride&&""===this.buffer&&(_(this.url)||null!==this.url.port))return this.parseError=!0,!1;const e=j(this.buffer,p(this.url));if(e===n)return n;if(this.url.host=e,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===e?this.arrFlag=!0:93===e&&(this.arrFlag=!1),this.buffer+=t;else{if(""===this.buffer)return this.parseError=!0,n;const e=j(this.buffer,p(this.url));if(e===n)return n;if(this.url.host=e,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},S.prototype["parse port"]=function(e,r){if(i(e))this.buffer+=r;else{if(!(isNaN(e)||47===e||63===e||35===e||p(this.url)&&92===e||this.stateOverride))return this.parseError=!0,n;if(""!==this.buffer){const e=parseInt(this.buffer);if(e>Math.pow(2,16)-1)return this.parseError=!0,n;this.url.port=e===(o=this.url.scheme,t[o])?null:e,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var o;return!0};const P=new Set([47,92,63,35]);S.prototype["parse file"]=function(e){var t,n;return this.url.scheme="file",47===e||92===e?(92===e&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?isNaN(e)?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query):63===e?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===e?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):(this.input.length-this.pointer-1==0||(t=e,n=this.input[this.pointer+1],!s(t)||58!==n&&124!==n)||this.input.length-this.pointer-1>=2&&!P.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),E(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},S.prototype["parse file slash"]=function(e){var t;return 47===e||92===e?(92===e&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(2===(t=this.base.path[0]).length&&s(t.codePointAt(0))&&":"===t[1]?this.url.path.push(this.base.path[0]):this.url.host=this.base.host),this.state="path",--this.pointer),!0},S.prototype["parse file host"]=function(e,t){if(isNaN(e)||47===e||92===e||63===e||35===e)if(--this.pointer,!this.stateOverride&&d(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let e=j(this.buffer,p(this.url));if(e===n)return n;if("localhost"===e&&(e=""),this.url.host=e,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=t;return!0},S.prototype["parse path start"]=function(e){return p(this.url)?(92===e&&(this.parseError=!0),this.state="path",47!==e&&92!==e&&--this.pointer):this.stateOverride||63!==e?this.stateOverride||35!==e?void 0!==e&&(this.state="path",47!==e&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},S.prototype["parse path"]=function(e){if(isNaN(e)||47===e||p(this.url)&&92===e||!this.stateOverride&&(63===e||35===e)){if(p(this.url)&&92===e&&(this.parseError=!0),!function(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e}(this.buffer)?!c(this.buffer)||47===e||p(this.url)&&92===e?c(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&d(this.buffer)&&(""!==this.url.host&&null!==this.url.host&&(this.parseError=!0,this.url.host=""),this.buffer=this.buffer[0]+":"),this.url.path.push(this.buffer)):this.url.path.push(""):(E(this.url),47===e||p(this.url)&&92===e||this.url.path.push("")),this.buffer="","file"===this.url.scheme&&(void 0===e||63===e||35===e))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===e&&(this.url.query="",this.state="query"),35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=y(e,m);return!0},S.prototype["parse cannot-be-a-base-URL path"]=function(e){return 63===e?(this.url.query="",this.state="query"):35===e?(this.url.fragment="",this.state="fragment"):(isNaN(e)||37===e||(this.parseError=!0),37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),isNaN(e)||(this.url.path[0]=this.url.path[0]+y(e,h))),!0},S.prototype["parse query"]=function(e,t){if(isNaN(e)||!this.stateOverride&&35===e){p(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const t=new Buffer(this.buffer);for(let e=0;e<t.length;++e)t[e]<33||t[e]>126||34===t[e]||35===t[e]||60===t[e]||62===t[e]?this.url.query+=f(t[e]):this.url.query+=String.fromCodePoint(t[e]);this.buffer="",35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=t;return!0},S.prototype["parse fragment"]=function(e){return isNaN(e)||(0===e?this.parseError=!0:(37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=y(e,h))),!0},e.exports.serializeURL=function(e,t){let n=e.scheme+":";if(null!==e.host?(n+="//",""===e.username&&""===e.password||(n+=e.username,""!==e.password&&(n+=":"+e.password),n+="@"),n+=I(e.host),null!==e.port&&(n+=":"+e.port)):null===e.host&&"file"===e.scheme&&(n+="//"),e.cannotBeABaseURL)n+=e.path[0];else for(const t of e.path)n+="/"+t;return null!==e.query&&(n+="?"+e.query),t||null===e.fragment||(n+="#"+e.fragment),n},e.exports.serializeURLOrigin=function(t){switch(t.scheme){case"blob":try{return e.exports.serializeURLOrigin(e.exports.parseURL(t.path[0]))}catch(e){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(e){let t=e.scheme+"://";return t+=I(e.host),null!==e.port&&(t+=":"+e.port),t}({scheme:t.scheme,host:t.host,port:t.port});case"file":return"file://";default:return"null"}},e.exports.basicURLParse=function(e,t){void 0===t&&(t={});const n=new S(e,t.baseURL,t.encodingOverride,t.url,t.stateOverride);return n.failure?"failure":n.url},e.exports.setTheUsername=function(e,t){e.username="";const n=u.ucs2.decode(t);for(let t=0;t<n.length;++t)e.username+=y(n[t],b)},e.exports.setThePassword=function(e,t){e.password="";const n=u.ucs2.decode(t);for(let t=0;t<n.length;++t)e.password+=y(n[t],b)},e.exports.serializeHost=I,e.exports.cannotHaveAUsernamePasswordPort=function(e){return null===e.host||""===e.host||e.cannotBeABaseURL||"file"===e.scheme},e.exports.serializeInteger=function(e){return String(e)},e.exports.parseURL=function(t,n){return void 0===n&&(n={}),e.exports.basicURLParse(t,{baseURL:n.baseURL,encodingOverride:n.encodingOverride})}}));Vr.serializeURL,Vr.serializeURLOrigin,Vr.basicURLParse,Vr.setTheUsername,Vr.setThePassword,Vr.serializeHost,Vr.cannotHaveAUsernamePasswordPort,Vr.serializeInteger,Vr.parseURL;var $r=class{constructor(e){const t=e[0],n=e[1];let r=null;if(void 0!==n&&(r=Vr.basicURLParse(n),"failure"===r))throw new TypeError("Invalid base URL");const o=Vr.basicURLParse(t,{baseURL:r});if("failure"===o)throw new TypeError("Invalid URL");this._url=o}get href(){return Vr.serializeURL(this._url)}set href(e){const t=Vr.basicURLParse(e);if("failure"===t)throw new TypeError("Invalid URL");this._url=t}get origin(){return Vr.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(e){Vr.basicURLParse(e+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(e){Vr.cannotHaveAUsernamePasswordPort(this._url)||Vr.setTheUsername(this._url,e)}get password(){return this._url.password}set password(e){Vr.cannotHaveAUsernamePasswordPort(this._url)||Vr.setThePassword(this._url,e)}get host(){const e=this._url;return null===e.host?"":null===e.port?Vr.serializeHost(e.host):Vr.serializeHost(e.host)+":"+Vr.serializeInteger(e.port)}set host(e){this._url.cannotBeABaseURL||Vr.basicURLParse(e,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":Vr.serializeHost(this._url.host)}set hostname(e){this._url.cannotBeABaseURL||Vr.basicURLParse(e,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":Vr.serializeInteger(this._url.port)}set port(e){Vr.cannotHaveAUsernamePasswordPort(this._url)||(""===e?this._url.port=null:Vr.basicURLParse(e,{url:this._url,stateOverride:"port"}))}get pathname(){return this._url.cannotBeABaseURL?this._url.path[0]:0===this._url.path.length?"":"/"+this._url.path.join("/")}set pathname(e){this._url.cannotBeABaseURL||(this._url.path=[],Vr.basicURLParse(e,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":"?"+this._url.query}set search(e){const t=this._url;if(""===e)return void(t.query=null);const n="?"===e[0]?e.substring(1):e;t.query="",Vr.basicURLParse(n,{url:t,stateOverride:"query"})}get hash(){return null===this._url.fragment||""===this._url.fragment?"":"#"+this._url.fragment}set hash(e){if(""===e)return void(this._url.fragment=null);const t="#"===e[0]?e.substring(1):e;this._url.fragment="",Vr.basicURLParse(t,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}},Hr=Cr((function(e){const t=qr.implSymbol;function n(r){if(!this||this[t]||!(this instanceof n))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");if(arguments.length<1)throw new TypeError("Failed to construct 'URL': 1 argument required, but only "+arguments.length+" present.");const o=[];for(let e=0;e<arguments.length&&e<2;++e)o[e]=arguments[e];o[0]=Ur.USVString(o[0]),void 0!==o[1]&&(o[1]=Ur.USVString(o[1])),e.exports.setup(this,o)}n.prototype.toJSON=function(){if(!this||!e.exports.is(this))throw new TypeError("Illegal invocation");const n=[];for(let e=0;e<arguments.length&&e<0;++e)n[e]=arguments[e];return this[t].toJSON.apply(this[t],n)},Object.defineProperty(n.prototype,"href",{get(){return this[t].href},set(e){e=Ur.USVString(e),this[t].href=e},enumerable:!0,configurable:!0}),n.prototype.toString=function(){if(!this||!e.exports.is(this))throw new TypeError("Illegal invocation");return this.href},Object.defineProperty(n.prototype,"origin",{get(){return this[t].origin},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get(){return this[t].protocol},set(e){e=Ur.USVString(e),this[t].protocol=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"username",{get(){return this[t].username},set(e){e=Ur.USVString(e),this[t].username=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"password",{get(){return this[t].password},set(e){e=Ur.USVString(e),this[t].password=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"host",{get(){return this[t].host},set(e){e=Ur.USVString(e),this[t].host=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hostname",{get(){return this[t].hostname},set(e){e=Ur.USVString(e),this[t].hostname=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"port",{get(){return this[t].port},set(e){e=Ur.USVString(e),this[t].port=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pathname",{get(){return this[t].pathname},set(e){e=Ur.USVString(e),this[t].pathname=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"search",{get(){return this[t].search},set(e){e=Ur.USVString(e),this[t].search=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hash",{get(){return this[t].hash},set(e){e=Ur.USVString(e),this[t].hash=e},enumerable:!0,configurable:!0}),e.exports={is:e=>!!e&&e[t]instanceof $r,create(e,t){let r=Object.create(n.prototype);return this.setup(r,e,t),r},setup(e,n,r){r||(r={}),r.wrapper=e,e[t]=new $r(n,r),e[t][qr.wrapperSymbol]=e},interface:n,expose:{Window:{URL:n},Worker:{URL:n}}}}));Hr.is,Hr.create,Hr.setup,Hr.expose;var Yr={URL:Hr.interface,serializeURL:Vr.serializeURL,serializeURLOrigin:Vr.serializeURLOrigin,basicURLParse:Vr.basicURLParse,setTheUsername:Vr.setTheUsername,setThePassword:Vr.setThePassword,serializeHost:Vr.serializeHost,serializeInteger:Vr.serializeInteger,parseURL:Vr.parseURL};const Zr=r.Readable,Kr=Symbol("buffer"),Xr=Symbol("type");class Qr{constructor(){this[Xr]="";const e=arguments[0],t=arguments[1],n=[];let r=0;if(e){const t=e,o=Number(t.length);for(let e=0;e<o;e++){const o=t[e];let i;i=o instanceof Buffer?o:ArrayBuffer.isView(o)?Buffer.from(o.buffer,o.byteOffset,o.byteLength):o instanceof ArrayBuffer?Buffer.from(o):o instanceof Qr?o[Kr]:Buffer.from("string"==typeof o?o:String(o)),r+=i.length,n.push(i)}}this[Kr]=Buffer.concat(n);let o=t&&void 0!==t.type&&String(t.type).toLowerCase();o&&!/[^\u0020-\u007E]/.test(o)&&(this[Xr]=o)}get size(){return this[Kr].length}get type(){return this[Xr]}text(){return Promise.resolve(this[Kr].toString())}arrayBuffer(){const e=this[Kr],t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return Promise.resolve(t)}stream(){const e=new Zr;return e._read=function(){},e.push(this[Kr]),e.push(null),e}toString(){return"[object Blob]"}slice(){const e=this.size,t=arguments[0],n=arguments[1];let r,o;r=void 0===t?0:t<0?Math.max(e+t,0):Math.min(t,e),o=void 0===n?e:n<0?Math.max(e+n,0):Math.min(n,e);const i=Math.max(o-r,0),s=this[Kr].slice(r,r+i),a=new Qr([],{type:arguments[2]});return a[Kr]=s,a}}function eo(e,t,n){Error.call(this,e),this.message=e,this.type=t,n&&(this.code=this.errno=n.code),Error.captureStackTrace(this,this.constructor)}let to;Object.defineProperties(Qr.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(Qr.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),eo.prototype=Object.create(Error.prototype),eo.prototype.constructor=eo,eo.prototype.name="FetchError";try{to=require("encoding").convert}catch(e){}const no=Symbol("Body internals"),ro=r.PassThrough;function oo(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.size;let i=void 0===o?0:o;var s=n.timeout;let a=void 0===s?0:s;null==e?e=null:so(e)?e=Buffer.from(e.toString()):ao(e)||Buffer.isBuffer(e)||("[object ArrayBuffer]"===Object.prototype.toString.call(e)?e=Buffer.from(e):ArrayBuffer.isView(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof r||(e=Buffer.from(String(e)))),this[no]={body:e,disturbed:!1,error:null},this.size=i,this.timeout=a,e instanceof r&&e.on("error",(function(e){const n="AbortError"===e.name?e:new eo(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[no].error=n}))}function io(){var e=this;if(this[no].disturbed)return oo.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[no].disturbed=!0,this[no].error)return oo.Promise.reject(this[no].error);let t=this.body;if(null===t)return oo.Promise.resolve(Buffer.alloc(0));if(ao(t)&&(t=t.stream()),Buffer.isBuffer(t))return oo.Promise.resolve(t);if(!(t instanceof r))return oo.Promise.resolve(Buffer.alloc(0));let n=[],o=0,i=!1;return new oo.Promise((function(r,s){let a;e.timeout&&(a=setTimeout((function(){i=!0,s(new eo(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)),t.on("error",(function(t){"AbortError"===t.name?(i=!0,s(t)):s(new eo(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))})),t.on("data",(function(t){if(!i&&null!==t){if(e.size&&o+t.length>e.size)return i=!0,void s(new eo(`content size at ${e.url} over limit: ${e.size}`,"max-size"));o+=t.length,n.push(t)}})),t.on("end",(function(){if(!i){clearTimeout(a);try{r(Buffer.concat(n,o))}catch(t){s(new eo(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}}))}))}function so(e){return"object"==typeof e&&"function"==typeof e.append&&"function"==typeof e.delete&&"function"==typeof e.get&&"function"==typeof e.getAll&&"function"==typeof e.has&&"function"==typeof e.set&&("URLSearchParams"===e.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(e)||"function"==typeof e.sort)}function ao(e){return"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.constructor&&"string"==typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}function uo(e){let t,n,o=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return o instanceof r&&"function"!=typeof o.getBoundary&&(t=new ro,n=new ro,o.pipe(t),o.pipe(n),e[no].body=t,o=n),o}function co(e){return null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":so(e)?"application/x-www-form-urlencoded;charset=UTF-8":ao(e)?e.type||null:Buffer.isBuffer(e)||"[object ArrayBuffer]"===Object.prototype.toString.call(e)||ArrayBuffer.isView(e)?null:"function"==typeof e.getBoundary?`multipart/form-data;boundary=${e.getBoundary()}`:e instanceof r?null:"text/plain;charset=UTF-8"}function lo(e){const t=e.body;return null===t?0:ao(t)?t.size:Buffer.isBuffer(t)?t.length:t&&"function"==typeof t.getLengthSync&&(t._lengthRetrievers&&0==t._lengthRetrievers.length||t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}oo.prototype={get body(){return this[no].body},get bodyUsed(){return this[no].disturbed},arrayBuffer(){return io.call(this).then((function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}))},blob(){let e=this.headers&&this.headers.get("content-type")||"";return io.call(this).then((function(t){return Object.assign(new Qr([],{type:e.toLowerCase()}),{[Kr]:t})}))},json(){var e=this;return io.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return oo.Promise.reject(new eo(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}}))},text(){return io.call(this).then((function(e){return e.toString()}))},buffer(){return io.call(this)},textConverted(){var e=this;return io.call(this).then((function(t){return function(e,t){if("function"!=typeof to)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=t.get("content-type");let r,o,i="utf-8";n&&(r=/charset=([^;]*)/i.exec(n));o=e.slice(0,1024).toString(),!r&&o&&(r=/<meta.+?charset=(['"])(.+?)\1/i.exec(o));!r&&o&&(r=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(o),r||(r=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(o),r&&r.pop()),r&&(r=/charset=(.*)/i.exec(r.pop())));!r&&o&&(r=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(o));r&&(i=r.pop(),"gb2312"!==i&&"gbk"!==i||(i="gb18030"));return to(e,"UTF-8",i).toString()}(t,e.headers)}))}},Object.defineProperties(oo.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),oo.mixIn=function(e){for(const t of Object.getOwnPropertyNames(oo.prototype))if(!(t in e)){const n=Object.getOwnPropertyDescriptor(oo.prototype,t);Object.defineProperty(e,t,n)}},oo.Promise=global.Promise;const po=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,fo=/[^\t\x20-\x7e\x80-\xff]/;function ho(e){if(e=`${e}`,po.test(e)||""===e)throw new TypeError(`${e} is not a legal HTTP header name`)}function vo(e){if(e=`${e}`,fo.test(e))throw new TypeError(`${e} is not a legal HTTP header value`)}function mo(e,t){t=t.toLowerCase();for(const n in e)if(n.toLowerCase()===t)return n}const go=Symbol("map");class bo{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[go]=Object.create(null),e instanceof bo){const t=e.raw(),n=Object.keys(t);for(const e of n)for(const n of t[e])this.append(e,n)}else if(null==e);else{if("object"!=typeof e)throw new TypeError("Provided initializer must be an object");{const t=e[Symbol.iterator];if(null!=t){if("function"!=typeof t)throw new TypeError("Header pairs must be iterable");const n=[];for(const t of e){if("object"!=typeof t||"function"!=typeof t[Symbol.iterator])throw new TypeError("Each header pair must be iterable");n.push(Array.from(t))}for(const e of n){if(2!==e.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(e[0],e[1])}}else for(const t of Object.keys(e)){const n=e[t];this.append(t,n)}}}}get(e){ho(e=`${e}`);const t=mo(this[go],e);return void 0===t?null:this[go][t].join(", ")}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=yo(this),r=0;for(;r<n.length;){var o=n[r];const i=o[0],s=o[1];e.call(t,s,i,this),n=yo(this),r++}}set(e,t){t=`${t}`,ho(e=`${e}`),vo(t);const n=mo(this[go],e);this[go][void 0!==n?n:e]=[t]}append(e,t){t=`${t}`,ho(e=`${e}`),vo(t);const n=mo(this[go],e);void 0!==n?this[go][n].push(t):this[go][e]=[t]}has(e){return ho(e=`${e}`),void 0!==mo(this[go],e)}delete(e){ho(e=`${e}`);const t=mo(this[go],e);void 0!==t&&delete this[go][t]}raw(){return this[go]}keys(){return jo(this,"key")}values(){return jo(this,"value")}[Symbol.iterator](){return jo(this,"key+value")}}function yo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(e[go]).sort().map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[go][t].join(", ")}:function(t){return[t.toLowerCase(),e[go][t].join(", ")]})}bo.prototype.entries=bo.prototype[Symbol.iterator],Object.defineProperty(bo.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(bo.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const wo=Symbol("internal");function jo(e,t){const n=Object.create(Io);return n[wo]={target:e,kind:t,index:0},n}const Io=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==Io)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[wo];const t=e.target,n=e.kind,r=e.index,o=yo(t,n);return r>=o.length?{value:void 0,done:!0}:(this[wo].index=r+1,{value:o[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function Eo(e){const t=Object.assign({__proto__:null},e[go]),n=mo(e[go],"Host");return void 0!==n&&(t[n]=t[n][0]),t}Object.defineProperty(Io,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const _o=Symbol("Response internals"),So=i.STATUS_CODES;class Po{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};oo.call(this,e,t);const n=t.status||200,r=new bo(t.headers);if(null!=e&&!r.has("Content-Type")){const t=co(e);t&&r.append("Content-Type",t)}this[_o]={url:t.url,status:n,statusText:t.statusText||So[n],headers:r,counter:t.counter}}get url(){return this[_o].url||""}get status(){return this[_o].status}get ok(){return this[_o].status>=200&&this[_o].status<300}get redirected(){return this[_o].counter>0}get statusText(){return this[_o].statusText}get headers(){return this[_o].headers}clone(){return new Po(uo(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}oo.mixIn(Po.prototype),Object.defineProperties(Po.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(Po.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const Ao=Symbol("Request internals"),Ro=s.URL||Yr.URL,Co=s.parse,ko=s.format;function Uo(e){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(e)&&(e=new Ro(e).toString()),Co(e)}const Oo="destroy"in r.Readable.prototype;function xo(e){return"object"==typeof e&&"object"==typeof e[Ao]}class qo{constructor(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};xo(e)?t=Uo(e.url):(t=e&&e.href?Uo(e.href):Uo(`${e}`),e={});let r=n.method||e.method||"GET";if(r=r.toUpperCase(),(null!=n.body||xo(e)&&null!==e.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let o=null!=n.body?n.body:xo(e)&&null!==e.body?uo(e):null;oo.call(this,o,{timeout:n.timeout||e.timeout||0,size:n.size||e.size||0});const i=new bo(n.headers||e.headers||{});if(null!=o&&!i.has("Content-Type")){const e=co(o);e&&i.append("Content-Type",e)}let s=xo(e)?e.signal:null;if("signal"in n&&(s=n.signal),null!=s&&!function(e){const t=e&&"object"==typeof e&&Object.getPrototypeOf(e);return!(!t||"AbortSignal"!==t.constructor.name)}(s))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[Ao]={method:r,redirect:n.redirect||e.redirect||"follow",headers:i,parsedURL:t,signal:s},this.follow=void 0!==n.follow?n.follow:void 0!==e.follow?e.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===e.compress||e.compress,this.counter=n.counter||e.counter||0,this.agent=n.agent||e.agent}get method(){return this[Ao].method}get url(){return ko(this[Ao].parsedURL)}get headers(){return this[Ao].headers}get redirect(){return this[Ao].redirect}get signal(){return this[Ao].signal}clone(){return new qo(this)}}function Do(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}oo.mixIn(qo.prototype),Object.defineProperty(qo.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(qo.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),Do.prototype=Object.create(Error.prototype),Do.prototype.constructor=Do,Do.prototype.name="AbortError";const To=s.URL||Yr.URL,No=r.PassThrough;function Bo(e,t){if(!Bo.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return oo.Promise=Bo.Promise,new Bo.Promise((function(n,o){const s=new qo(e,t),a=function(e){const t=e[Ao].parsedURL,n=new bo(e[Ao].headers);if(n.has("Accept")||n.set("Accept","*/*"),!t.protocol||!t.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&e.body instanceof r.Readable&&!Oo)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let o=null;if(null==e.body&&/^(POST|PUT)$/i.test(e.method)&&(o="0"),null!=e.body){const t=lo(e);"number"==typeof t&&(o=String(t))}o&&n.set("Content-Length",o),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),e.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let i=e.agent;return"function"==typeof i&&(i=i(t)),Object.assign({},t,{method:e.method,headers:Eo(n),agent:i})}(s),u=("https:"===a.protocol?c:i).request,l=s.signal;let p=null;const f=function(){let e=new Do("The user aborted a request.");o(e),s.body&&s.body instanceof r.Readable&&Lo(s.body,e),p&&p.body&&p.body.emit("error",e)};if(l&&l.aborted)return void f();const h=function(){f(),g()},v=u(a);let m;function g(){v.abort(),l&&l.removeEventListener("abort",h),clearTimeout(m)}l&&l.addEventListener("abort",h),s.timeout&&v.once("socket",(function(e){m=setTimeout((function(){o(new eo(`network timeout at: ${s.url}`,"request-timeout")),g()}),s.timeout)})),v.on("error",(function(e){o(new eo(`request to ${s.url} failed, reason: ${e.message}`,"system",e)),p&&p.body&&Lo(p.body,e),g()})),function(e,t){let n;e.on("socket",(function(e){n=e})),e.on("response",(function(e){const r=e.headers;"chunked"!==r["transfer-encoding"]||r["content-length"]||e.once("close",(function(e){if(n&&n.listenerCount("data")>0&&!e){const e=new Error("Premature close");e.code="ERR_STREAM_PREMATURE_CLOSE",t(e)}}))}))}(v,(function(e){l&&l.aborted||p&&p.body&&Lo(p.body,e)})),parseInt(process.version.substring(1))<14&&v.on("socket",(function(e){e.addListener("close",(function(t){const n=e.listenerCount("data")>0;if(p&&n&&!t&&(!l||!l.aborted)){const e=new Error("Premature close");e.code="ERR_STREAM_PREMATURE_CLOSE",p.body.emit("error",e)}}))})),v.on("response",(function(e){clearTimeout(m);const t=function(e){const t=new bo;for(const n of Object.keys(e))if(!po.test(n))if(Array.isArray(e[n]))for(const r of e[n])fo.test(r)||(void 0===t[go][n]?t[go][n]=[r]:t[go][n].push(r));else fo.test(e[n])||(t[go][n]=[e[n]]);return t}(e.headers);if(Bo.isRedirect(e.statusCode)){const i=t.get("Location");let a=null;try{a=null===i?null:new To(i,s.url).toString()}catch(e){if("manual"!==s.redirect)return o(new eo(`uri requested responds with an invalid redirect URL: ${i}`,"invalid-redirect")),void g()}switch(s.redirect){case"error":return o(new eo(`uri requested responds with a redirect, redirect mode is set to error: ${s.url}`,"no-redirect")),void g();case"manual":if(null!==a)try{t.set("Location",a)}catch(e){o(e)}break;case"follow":if(null===a)break;if(s.counter>=s.follow)return o(new eo(`maximum redirect reached at: ${s.url}`,"max-redirect")),void g();const i={headers:new bo(s.headers),follow:s.follow,counter:s.counter+1,agent:s.agent,compress:s.compress,method:s.method,body:s.body,signal:s.signal,timeout:s.timeout,size:s.size};if(!function(e,t){const n=new To(t).hostname,r=new To(e).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(s.url,a)||(r=s.url,new To(a).protocol!==new To(r).protocol))for(const e of["authorization","www-authenticate","cookie","cookie2"])i.headers.delete(e);return 303!==e.statusCode&&s.body&&null===lo(s)?(o(new eo("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void g()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==s.method)||(i.method="GET",i.body=void 0,i.headers.delete("content-length")),n(Bo(new qo(a,i))),void g())}}var r;e.once("end",(function(){l&&l.removeEventListener("abort",h)}));let i=e.pipe(new No);const a={url:s.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:s.size,timeout:s.timeout,counter:s.counter},u=t.get("Content-Encoding");if(!s.compress||"HEAD"===s.method||null===u||204===e.statusCode||304===e.statusCode)return p=new Po(i,a),void n(p);const c={flush:d.Z_SYNC_FLUSH,finishFlush:d.Z_SYNC_FLUSH};if("gzip"==u||"x-gzip"==u)return i=i.pipe(d.createGunzip(c)),p=new Po(i,a),void n(p);if("deflate"==u||"x-deflate"==u){const t=e.pipe(new No);return t.once("data",(function(e){i=8==(15&e[0])?i.pipe(d.createInflate()):i.pipe(d.createInflateRaw()),p=new Po(i,a),n(p)})),void t.on("end",(function(){p||(p=new Po(i,a),n(p))}))}if("br"==u&&"function"==typeof d.createBrotliDecompress)return i=i.pipe(d.createBrotliDecompress()),p=new Po(i,a),void n(p);p=new Po(i,a),n(p)})),function(e,t){const n=t.body;null===n?e.end():ao(n)?n.stream().pipe(e):Buffer.isBuffer(n)?(e.write(n),e.end()):n.pipe(e)}(v,s)}))}function Lo(e,t){e.destroy?e.destroy(t):(e.emit("error",t),e.end())}Bo.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},Bo.Promise=global.Promise;var Fo=function(){function e(e){this.contextProvider=e}return e.prototype.getServiceDetails=function(e,t){return P(this,void 0,void 0,(function(){return A(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(e,"/services/").concat(t))]}))}))},e.prototype.getAddonDetails=function(e,t){return P(this,void 0,void 0,(function(){return A(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(e,"/addons/").concat(t))]}))}))},e.prototype.fetch=function(e,t){return P(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return A(this,(function(u){switch(u.label){case 0:return n="Error while trying to connect, please try again.",r=Rr({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},S({},t)),[4,eu(2)((function(){return P(a,void 0,void 0,(function(){return A(this,(function(t){return[2,Bo(e,r)]}))}))})).catch((function(){throw new Error(n)}))];case 1:return(o=u.sent()).ok?[3,3]:[4,o.text()];case 2:i=u.sent(),s=n;try{s=JSON.parse(i)}catch(e){s=null!=i?i:n}finally{throw new Error(JSON.stringify(s))}case 3:return[4,o.json()];case 4:return[2,u.sent()]}}))}))},e}(),Go=function(e,t,n){return P(void 0,void 0,void 0,(function(){var r,o,i,s,a;return A(this,(function(u){switch(u.label){case 0:if(r=zo(t||"127.0.0.1"),(o=zo(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===l.platform()&&(i=function(e){return P(void 0,void 0,void 0,(function(){var t;return A(this,(function(n){switch(n.label){case 0:return t="lo0 alias ".concat(e," up"),[4,Jo.apply(void 0,t.split(" "))];case 1:return n.sent(),[2]}}))}))}),s=r,u.label=1;case 1:return s<=o?(a=Wo(s),[4,Mo(e,a)]):[3,6];case 2:return u.sent()?i?[4,i(a)]:[3,4]:[3,5];case 3:u.sent(),u.label=4;case 4:return[2,a];case 5:return s+=1,[3,1];case 6:throw new Error("Not possible to assign port '".concat(e,"' to an IP address on this machine. Please check if there is already a service running with this port which binds to the wildcard host address (0.0.0.0) and stop this service."))}}))}))},Mo=function(e,t){return new Promise((function(n){var r=new h,o=!1;r.on("connect",(function(){o=!0,r.destroy()})),r.setTimeout(400),r.on("timeout",(function(){o=!1,r.destroy()})),r.on("error",(function(){o=!1})),r.on("close",(function(){n(!o)})),t?r.connect(e,t):r.connect(e)}))},Jo=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return P(void 0,void 0,void 0,(function(){return A(this,(function(t){switch(t.label){case 0:return"/sbin/ifconfig",[4,Vo("/sbin/ifconfig",e).resultPromise];case 1:return[2,t.sent()]}}))}))},zo=function(e){var t=e.split(".").reverse();if(4!==t.length)throw new Error("Invalid ip address: ".concat(e));for(var n=0,r=0;r<4;r+=1){var o=Number.parseInt(t[r],10);if(o<0||o>255)throw new Error("Invalid ip address: ".concat(e));n+=o<<8*r}return n},Wo=function(e){if(!Number.isSafeInteger(e))throw new Error("Number is not an integer");if(e<0||e>4294967295)throw new Error("Number is out of range 0x0-0xffffffff");for(var t=[],n=0;n<4;n+=1)t.push(e>>8*n&255);return t.reverse().join(".")},Vo=function(e,t,n){var r=v(e,t,S({windowsHide:!0},n)),o=new Promise((function(o,i){var s="",a="";(null===(null==n?void 0:n.stdio)||void 0===(null==n?void 0:n.stdio))&&(r.stdout&&r.stdout.on("data",(function(e){s+=e})),r.stderr&&r.stderr.on("data",(function(e){a+=e}))),r.on("close",(function(n){var r={code:n,stdout:s,stderr:a};if(0!==n){var u="Error during execution of command '".concat(e," ").concat(t.join(" "),"': ").concat(a);i({message:u,result:r})}else o(r)}))}));return{process:r,resultPromise:o}},$o=function(e,t,n){return P(void 0,void 0,void 0,(function(){var r,o;return A(this,(function(i){switch(i.label){case 0:return r=Ho(e,10),[4,g.promises.writeFile(r,t,n)];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,6]),[4,g.promises.rename(r,e)];case 3:return i.sent(),[3,6];case 4:return o=i.sent(),[4,g.promises.unlink(r).catch((function(){}))];case 5:throw i.sent(),o;case 6:return[2]}}))}))},Ho=function(e,t){for(var n,r=b.dirname(e),o=b.basename(e),i=0;null===(n=i<t)||void 0===n||n;i+=1){var s=R([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),a=".".concat(s,".").concat(o),u=b.join(r,a);if(!g.existsSync(u))return u}throw new Error("Could not write file to file '".concat(e,"'."))},Yo="win32"===process.platform?"\r\n":"\n",Zo=function(){function e(e,t){this.nodes=e,this.config=t}return e.prototype.add=function(e,t,n){var r=this;if(0===t.length)return this;var o=this.findOrCreateEntry(e,n);return t.forEach((function(e){if(!o.hosts.find((function(t){return t.host===e}))){var t=1;0===o.hosts.length&&(t=r.config.indent-"".concat(o.ipPrefixWhitespace).concat(o.ip).length),o.hosts.push({whitespace:" ".repeat(t<1?1:t),host:e})}})),this},e.prototype.remove=function(e,t){var n=this;return this.findEntries(e).forEach((function(e){t.forEach((function(t){var r=e.hosts.findIndex((function(e){return e.host===t}));r<0||(0===r&&void 0!==e.hosts[1]&&(e.hosts[1].whitespace=e.hosts[0].whitespace),e.hosts.splice(r,1),0===e.hosts.length&&n.removeEntry(e))}))})),this},e.prototype.removeHosts=function(e){var t=this;ri(this.nodes,"entry").forEach((function(n){t.remove(n.ip,e)}))},e.prototype.removeIps=function(e){var t=this;return e.forEach((function(e){t.findEntries(e).forEach((function(e){return t.removeEntry(e)}))})),this},e.prototype.resolveHosts=function(e){return Er(this.findEntries(e),(function(e){return e.hosts.map((function(e){return e.host}))}))},e.prototype.resolveIps=function(e){return ri(this.nodes,"entry").filter((function(t){return t.hosts.some((function(t){return t.host===e}))})).map((function(e){return e.ip}))},e.prototype.toString=function(){return ei(this.nodes,this.config.eol)},e.prototype.removeEntry=function(e){var t,n="number"==typeof(t=e)||M(t)&&"[object Number]"==G(t)?e:this.nodes.findIndex((function(t){return t===e}));n<0||this.nodes.splice(n,1)},e.prototype.findEntries=function(e){return ri(this.nodes,"entry").filter((function(t){return t.ip===e}))},e.prototype.findOrCreateEntry=function(e,t){var n=this.findEntries(e)[0];if(n)return n;var r=this.makeEntry(e);if(t){var o=Qo(t),i=this.nodes.findIndex((function(e){return"comment"===e.type&&e.line===o}));if(i>=0)this.insertAt(i+1,r);else{var s="blank"!==this.nodes[this.nodes.length-1].type?[Ko(),Xo(o),r]:[Xo(o),r];this.insertAt.apply(this,R([this.nodes.length],s,!1))}}else this.insertAt(this.nodes.length,r);return r},e.prototype.insertAt=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.nodes).splice.apply(t,R([e,0],n,!1))},e.prototype.makeEntry=function(e,t){var n=this.config.ipPrefixWhitespace;return S({type:"entry",ip:e,ipPrefixWhitespace:n,hosts:[]},t)},e.fromNodes=function(t,n){var r,o;return new e(t.filter((function(e){return"eol"!==e.type})),{eol:null!==(r=null==n?void 0:n.eol)&&void 0!==r?r:function(){var e,n=ri(t,"eol").map((function(e){return e.line}));return null!==(e=oi(n))&&void 0!==e?e:Yo}(),indent:null!==(o=null==n?void 0:n.indent)&&void 0!==o?o:function(){var e,n=Er(ri(t,"entry"),(function(e){var t=e.ipPrefixWhitespace,n=e.ip,r=e.hosts[0];return r?["".concat(t).concat(n).concat(r.whitespace).length]:[]}));return null!==(e=oi(n))&&void 0!==e?e:17}(),ipPrefixWhitespace:""})},e.parse=function(e,t){return this.fromNodes(ti(e),t)},e}(),Ko=function(){return{type:"blank",line:""}},Xo=function(e){return{type:"comment",line:Qo(e)}},Qo=function(e){return e.startsWith("#")?e:"# ".concat(e)},ei=function(e,t){var n=e.map((function(e){switch(e.type){case"entry":var t=e.hosts.map((function(e){var t=e.whitespace,n=e.host;return"".concat(t).concat(n)})).join("");return"".concat(e.ipPrefixWhitespace).concat(e.ip).concat(t);case"blank":case"comment":case"invalid":return e.line;default:return""}}));return n.join(null!=t?t:Yo)},ti=function(e){return e.split(/(\r?\n)/).map((function(e){return function(e){return e.match(/^\s*#.*$/)}(e)?{type:"comment",line:e}:function(e){return e.match(/^(\r?\n)$/)}(e)?{type:"eol",line:e}:function(e){return e.match(/^\s*$/)}(e)?{type:"blank",line:e}:ni(e)}))},ni=function(e){var t=e.match(/^(\s*)(\S+)(.+)?$/);if(!t)return{type:"invalid",line:e};var n=t[1],r=t[2],o=t.slice(3),i=!1,s=Er(o.filter((function(e){return void 0!==e})),(function(e){var t=e.match(/(\s+)(\S+)/g);return t?t.map((function(e){var t=e.match(/^(\s+)(\S+)$/);t||(i=!0);var n=null!=t?t:[];return{whitespace:n[1],host:n[2]}})):(i=!0,[])}));return i?{type:"invalid",line:e}:{type:"entry",ipPrefixWhitespace:n,ip:r,hosts:s}},ri=function(e,t){return e.filter((function(e){return e.type===t}))},oi=function(e){var t=new Map;e.forEach((function(e){var n;t.set(e,(null!==(n=t.get(e))&&void 0!==n?n:0)+1)}));var n=Pr(Array.from(t.entries()),(function(e){return e[1]}));if(n)return n[0]},ii="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",si=function(){function e(e){this.ast=Zo.fromNodes([]);var t={writeMode:"atomic",hostsFile:ii};this.config=S(S({},t),e)}return e.prototype.add=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!Sr(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!Sr(e))throw new Error("Expected 'host' to be a string, but got ".concat(typeof e,"."))})),this.ast.add(e,t,this.config.header),this},e.prototype.remove=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!Sr(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!Sr(e))throw new Error("Expected 'host' to be a string, but got ".concat(typeof e,"."))})),this.ast.remove(e,t),this},e.prototype.removeHosts=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.forEach((function(e){if(!Sr(e))throw new Error("Expected 'host' to be a string, but got ".concat(typeof e,"."))})),this.ast.removeHosts(e),this},e.prototype.removeIps=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.forEach((function(e){if(!Sr(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."))})),this.ast.removeIps(e),this},e.prototype.read=function(){return P(this,void 0,void 0,(function(){var e;return A(this,(function(t){switch(t.label){case 0:return[4,g.promises.readFile(this.config.hostsFile)];case 1:return e=t.sent(),this.ast=Zo.parse(e.toString(),this.config),[2,this]}}))}))},e.prototype.write=function(e){return P(this,void 0,void 0,(function(){var t,n,r,o;return A(this,(function(i){switch(i.label){case 0:switch(t=S(S({},this.config),e),n=t.hostsFile,r=t.writeMode,o=this.ast.toString(),r){case void 0:case"atomic":return[3,1];case"standard":return[3,3];case"disabled":return[3,5]}return[3,5];case 1:return[4,$o(n,o)];case 2:case 4:return i.sent(),[3,6];case 3:return[4,g.promises.writeFile(n,o)];case 5:return[3,6];case 6:return[2,this]}}))}))},e.prototype.backup=function(e){return P(this,void 0,void 0,(function(){var t,n,r,o;return A(this,(function(i){switch(i.label){case 0:return g.existsSync(this.config.hostsFile)?(t=b.dirname(this.config.hostsFile),n=b.basename(this.config.hostsFile),r="".concat(n).concat(e.suffix),o=b.resolve(t,r),g.existsSync(o)&&!e.rewrite?[3,2]:[4,g.promises.copyFile(this.config.hostsFile,o)]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))},e.load=function(t){return P(this,void 0,void 0,(function(){return A(this,(function(n){switch(n.label){case 0:return[4,new e(t).read()];case 1:return[2,n.sent()]}}))}))},e}(),ai=function(){function e(){this.previousPromise=Promise.resolve(),this._queueLength=0}return Object.defineProperty(e.prototype,"queueLength",{get:function(){return this._queueLength},enumerable:!1,configurable:!0}),e.prototype.enter=function(e){return P(this,void 0,void 0,(function(){var t,n=this;return A(this,(function(r){return this._queueLength+=1,t=this.previousPromise.then((function(){return n._queueLength-=1,e()}),(function(){return n._queueLength-=1,e()})),this.previousPromise=t,[2,t]}))}))},e}(),ui=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),o=e[e.length-1];return"function"==typeof r&&r!==o&&Object.keys(o).forEach((function(e){r[e]=o[e]})),r}};var ci=ui(li),di=ui(pi);function li(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function pi(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}li.proto=li((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return li(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return pi(this)},configurable:!0})})),ci.strict=di;var fi=function(){},hi=function(e,t,n){if("function"==typeof t)return hi(e,null,t);t||(t={}),n=ci(n||fi);var r=e._writableState,o=e._readableState,i=t.readable||!1!==t.readable&&e.readable,s=t.writable||!1!==t.writable&&e.writable,a=!1,u=function(){e.writable||c()},c=function(){s=!1,i||n.call(e)},d=function(){i=!1,s||n.call(e)},l=function(t){n.call(e,t?new Error("exited with error code: "+t):null)},p=function(t){n.call(e,t)},f=function(){process.nextTick(h)},h=function(){if(!a)return(!i||o&&o.ended&&!o.destroyed)&&(!s||r&&r.ended&&!r.destroyed)?void 0:n.call(e,new Error("premature close"))},v=function(){e.req.on("finish",c)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?s&&!r&&(e.on("end",u),e.on("close",u)):(e.on("complete",c),e.on("abort",f),e.req?v():e.on("request",v)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",l),e.on("end",d),e.on("finish",c),!1!==t.error&&e.on("error",p),e.on("close",f),function(){a=!0,e.removeListener("complete",c),e.removeListener("abort",f),e.removeListener("request",v),e.req&&e.req.removeListener("finish",c),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",c),e.removeListener("exit",l),e.removeListener("end",d),e.removeListener("error",p),e.removeListener("close",f)}},vi=hi,mi=function(){},gi=/^v?\.0/.test(process.version),bi=function(e){return"function"==typeof e},yi=function(e,t,n,r){r=ci(r);var o=!1;e.on("close",(function(){o=!0})),vi(e,{readable:t,writable:n},(function(e){if(e)return r(e);o=!0,r()}));var i=!1;return function(t){if(!o&&!i)return i=!0,function(e){return!!gi&&!!g&&(e instanceof(g.ReadStream||mi)||e instanceof(g.WriteStream||mi))&&bi(e.close)}(e)?e.close(mi):function(e){return e.setHeader&&bi(e.abort)}(e)?e.abort():bi(e.destroy)?e.destroy():void r(t||new Error("stream was destroyed"))}},wi=function(e){e()},ji=function(e,t){return e.pipe(t)},Ii=function(){var e,t=Array.prototype.slice.call(arguments),n=bi(t[t.length-1]||mi)&&t.pop()||mi;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r=t.map((function(o,i){var s=i<t.length-1;return yi(o,s,i>0,(function(t){e||(e=t),t&&r.forEach(wi),s||(r.forEach(wi),n(e))}))}));return t.reduce(ji)};const{Duplex:Ei}=r;function _i(e){e.emit("close")}function Si(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Pi(e){this.removeListener("error",Pi),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}var Ai=function(e,t){let n=!0;const r=new Ei({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",(function(t,n){const o=!n&&r._readableState.objectMode?t.toString():t;r.push(o)||e.pause()})),e.once("error",(function(e){r.destroyed||(n=!1,r.destroy(e))})),e.once("close",(function(){r.destroyed||r.push(null)})),r._destroy=function(t,o){if(e.readyState===e.CLOSED)return o(t),void process.nextTick(_i,r);let i=!1;e.once("error",(function(e){i=!0,o(e)})),e.once("close",(function(){i||o(t),process.nextTick(_i,r)})),n&&e.terminate()},r._final=function(t){e.readyState!==e.CONNECTING?null!==e._socket&&(e._socket._writableState.finished?(t(),r._readableState.endEmitted&&r.destroy()):(e._socket.once("finish",(function(){t()})),e.close())):e.once("open",(function(){r._final(t)}))},r._read=function(){e.isPaused&&e.resume()},r._write=function(t,n,o){e.readyState!==e.CONNECTING?e.send(t,o):e.once("open",(function(){r._write(t,n,o)}))},r.on("end",Si),r.on("error",Pi),r},Ri={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},Ci="function"==typeof __webpack_require__?__non_webpack_require__:function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")},ki=process.config&&process.config.variables||{},Ui=!!process.env.PREBUILDS_ONLY,Oi=process.versions.modules,xi=!(!process.versions||!process.versions.electron)||!!process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":process.versions&&process.versions.nw?"node-webkit":"node",qi=process.env.npm_config_arch||l.arch(),Di=process.env.npm_config_platform||l.platform(),Ti=process.env.LIBC||(function(e){return"linux"===e&&g.existsSync("/etc/alpine-release")}(Di)?"musl":"glibc"),Ni=process.env.ARM_VERSION||("arm64"===qi?"8":ki.arm_version)||"",Bi=(process.versions.uv||"").split(".")[0],Li=Fi;function Fi(e){return Ci(Fi.resolve(e))}function Gi(e){try{return g.readdirSync(e)}catch(e){return[]}}function Mi(e,t){var n=Gi(e).filter(t);return n[0]&&b.join(e,n[0])}function Ji(e){return/\.node$/.test(e)}function zi(e){var t=e.split("-");if(2===t.length){var n=t[0],r=t[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:e,platform:n,architectures:r}}}function Wi(e,t){return function(n){return null!=n&&(n.platform===e&&n.architectures.includes(t))}}function Vi(e,t){return e.architectures.length-t.architectures.length}function $i(e){var t=e.split("."),n={file:e,specificity:0};if("node"===t.pop()){for(var r=0;r<t.length;r++){var o=t[r];if("node"===o||"electron"===o||"node-webkit"===o)n.runtime=o;else if("napi"===o)n.napi=!0;else if("abi"===o.slice(0,3))n.abi=o.slice(3);else if("uv"===o.slice(0,2))n.uv=o.slice(2);else if("armv"===o.slice(0,4))n.armv=o.slice(4);else{if("glibc"!==o&&"musl"!==o)continue;n.libc=o}n.specificity++}return n}}function Hi(e,t){return function(n){return null!=n&&(!(n.runtime!==e&&!function(e){return"node"===e.runtime&&e.napi}(n))&&(!(n.abi!==t&&!n.napi)&&((!n.uv||n.uv===Bi)&&((!n.armv||n.armv===Ni)&&(!n.libc||n.libc===Ti)))))}}function Yi(e){return function(t,n){return t.runtime!==n.runtime?t.runtime===e?-1:1:t.abi!==n.abi?t.abi?-1:1:t.specificity!==n.specificity?t.specificity>n.specificity?-1:1:0}}Fi.resolve=Fi.path=function(e){e=b.resolve(e||".");try{var t=Ci(b.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[t+"_PREBUILD"]&&(e=process.env[t+"_PREBUILD"])}catch(e){}if(!Ui){var n=Mi(b.join(e,"build/Release"),Ji);if(n)return n;var r=Mi(b.join(e,"build/Debug"),Ji);if(r)return r}var o=a(e);if(o)return o;var i=a(b.dirname(process.execPath));if(i)return i;var s=["platform="+Di,"arch="+qi,"runtime="+xi,"abi="+Oi,"uv="+Bi,Ni?"armv="+Ni:"","libc="+Ti,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","function"==typeof __webpack_require__?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+s+"\n loaded from: "+e+"\n");function a(e){var t=Gi(b.join(e,"prebuilds")).map(zi).filter(Wi(Di,qi)).sort(Vi)[0];if(t){var n=b.join(e,"prebuilds",t.name),r=Gi(n).map($i).filter(Hi(xi,Oi)).sort(Yi(xi))[0];return r?b.join(n,r.file):void 0}}},Fi.parseTags=$i,Fi.matchTags=Hi,Fi.compareTags=Yi,Fi.parseTuple=zi,Fi.matchTuple=Wi,Fi.compareTuples=Vi;var Zi=Cr((function(e){"function"==typeof process.addon?e.exports=process.addon.bind(process):e.exports=Li}));var Ki={mask:(e,t,n,r,o)=>{for(var i=0;i<o;i++)n[r+i]=e[i]^t[3&i]},unmask:(e,t)=>{const n=e.length;for(var r=0;r<n;r++)e[r]^=t[3&r]}},Xi=Cr((function(e){try{e.exports=Zi(__dirname)}catch(t){e.exports=Ki}})),Qi=Cr((function(e){const{EMPTY_BUFFER:t}=Ri,n=Buffer[Symbol.species];function r(e,t,n,r,o){for(let i=0;i<o;i++)n[r+i]=e[i]^t[3&i]}function o(e,t){for(let n=0;n<e.length;n++)e[n]^=t[3&n]}if(e.exports={concat:function(e,r){if(0===e.length)return t;if(1===e.length)return e[0];const o=Buffer.allocUnsafe(r);let i=0;for(let t=0;t<e.length;t++){const n=e[t];o.set(n,i),i+=n.length}return i<r?new n(o.buffer,o.byteOffset,i):o},mask:r,toArrayBuffer:function(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)},toBuffer:function e(t){if(e.readOnly=!0,Buffer.isBuffer(t))return t;let r;return t instanceof ArrayBuffer?r=new n(t):ArrayBuffer.isView(t)?r=new n(t.buffer,t.byteOffset,t.byteLength):(r=Buffer.from(t),e.readOnly=!1),r},unmask:o},!process.env.WS_NO_BUFFER_UTIL)try{const t=Xi;e.exports.mask=function(e,n,o,i,s){s<48?r(e,n,o,i,s):t.mask(e,n,o,i,s)},e.exports.unmask=function(e,n){e.length<32?o(e,n):t.unmask(e,n)}}catch(e){}}));Qi.concat,Qi.mask,Qi.toArrayBuffer,Qi.toBuffer,Qi.unmask;const es=Symbol("kDone"),ts=Symbol("kRun");var ns=class{constructor(e){this[es]=()=>{this.pending--,this[ts]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[ts]()}[ts](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[es])}}};const{kStatusCode:rs}=Ri,os=Buffer[Symbol.species],is=Buffer.from([0,0,255,255]),ss=Symbol("permessage-deflate"),as=Symbol("total-length"),us=Symbol("callback"),cs=Symbol("buffers"),ds=Symbol("error");let ls;var ps=class{constructor(e,t,n){if(this._maxPayload=0|n,this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!ls){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;ls=new ns(e)}}static get extensionName(){return"permessage-deflate"}offer(){const e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const e=this._deflate[us];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){const t=this._options,n=e.find((e=>!(!1===t.serverNoContextTakeover&&e.server_no_context_takeover||e.server_max_window_bits&&(!1===t.serverMaxWindowBits||"number"==typeof t.serverMaxWindowBits&&t.serverMaxWindowBits>e.server_max_window_bits)||"number"==typeof t.clientMaxWindowBits&&!e.client_max_window_bits)));if(!n)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(n.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?n.client_max_window_bits=t.clientMaxWindowBits:!0!==n.client_max_window_bits&&!1!==t.clientMaxWindowBits||delete n.client_max_window_bits,n}acceptAsClient(e){const t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach((e=>{Object.keys(e).forEach((t=>{let n=e[t];if(n.length>1)throw new Error(`Parameter "${t}" must have only a single value`);if(n=n[0],"client_max_window_bits"===t){if(!0!==n){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}else if("server_max_window_bits"===t){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else{if("client_no_context_takeover"!==t&&"server_no_context_takeover"!==t)throw new Error(`Unknown parameter "${t}"`);if(!0!==n)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}e[t]=n}))})),e}decompress(e,t,n){ls.add((r=>{this._decompress(e,t,((e,t)=>{r(),n(e,t)}))}))}compress(e,t,n){ls.add((r=>{this._compress(e,t,((e,t)=>{r(),n(e,t)}))}))}_decompress(e,t,n){const r=this._isServer?"client":"server";if(!this._inflate){const e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?d.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=d.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[ss]=this,this._inflate[as]=0,this._inflate[cs]=[],this._inflate.on("error",vs),this._inflate.on("data",hs)}this._inflate[us]=n,this._inflate.write(e),t&&this._inflate.write(is),this._inflate.flush((()=>{const e=this._inflate[ds];if(e)return this._inflate.close(),this._inflate=null,void n(e);const o=Qi.concat(this._inflate[cs],this._inflate[as]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[as]=0,this._inflate[cs]=[],t&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,o)}))}_compress(e,t,n){const r=this._isServer?"server":"client";if(!this._deflate){const e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?d.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=d.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[as]=0,this._deflate[cs]=[],this._deflate.on("data",fs)}this._deflate[us]=n,this._deflate.write(e),this._deflate.flush(d.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let e=Qi.concat(this._deflate[cs],this._deflate[as]);t&&(e=new os(e.buffer,e.byteOffset,e.length-4)),this._deflate[us]=null,this._deflate[as]=0,this._deflate[cs]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,e)}))}};function fs(e){this[cs].push(e),this[as]+=e.length}function hs(e){this[as]+=e.length,this[ss]._maxPayload<1||this[as]<=this[ss]._maxPayload?this[cs].push(e):(this[ds]=new RangeError("Max payload size exceeded"),this[ds].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[ds][rs]=1009,this.removeListener("data",hs),this.reset())}function vs(e){this[ss]._inflate=null,e[rs]=1007,this[us](e)}var ms=function(e){const t=e.length;let n=0;for(;n<t;)if(0==(128&e[n]))n++;else if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}return!0},gs=Cr((function(e){try{e.exports=Zi(__dirname)}catch(t){e.exports=ms}})),bs=Cr((function(e){const{isUtf8:t}=y;function n(e){const t=e.length;let n=0;for(;n<t;)if(0==(128&e[n]))n++;else if(192==(224&e[n])){if(n+1===t||128!=(192&e[n+1])||192==(254&e[n]))return!1;n+=2}else if(224==(240&e[n])){if(n+2>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||224===e[n]&&128==(224&e[n+1])||237===e[n]&&160==(224&e[n+1]))return!1;n+=3}else{if(240!=(248&e[n]))return!1;if(n+3>=t||128!=(192&e[n+1])||128!=(192&e[n+2])||128!=(192&e[n+3])||240===e[n]&&128==(240&e[n+1])||244===e[n]&&e[n+1]>143||e[n]>244)return!1;n+=4}return!0}if(e.exports={isValidStatusCode:function(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},isValidUTF8:n,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},t)e.exports.isValidUTF8=function(e){return e.length<24?n(e):t(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{const t=gs;e.exports.isValidUTF8=function(e){return e.length<32?n(e):t(e)}}catch(e){}}));bs.isValidStatusCode,bs.isValidUTF8,bs.tokenChars;const{Writable:ys}=r,{BINARY_TYPES:ws,EMPTY_BUFFER:js,kStatusCode:Is,kWebSocket:Es}=Ri,{concat:_s,toArrayBuffer:Ss,unmask:Ps}=Qi,{isValidStatusCode:As,isValidUTF8:Rs}=bs,Cs=Buffer[Symbol.species];var ks=class extends ys{constructor(e={}){super(),this._binaryType=e.binaryType||ws[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Es]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=0,this._loop=!1}_write(e,t,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(n)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){const t=this._buffers[0];return this._buffers[0]=new Cs(t.buffer,t.byteOffset+e,t.length-e),new Cs(t.buffer,t.byteOffset,e)}const t=Buffer.allocUnsafe(e);do{const n=this._buffers[0],r=t.length-e;e>=n.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(n.buffer,n.byteOffset,e),r),this._buffers[0]=new Cs(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){let t;this._loop=!0;do{switch(this._state){case 0:t=this.getInfo();break;case 1:t=this.getPayloadLength16();break;case 2:t=this.getPayloadLength64();break;case 3:this.getMask();break;case 4:t=this.getData(e);break;default:return void(this._loop=!1)}}while(this._loop);e(t)}getInfo(){if(this._bufferedBytes<2)return void(this._loop=!1);const e=this.consume(2);if(0!=(48&e[0]))return this._loop=!1,Us(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");const t=64==(64&e[0]);if(t&&!this._extensions[ps.extensionName])return this._loop=!1,Us(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=128==(128&e[0]),this._opcode=15&e[0],this._payloadLength=127&e[1],0===this._opcode){if(t)return this._loop=!1,Us(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,Us(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return this._loop=!1,Us(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=t}else{if(!(this._opcode>7&&this._opcode<11))return this._loop=!1,Us(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin)return this._loop=!1,Us(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(t)return this._loop=!1,Us(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength)return this._loop=!1,Us(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=128==(128&e[1]),this._isServer){if(!this._masked)return this._loop=!1,Us(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,Us(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(126===this._payloadLength)this._state=1;else{if(127!==this._payloadLength)return this.haveLength();this._state=2}}getPayloadLength16(){if(!(this._bufferedBytes<2))return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength();this._loop=!1}getPayloadLength64(){if(this._bufferedBytes<8)return void(this._loop=!1);const e=this.consume(8),t=e.readUInt32BE(0);return t>Math.pow(2,21)-1?(this._loop=!1,Us(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=t*Math.pow(2,32)+e.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,Us(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(e){let t=js;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);t=this.consume(this._payloadLength),this._masked&&0!=(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])&&Ps(t,this._mask)}return this._opcode>7?this.controlMessage(t):this._compressed?(this._state=5,void this.decompress(t,e)):(t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage())}decompress(e,t){this._extensions[ps.extensionName].decompress(e,this._fin,((e,n)=>{if(e)return t(e);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return t(Us(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(n)}const r=this.dataMessage();if(r)return t(r);this.startLoop(t)}))}dataMessage(){if(this._fin){const e=this._messageLength,t=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let n;n="nodebuffer"===this._binaryType?_s(t,e):"arraybuffer"===this._binaryType?Ss(_s(t,e)):t,this.emit("message",n,!0)}else{const n=_s(t,e);if(!this._skipUTF8Validation&&!Rs(n))return this._loop=!1,Us(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",n,!1)}}this._state=0}controlMessage(e){if(8===this._opcode)if(this._loop=!1,0===e.length)this.emit("conclude",1005,js),this.end();else{const t=e.readUInt16BE(0);if(!As(t))return Us(RangeError,`invalid status code ${t}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");const n=new Cs(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Rs(n))return Us(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",t,n),this.end()}else 9===this._opcode?this.emit("ping",e):this.emit("pong",e);this._state=0}};function Us(e,t,n,r,o){const i=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(i,Us),i.code=o,i[Is]=r,i}const{randomFillSync:Os}=j,{EMPTY_BUFFER:xs}=Ri,{isValidStatusCode:qs}=bs,{mask:Ds,toBuffer:Ts}=Qi,Ns=Symbol("kByteLength"),Bs=Buffer.alloc(4);class Ls{constructor(e,t,n){this._extensions=t||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(e,t){let n,r,o=!1,i=2,s=!1;t.mask&&(n=t.maskBuffer||Bs,t.generateMask?t.generateMask(n):Os(n,0,4),s=0==(n[0]|n[1]|n[2]|n[3]),i=6),"string"==typeof e?r=t.mask&&!s||void 0===t[Ns]?(e=Buffer.from(e)).length:t[Ns]:(r=e.length,o=t.mask&&t.readOnly&&!s);let a=r;r>=65536?(i+=8,a=127):r>125&&(i+=2,a=126);const u=Buffer.allocUnsafe(o?r+i:i);return u[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(u[0]|=64),u[1]=a,126===a?u.writeUInt16BE(r,2):127===a&&(u[2]=u[3]=0,u.writeUIntBE(r,4,6)),t.mask?(u[1]|=128,u[i-4]=n[0],u[i-3]=n[1],u[i-2]=n[2],u[i-1]=n[3],s?[u,e]:o?(Ds(e,n,u,i,r),[u]):(Ds(e,n,e,0,r),[u,e])):[u,e]}close(e,t,n,r){let o;if(void 0===e)o=xs;else{if("number"!=typeof e||!qs(e))throw new TypeError("First argument must be a valid error code number");if(void 0!==t&&t.length){const n=Buffer.byteLength(t);if(n>123)throw new RangeError("The message must not be greater than 123 bytes");o=Buffer.allocUnsafe(2+n),o.writeUInt16BE(e,0),"string"==typeof t?o.write(t,2):o.set(t,2)}else o=Buffer.allocUnsafe(2),o.writeUInt16BE(e,0)}const i={[Ns]:o.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,o,!1,i,r]):this.sendFrame(Ls.frame(o,i),r)}ping(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):(r=(e=Ts(e)).length,o=Ts.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[Ns]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,i,n]):this.sendFrame(Ls.frame(e,i),n)}pong(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):(r=(e=Ts(e)).length,o=Ts.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[Ns]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,e,!1,i,n]):this.sendFrame(Ls.frame(e,i),n)}send(e,t,n){const r=this._extensions[ps.extensionName];let o,i,s=t.binary?2:1,a=t.compress;if("string"==typeof e?(o=Buffer.byteLength(e),i=!1):(o=(e=Ts(e)).length,i=Ts.readOnly),this._firstFragment?(this._firstFragment=!1,a&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=o>=r._threshold),this._compress=a):(a=!1,s=0),t.fin&&(this._firstFragment=!0),r){const r={[Ns]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:i,rsv1:a};this._deflating?this.enqueue([this.dispatch,e,this._compress,r,n]):this.dispatch(e,this._compress,r,n)}else this.sendFrame(Ls.frame(e,{[Ns]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:i,rsv1:!1}),n)}dispatch(e,t,n,r){if(!t)return void this.sendFrame(Ls.frame(e,n),r);const o=this._extensions[ps.extensionName];this._bufferedBytes+=n[Ns],this._deflating=!0,o.compress(e,n.fin,((e,t)=>{if(this._socket.destroyed){const e=new Error("The socket was closed while data was being compressed");"function"==typeof r&&r(e);for(let t=0;t<this._queue.length;t++){const n=this._queue[t],r=n[n.length-1];"function"==typeof r&&r(e)}}else this._bufferedBytes-=n[Ns],this._deflating=!1,n.readOnly=!1,this.sendFrame(Ls.frame(t,n),r),this.dequeue()}))}dequeue(){for(;!this._deflating&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[3][Ns],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][Ns],this._queue.push(e)}sendFrame(e,t){2===e.length?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}}var Fs=Ls;const{kForOnEventAttribute:Gs,kListener:Ms}=Ri,Js=Symbol("kCode"),zs=Symbol("kData"),Ws=Symbol("kError"),Vs=Symbol("kMessage"),$s=Symbol("kReason"),Hs=Symbol("kTarget"),Ys=Symbol("kType"),Zs=Symbol("kWasClean");class Ks{constructor(e){this[Hs]=null,this[Ys]=e}get target(){return this[Hs]}get type(){return this[Ys]}}Object.defineProperty(Ks.prototype,"target",{enumerable:!0}),Object.defineProperty(Ks.prototype,"type",{enumerable:!0});class Xs extends Ks{constructor(e,t={}){super(e),this[Js]=void 0===t.code?0:t.code,this[$s]=void 0===t.reason?"":t.reason,this[Zs]=void 0!==t.wasClean&&t.wasClean}get code(){return this[Js]}get reason(){return this[$s]}get wasClean(){return this[Zs]}}Object.defineProperty(Xs.prototype,"code",{enumerable:!0}),Object.defineProperty(Xs.prototype,"reason",{enumerable:!0}),Object.defineProperty(Xs.prototype,"wasClean",{enumerable:!0});class Qs extends Ks{constructor(e,t={}){super(e),this[Ws]=void 0===t.error?null:t.error,this[Vs]=void 0===t.message?"":t.message}get error(){return this[Ws]}get message(){return this[Vs]}}Object.defineProperty(Qs.prototype,"error",{enumerable:!0}),Object.defineProperty(Qs.prototype,"message",{enumerable:!0});class ea extends Ks{constructor(e,t={}){super(e),this[zs]=void 0===t.data?null:t.data}get data(){return this[zs]}}Object.defineProperty(ea.prototype,"data",{enumerable:!0});const ta={addEventListener(e,t,n={}){for(const r of this.listeners(e))if(!n[Gs]&&r[Ms]===t&&!r[Gs])return;let r;if("message"===e)r=function(e,n){const r=new ea("message",{data:n?e:e.toString()});r[Hs]=this,ra(t,this,r)};else if("close"===e)r=function(e,n){const r=new Xs("close",{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[Hs]=this,ra(t,this,r)};else if("error"===e)r=function(e){const n=new Qs("error",{error:e,message:e.message});n[Hs]=this,ra(t,this,n)};else{if("open"!==e)return;r=function(){const e=new Ks("open");e[Hs]=this,ra(t,this,e)}}r[Gs]=!!n[Gs],r[Ms]=t,n.once?this.once(e,r):this.on(e,r)},removeEventListener(e,t){for(const n of this.listeners(e))if(n[Ms]===t&&!n[Gs]){this.removeListener(e,n);break}}};var na={CloseEvent:Xs,ErrorEvent:Qs,Event:Ks,EventTarget:ta,MessageEvent:ea};function ra(e,t,n){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}const{tokenChars:oa}=bs;function ia(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var sa={format:function(e){return Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>[t].concat(Object.keys(e).map((t=>{let n=e[t];return Array.isArray(n)||(n=[n]),n.map((e=>!0===e?t:`${t}=${e}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(e){const t=Object.create(null);let n,r,o=Object.create(null),i=!1,s=!1,a=!1,u=-1,c=-1,d=-1,l=0;for(;l<e.length;l++)if(c=e.charCodeAt(l),void 0===n)if(-1===d&&1===oa[c])-1===u&&(u=l);else if(0===l||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);const r=e.slice(u,d);44===c?(ia(t,r,o),o=Object.create(null)):n=r,u=d=-1}}else-1===d&&-1!==u&&(d=l);else if(void 0===r)if(-1===d&&1===oa[c])-1===u&&(u=l);else if(32===c||9===c)-1===d&&-1!==u&&(d=l);else if(59===c||44===c){if(-1===u)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l),ia(o,e.slice(u,d),!0),44===c&&(ia(t,n,o),o=Object.create(null),n=void 0),u=d=-1}else{if(61!==c||-1===u||-1!==d)throw new SyntaxError(`Unexpected character at index ${l}`);r=e.slice(u,l),u=d=-1}else if(s){if(1!==oa[c])throw new SyntaxError(`Unexpected character at index ${l}`);-1===u?u=l:i||(i=!0),s=!1}else if(a)if(1===oa[c])-1===u&&(u=l);else if(34===c&&-1!==u)a=!1,d=l;else{if(92!==c)throw new SyntaxError(`Unexpected character at index ${l}`);s=!0}else if(34===c&&61===e.charCodeAt(l-1))a=!0;else if(-1===d&&1===oa[c])-1===u&&(u=l);else if(-1===u||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);let s=e.slice(u,d);i&&(s=s.replace(/\\/g,""),i=!1),ia(o,r,s),44===c&&(ia(t,n,o),o=Object.create(null),n=void 0),r=void 0,u=d=-1}}else-1===d&&(d=l);if(-1===u||a||32===c||9===c)throw new SyntaxError("Unexpected end of input");-1===d&&(d=l);const p=e.slice(u,d);return void 0===n?ia(t,p,o):(void 0===r?ia(o,p,!0):ia(o,r,i?p.replace(/\\/g,""):p),ia(t,n,o)),t}};const{randomBytes:aa,createHash:ua}=j,{URL:ca}=s,{BINARY_TYPES:da,EMPTY_BUFFER:la,GUID:pa,kForOnEventAttribute:fa,kListener:ha,kStatusCode:va,kWebSocket:ma,NOOP:ga}=Ri,{EventTarget:{addEventListener:ba,removeEventListener:ya}}=na,{format:wa,parse:ja}=sa,{toBuffer:Ia}=Qi,Ea=Symbol("kAborted"),_a=[8,13],Sa=["CONNECTING","OPEN","CLOSING","CLOSED"],Pa=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class Aa extends e{constructor(e,t,n){super(),this._binaryType=da[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=la,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Aa.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==e?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===t?t=[]:Array.isArray(t)||("object"==typeof t&&null!==t?(n=t,t=[]):t=[t]),Ca(this,e,t,n)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(e){da.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,n){const r=new ks({binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new Fs(e,this._extensions,n.generateMask),this._receiver=r,this._socket=e,r[ma]=this,e[ma]=this,r.on("conclude",Da),r.on("drain",Ta),r.on("error",Na),r.on("message",La),r.on("ping",Fa),r.on("pong",Ga),e.setTimeout(0),e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",Ja),e.on("data",za),e.on("end",Wa),e.on("error",Va),this._readyState=Aa.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=Aa.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[ps.extensionName]&&this._extensions[ps.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Aa.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==Aa.CLOSED)if(this.readyState!==Aa.CONNECTING)this.readyState!==Aa.CLOSING?(this._readyState=Aa.CLOSING,this._sender.close(e,t,!this._isServer,(e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),3e4)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();else{const e="WebSocket was closed before the connection was established";xa(this,this._req,e)}}pause(){this.readyState!==Aa.CONNECTING&&this.readyState!==Aa.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===Aa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof e?(n=e,e=t=void 0):"function"==typeof t&&(n=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState===Aa.OPEN?(void 0===t&&(t=!this._isServer),this._sender.ping(e||la,t,n)):qa(this,e,n)}pong(e,t,n){if(this.readyState===Aa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof e?(n=e,e=t=void 0):"function"==typeof t&&(n=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState===Aa.OPEN?(void 0===t&&(t=!this._isServer),this._sender.pong(e||la,t,n)):qa(this,e,n)}resume(){this.readyState!==Aa.CONNECTING&&this.readyState!==Aa.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===Aa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof t&&(n=t,t={}),"number"==typeof e&&(e=e.toString()),this.readyState!==Aa.OPEN)return void qa(this,e,n);const r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[ps.extensionName]||(r.compress=!1),this._sender.send(e||la,r,n)}terminate(){if(this.readyState!==Aa.CLOSED)if(this.readyState!==Aa.CONNECTING)this._socket&&(this._readyState=Aa.CLOSING,this._socket.destroy());else{const e="WebSocket was closed before the connection was established";xa(this,this._req,e)}}}Object.defineProperty(Aa,"CONNECTING",{enumerable:!0,value:Sa.indexOf("CONNECTING")}),Object.defineProperty(Aa.prototype,"CONNECTING",{enumerable:!0,value:Sa.indexOf("CONNECTING")}),Object.defineProperty(Aa,"OPEN",{enumerable:!0,value:Sa.indexOf("OPEN")}),Object.defineProperty(Aa.prototype,"OPEN",{enumerable:!0,value:Sa.indexOf("OPEN")}),Object.defineProperty(Aa,"CLOSING",{enumerable:!0,value:Sa.indexOf("CLOSING")}),Object.defineProperty(Aa.prototype,"CLOSING",{enumerable:!0,value:Sa.indexOf("CLOSING")}),Object.defineProperty(Aa,"CLOSED",{enumerable:!0,value:Sa.indexOf("CLOSED")}),Object.defineProperty(Aa.prototype,"CLOSED",{enumerable:!0,value:Sa.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((e=>{Object.defineProperty(Aa.prototype,e,{enumerable:!0})})),["open","error","close","message"].forEach((e=>{Object.defineProperty(Aa.prototype,`on${e}`,{enumerable:!0,get(){for(const t of this.listeners(e))if(t[fa])return t[ha];return null},set(t){for(const t of this.listeners(e))if(t[fa]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[fa]:!0})}})})),Aa.prototype.addEventListener=ba,Aa.prototype.removeEventListener=ya;var Ra=Aa;function Ca(e,t,n,r){const o={protocolVersion:_a[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(!_a.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${_a.join(", ")})`);let s;if(t instanceof ca)s=t,e._url=t.href;else{try{s=new ca(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}e._url=t}const a="wss:"===s.protocol,u="ws+unix:"===s.protocol;let d;if("ws:"===s.protocol||a||u?u&&!s.pathname?d="The URL's pathname is empty":s.hash&&(d="The URL contains a fragment identifier"):d='The URL\'s protocol must be one of "ws:", "wss:", or "ws+unix:"',d){const t=new SyntaxError(d);if(0===e._redirects)throw t;return void ka(e,t)}const l=a?443:80,p=aa(16).toString("base64"),f=a?c.request:i.request,h=new Set;let v,m;if(o.createConnection=a?Oa:Ua,o.defaultPort=o.defaultPort||l,o.port=s.port||l,o.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":p,Connection:"Upgrade",Upgrade:"websocket"},o.path=s.pathname+s.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(v=new ps(!0!==o.perMessageDeflate?o.perMessageDeflate:{},!1,o.maxPayload),o.headers["Sec-WebSocket-Extensions"]=wa({[ps.extensionName]:v.offer()})),n.length){for(const e of n){if("string"!=typeof e||!Pa.test(e)||h.has(e))throw new SyntaxError("An invalid or duplicated subprotocol was specified");h.add(e)}o.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(o.origin&&(o.protocolVersion<13?o.headers["Sec-WebSocket-Origin"]=o.origin:o.headers.Origin=o.origin),(s.username||s.password)&&(o.auth=`${s.username}:${s.password}`),u){const e=o.path.split(":");o.socketPath=e[0],o.path=e[1]}if(o.followRedirects){if(0===e._redirects){e._originalIpc=u,e._originalSecure=a,e._originalHostOrSocketPath=u?o.socketPath:s.host;const t=r&&r.headers;if(r={...r,headers:{}},t)for(const[e,n]of Object.entries(t))r.headers[e.toLowerCase()]=n}else if(0===e.listenerCount("redirect")){const t=u?!!e._originalIpc&&o.socketPath===e._originalHostOrSocketPath:!e._originalIpc&&s.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!a)&&(delete o.headers.authorization,delete o.headers.cookie,t||delete o.headers.host,o.auth=void 0)}o.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(o.auth).toString("base64")),m=e._req=f(o),e._redirects&&e.emit("redirect",e.url,m)}else m=e._req=f(o);o.timeout&&m.on("timeout",(()=>{xa(e,m,"Opening handshake has timed out")})),m.on("error",(t=>{null===m||m[Ea]||(m=e._req=null,ka(e,t))})),m.on("response",(i=>{const s=i.headers.location,a=i.statusCode;if(s&&o.followRedirects&&a>=300&&a<400){if(++e._redirects>o.maxRedirects)return void xa(e,m,"Maximum redirects exceeded");let i;m.abort();try{i=new ca(s,t)}catch(t){const n=new SyntaxError(`Invalid URL: ${s}`);return void ka(e,n)}Ca(e,i,n,r)}else e.emit("unexpected-response",m,i)||xa(e,m,`Unexpected server response: ${i.statusCode}`)})),m.on("upgrade",((t,n,r)=>{if(e.emit("upgrade",t),e.readyState!==Aa.CONNECTING)return;if(m=e._req=null,"websocket"!==t.headers.upgrade.toLowerCase())return void xa(e,n,"Invalid Upgrade header");const i=ua("sha1").update(p+pa).digest("base64");if(t.headers["sec-websocket-accept"]!==i)return void xa(e,n,"Invalid Sec-WebSocket-Accept header");const s=t.headers["sec-websocket-protocol"];let a;if(void 0!==s?h.size?h.has(s)||(a="Server sent an invalid subprotocol"):a="Server sent a subprotocol but none was requested":h.size&&(a="Server sent no subprotocol"),a)return void xa(e,n,a);s&&(e._protocol=s);const u=t.headers["sec-websocket-extensions"];if(void 0!==u){if(!v){return void xa(e,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let t;try{t=ja(u)}catch(t){return void xa(e,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(t);if(1!==r.length||r[0]!==ps.extensionName){return void xa(e,n,"Server indicated an extension that was not requested")}try{v.accept(t[ps.extensionName])}catch(t){return void xa(e,n,"Invalid Sec-WebSocket-Extensions header")}e._extensions[ps.extensionName]=v}e.setSocket(n,r,{generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})})),o.finishRequest?o.finishRequest(m,e):m.end()}function ka(e,t){e._readyState=Aa.CLOSING,e.emit("error",t),e.emitClose()}function Ua(e){return e.path=e.socketPath,f.connect(e)}function Oa(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=f.isIP(e.host)?"":e.host),w.connect(e)}function xa(e,t,n){e._readyState=Aa.CLOSING;const r=new Error(n);Error.captureStackTrace(r,xa),t.setHeader?(t[Ea]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(ka,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function qa(e,t,n){if(t){const n=Ia(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){const t=new Error(`WebSocket is not open: readyState ${e.readyState} (${Sa[e.readyState]})`);process.nextTick(n,t)}}function Da(e,t){const n=this[ma];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,void 0!==n._socket[ma]&&(n._socket.removeListener("data",za),process.nextTick(Ma,n._socket),1005===e?n.close():n.close(e,t))}function Ta(){const e=this[ma];e.isPaused||e._socket.resume()}function Na(e){const t=this[ma];void 0!==t._socket[ma]&&(t._socket.removeListener("data",za),process.nextTick(Ma,t._socket),t.close(e[va])),t.emit("error",e)}function Ba(){this[ma].emitClose()}function La(e,t){this[ma].emit("message",e,t)}function Fa(e){const t=this[ma];t.pong(e,!t._isServer,ga),t.emit("ping",e)}function Ga(e){this[ma].emit("pong",e)}function Ma(e){e.resume()}function Ja(){const e=this[ma];let t;this.removeListener("close",Ja),this.removeListener("data",za),this.removeListener("end",Wa),e._readyState=Aa.CLOSING,this._readableState.endEmitted||e._closeFrameReceived||e._receiver._writableState.errorEmitted||null===(t=e._socket.read())||e._receiver.write(t),e._receiver.end(),this[ma]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",Ba),e._receiver.on("finish",Ba))}function za(e){this[ma]._receiver.write(e)||this.pause()}function Wa(){const e=this[ma];e._readyState=Aa.CLOSING,e._receiver.end(),this.end()}function Va(){const e=this[ma];this.removeListener("error",Va),this.on("error",ga),e&&(e._readyState=Aa.CLOSING,this.destroy())}var $a=function(e){function t(t,n,r,o,i){void 0===i&&(i=5e3);var s=e.call(this)||this;s.endpoint=t,s.headers=n,s.rewriteHostHeader=r,s.bindToAssign=o,s.closeTimeout=i,s.protocol="TCP",s.openConnections=new Set,s.tcpServer=p.createServer(s.handleConnection.bind(s));var a=null==r?void 0:r.altHostnames.map((function(e){return(t=xt(t=e))&&jr.test(t)?t.replace(wr,"\\$&"):t;var t})).join("|");return s.hostRegex=new RegExp("Host: (?:".concat(a,")(:.*$|$)"),"im"),s}return _(t,e),Object.defineProperty(t.prototype,"bindTo",{get:function(){var e;return null!==(e=this.boundTo)&&void 0!==e?e:this.bindToAssign},enumerable:!1,configurable:!0}),t.prototype.open=function(){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(t){return[2,new Promise((function(t){if(e.bindToAssign){var n=e.bindToAssign,r=n.port,o=n.address;e.tcpServer.listen(r,o,(function(){e.emit("tunnel-open",{address:o,port:r}),t({address:o,port:r})}))}else e.tcpServer.listen(0,(function(){var n=e.tcpServer.address(),r=n.address,o=n.port,i="0.0.0.0"===r||"::"===r?"127.0.0.1":r;e.boundTo={address:i,port:o},e.emit("tunnel-open",e.boundTo),t(e.boundTo)}))}))]}))}))},t.prototype.close=function(){return P(this,void 0,void 0,(function(){var e,t=this;return A(this,(function(n){switch(n.label){case 0:return e=!1,[4,Promise.race([new Promise((function(n){t.tcpServer.close((function(){e=!0,t.emit("tunnel-close"),n()}))})),new Promise((function(n){new Promise((function(e){return setTimeout(e,t.closeTimeout)})).then((function(){e||(t.openConnections.forEach((function(e){e.destroy(),t.openConnections.delete(e)})),n())}))}))])];case 1:return n.sent(),[2]}}))}))},t.prototype.handleConnection=function(e){var t=this;this.openConnections.add(e);var n=new Ra(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Ai(n),o=this.getHeaderTransform();this.rewriteHostHeader&&o?Ii(e,o,r):Ii(e,r),Ii(r,e),n.on("close",(function(e,n,r){t.emit("connection-close",e,n,r)})),r.on("error",(function(e){t.emit("connection-error",e)})),e.on("error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},t.prototype.getHeaderTransform=function(){if(this.rewriteHostHeader){var e=this.rewriteHostHeader.targetHostname,t=this.hostRegex;return new o({transform:function(n,r,o){var i=n.toString();if(i.split("\n",1)[0].includes("HTTP")){var s=i.replace(t,"Host: ".concat(e));o(null,Buffer.from(s))}else o(null,n)}})}},t}(t),Ha=function(e){function t(t,n,r){var o=e.call(this)||this;return o.endpoint=t,o.headers=n,o.bindToAssign=r,o.protocol="UDP",o.udpSocket=I.createSocket("udp4"),o.handleConnection(),o}return _(t,e),Object.defineProperty(t.prototype,"bindTo",{get:function(){var e;return null!==(e=this.boundTo)&&void 0!==e?e:this.bindToAssign},enumerable:!1,configurable:!0}),t.prototype.open=function(){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(t){return[2,new Promise((function(t){if(e.bindToAssign){var n=e.bindToAssign,r=n.port,o=n.address;e.udpSocket.bind(r,o,(function(){e.emit("tunnel-open",{address:o,port:r}),t({address:o,port:r})}))}else e.udpSocket.bind(0,(function(){var n=e.udpSocket.address(),r=n.address,o=n.port,i="0.0.0.0"===r||"::"===r?"127.0.0.1":r;e.boundTo={address:i,port:o},e.emit("tunnel-open",e.boundTo),t(e.boundTo)}))}))]}))}))},t.prototype.close=function(){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(t){switch(t.label){case 0:return[4,new Promise((function(t){e.udpSocket.close((function(){e.emit("tunnel-close"),t()}))}))];case 1:return t.sent(),[2]}}))}))},t.prototype.handleConnection=function(){var e,t=this,n=new Ra(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Ai(n);this.udpSocket.on("message",(function(t,n){e=n,r.write(t)})),r.on("data",(function(n){e&&t.udpSocket.send(n,e.port,e.address,(function(e){e&&t.emit("connection-error",e)}))})),this.udpSocket.on("error",(function(e){t.emit("connection-error",e)})),r.on("error",(function(e){t.emit("connection-error",e)})),n.on("connection-close",(function(e,n,r){t.emit("connection-close",e,n,r)})),n.on("connection-error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},t}(t);var Ya,Za="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,Ka=function(e,t){return P(void 0,void 0,void 0,(function(){var n;return A(this,(function(r){return n=Promise.resolve([]),[2,e.reduce((function(e,n){return e.then((function(e){return t(n).then((function(t){return e.push(t),e}))}))}),n)]}))}))},Xa=function(e){function t(t){void 0===t&&(t=8192);var n=e.call(this)||this;return n.bufferDefaultSize=t,n._size=0,n.buffer=Buffer.alloc(n.bufferDefaultSize),n}return _(t,e),Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.getContentsAsString=function(e,t){void 0===e&&(e="utf8");var n=this.buffer.toString(e,0,Math.min(t||this.size,this.size)),r=Buffer.byteLength(n);return r<this.size&&this.buffer.copy(this.buffer,0,r),this._size-=r,n},t.prototype.adaptBuffer=function(e){if(this.buffer.length-this.size<e){var t=Math.ceil((e-(this.buffer.length-this.size))/this.bufferDefaultSize),n=Buffer.alloc(this.buffer.length+this.bufferDefaultSize*t);this.buffer.copy(n,0,0,this.size),this.buffer=n}},t.prototype._write=function(e,t,n){this.adaptBuffer(e.length),e.copy(this.buffer,this.size,0),this._size+=e.length,n()},t}(r.Writable),Qa=function(e){function t(t,n,r){var o=e.call(this)||this;return o.contextProvider=t,o.listServices=n,o.listAddons=r,o.connections=[],o.hostsFileMutex=new ai,o.ipAllocationMutex=new ai,o.stopForwarding=function(e){return P(o,void 0,void 0,(function(){var t,n,r,o,i,s,a;return A(this,(function(u){switch(u.label){case 0:return[4,e.tunnel.close()];case 1:return u.sent(),t=e.forwardingContext,n=t.projectId,r=t.type,o=t.id,i=t.hostnames,s=t.ipOnly,i.length>0&&!s?[4,this.unregisterHostnames(null===(a=e.tunnel.bindTo)||void 0===a?void 0:a.address,i)]:[3,3];case 2:u.sent(),u.label=3;case 3:return this.connections.splice(this.connections.findIndex((function(e){var t=e.forwardingContext,i=t.type,s=t.id,a=t.projectId;return s===o&&a===n&&i===r})),1),[2]}}))}))},o.canExecuteWithHostnames=function(){return"win32"!==process.platform?process.getuid&&0!==process.getuid()?{error:!0,message:"You are not running this command with sufficient privileges (uid=".concat(null===(e=null===process||void 0===process?void 0:process.getuid)||void 0===e?void 0:e.call(process),"). Try running with 'sudo -E'.")}:{error:!1,type:"unix-admin"}:function(){try{return m("fsutil dirty query %systemdrive%"),!0}catch(e){if("ENOENT"===e.code)try{return m("fltmc"),!0}catch(e){return!1}return!1}}()?{error:!1,type:"windows-admin"}:{error:!0,message:"You are not running this command as administrator. Please start command line with admin rights."};var e},o.assertStartedWithNodejs=function(){if(!Za)throw new Error("Port forwarding only possible when started with nodejs")},o.proxyApiClient=new Fo(t),o}return _(t,e),t.prototype.withProjectForwarding=function(e,t,n){return void 0===n&&(n=!0),P(this,void 0,void 0,(function(){var r;return A(this,(function(o){switch(o.label){case 0:return[4,this.forwardProject(e,n)];case 1:r=o.sent(),o.label=2;case 2:return o.trys.push([2,,4,6]),[4,t(r)];case 3:return[2,o.sent()];case 4:return[4,this.stopProjectForwarding(e)];case 5:return o.sent(),[7];case 6:return[2]}}))}))},t.prototype.forwardProject=function(e,t){return void 0===t&&(t=!0),P(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return A(this,(function(u){switch(u.label){case 0:return this.assertStartedWithNodejs(),n=e.projectId,[4,this.listServices({parameters:{projectId:n}})];case 1:return r=u.sent(),[4,this.listAddons({parameters:{projectId:n}})];case 2:return o=u.sent(),[4,Promise.all(r.data.services.map((function(e){return P(a,void 0,void 0,(function(){return A(this,(function(r){return[2,this.forwardService({projectId:n,serviceId:e.id},t)]}))}))})))];case 3:return i=u.sent(),[4,Promise.all(o.data.addons.map((function(e){return P(a,void 0,void 0,(function(){return A(this,(function(r){switch(r.label){case 0:return[4,this.forwardAddon({projectId:n,addonId:e.id},t)];case 1:return[2,r.sent()]}}))}))})))];case 4:return s=u.sent(),[2,{services:i,addons:s}]}}))}))},t.prototype.withServiceForwarding=function(e,t,n){return void 0===n&&(n=!0),P(this,void 0,void 0,(function(){var r;return A(this,(function(o){switch(o.label){case 0:return[4,this.forwardService(e,n)];case 1:r=o.sent(),o.label=2;case 2:return o.trys.push([2,,4,6]),[4,t(r)];case 3:return[2,o.sent()];case 4:return[4,this.stopServiceForwarding(e)];case 5:return o.sent(),[7];case 6:return[2]}}))}))},t.prototype.forwardService=function(e,t){return void 0===t&&(t=!0),P(this,void 0,void 0,(function(){var n,r,o,i,s,a,u,c=this;return A(this,(function(d){switch(d.label){case 0:return this.assertStartedWithNodejs(),n=e.projectId,r=e.serviceId,[4,this.proxyApiClient.getServiceDetails(n,r)];case 1:return o=d.sent(),i=o.namespace,s=o.targetDomain,a=o.instances,u=o.ports,0===a.length?[2,[]]:[4,Ka(u,(function(e){var o,u="https://".concat(s,"/tunnel/projects/").concat(n,"/services/").concat(r,"/instance/").concat(a[0].podName,"/port/").concat(e.internalPort),d="".concat(r,".").concat(i,".svc.cluster.local"),l=["".concat(r)];e.name&&l.push("".concat(e.name,".").concat(r)),"HTTP"===e.protocol&&(o={altHostnames:l,targetHostname:d});var p=R([d],l,!0);return c.forwardPort(u,e,p,"service",r,n,t,o)}))];case 2:return[2,d.sent()]}}))}))},t.prototype.withAddonForwarding=function(e,t,n){return void 0===n&&(n=!0),P(this,void 0,void 0,(function(){var r;return A(this,(function(o){switch(o.label){case 0:return[4,this.forwardAddon(e,n)];case 1:r=o.sent(),o.label=2;case 2:return o.trys.push([2,,4,6]),[4,t(r)];case 3:return[2,o.sent()];case 4:return[4,this.stopAddonForwarding(e)];case 5:return o.sent(),[7];case 6:return[2]}}))}))},t.prototype.forwardAddon=function(e,t){return void 0===t&&(t=!0),P(this,void 0,void 0,(function(){var n,r,o,i,s=this;return A(this,(function(a){switch(a.label){case 0:return this.assertStartedWithNodejs(),n=e.addonId,r=e.projectId,[4,this.proxyApiClient.getAddonDetails(r,n)];case 1:return o=a.sent(),i=o.instances.map((function(e){var t=e.podName,n=e.internalHostname;return e.ports.map((function(e){return{podName:t,internalHostname:n,port:e}}))})),[4,Ka((u=i,null!=u&&u.length?Gt(u,1/0):[]),(function(e){var i=e.podName,a=e.internalHostname,u=e.port;return P(s,void 0,void 0,(function(){var e;return A(this,(function(s){return e="https://".concat(o.targetDomain,"/tunnel/projects/").concat(r,"/addons/").concat(n,"/instance/").concat(i,"/port/").concat(u.internalPort),[2,this.forwardPort(e,u,[a],"addon",n,r,t)]}))}))}))];case 2:return[2,a.sent()]}var u}))}))},t.prototype.allocateIpAddress=function(e){return P(this,void 0,void 0,(function(){var t=this;return A(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){switch(s.label){case 0:return t="127.24.1.1",n="127.24.255.255",r=null!==(i=this.nextIpAddress)&&void 0!==i?i:t,[4,Go(e,r,n)];case 1:return o=s.sent(),this.nextIpAddress=Wo(zo(o)+1),zo(this.nextIpAddress)>zo(n)&&(this.nextIpAddress=t),[2,o]}}))}))}))]}))}))},t.prototype.forwardPort=function(e,t,n,r,o,i,s,a){var u;return void 0===s&&(s=!0),P(this,void 0,void 0,(function(){var c,d,l,p,f,h,v=this;return A(this,(function(m){switch(m.label){case 0:if(c={Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken())},!s&&(d=this.canExecuteWithHostnames()).error)throw new Error("".concat(d.message," Alternatively, you can use the ipOnly mode when port-forwarding (apiClient.forwarding.forwardAddon({ projectId, addonId }, true))"));return[4,this.determineSocketAddress(i,o,r,t,s)];case 1:return l=m.sent(),p="UDP"===t.protocol?new Ha(e,c,l):new $a(e,c,a,l),s?[3,3]:[4,this.registerHostnames(null===(u=p.bindTo)||void 0===u?void 0:u.address,n)];case 2:m.sent(),m.label=3;case 3:return p.on("connection-accept",(function(){return v.emit("connection-accept",p)})),p.on("connection-close",(function(){return P(v,void 0,void 0,(function(){return A(this,(function(e){return[2,this.emit("connection-close",p)]}))}))})),[4,p.open()];case 4:return f=m.sent(),h={projectId:i,id:o,type:r,hostnames:n,ipOnly:s,port:f.port,address:f.address,protocol:t.protocol,portName:t.name},this.emit("tunnel-open",p,h),p.on("connection-error",(function(e){return v.emit("connection-error",p,h,e)})),p.on("tunnel-close",(function(){return v.emit("tunnel-close",p,h)})),this.connections.push({tunnel:p,forwardingContext:h}),[2,{data:h}]}}))}))},t.prototype.determineSocketAddress=function(e,t,n,r,o){var i;return P(this,void 0,void 0,(function(){var s,a,u;return A(this,(function(c){switch(c.label){case 0:return o&&"darwin"===l.platform()?[2,void 0]:(s=this.connections.find((function(r){return r.forwardingContext.projectId===e&&r.forwardingContext.id===t&&r.forwardingContext.type===n})),a=(null===(i=null==s?void 0:s.forwardingContext)||void 0===i?void 0:i.port)!==r.internalPort,s&&a?[2,{address:s.forwardingContext.address,port:r.internalPort}]:(u={},[4,this.allocateIpAddress(r.internalPort)]));case 1:return[2,(u.address=c.sent(),u.port=r.internalPort,u)]}}))}))},t.prototype.registerHostnames=function(e,t){return P(this,void 0,void 0,(function(){return A(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.removeHosts.apply(n,t),n.add.apply(n,R([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.unregisterHostnames=function(e,t){return P(this,void 0,void 0,(function(){return A(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.remove.apply(n,R([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.modifyHostsFile=function(e){return P(this,void 0,void 0,(function(){var t=this;return A(this,(function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter((function(){return P(t,void 0,void 0,(function(){var t,n=this;return A(this,(function(r){switch(r.label){case 0:return[4,si.load({header:"Northflank Proxy"})];case 1:return t=r.sent(),e(t),[4,t.backup({suffix:".backup-pre-northflank"})];case 2:r.sent(),r.label=3;case 3:return r.trys.push([3,5,,7]),[4,eu(5)((function(){return P(n,void 0,void 0,(function(){return A(this,(function(e){switch(e.label){case 0:return[4,t.write({writeMode:"atomic"})];case 1:return e.sent(),[2]}}))}))}))];case 4:return r.sent(),[3,7];case 5:return r.sent(),[4,eu(5)((function(){return P(n,void 0,void 0,(function(){return A(this,(function(e){switch(e.label){case 0:return[4,t.write({writeMode:"standard"})];case 1:return e.sent(),[2]}}))}))}))];case 6:return r.sent(),[3,7];case 7:return[2]}}))}))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.stopProjectForwarding=function(e){return P(this,void 0,void 0,(function(){var t=this;return A(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(t){return t.forwardingContext.projectId===e.projectId})).map((function(e){return t.stopForwarding(e)})))];case 1:return n.sent(),[2]}}))}))},t.prototype.stopServiceForwarding=function(e){return P(this,void 0,void 0,(function(){var t=this;return A(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(t){return"service"===t.forwardingContext.type&&t.forwardingContext.projectId===e.projectId&&t.forwardingContext.id===e.serviceId})).map((function(e){return t.stopForwarding(e)})))];case 1:return n.sent(),[2]}}))}))},t.prototype.stopAddonForwarding=function(e){return P(this,void 0,void 0,(function(){var t=this;return A(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(t){return"addon"===t.forwardingContext.type&&t.forwardingContext.projectId===e.projectId&&t.forwardingContext.id===e.addonId})).map((function(e){return t.stopForwarding(e)})))];case 1:return n.sent(),[2]}}))}))},t.prototype.stop=function(){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(t){switch(t.label){case 0:return[4,Promise.all(this.connections.map((function(t){return P(e,void 0,void 0,(function(){return A(this,(function(e){return[2,this.stopForwarding(t)]}))}))})))];case 1:return t.sent(),[2]}}))}))},t}(t),eu=function(e,t){return void 0===t&&(t=50),function(n){var r=e,o=function(){return P(void 0,void 0,void 0,(function(){var e;return A(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,4]),[4,n()];case 1:return[2,i.sent()];case 2:if(e=i.sent(),r<=0)throw e;return r-=1,[4,new Promise((function(e){return setTimeout((function(){return e()}),t)}))];case 3:return i.sent(),[2,o()];case 4:return[2]}}))}))};return o()}},tu=function(e){function t(t,r,o,i,s,a){void 0===i&&(i=new n.PassThrough),void 0===s&&(s=new n.PassThrough),void 0===a&&(a=new n.PassThrough);var u=e.call(this)||this;return u.baseUrl=t,u.execConfig=r,u.token=o,u.stdOut=i,u.stdErr=s,u.stdIn=a,u.waitForCommandResult=function(){return P(u,void 0,void 0,(function(){return A(this,(function(e){switch(e.label){case 0:if(void 0===this.currentCommand)throw new Error("No command is running");return[4,this.currentCommand];case 1:return[2,e.sent()]}}))}))},u.sendInputToCurrentCommand=function(e){return P(u,void 0,void 0,(function(){var t;return A(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running");return null===(t=this.duplex)||void 0===t||t.write(this.constructPayloadPacket(e)),[2]}))}))},u.resizeTerminal=function(e){return P(u,void 0,void 0,(function(){var t;return A(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running, can't resize terminal");return null===(t=this.duplex)||void 0===t||t.write(JSON.stringify({type:"resize",data:{ttyRows:null==e?void 0:e.rows,ttyColumns:null==e?void 0:e.columns}})),[2]}))}))},u.constructPayloadPacket=function(e){return JSON.stringify({type:"payload",data:e.toString()})},u}return _(t,e),Object.defineProperty(t.prototype,"execEndpoint",{get:function(){var e=this.execConfig,t=e.entityId,n=e.entityType,r=e.projectId,o="".concat(this.baseUrl,"/v1/command-exec/projects/").concat(r,"/");return"".concat(o).concat(function(){switch(n){case"service":return"services/".concat(t);case"job":return"jobs/".concat(t);case"addon":return"addons/".concat(t);case"build":return"builds/".concat(t);default:throw new Error("Unexpected Northflank entity type received in command exec endpoint generation: ".concat(n))}}())},enumerable:!1,configurable:!0}),t.prototype.start=function(){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(t){if(void 0!==this.currentCommand)throw new Error("Command is already running");return this.currentCommand=new Promise((function(t,n){var r,o,i;void 0!==e.remote&&n(Error("Command is already running"));var s,a=e.execEndpoint.replace("https:","wss:").replace("http:","ws:");e.remote=new Ra(a);try{e.duplex=Ai(e.remote)}catch(e){throw new Error("Failed to establish connection to command execution proxy: ".concat(e.message))}e.initialAuth(),e.stdIn.on("data",(function(t){var n,r;(null===(n=e.duplex)||void 0===n?void 0:n.writable)&&(null===(r=e.duplex)||void 0===r||r.write(e.constructPayloadPacket(t)))})),null===(r=e.duplex)||void 0===r||r.on("data",(function(t){var n,r,o,i=JSON.parse(t.toString());switch(null==i?void 0:i.type){case"init":var a=i.data;"successful"!==a.auth&&u("Command initialization failed: ".concat(null!==(n=null==a?void 0:a.message)&&void 0!==n?n:"Reason unknown"));break;case"completion":s=i.data,e.emit("command-result",s),null===(r=e.duplex)||void 0===r||r.end();break;case"stdOut":e.emit("std-out-data",i.data),e.stdOut.write(i.data);break;case"stdErr":e.emit("std-err-data",i.data),e.stdErr.write(i.data);break;case"error":u(null===(o=i.data)||void 0===o?void 0:o.message);break;default:var c="unable to parse message: ".concat(JSON.stringify(i));u(c)}})),null===(o=e.duplex)||void 0===o||o.on("end",(function(){e.emit("command-completed"),e.reset(),t(s)})),null===(i=e.duplex)||void 0===i||i.on("error",(function(n){e.emit("error",n),e.emit("command-completed"),e.reset(),t(s)}));var u=function(t){e.emit("error",t),e.reset(),n(new Error(t))};e.emit("command-started")})),[2,this.currentCommand]}))}))},t.prototype.initialAuth=function(){var e,t=this.execConfig,n=t.command,r=t.containerName,o=t.shell,i=t.user,s=t.group,a=t.ttyColumns,u=t.ttyRows,c={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{containerId:r,command:n,shell:o,user:i,group:s,ttyColumns:a,ttyRows:u}}};null===(e=this.duplex)||void 0===e||e.write(JSON.stringify(c))},t.prototype.reset=function(){var e;this.remote=void 0,this.currentCommand=void 0,null===(e=this.duplex)||void 0===e||e.destroy(),this.duplex=void 0},t}(t),nu=function(){function e(e){this.contextProvider=e,this.assertStartedWithNodejs=function(){if(!Za)throw new Error("Command exec only possible when started with nodejs")}}return e.prototype.execServiceCommand=function(e,t){return P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){return n=e.serviceId,r=e.projectId,"service",o=S({projectId:r,entityId:n,entityType:"service"},t),[2,this.execCommand(o)]}))}))},e.prototype.execServiceSession=function(e,t){return P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){return n=e.serviceId,r=e.projectId,"service",o=S({projectId:r,entityId:n,entityType:"service"},t),[2,this.shellSession(o)]}))}))},e.prototype.execJobCommand=function(e,t){return P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){return n=e.jobId,r=e.projectId,"job",o=S({projectId:r,entityId:n,entityType:"job"},t),[2,this.execCommand(o)]}))}))},e.prototype.execJobSession=function(e,t){return P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){return n=e.jobId,r=e.projectId,"job",o=S({projectId:r,entityId:n,entityType:"job"},t),[2,this.shellSession(o)]}))}))},e.prototype.execCommand=function(e){return P(this,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){switch(o.label){case 0:return this.assertStartedWithNodejs(),t=this.getCommandRunner(S({shell:"none"},e)),n=new Xa,r=new Xa,t.stdOut.pipe(n),t.stdErr.pipe(r),t.on("error",(function(e){throw new Error(e)})),[4,t.start()];case 1:return[2,{commandResult:o.sent(),stdOut:n.getContentsAsString(),stdErr:r.getContentsAsString()}]}}))}))},e.prototype.shellSession=function(e){this.assertStartedWithNodejs();var t=this.getCommandRunner(e);return t.start(),t},e.prototype.getCommandRunner=function(e){var t=this.contextProvider.getCurrentBaseUrl(!0),n=this.contextProvider.getCurrentToken();if(!n)throw Error("API token not found");return new tu(t,e,n)},e}(),ru=function(e){function t(t){var n=this.constructor,r=e.call(this,t.message)||this;r.name="NorthflankApiCallError",r.message=t.message,r.status=t.status,r.id=t.id,r.details=t.details;var o=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,o):r.__proto__=o,r}return _(t,e),t}(Error),ou=function(e){function t(t,n,r){var o=e.call(this)||this;return o.baseUrl=t,o.logsConfig=n,o.token=r,o.stop=function(){return P(o,void 0,void 0,(function(){var e;return A(this,(function(t){if(void 0===this.logSession)throw new Error("No command is running");return null===(e=this.remote)||void 0===e||e.close(),[2]}))}))},o}return _(t,e),t.getLogsEndpoint=function(e){var t=e.containerName,n=e.entityId,r=e.entityType,o=e.buildId,i=e.runId,s=e.backupId,a=e.restoreId,u=e.isBuild,c=e.lineLimit,d=e.projectId,l=e.queryType,p=e.startTime,f=e.endTime,h=e.duration,v=e.direction,m=e.textIncludes,g=e.textNotIncludes,b=e.regexIncludes,y=e.regexNotIncludes,w="/v1/projects/".concat(d,"/"),j=new URLSearchParams;return j.append("queryType",l),void 0!==p&&j.append("startTime",p.toISOString()),void 0!==f&&j.append("endTime",f.toISOString()),void 0!==c&&j.append("lineLimit",c.toString()),void 0!==t&&j.append("containerName",t),void 0!==i&&j.append("runId",i),void 0!==o&&j.append("buildId",o),void 0!==m&&j.append("textIncludes",m),void 0!==g&&j.append("textNotIncludes",g),void 0!==b&&j.append("regexIncludes",b),void 0!==y&&j.append("regexNotIncludes",y),void 0!==v&&j.append("direction",v),void 0!==h&&j.append("duration",h.toString()),"".concat(w).concat(function(){var e=u?"/build-logs":"/logs";switch(r){case"service":return"services/".concat(n).concat(e);case"job":return"jobs/".concat(n).concat(e);case"addon":return"addons/".concat(n).concat(e);case"addonBackup":return"addons/".concat(n,"/backups/").concat(s).concat(e);case"addonRestore":return"addons/".concat(n,"/backups/").concat(s,"/restores/").concat(a).concat(e);default:throw new Error("Unexpected Northflank entity type received in logs endpoint generation: ".concat(r))}}(),"?").concat(j.toString())},Object.defineProperty(t.prototype,"logsEndpoint",{get:function(){return"".concat(this.baseUrl).concat(t.getLogsEndpoint(this.logsConfig))},enumerable:!1,configurable:!0}),t.prototype.start=function(){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(t){switch(t.label){case 0:if(void 0!==this.logSession)throw new Error("Command is already running");return this.logSession=new Promise((function(t,n){var r,o,i,s;void 0!==e.remote&&n(Error("Command is already running"));var a=e.logsEndpoint.replace("https:","wss:").replace("http:","ws:");e.remote=new Ra(a),null===(r=e.remote)||void 0===r||r.on("message",(function(t){var n,r,o=JSON.parse(t.toString());switch(null==o?void 0:o.type){case"init":var i=o.data;"successful"!==i.auth&&u("Log tail initialization failed: ".concat(null!==(n=null==i?void 0:i.message)&&void 0!==n?n:"Reason unknown"));break;case"log-lines":var s=o.data;e.emit("logs-received",s.map(vu));break;case"error":u(null===(r=o.data)||void 0===r?void 0:r.message);break;default:var a="unable to parse message: ".concat(JSON.stringify(o));u(a)}})),null===(o=e.remote)||void 0===o||o.on("close",(function(){e.emit("close"),e.reset(),t()})),null===(i=e.remote)||void 0===i||i.on("open",(function(){e.emit("open")})),null===(s=e.remote)||void 0===s||s.on("error",(function(n){e.emit("error",n),e.reset(),t()}));var u=function(t){e.emit("error",{message:t}),e.reset(),n(new Error(t))}})),[4,new Promise((function(t){var n;e.remote.on("open",(function(){return t()})),null===(n=e.remote)||void 0===n||n.on("error",(function(){t()}))}))];case 1:return t.sent(),this.initialAuth(),[2,this.logSession]}}))}))},t.prototype.initialAuth=function(){var e,t={type:"init",data:{auth:{type:"apiToken",apiToken:this.token}}};null===(e=this.remote)||void 0===e||e.send(JSON.stringify(t))},t.prototype.reset=function(){this.remote=void 0,this.logSession=void 0},t}(t),iu=Za?Bo:window.fetch,su=function(){if(Za)try{return JSON.parse(g.readFileSync(b.join(b.dirname(a(import.meta.url)),"../../package.json")).toString())}catch(e){return console.log("Failed to check version of northflank CLI (".concat(e.message,")")),{}}return{}},au=function(){function e(e,t){var n=this;this.opts=t,this.call=function(e){return P(n,void 0,void 0,(function(){var t,n,r,o,i,s,a,u,c,d,l,p,f=this;return A(this,(function(h){switch(h.label){case 0:if(t=this.method,n={method:t,headers:this.getDefaultHeaders()},!(r=null===(p=this.contextProvider)||void 0===p?void 0:p.getCurrentBaseUrl()))throw new Error("Api client context not correctly initialized, please provide a url to the context.");return o="".concat(r).concat(this.endpointUrl(e)),i=this.body(e),s=S(S({url:o},n),{body:i}),[4,fu(o,S(S({},n),{body:i}))];case 1:return[4,(a=h.sent()).text()];case 2:return u=h.sent(),c=function(){if(200!==a.status){var e=null==d?void 0:d.error,t=(null==e?void 0:e.message)||"",n={status:a.status,message:t,id:null==e?void 0:e.id,details:null==e?void 0:e.details};if(f.opts.throwErrorOnHttpErrorCode)throw new ru(n);return n}},d=function(){try{return JSON.parse(u)}catch(e){throw Error("Failed reading api request result: \n\tStatus: ".concat(a.statusText," (").concat(a.status,")\n\tMessage: ").concat(u))}}(),l=c(),[2,{data:null==d?void 0:d.data,rawResponse:a,request:s,error:l,pagination:null==d?void 0:d.pagination}]}}))}))},this.contextProvider=e}return e.prototype.getDefaultHeaders=function(){var e,t,n=this.contextProvider.getCurrentToken(),r=(null===(e=this.opts)||void 0===e?void 0:e.customUserAgent)?" (".concat(this.opts.customUserAgent,")"):"";return{Authorization:this.withAuth?"Bearer ".concat(n):void 0,"Content-Type":"application/json","User-Agent":"northflank-js-client/".concat(null===(t=su())||void 0===t?void 0:t.version).concat(r)}},e}(),uu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="get",t.body=function(){},t}return _(t,e),t}(au),cu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="post",t}return _(t,e),t}(au),du=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="delete",t.body=function(){},t}return _(t,e),t}(au),lu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="put",t}return _(t,e),t}(au),pu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="patch",t}return _(t,e),t}(au),fu=function(e,t,n,r){return void 0===t&&(t={}),void 0===n&&(n=3),void 0===r&&(r=500),new Promise((function(o,i){var s=function(n){return iu(e,t).then((function(e){o(e)})).catch((function(e){return P(void 0,void 0,void 0,(function(){return A(this,(function(t){switch(t.label){case 0:return n>0?[4,(o=r,new Promise((function(e){setTimeout((function(){e()}),o)})))]:[3,2];case 1:return t.sent(),[2,s(n-1)];case 2:return[2,i(e)]}var o}))}))}))};return s(n)}))},hu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Fetch log lines over a specific time span",t.withAuth=!0,t.requiredPermissions="Account > Service | Job | Addon > General > Read",t.endpointUrl=function(e){return ou.getLogsEndpoint(e)},t.body=function(){},t}return _(t,e),t}(uu),vu=function(e){return{containerId:e.containerId,log:e.log,ts:new Date(e.ts)}},mu=function(e){var t=this;this.contextProvider=e,this.getServiceLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.logRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){return t=e.parameters,n=e.options,r=t.projectId,o=t.serviceId,i={entityId:o,projectId:r},[2,this.logRange(i,S(S({},n),{isBuild:!0}),"service")]}))}))},this.getJobLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.logRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){return t=e.parameters,n=e.options,r=t.projectId,o=t.jobId,i={entityId:o,projectId:r},[2,this.logRange(i,S(S({},n),{isBuild:!0}),"job")]}))}))},this.getAddonLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logRange(r,null!=n?n:{},"addon")]}))}))},this.getAddonBackupLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logRange(r,S(S({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.getAddonRestoresLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o;return A(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},o={backupId:t.backupId,restoreId:t.restoreId},[2,this.logRange(r,S(S({},n),o),"addonRestore")]}))}))},this.logRange=function(e,n,r){return P(t,void 0,void 0,(function(){var t,o,i,s,a;return A(this,(function(u){switch(u.label){case 0:return t=e.entityId,o=e.projectId,i=S(S({projectId:o,entityId:t,entityType:r},n),{queryType:"range"}),[4,new hu(this.contextProvider,{}).call(i)];case 1:return(s=u.sent()).error?[2,s]:[2,S(S({},s),{data:null===(a=null==s?void 0:s.data)||void 0===a?void 0:a.map(vu)})]}}))}))},this.tailServiceLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.logTail(r,null!=n?n:{},"service")]}))}))},this.tailServiceBuildLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){return t=e.parameters,n=e.options,r=t.serviceId,o=t.projectId,i={entityId:r,projectId:o},[2,this.logTail(i,S(S({},n),{isBuild:!0}),"service")]}))}))},this.tailJobLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.logTail(r,null!=n?n:{},"job")]}))}))},this.tailJobBuildLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){return t=e.parameters,n=e.options,r=t.projectId,o=t.jobId,i={entityId:o,projectId:r},[2,this.logTail(i,S(S({},n),{isBuild:!0}),"job")]}))}))},this.tailAddonLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logTail(r,null!=n?n:{},"addon")]}))}))},this.tailAddonBackupLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logTail(r,S(S({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.tailAddonRestoresLogs=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o;return A(this,(function(i){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},o={backupId:t.backupId,restoreId:t.restoreId},[2,this.logTail(r,S(S({},n),o),"addonRestore")]}))}))},this.logTail=function(e,n,r){return P(t,void 0,void 0,(function(){var t,o,i,s,a;return A(this,(function(u){if(t=e.entityId,o=e.projectId,i=S({queryType:"tail",projectId:o,entityId:t,entityType:r},n),this.assertStartedWithNodejs(),s=this.contextProvider.getCurrentBaseUrl(!0),!(a=this.contextProvider.getCurrentToken()))throw new Error("API token not found");return[2,new ou(s,i,a)]}))}))},this.assertStartedWithNodejs=function(){if(!Za)throw new Error("Command exec only possible when started with nodejs")}},gu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Fetch metrics entries over a specific time span",t.withAuth=!0,t.requiredPermissions="Account > Service | Job | Addon > General > Read",t.endpointUrl=function(e){var t=e.projectId,n=e.entityId,r=e.entityType,o=e.runId,i=e.buildId,s=e.isBuild,a=e.queryType,u=e.metricTypes,c=e.startTime,d=e.endTime,l=e.duration,p=e.containerName,f=e.timestamp,h="/v1/projects/".concat(t,"/");var v=new URLSearchParams;return v.append("queryType",a),void 0!==c&&v.append("startTime",c.toISOString()),void 0!==d&&v.append("endTime",d.toISOString()),void 0!==p&&v.append("containerName",p),void 0!==o&&v.append("runId",o),void 0!==i&&v.append("buildId",i),void 0!==f&&v.append("timestamp",f.toISOString()),void 0!==l&&v.append("duration",l.toString()),void 0!==u&&u.forEach((function(e){return v.append("metricTypes",e)})),"".concat(h).concat(function(){var e=s?"/build-metrics":"/metrics";switch(r){case"service":return"services/".concat(n).concat(e);case"job":return"jobs/".concat(n).concat(e);case"addon":return"addons/".concat(n).concat(e);default:throw new Error("Unexpected Northflank entity type received in metrics endpoint generation: ".concat(r))}}(),"?").concat(v.toString())},t.body=function(){},t}return _(t,e),t}(uu),bu=function(e){return{metadata:e.metadata,data:e.data.map((function(e){return{value:e.value,ts:new Date(e.ts)}}))}};!function(e){e.Cpu="cpu",e.Memory="memory",e.NetworkIngress="networkIngress",e.NetworkEgress="networkEgress",e.TcpConnectionOpen="tcpConnectionsOpen",e.PvcUsage="diskUsage",e.Requests="requests",e.Http4xxResponses="http4xxResponses",e.Http5xxResponses="http5xxResponses",e.Bandwidth="bandwidth",e.BandwidthVolume="bandwidthVolume"}(Ya||(Ya={}));var yu=function(e){var t=this;this.contextProvider=e,this.getServiceMetrics=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.metricsSingle(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetrics=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){return t=e.parameters,n=e.options,r=t.serviceId,o=t.projectId,i={entityId:r,projectId:o},[2,this.metricsSingle(i,S(S({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetrics=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.metricsSingle(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetrics=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){return t=e.parameters,n=e.options,r=t.jobId,o=t.projectId,i={entityId:r,projectId:o},[2,this.metricsSingle(i,S(S({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetrics=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.metricsSingle(r,null!=n?n:{},"addon")]}))}))},this.metricsSingle=function(e,n,r){return P(t,void 0,void 0,(function(){var t,o,i;return A(this,(function(s){return t=e.entityId,o=e.projectId,i=S(S({projectId:o,entityId:t,entityType:r},n),{queryType:"single"}),[2,this.getMetrics(i)]}))}))},this.getServiceMetricsRange=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.serviceId,projectId:t.projectId},[2,this.metricsRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetricsRange=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){return t=e.parameters,n=e.options,r=t.projectId,o=t.serviceId,i={entityId:o,projectId:r},[2,this.metricsRange(i,S(S({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetricsRange=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.jobId,projectId:t.projectId},[2,this.metricsRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetricsRange=function(e){return P(t,void 0,void 0,(function(){var t,n,r,o,i;return A(this,(function(s){return t=e.parameters,n=e.options,r=t.projectId,o=t.jobId,i={entityId:o,projectId:r},[2,this.metricsRange(i,S(S({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetricsRange=function(e){return P(t,void 0,void 0,(function(){var t,n,r;return A(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.metricsRange(r,null!=n?n:{},"addon")]}))}))},this.metricsRange=function(e,n,r){return P(t,void 0,void 0,(function(){var t,o,i;return A(this,(function(s){return t=e.entityId,o=e.projectId,i=S(S({projectId:o,entityId:t,entityType:r},n),{queryType:"range"}),[2,this.getMetrics(i)]}))}))},this.getMetrics=function(e){return P(t,void 0,void 0,(function(){var t;return A(this,(function(n){switch(n.label){case 0:return[4,new gu(this.contextProvider,{}).call(e)];case 1:return(t=n.sent()).error?[2,t]:[2,S(S({},t),{data:Object.fromEntries(Object.entries(t.data).map((function(e){var t=e[0],n=e[1];return[t,S(S({},n),{values:n.values.map(bu)})]})))})]}}))}))}},wu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the available addon types",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return"/v1/addon-types"},t.body=function(){},t}return _(t,e),t}(uu),ju=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of past invoices",t.withAuth=!0,t.requiredPermissions="Account > Billing > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/billing/invoices".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Iu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about an invoice. If `timestamp` is passed in as a query parameter, this endpoint returns details about the invoice containing that timestamp. Otherwise, returns a preview invoice displaying billing data from after the most recent invoice.",t.withAuth=!0,t.requiredPermissions="Account > Billing > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/billing/invoices/details".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Eu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists supported cloud providers",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return"/v1/cloud-providers"},t.body=function(){},t}return _(t,e),t}(uu),_u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists clusters for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/clusters".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Su=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new cluster.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Create",t.endpointUrl=function(e){return"/v1/cloud-providers/clusters"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Pu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given cluster",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Read",t.endpointUrl=function(e){return["clusterId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(e.parameters.clusterId)},t.body=function(){},t}return _(t,e),t}(uu),Au=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update an existing cluster.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return["clusterId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(e.parameters.clusterId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Ru=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given cluster. Fails if the cluster has associated projects.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Delete",t.endpointUrl=function(e){return["clusterId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/clusters/".concat(e.parameters.clusterId)},t.body=function(){},t}return _(t,e),t}(du),Cu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists docker registries for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/docker-registries".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),ku=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new docker registry.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Create",t.endpointUrl=function(e){return"/v1/cloud-providers/docker-registries"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Uu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given docker registry",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Read",t.endpointUrl=function(e){return["registryId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/docker-registries/".concat(e.parameters.registryId)},t.body=function(){},t}return _(t,e),t}(uu),Ou=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given docker registry. Fails if the docker registry is associated with existing clusters.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Registries > Delete",t.endpointUrl=function(e){return["registryId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/docker-registries/".concat(e.parameters.registryId)},t.body=function(){},t}return _(t,e),t}(du),xu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists integrations for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/integrations".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),qu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new integration.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Create",t.endpointUrl=function(e){return"/v1/cloud-providers/integrations"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Du=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given integration",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Read",t.endpointUrl=function(e){return["integrationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/integrations/".concat(e.parameters.integrationId)},t.body=function(){},t}return _(t,e),t}(uu),Tu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update information about the given integration",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Update",t.endpointUrl=function(e){return["integrationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/integrations/".concat(e.parameters.integrationId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Nu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given integration. Fails if the integration is associated with existing clusters.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Delete",t.endpointUrl=function(e){return["integrationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/cloud-providers/integrations/".concat(e.parameters.integrationId)},t.body=function(){},t}return _(t,e),t}(du),Bu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists supported cloud provider node types",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/node-types".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Lu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists supported cloud provider regions",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/cloud-providers/regions".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Fu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns the partially random string used when generating host names for the authenticated account.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Read",t.endpointUrl=function(e){return"/v1/dns-id"},t.body=function(){},t}return _(t,e),t}(uu),Gu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists available domains",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/domains".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Mu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Registers a new domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Create",t.endpointUrl=function(e){return"/v1/domains"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Ju=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Read",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain)},t.body=function(){},t}return _(t,e),t}(uu),zu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a domain and each of its registered subdomains.",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Delete",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain)},t.body=function(){},t}return _(t,e),t}(du),Wu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new subdomain to the domain.",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/subdomains")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Vu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Read",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain)},t.body=function(){},t}return _(t,e),t}(uu),$u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes a subdomain from a domain.",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain)},t.body=function(){},t}return _(t,e),t}(du),Hu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Assigns a service port to the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/assign")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Yu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes a subdomain from its assigned service",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/assign")},t.body=function(){},t}return _(t,e),t}(du),Zu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Removes the CDN integration from the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/cdn/disable")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Ku=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Enables a CDN integration on the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/cdn/enable")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Xu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the given subdomain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Update",t.endpointUrl=function(e){return["domain","subdomain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/subdomains/").concat(e.parameters.subdomain,"/verify")},t.body=function(){},t}return _(t,e),t}(cu),Qu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Attempts to verify the domain",t.withAuth=!0,t.requiredPermissions="Account > Domains > General > Create",t.endpointUrl=function(e){return["domain"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/domains/".concat(e.parameters.domain,"/verify")},t.body=function(){},t}return _(t,e),t}(cu),ec=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of log sinks added to this account.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/log-sinks".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),tc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Create",t.endpointUrl=function(e){return"/v1/integrations/log-sinks"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),nc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a given log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Read",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId)},t.body=function(){},t}return _(t,e),t}(uu),rc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Delete",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId)},t.body=function(){},t}return _(t,e),t}(du),oc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pauses a given log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId,"/pause")},t.body=function(){},t}return _(t,e),t}(cu),ic=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes a paused log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId,"/resume")},t.body=function(){},t}return _(t,e),t}(cu),sc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the settings for a log sink.",t.withAuth=!0,t.requiredPermissions="Account > Sinks > General > Update",t.endpointUrl=function(e){return["logSinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/log-sinks/".concat(e.parameters.logSinkId,"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),ac=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists notification integrations for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/notifications".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),uc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Create a new notification integration.",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Manage",t.endpointUrl=function(e){return["notificationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/notifications"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),cc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a notification integration.",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Read",t.endpointUrl=function(e){return["notificationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/notifications/".concat(e.parameters.notificationId)},t.body=function(){},t}return _(t,e),t}(uu),dc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a notification integration",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Manage",t.endpointUrl=function(e){return["notificationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/notifications/".concat(e.parameters.notificationId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),lc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a notification integration",t.withAuth=!0,t.requiredPermissions="Account > Team > Notifications > Manage",t.endpointUrl=function(e){return["notificationId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/notifications/".concat(e.parameters.notificationId)},t.body=function(){},t}return _(t,e),t}(du),pc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the container registry credentials saved to this account. Does not display secrets.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/registries".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),fc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new set of container registry credentials to this account.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Create",t.endpointUrl=function(e){return"/v1/integrations/registries"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),hc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Views a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Read Encrypted",t.endpointUrl=function(e){return["credentialId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/registries/".concat(e.parameters.credentialId)},t.body=function(){},t}return _(t,e),t}(uu),vc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Delete",t.endpointUrl=function(e){return["credentialId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/registries/".concat(e.parameters.credentialId)},t.body=function(){},t}return _(t,e),t}(du),mc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a set of registry credential data.",t.withAuth=!0,t.requiredPermissions="Account > Credentials > General > Update",t.endpointUrl=function(e){return["credentialId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/integrations/registries/".concat(e.parameters.credentialId,"/modify")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),gc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists linked version control providers",t.withAuth=!0,t.requiredPermissions="Account > Git > General > Read",t.endpointUrl=function(e){return"/v1/integrations/vcs"},t.body=function(){},t}return _(t,e),t}(uu),bc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Generate a token for a specific VCS link.",t.withAuth=!0,t.requiredPermissions="Account > Git > Tokens > Read",t.endpointUrl=function(e){var t;["customVCSId","vcsLinkId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/vcs/custom/".concat(e.parameters.customVCSId,"/token/").concat(e.parameters.vcsLinkId).concat(r)},t.body=function(){},t}return _(t,e),t}(cu),yc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of repositories accessible to this account",t.withAuth=!0,t.requiredPermissions="Account > Git > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/vcs/repos".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),wc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of branches for the repo",t.withAuth=!0,t.requiredPermissions="Account > Git > General > Read",t.endpointUrl=function(e){var t;["vcsService","repositoryOwner","repositoryName"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/integrations/vcs/repos/".concat(e.parameters.vcsService,"/").concat(e.parameters.repositoryOwner,"/").concat(e.parameters.repositoryName,"/branches").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),jc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists available billing plans",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return"/v1/plans"},t.body=function(){},t}return _(t,e),t}(uu),Ic=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists projects for the authenticated user or team.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Ec=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new project.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Create",t.endpointUrl=function(e){return"/v1/projects"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),_c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a project.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Create",t.endpointUrl=function(e){return"/v1/projects"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(lu),Sc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a project.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Update",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(pu),Pc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given project",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Read",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId)},t.body=function(){},t}return _(t,e),t}(uu),Ac=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete the given project. Fails if the project isn't empty.",t.withAuth=!0,t.requiredPermissions="Project > Projects > Manage > Delete",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId).concat(r)},t.body=function(){},t}return _(t,e),t}(du),Rc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of addons belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Cc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),kc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates an addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(lu),Uc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId)},t.body=function(){},t}return _(t,e),t}(uu),Oc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates an addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(pu),xc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Delete",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId)},t.body=function(){},t}return _(t,e),t}(du),qc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about an addon's backup schedules",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backup-schedules").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Dc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Create a new backup schedule for an addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backup-schedules")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Tc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a backup schedule for an addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","scheduleId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backup-schedules/").concat(e.parameters.scheduleId)},t.body=function(){},t}return _(t,e),t}(du),Nc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns a list of backups for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Bc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Initiates a backup for the given addon",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Lc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId)},t.body=function(){},t}return _(t,e),t}(uu),Fc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes a given backup",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId)},t.body=function(){},t}return _(t,e),t}(du),Gc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the in progress backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/abort")},t.body=function(){},t}return _(t,e),t}(cu),Mc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts an in-progress backup restore.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/abort-restore")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Jc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Generates a temporary download link for downloading the given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/download-link")},t.body=function(){},t}return _(t,e),t}(uu),zc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restores the given addon to the given backup state.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/restore")},t.body=function(){},t}return _(t,e),t}(cu),Wc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of restores for the given backup.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){var t;["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/restores").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Vc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Flags a temporary backup generated by a backup schedule to be retained indefinitely rather than being deleted after the expiry date.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId","backupId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/backups/").concat(e.parameters.backupId,"/retain")},t.body=function(){},t}return _(t,e),t}(cu),$c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > Deployment > View Instances",t.endpointUrl=function(e){var t;["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/containers").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Hc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns the credentials for connecting to the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/credentials")},t.body=function(){},t}return _(t,e),t}(uu),Yc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Imports a database from an external archive or existing live database.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/import")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Zc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the network settings for the addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/network-settings")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Kc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/pause")},t.body=function(){},t}return _(t,e),t}(cu),Xc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restores an addon to a specific point in time.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/pitr")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Qc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the valid window for performing a point-in-time restore (PITR) on this addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/pitr-window")},t.body=function(){},t}return _(t,e),t}(uu),ed=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Reset the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Delete",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/reset")},t.body=function(){},t}return _(t,e),t}(cu),td=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restart the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/restart")},t.body=function(){},t}return _(t,e),t}(cu),nd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resume the given addon if it is paused.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/resume")},t.body=function(){},t}return _(t,e),t}(cu),rd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the allocated resources for the given addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),od=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the security rules for the addon.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/security")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),id=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about the current addon version including available upgrades and upgrade history.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Read",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/version")},t.body=function(){},t}return _(t,e),t}(uu),sd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Upgrades the addon to a new version.",t.withAuth=!0,t.requiredPermissions="Project > Addons > General > Update",t.endpointUrl=function(e){return["projectId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/addons/").concat(e.parameters.addonId,"/version")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),ad=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of jobs belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),ud=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),cd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(lu),dd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a cron job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/cron/").concat(e.parameters.jobId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(pu),ld=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),pd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(lu),fd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/manual/").concat(e.parameters.jobId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(pu),hd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId)},t.body=function(){},t}return _(t,e),t}(uu),vd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Delete",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId)},t.body=function(){},t}return _(t,e),t}(du),md=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the branches of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/branches").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),gd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists builds for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),bd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Start a new build for the given job. Given a commit sha, it will build that commit.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),yd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the build arguments of the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > View Build Parameters",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-arguments").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),wd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets build arguments for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > Update Build Parameters",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),jd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the build arguments accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > View Build Parameters",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-arguments/details")},t.body=function(){},t}return _(t,e),t}(uu),Id=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the build options for a given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Ed=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the version control source for a given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),_d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about a build for the job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","jobId","buildId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build/").concat(e.parameters.buildId)},t.body=function(){},t}return _(t,e),t}(uu),Sd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given job build",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","jobId","buildId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/build/").concat(e.parameters.buildId)},t.body=function(){},t}return _(t,e),t}(du),Pd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > View Instance Logs",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/containers").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Ad=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the deployment of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/deployment")},t.body=function(){},t}return _(t,e),t}(uu),Rd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the deployment settings of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Update Deployment",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Cd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the health checks for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/health-checks")},t.body=function(){},t}return _(t,e),t}(uu),kd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates health checks for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Ud=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/pause")},t.body=function(){},t}return _(t,e),t}(cu),Od=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the pull-requests of the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/pull-requests").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),xd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes the given job. Optionally takes several arguments to override resumed settings.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),qd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Fetches run history for the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runs").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Dd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Starts a new job run for the given job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Td=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns data about the given job run",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId","runId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runs/").concat(e.parameters.runId)},t.body=function(){},t}return _(t,e),t}(uu),Nd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given job run",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","jobId","runId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runs/").concat(e.parameters.runId)},t.body=function(){},t}return _(t,e),t}(du),Bd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns the runtime environment for the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > View Environment Variables",t.endpointUrl=function(e){var t;["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runtime-environment").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Ld=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the runtime environment for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > Update Environment Variables",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Fd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the runtime environment accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Configuration > View Environment Variables",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/runtime-environment/details")},t.body=function(){},t}return _(t,e),t}(uu),Gd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the scaling settings for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > Deployment > Scale Job",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Md=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates settings for the job",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Jd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modify cron job to toggle suspending of its schedule.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Update",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/jobs/").concat(e.parameters.jobId,"/suspend")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),zd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists all pipelines for a project",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Wd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a pipeline",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId)},t.body=function(){},t}return _(t,e),t}(uu),Vd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given preview template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),$d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a given preview template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Create",t.endpointUrl=function(e){return["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Hd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of active preview environments for a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs/previews").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Yd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a preview environment generated by a preview template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Delete",t.endpointUrl=function(e){return["projectId","pipelineId","previewId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs/previews/").concat(e.parameters.previewId)},t.body=function(){},t}return _(t,e),t}(du),Zd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of preview template runs",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["projectId","pipelineId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs/runs").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Kd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given preview template run.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){return["projectId","pipelineId","templateRunId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/preview-envs/runs/").concat(e.parameters.templateRunId)},t.body=function(){},t}return _(t,e),t}(uu),Xd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets details about a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return["projectId","pipelineId","stage"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage)},t.body=function(){},t}return _(t,e),t}(uu),Qd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return["projectId","pipelineId","stage"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),el=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Runs a given release flow with given arguments. This endpoint can be used as part of a CI pipeline to automatically trigger a release process.",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return["projectId","pipelineId","stage"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage,"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),tl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists runs of a release flow",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){var t;["projectId","pipelineId","stage"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage,"/runs").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),nl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given release flow run",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Read",t.endpointUrl=function(e){return["projectId","pipelineId","stage","runId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage,"/runs/").concat(e.parameters.runId)},t.body=function(){},t}return _(t,e),t}(uu),rl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Abort the given release flow run",t.withAuth=!0,t.requiredPermissions="Project > Pipelines > General > Update",t.endpointUrl=function(e){return["projectId","pipelineId","stage","runId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/pipelines/").concat(e.parameters.pipelineId,"/release-flows/").concat(e.parameters.stage,"/runs/").concat(e.parameters.runId,"/abort")},t.body=function(){},t}return _(t,e),t}(cu),ol=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of secrets belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/secrets").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),il=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),sl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(lu),al=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a secret with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(pu),ul=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View a secret including its contents",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Read",t.endpointUrl=function(e){var t;["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId).concat(r)},t.body=function(){},t}return _(t,e),t}(uu),cl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a secret",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Delete",t.endpointUrl=function(e){return["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId)},t.body=function(){},t}return _(t,e),t}(du),dl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a secret",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),ll=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Link an addon to the secret group or edit the settings of the linked addon.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return["projectId","secretId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId,"/addons/").concat(e.parameters.addonId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),pl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about a given addon link.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return["projectId","secretId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId,"/addons/").concat(e.parameters.addonId)},t.body=function(){},t}return _(t,e),t}(uu),fl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Unlinks an addon from the secret group.",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Update",t.endpointUrl=function(e){return["projectId","secretId","addonId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId,"/addons/").concat(e.parameters.addonId)},t.body=function(){},t}return _(t,e),t}(du),hl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View a secret with details about its linked addons",t.withAuth=!0,t.requiredPermissions="Project > Secrets > General > Read",t.endpointUrl=function(e){return["projectId","secretId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/secrets/").concat(e.parameters.secretId,"/details")},t.body=function(){},t}return _(t,e),t}(uu),vl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of services belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t;["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),ml=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),gl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(lu),bl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a build service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/build/").concat(e.parameters.serviceId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(pu),yl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),wl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(lu),jl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/combined/").concat(e.parameters.serviceId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(pu),Il=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a new deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),El=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(lu),_l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a deployment service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/deployment/").concat(e.parameters.serviceId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(pu),Sl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId)},t.body=function(){},t}return _(t,e),t}(uu),Pl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Delete",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId).concat(r)},t.body=function(){},t}return _(t,e),t}(du),Al=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the branches of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/branches").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Rl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the builds for the service",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Cl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Start a new build for the given combined or build service. If given a commit sha, it will build that commit. Otherwise, the most recent relevant commit will be built. If the service provided is a build service, a branch name or pull request to build from is required.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),kl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the build arguments of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > View Build Parameters",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-arguments").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Ul=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the build arguments for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > Update Build Parameters",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Ol=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the build arguments accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > View Build Parameters",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-arguments/details")},t.body=function(){},t}return _(t,e),t}(uu),xl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the build options for a given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),ql=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the version control source for a given build or combined service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Dl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about a build for the service",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return["projectId","serviceId","buildId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build/").concat(e.parameters.buildId)},t.body=function(){},t}return _(t,e),t}(uu),Tl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Aborts the given service build",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","serviceId","buildId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/build/").concat(e.parameters.buildId)},t.body=function(){},t}return _(t,e),t}(du),Nl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of containers for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > View Instances",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/containers").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Bl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the deployment of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > View Instances",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/deployment")},t.body=function(){},t}return _(t,e),t}(uu),Ll=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the deployment settings of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Update Deployment",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Fl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the health checks for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/health-checks")},t.body=function(){},t}return _(t,e),t}(uu),Gl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates health checks for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Ml=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Pause the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/pause")},t.body=function(){},t}return _(t,e),t}(cu),Jl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the ports for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/ports")},t.body=function(){},t}return _(t,e),t}(uu),zl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates the list of ports for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/ports")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Wl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets information about the pull-requests of the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Read",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/pull-requests").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Vl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restarts the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/restart")},t.body=function(){},t}return _(t,e),t}(cu),$l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Resumes the given service. Optionally takes several arguments to override resumed settings.",t.withAuth=!0,t.requiredPermissions="Project > Services > General > Update",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Hl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets the runtime environment of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > View Environment Variables",t.endpointUrl=function(e){var t;["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/runtime-environment").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),Yl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Sets the runtime environment for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > Update Environment Variables",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Zl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get details about the runtime environment accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",t.withAuth=!0,t.requiredPermissions="Project > Services > Configuration > View Environment Variables",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/runtime-environment/details")},t.body=function(){},t}return _(t,e),t}(uu),Kl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Modifies the scaling settings for the given service.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Scale Service",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/services/").concat(e.parameters.serviceId,"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),Xl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Gets a list of volumes belonging to the project",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Read",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/volumes")},t.body=function(){},t}return _(t,e),t}(uu),Ql=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates a volume with the specified payload",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Create",t.endpointUrl=function(e){return["projectId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/volumes")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),ep=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Retrieve a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Read",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId)},t.body=function(){},t}return _(t,e),t}(uu),tp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update volume mounts and storage size",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),np=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Deletes this volume and its associated data.",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Delete",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId)},t.body=function(){},t}return _(t,e),t}(du),rp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Attach a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId,"/attach")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),op=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Detach a volume",t.withAuth=!0,t.requiredPermissions="Project > Volumes > General > Update",t.endpointUrl=function(e){return["projectId","volumeId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(e.parameters.projectId,"/volumes/").concat(e.parameters.volumeId,"/detach")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),ip=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists available project regions",t.withAuth=!0,t.requiredPermissions="undefined",t.endpointUrl=function(e){return"/v1/regions"},t.body=function(){},t}return _(t,e),t}(uu),sp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of templates",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t,n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/templates".concat(r)},t.body=function(){},t}return _(t,e),t}(uu),ap=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Create a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Create",t.endpointUrl=function(e){return"/v1/templates"},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),up=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given template.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/templates/".concat(e.parameters.templateId).concat(r)},t.body=function(){},t}return _(t,e),t}(uu),cp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Update",t.endpointUrl=function(e){return["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(e.parameters.templateId)},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),dp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Delete",t.endpointUrl=function(e){return["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(e.parameters.templateId)},t.body=function(){},t}return _(t,e),t}(du),lp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Run a template",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Run",t.endpointUrl=function(e){return["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(e.parameters.templateId,"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return _(t,e),t}(cu),pp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of template runs",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){var t;["templateId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}));var n=Object.entries(null!==(t=null==e?void 0:e.options)&&void 0!==t?t:{}).filter((function(e){return void 0!==e[1]})),r=n.length>0?"?".concat(n.map((function(e){return"".concat(e[0],"=").concat(e[1])})).join("&")):"";return"/v1/templates/".concat(e.parameters.templateId,"/runs").concat(r)},t.body=function(){},t}return _(t,e),t}(uu),fp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get information about the given template run.",t.withAuth=!0,t.requiredPermissions="Account > Templates > General > Read",t.endpointUrl=function(e){return["templateId","templateRunId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(e.parameters.templateId,"/runs/").concat(e.parameters.templateRunId)},t.body=function(){},t}return _(t,e),t}(uu),hp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Abort the given template run.",t.withAuth=!0,t.requiredPermissions="Account > Templates > Runs > Abort",t.endpointUrl=function(e){return["templateId","templateRunId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/templates/".concat(e.parameters.templateId,"/runs/").concat(e.parameters.templateRunId,"/abort")},t.body=function(){},t}return _(t,e),t}(cu),vp=function(){function e(){this.loadContext()}return e.prototype.loadContext=function(){this.contextWrapper=this.loadContextWrapper()},e.prototype.getInfo=function(){return""},e.prototype.storeContext=function(e){return P(this,void 0,void 0,(function(){return A(this,(function(t){switch(t.label){case 0:return[4,this.writeContext(e)];case 1:return t.sent(),this.contextWrapper=e,[2]}}))}))},e.prototype.addContext=function(e,t){return void 0===t&&(t=!0),P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){switch(i.label){case 0:if(t||void 0===this.findContext(e.name))return[3,1];throw new Error("Context with name ".concat(e.name," already exists"));case 1:return[4,this.removeContext(e.name)];case 2:i.sent(),i.label=3;case 3:return n=S({host:"https://api.northflank.com"},e),r=this.contextWrapper,o={current:n.name,contexts:R(R([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(o)];case 4:return i.sent(),[2]}}))}))},e.prototype.removeContext=function(e){return P(this,void 0,void 0,(function(){var t,n,r,o;return A(this,(function(i){switch(i.label){case 0:return t=this.contextWrapper,n=t.contexts.filter((function(t){return t.name!==e})),r=t.current===e?void 0:t.current,o={current:r,contexts:R([],n,!0),lastUpdateCheck:t.lastUpdateCheck},[4,this.storeContext(o)];case 1:return i.sent(),[2]}}))}))},e.prototype.getCurrentContext=function(){var e=this.contextWrapper.current;return void 0===e?e:this.findContext(e)},e.prototype.findContext=function(e){return this.contextWrapper.contexts.find((function(t){return t.name===e}))},e.prototype.getCurrentBaseUrl=function(e){var t=this.getCurrentContext();if(!0===e&&!(null==t?void 0:t.host))throw new Error("Context (".concat(null==t?void 0:t.name,") doesn't have a target API host. Please login again."));return null==t?void 0:t.host},e.prototype.getCurrentProjectName=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.project},e.prototype.getCurrentName=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.name},e.prototype.getCurrentToken=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.token},e.prototype.getCurrentServiceName=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.service},e.prototype.getCurrentJobName=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.job},e.prototype.getCurrentPlanId=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.plan},e.prototype.getCurrentRegion=function(){var e;return null===(e=this.getCurrentContext())||void 0===e?void 0:e.region},e.prototype.useContext=function(e){return P(this,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:if(!this.findContext(e))throw new Error("Context with name ".concat(e," doesn't exist"));return t=this.contextWrapper,n=S(S({},t),{current:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.updateToken=function(e,t){return P(this,void 0,void 0,(function(){var n,r,o,i,s;return A(this,(function(a){switch(a.label){case 0:if(n=null!=t?t:this.getCurrentName(),!(r=this.findContext(n)))throw new Error("Context with name ".concat(t," doesn't exist"));return o=this.contextWrapper,i=o.contexts.map((function(t){return t.name===n?S(S({},r),{token:e}):t})),s=S(S({},o),{contexts:i}),[4,this.storeContext(s)];case 1:return a.sent(),[2]}}))}))},e.prototype.useProjectId=function(e){return P(this,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set project id to current context, current context not defined");return n=S(S({},t),{project:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useServiceId=function(e){return P(this,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set service id to current context, current context not defined");return n=S(S({},t),{service:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useJobId=function(e){return P(this,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set job id to current context, current context not defined");return n=S(S({},t),{job:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.usePlanId=function(e){return P(this,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set plan id to current context, current context not defined");return n=S(S({},t),{plan:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useRegion=function(e){return P(this,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:if(void 0===(t=this.getCurrentContext()))throw new Error("Failed to set region id to current context, current context not defined");return n=S(S({},t),{region:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.getLastUpdateCheck=function(){return this.contextWrapper.lastUpdateCheck||new Date},e.prototype.setLastUpdateCheck=function(e){return P(this,void 0,void 0,(function(){var t,n;return A(this,(function(r){switch(r.label){case 0:return t=this.contextWrapper,n=S(S({},t),{lastUpdateCheck:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e}(),mp=function(e){function t(t){var n=e.call(this)||this;return n.assertDir=function(e){return P(n,void 0,void 0,(function(){var t;return A(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,g.promises.mkdir(e,{recursive:!0})];case 1:return[2,n.sent()];case 2:throw t=n.sent(),console.log("Failed to login, local files could not be created: ".concat(e,", error: ").concat(t.message)),t;case 3:return[2]}}))}))},n.configPath=t||"".concat(l.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return _(t,e),t.prototype.loadContextWrapper=function(){try{return JSON.parse(g.readFileSync(this.configFile,"utf8"))}catch(e){return{contexts:[],lastUpdateCheck:new Date(0)}}},t.prototype.writeContext=function(e){return P(this,void 0,void 0,(function(){var t;return A(this,(function(n){switch(n.label){case 0:return[4,this.assertConfigDir()];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,g.promises.writeFile(this.configFile,JSON.stringify(e,null,"\t"),{mode:416})];case 3:return n.sent(),[3,5];case 4:throw t=n.sent(),console.log("Failed to persist api context, local files could not be created, error: ".concat(t.message)),t;case 5:return[2]}}))}))},t.prototype.assertConfigDir=function(){return P(this,void 0,void 0,(function(){return A(this,(function(e){switch(e.label){case 0:return[4,this.assertDir(this.configPath)];case 1:return e.sent(),[2]}}))}))},t.prototype.getInfo=function(){return"Cli config stored in: ".concat(this.configPath)},t}(vp),gp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},t}return _(t,e),t.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},t.prototype.writeContext=function(e){return P(this,void 0,void 0,(function(){return A(this,(function(t){return this.inMemoryContextWrapper=e,[2]}))}))},t}(vp),bp=function(e,t){void 0===t&&(t={});var n,r,o,i=this;this.baseUrl=function(){return i.contextProvider.getCurrentBaseUrl()},this.contextProvider=e,this.forwarding=new Qa(e,new vl(e,t).call,new Rc(e,t).call),this.exec=new nu(e),this.logs=new mu(e),this.metrics=new yu(e),this.endpoints={get:(o={},o.addon=((r=new Uc(e,t)).types=new wu(e,t),r.backupSchedules=new qc(e,t),r.backups=new Nc(e,t),r.backup=((n=new Lc(e,t)).download=new Jc(e,t),n),r.restores=new Wc(e,t),r.containers=new $c(e,t),r.credentials=new Hc(e,t),r.pitrWindow=new Qc(e,t),r.version=new id(e,t),r),o.invoice=function(){var n={};return n.details=new Iu(e,t),n}(),o.cloud=function(){var n={};return n.cluster=new Pu(e,t),n.dockerRegistry=new Uu(e,t),n.integration=new Du(e,t),n}(),o.dnsId=new Fu(e,t),o.domain=new Ju(e,t),o.subdomain=new Vu(e,t),o.logSink=new nc(e,t),o.notification=new cc(e,t),o.registryCredentials=new hc(e,t),o.project=new Pc(e,t),o.job=function(){var n=new hd(e,t);return n.branches=new md(e,t),n.builds=new gd(e,t),n.buildArguments=new yd(e,t),n.buildArgumentDetails=new jd(e,t),n.build=new _d(e,t),n.containers=new Pd(e,t),n.deployment=new Ad(e,t),n.healthChecks=new Cd(e,t),n.pullRequests=new Od(e,t),n.runs=new qd(e,t),n.run=new Td(e,t),n.runtimeEnvironment=new Bd(e,t),n.runtimeEnvironmentDetails=new Fd(e,t),n}(),o.pipeline=new Wd(e,t),o.previewTemplate=new Vd(e,t),o.previewTemplateRun=new Kd(e,t),o.releaseFlow=new Xd(e,t),o.releaseFlowRun=new nl(e,t),o.secret=new ul(e,t),o.secretLink=new pl(e,t),o.secretDetails=new hl(e,t),o.service=function(){var n=new Sl(e,t);return n.branches=new Al(e,t),n.builds=new Rl(e,t),n.buildArguments=new kl(e,t),n.buildArgumentDetails=new Ol(e,t),n.build=new Dl(e,t),n.containers=new Nl(e,t),n.deployment=new Bl(e,t),n.healthChecks=new Fl(e,t),n.ports=new Jl(e,t),n.pullRequests=new Wl(e,t),n.runtimeEnvironment=new Hl(e,t),n.runtimeEnvironmentDetails=new Zl(e,t),n}(),o.volume=new ep(e,t),o.template=new up(e,t),o.templateRun=new fp(e,t),o),list:function(){var n={};return n.invoices=new ju(e,t),n.cloud=function(){var n={};return n.providers=new Eu(e,t),n.clusters=new _u(e,t),n.dockerRegistry=new Cu(e,t),n.integrations=new xu(e,t),n.nodeTypes=new Bu(e,t),n.regions=new Lu(e,t),n}(),n.domains=new Gu(e,t),n.logSinks=new ec(e,t),n.notifications=new ac(e,t),n.registryCredentials=new pc(e,t),n.vcs=new gc(e,t),n.repos=new yc(e,t),n.branches=new wc(e,t),n.plans=new jc(e,t),n.projects=new Ic(e,t),n.addons=new Rc(e,t),n.jobs=new ad(e,t),n.pipelines=new zd(e,t),n.previewTemplatePreviews=new Hd(e,t),n.previewTemplateRuns=new Zd(e,t),n.releaseFlowRuns=new tl(e,t),n.secrets=new ol(e,t),n.services=new vl(e,t),n.volumes=new Xl(e,t),n.regions=new ip(e,t),n.templates=new sp(e,t),n.templateRuns=new pp(e,t),n}(),create:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Su(e,t),n.dockerRegistry=new ku(e,t),n.integration=new qu(e,t),n}(),n.domain=new Mu(e,t),n.logSink=new tc(e,t),n.notification=new uc(e,t),n.customVcs=function(){var n={};return n.token=new bc(e,t),n}(),n.project=new Ec(e,t),n.addon=function(){var n=new Cc(e,t);return n.backupSchedule=new Dc(e,t),n}(),n.job=function(){var n={};return n.cron=new ud(e,t),n.manual=new ld(e,t),n}(),n.secret=new il(e,t),n.service=function(){var n={};return n.build=new ml(e,t),n.combined=new yl(e,t),n.deployment=new Il(e,t),n}(),n.volume=new Ql(e,t),n.template=new ap(e,t),n}(),update:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Au(e,t),n.integration=new Tu(e,t),n}(),n.logSink=new sc(e,t),n.notification=new dc(e,t),n.registryCredentials=new mc(e,t),n.addon=function(){var n={};return n.networkSettings=new Zc(e,t),n.security=new od(e,t),n.version=new sd(e,t),n}(),n.job=function(){var n={};return n.buildArguments=new wd(e,t),n.buildOptions=new Id(e,t),n.buildSource=new Ed(e,t),n.deployment=new Rd(e,t),n.healthChecks=new kd(e,t),n.runtimeEnvironment=new Ld(e,t),n.settings=new Md(e,t),n}(),n.previewTemplate=new $d(e,t),n.releaseFlow=new Qd(e,t),n.secret=new dl(e,t),n.secretLink=new ll(e,t),n.service=function(){var n={};return n.buildArguments=new Ul(e,t),n.buildOptions=new xl(e,t),n.buildSource=new ql(e,t),n.deployment=new Ll(e,t),n.healthChecks=new Gl(e,t),n.ports=new zl(e,t),n.runtimeEnvironment=new Yl(e,t),n}(),n.volume=new tp(e,t),n.template=new cp(e,t),n}(),delete:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Ru(e,t),n.dockerRegistry=new Ou(e,t),n.integration=new Nu(e,t),n}(),n.domain=new zu(e,t),n.subdomain=new $u(e,t),n.logSink=new rc(e,t),n.notification=new lc(e,t),n.registryCredentials=new vc(e,t),n.project=new Ac(e,t),n.addon=function(){var n=new xc(e,t);return n.backupSchedule=new Tc(e,t),n}(),n.backup=new Fc(e,t),n.job=new vd(e,t),n.previewTemplatePreview=new Yd(e,t),n.secret=new cl(e,t),n.secretLink=new fl(e,t),n.service=new Pl(e,t),n.volume=new np(e,t),n.template=new dp(e,t),n}(),add:function(){var n={};return n.domain=function(){var n={};return n.subdomain=new Wu(e,t),n}(),n.registryCredentials=new fc(e,t),n}(),assign:function(){var n={};return n.subdomain=function(){var n={};return n.service=new Hu(e,t),n}(),n}(),unassign:function(){var n={};return n.subdomain=new Yu(e,t),n}(),disable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new Zu(e,t),n}(),n}(),enable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new Ku(e,t),n}(),n}(),verify:function(){var n={};return n.subdomain=new Xu(e,t),n.domain=new Qu(e,t),n}(),pause:function(){var n={};return n.logSink=new oc(e,t),n.addon=new Kc(e,t),n.job=new Ud(e,t),n.service=new Ml(e,t),n}(),resume:function(){var n={};return n.logSink=new ic(e,t),n.addon=new nd(e,t),n.job=new xd(e,t),n.service=new $l(e,t),n}(),put:function(){var n={};return n.project=new _c(e,t),n.addon=new kc(e,t),n.job=function(){var n={};return n.cron=new cd(e,t),n.manual=new pd(e,t),n}(),n.secret=new sl(e,t),n.service=function(){var n={};return n.build=new gl(e,t),n.combined=new wl(e,t),n.deployment=new El(e,t),n}(),n}(),patch:function(){var n={};return n.project=new Sc(e,t),n.addon=new Oc(e,t),n.job=function(){var n={};return n.cron=new dd(e,t),n.manual=new fd(e,t),n}(),n.secret=new al(e,t),n.service=function(){var n={};return n.build=new bl(e,t),n.combined=new jl(e,t),n.deployment=new _l(e,t),n}(),n}(),backup:function(){var n={};return n.addon=new Bc(e,t),n}(),abort:function(){var n={};return n.addon=function(){var n={};return n.backup=new Gc(e,t),n.restore=new Mc(e,t),n}(),n.job=function(){var n={};return n.build=new Sd(e,t),n.run=new Nd(e,t),n}(),n.releaseFlowRun=new rl(e,t),n.service=function(){var n={};return n.build=new Tl(e,t),n}(),n.templateRun=new hp(e,t),n}(),restore:function(){var n={};return n.addon=function(){var n={};return n.backup=new zc(e,t),n}(),n}(),retain:function(){var n={};return n.addon=function(){var n={};return n.backup=new Vc(e,t),n}(),n}(),import:function(){var n={};return n.addon=function(){var n={};return n.backup=new Yc(e,t),n}(),n}(),start:function(){var n={};return n.addon=function(){var n={};return n.pitr=new Xc(e,t),n}(),n.job=function(){var n={};return n.build=new bd(e,t),n.run=new Dd(e,t),n}(),n.service=function(){var n={};return n.build=new Cl(e,t),n}(),n}(),reset:function(){var n={};return n.addon=new ed(e,t),n}(),restart:function(){var n={};return n.addon=new td(e,t),n.service=new Vl(e,t),n}(),scale:function(){var n={};return n.addon=new rd(e,t),n.job=new Gd(e,t),n.service=new Kl(e,t),n}(),suspend:function(){var n={};return n.job=new Jd(e,t),n}(),run:function(){var n={};return n.releaseFlow=new el(e,t),n.template=new lp(e,t),n}(),attach:function(){var n={};return n.volume=new rp(e,t),n}(),detach:function(){var n={};return n.volume=new op(e,t),n}()},this.get=function(){var e={};return e.addon=function(){var e=i.endpoints.get.addon.call;return e.types=i.endpoints.get.addon.types.call,e.backupSchedules=i.endpoints.get.addon.backupSchedules.call,e.backups=i.endpoints.get.addon.backups.call,e.backup=function(){var e=i.endpoints.get.addon.backup.call;return e.download=i.endpoints.get.addon.backup.download.call,e.logs=i.logs.getAddonBackupLogs,e.logTail=i.logs.tailAddonBackupLogs,e}(),e.restores=function(){var e=i.endpoints.get.addon.restores.call;return e.logs=i.logs.getAddonRestoresLogs,e.logTail=i.logs.tailAddonRestoresLogs,e}(),e.containers=i.endpoints.get.addon.containers.call,e.credentials=i.endpoints.get.addon.credentials.call,e.pitrWindow=i.endpoints.get.addon.pitrWindow.call,e.version=i.endpoints.get.addon.version.call,e.logs=i.logs.getAddonLogs,e.logTail=i.logs.tailAddonLogs,e.metrics=i.metrics.getAddonMetrics,e.metricsRange=i.metrics.getAddonMetricsRange,e}(),e.invoice=function(){var e={};return e.details=i.endpoints.get.invoice.details.call,e}(),e.cloud=function(){var e={};return e.cluster=i.endpoints.get.cloud.cluster.call,e.dockerRegistry=i.endpoints.get.cloud.dockerRegistry.call,e.integration=i.endpoints.get.cloud.integration.call,e}(),e.dnsId=i.endpoints.get.dnsId.call,e.domain=i.endpoints.get.domain.call,e.subdomain=i.endpoints.get.subdomain.call,e.logSink=i.endpoints.get.logSink.call,e.notification=i.endpoints.get.notification.call,e.registryCredentials=i.endpoints.get.registryCredentials.call,e.project=i.endpoints.get.project.call,e.job=function(){var e=i.endpoints.get.job.call;return e.branches=i.endpoints.get.job.branches.call,e.builds=i.endpoints.get.job.builds.call,e.buildArguments=i.endpoints.get.job.buildArguments.call,e.buildArgumentDetails=i.endpoints.get.job.buildArgumentDetails.call,e.build=i.endpoints.get.job.build.call,e.containers=i.endpoints.get.job.containers.call,e.deployment=i.endpoints.get.job.deployment.call,e.healthChecks=i.endpoints.get.job.healthChecks.call,e.pullRequests=i.endpoints.get.job.pullRequests.call,e.runs=i.endpoints.get.job.runs.call,e.run=i.endpoints.get.job.run.call,e.runtimeEnvironment=i.endpoints.get.job.runtimeEnvironment.call,e.runtimeEnvironmentDetails=i.endpoints.get.job.runtimeEnvironmentDetails.call,e.logs=i.logs.getJobLogs,e.buildLogs=i.logs.getJobBuildLogs,e.logTail=i.logs.tailJobLogs,e.buildLogTail=i.logs.tailJobBuildLogs,e.metrics=i.metrics.getJobMetrics,e.buildMetrics=i.metrics.getJobBuildMetrics,e.metricsRange=i.metrics.getJobMetricsRange,e.buildMetricsRange=i.metrics.getJobBuildMetricsRange,e}(),e.pipeline=i.endpoints.get.pipeline.call,e.previewTemplate=i.endpoints.get.previewTemplate.call,e.previewTemplateRun=i.endpoints.get.previewTemplateRun.call,e.releaseFlow=i.endpoints.get.releaseFlow.call,e.releaseFlowRun=i.endpoints.get.releaseFlowRun.call,e.secret=i.endpoints.get.secret.call,e.secretLink=i.endpoints.get.secretLink.call,e.secretDetails=i.endpoints.get.secretDetails.call,e.service=function(){var e=i.endpoints.get.service.call;return e.branches=i.endpoints.get.service.branches.call,e.builds=i.endpoints.get.service.builds.call,e.buildArguments=i.endpoints.get.service.buildArguments.call,e.buildArgumentDetails=i.endpoints.get.service.buildArgumentDetails.call,e.build=i.endpoints.get.service.build.call,e.containers=i.endpoints.get.service.containers.call,e.deployment=i.endpoints.get.service.deployment.call,e.healthChecks=i.endpoints.get.service.healthChecks.call,e.ports=i.endpoints.get.service.ports.call,e.pullRequests=i.endpoints.get.service.pullRequests.call,e.runtimeEnvironment=i.endpoints.get.service.runtimeEnvironment.call,e.runtimeEnvironmentDetails=i.endpoints.get.service.runtimeEnvironmentDetails.call,e.logs=i.logs.getServiceLogs,e.buildLogs=i.logs.getServiceBuildLogs,e.logTail=i.logs.tailServiceLogs,e.buildLogTail=i.logs.tailServiceBuildLogs,e.metrics=i.metrics.getServiceMetrics,e.buildMetrics=i.metrics.getServiceBuildMetrics,e.metricsRange=i.metrics.getServiceMetricsRange,e.buildMetricsRange=i.metrics.getServiceBuildMetricsRange,e}(),e.volume=i.endpoints.get.volume.call,e.template=i.endpoints.get.template.call,e.templateRun=i.endpoints.get.templateRun.call,e}(),this.list=function(){var e={};return e.invoices=i.endpoints.list.invoices.call,e.cloud=function(){var e={};return e.providers=i.endpoints.list.cloud.providers.call,e.clusters=i.endpoints.list.cloud.clusters.call,e.dockerRegistry=i.endpoints.list.cloud.dockerRegistry.call,e.integrations=i.endpoints.list.cloud.integrations.call,e.nodeTypes=i.endpoints.list.cloud.nodeTypes.call,e.regions=i.endpoints.list.cloud.regions.call,e}(),e.domains=i.endpoints.list.domains.call,e.logSinks=i.endpoints.list.logSinks.call,e.notifications=i.endpoints.list.notifications.call,e.registryCredentials=i.endpoints.list.registryCredentials.call,e.vcs=i.endpoints.list.vcs.call,e.repos=i.endpoints.list.repos.call,e.branches=i.endpoints.list.branches.call,e.plans=i.endpoints.list.plans.call,e.projects=i.endpoints.list.projects.call,e.addons=i.endpoints.list.addons.call,e.jobs=i.endpoints.list.jobs.call,e.pipelines=i.endpoints.list.pipelines.call,e.previewTemplatePreviews=i.endpoints.list.previewTemplatePreviews.call,e.previewTemplateRuns=i.endpoints.list.previewTemplateRuns.call,e.releaseFlowRuns=i.endpoints.list.releaseFlowRuns.call,e.secrets=i.endpoints.list.secrets.call,e.services=i.endpoints.list.services.call,e.volumes=i.endpoints.list.volumes.call,e.regions=i.endpoints.list.regions.call,e.templates=i.endpoints.list.templates.call,e.templateRuns=i.endpoints.list.templateRuns.call,e}(),this.create=function(){var e={};return e.cloud=function(){var e={};return e.cluster=i.endpoints.create.cloud.cluster.call,e.dockerRegistry=i.endpoints.create.cloud.dockerRegistry.call,e.integration=i.endpoints.create.cloud.integration.call,e}(),e.domain=i.endpoints.create.domain.call,e.logSink=i.endpoints.create.logSink.call,e.notification=i.endpoints.create.notification.call,e.customVcs=function(){var e={};return e.token=i.endpoints.create.customVcs.token.call,e}(),e.project=i.endpoints.create.project.call,e.addon=function(){var e=i.endpoints.create.addon.call;return e.backupSchedule=i.endpoints.create.addon.backupSchedule.call,e}(),e.job=function(){var e={};return e.cron=i.endpoints.create.job.cron.call,e.manual=i.endpoints.create.job.manual.call,e}(),e.secret=i.endpoints.create.secret.call,e.service=function(){var e={};return e.build=i.endpoints.create.service.build.call,e.combined=i.endpoints.create.service.combined.call,e.deployment=i.endpoints.create.service.deployment.call,e}(),e.volume=i.endpoints.create.volume.call,e.template=i.endpoints.create.template.call,e}(),this.update=function(){var e={};return e.cloud=function(){var e={};return e.cluster=i.endpoints.update.cloud.cluster.call,e.integration=i.endpoints.update.cloud.integration.call,e}(),e.logSink=i.endpoints.update.logSink.call,e.notification=i.endpoints.update.notification.call,e.registryCredentials=i.endpoints.update.registryCredentials.call,e.addon=function(){var e={};return e.networkSettings=i.endpoints.update.addon.networkSettings.call,e.security=i.endpoints.update.addon.security.call,e.version=i.endpoints.update.addon.version.call,e}(),e.job=function(){var e={};return e.buildArguments=i.endpoints.update.job.buildArguments.call,e.buildOptions=i.endpoints.update.job.buildOptions.call,e.buildSource=i.endpoints.update.job.buildSource.call,e.deployment=i.endpoints.update.job.deployment.call,e.healthChecks=i.endpoints.update.job.healthChecks.call,e.runtimeEnvironment=i.endpoints.update.job.runtimeEnvironment.call,e.settings=i.endpoints.update.job.settings.call,e}(),e.previewTemplate=i.endpoints.update.previewTemplate.call,e.releaseFlow=i.endpoints.update.releaseFlow.call,e.secret=i.endpoints.update.secret.call,e.secretLink=i.endpoints.update.secretLink.call,e.service=function(){var e={};return e.buildArguments=i.endpoints.update.service.buildArguments.call,e.buildOptions=i.endpoints.update.service.buildOptions.call,e.buildSource=i.endpoints.update.service.buildSource.call,e.deployment=i.endpoints.update.service.deployment.call,e.healthChecks=i.endpoints.update.service.healthChecks.call,e.ports=i.endpoints.update.service.ports.call,e.runtimeEnvironment=i.endpoints.update.service.runtimeEnvironment.call,e}(),e.volume=i.endpoints.update.volume.call,e.template=i.endpoints.update.template.call,e}(),this.delete=function(){var e={};return e.cloud=function(){var e={};return e.cluster=i.endpoints.delete.cloud.cluster.call,e.dockerRegistry=i.endpoints.delete.cloud.dockerRegistry.call,e.integration=i.endpoints.delete.cloud.integration.call,e}(),e.domain=i.endpoints.delete.domain.call,e.subdomain=i.endpoints.delete.subdomain.call,e.logSink=i.endpoints.delete.logSink.call,e.notification=i.endpoints.delete.notification.call,e.registryCredentials=i.endpoints.delete.registryCredentials.call,e.project=i.endpoints.delete.project.call,e.addon=function(){var e=i.endpoints.delete.addon.call;return e.backupSchedule=i.endpoints.delete.addon.backupSchedule.call,e}(),e.backup=i.endpoints.delete.backup.call,e.job=i.endpoints.delete.job.call,e.previewTemplatePreview=i.endpoints.delete.previewTemplatePreview.call,e.secret=i.endpoints.delete.secret.call,e.secretLink=i.endpoints.delete.secretLink.call,e.service=i.endpoints.delete.service.call,e.volume=i.endpoints.delete.volume.call,e.template=i.endpoints.delete.template.call,e}(),this.add=function(){var e={};return e.domain=function(){var e={};return e.subdomain=i.endpoints.add.domain.subdomain.call,e}(),e.registryCredentials=i.endpoints.add.registryCredentials.call,e}(),this.assign=function(){var e={};return e.subdomain=function(){var e={};return e.service=i.endpoints.assign.subdomain.service.call,e}(),e}(),this.unassign=function(){var e={};return e.subdomain=i.endpoints.unassign.subdomain.call,e}(),this.disable=function(){var e={};return e.subdomain=function(){var e={};return e.cdn=i.endpoints.disable.subdomain.cdn.call,e}(),e}(),this.enable=function(){var e={};return e.subdomain=function(){var e={};return e.cdn=i.endpoints.enable.subdomain.cdn.call,e}(),e}(),this.verify=function(){var e={};return e.subdomain=i.endpoints.verify.subdomain.call,e.domain=i.endpoints.verify.domain.call,e}(),this.pause=function(){var e={};return e.logSink=i.endpoints.pause.logSink.call,e.addon=i.endpoints.pause.addon.call,e.job=i.endpoints.pause.job.call,e.service=i.endpoints.pause.service.call,e}(),this.resume=function(){var e={};return e.logSink=i.endpoints.resume.logSink.call,e.addon=i.endpoints.resume.addon.call,e.job=i.endpoints.resume.job.call,e.service=i.endpoints.resume.service.call,e}(),this.put=function(){var e={};return e.project=i.endpoints.put.project.call,e.addon=i.endpoints.put.addon.call,e.job=function(){var e={};return e.cron=i.endpoints.put.job.cron.call,e.manual=i.endpoints.put.job.manual.call,e}(),e.secret=i.endpoints.put.secret.call,e.service=function(){var e={};return e.build=i.endpoints.put.service.build.call,e.combined=i.endpoints.put.service.combined.call,e.deployment=i.endpoints.put.service.deployment.call,e}(),e}(),this.patch=function(){var e={};return e.project=i.endpoints.patch.project.call,e.addon=i.endpoints.patch.addon.call,e.job=function(){var e={};return e.cron=i.endpoints.patch.job.cron.call,e.manual=i.endpoints.patch.job.manual.call,e}(),e.secret=i.endpoints.patch.secret.call,e.service=function(){var e={};return e.build=i.endpoints.patch.service.build.call,e.combined=i.endpoints.patch.service.combined.call,e.deployment=i.endpoints.patch.service.deployment.call,e}(),e}(),this.backup=function(){var e={};return e.addon=i.endpoints.backup.addon.call,e}(),this.abort=function(){var e={};return e.addon=function(){var e={};return e.backup=i.endpoints.abort.addon.backup.call,e.restore=i.endpoints.abort.addon.restore.call,e}(),e.job=function(){var e={};return e.build=i.endpoints.abort.job.build.call,e.run=i.endpoints.abort.job.run.call,e}(),e.releaseFlowRun=i.endpoints.abort.releaseFlowRun.call,e.service=function(){var e={};return e.build=i.endpoints.abort.service.build.call,e}(),e.templateRun=i.endpoints.abort.templateRun.call,e}(),this.restore=function(){var e={};return e.addon=function(){var e={};return e.backup=i.endpoints.restore.addon.backup.call,e}(),e}(),this.retain=function(){var e={};return e.addon=function(){var e={};return e.backup=i.endpoints.retain.addon.backup.call,e}(),e}(),this.import=function(){var e={};return e.addon=function(){var e={};return e.backup=i.endpoints.import.addon.backup.call,e}(),e}(),this.start=function(){var e={};return e.addon=function(){var e={};return e.pitr=i.endpoints.start.addon.pitr.call,e}(),e.job=function(){var e={};return e.build=i.endpoints.start.job.build.call,e.run=i.endpoints.start.job.run.call,e}(),e.service=function(){var e={};return e.build=i.endpoints.start.service.build.call,e}(),e}(),this.reset=function(){var e={};return e.addon=i.endpoints.reset.addon.call,e}(),this.restart=function(){var e={};return e.addon=i.endpoints.restart.addon.call,e.service=i.endpoints.restart.service.call,e}(),this.scale=function(){var e={};return e.addon=i.endpoints.scale.addon.call,e.job=i.endpoints.scale.job.call,e.service=i.endpoints.scale.service.call,e}(),this.suspend=function(){var e={};return e.job=i.endpoints.suspend.job.call,e}(),this.run=function(){var e={};return e.releaseFlow=i.endpoints.run.releaseFlow.call,e.template=i.endpoints.run.template.call,e}(),this.attach=function(){var e={};return e.volume=i.endpoints.attach.volume.call,e}(),this.detach=function(){var e={};return e.volume=i.endpoints.detach.volume.call,e}()};export{Gc as AbortAddonBackupEndpoint,Mc as AbortAddonRestoreEndpoint,Sd as AbortJobBuildEndpoint,Nd as AbortJobRunEndpoint,rl as AbortReleaseflowrunEndpoint,Tl as AbortServiceBuildEndpoint,hp as AbortTemplaterunEndpoint,Wu as AddDomainSubdomainEndpoint,fc as AddRegistrycredentialsEndpoint,bp as ApiClient,vp as ApiClientContextProvider,mp as ApiClientFileContextProvider,gp as ApiClientInMemoryContextProvider,au as ApiEndpoint,Hu as AssignSubdomainServiceEndpoint,rp as AttachVolumeEndpoint,Bc as BackupAddonEndpoint,Dc as CreateAddonBackupscheduleEndpoint,Cc as CreateAddonEndpoint,Su as CreateCloudClusterEndpoint,ku as CreateCloudDockerregistryEndpoint,qu as CreateCloudIntegrationEndpoint,bc as CreateCustomvcsTokenEndpoint,Mu as CreateDomainEndpoint,ud as CreateJobCronEndpoint,ld as CreateJobManualEndpoint,tc as CreateLogsinkEndpoint,uc as CreateNotificationEndpoint,Ec as CreateProjectEndpoint,il as CreateSecretEndpoint,ml as CreateServiceBuildEndpoint,yl as CreateServiceCombinedEndpoint,Il as CreateServiceDeploymentEndpoint,ap as CreateTemplateEndpoint,Ql as CreateVolumeEndpoint,Tc as DeleteAddonBackupscheduleEndpoint,xc as DeleteAddonEndpoint,du as DeleteApiEndpoint,Fc as DeleteBackupEndpoint,Ru as DeleteCloudClusterEndpoint,Ou as DeleteCloudDockerregistryEndpoint,Nu as DeleteCloudIntegrationEndpoint,zu as DeleteDomainEndpoint,vd as DeleteJobEndpoint,rc as DeleteLogsinkEndpoint,lc as DeleteNotificationEndpoint,Yd as DeletePreviewtemplatepreviewEndpoint,Ac as DeleteProjectEndpoint,vc as DeleteRegistrycredentialsEndpoint,cl as DeleteSecretEndpoint,fl as DeleteSecretlinkEndpoint,Pl as DeleteServiceEndpoint,$u as DeleteSubdomainEndpoint,dp as DeleteTemplateEndpoint,np as DeleteVolumeEndpoint,op as DetachVolumeEndpoint,Zu as DisableSubdomainCdnEndpoint,Ku as EnableSubdomainCdnEndpoint,tu as ExecCommandStandard,Jc as GetAddonBackupDownloadEndpoint,Lc as GetAddonBackupEndpoint,Nc as GetAddonBackupsEndpoint,qc as GetAddonBackupschedulesEndpoint,$c as GetAddonContainersEndpoint,Hc as GetAddonCredentialsEndpoint,Uc as GetAddonEndpoint,Qc as GetAddonPitrwindowEndpoint,Wc as GetAddonRestoresEndpoint,wu as GetAddonTypesEndpoint,id as GetAddonVersionEndpoint,uu as GetApiEndpoint,Pu as GetCloudClusterEndpoint,Uu as GetCloudDockerregistryEndpoint,Du as GetCloudIntegrationEndpoint,Fu as GetDnsidEndpoint,Ju as GetDomainEndpoint,Iu as GetInvoiceDetailsEndpoint,md as GetJobBranchesEndpoint,_d as GetJobBuildEndpoint,jd as GetJobBuildargumentdetailsEndpoint,yd as GetJobBuildargumentsEndpoint,gd as GetJobBuildsEndpoint,Pd as GetJobContainersEndpoint,Ad as GetJobDeploymentEndpoint,hd as GetJobEndpoint,Cd as GetJobHealthchecksEndpoint,Od as GetJobPullrequestsEndpoint,Td as GetJobRunEndpoint,qd as GetJobRunsEndpoint,Bd as GetJobRuntimeenvironmentEndpoint,Fd as GetJobRuntimeenvironmentdetailsEndpoint,nc as GetLogsinkEndpoint,cc as GetNotificationEndpoint,Wd as GetPipelineEndpoint,Vd as GetPreviewtemplateEndpoint,Kd as GetPreviewtemplaterunEndpoint,Pc as GetProjectEndpoint,hc as GetRegistrycredentialsEndpoint,Xd as GetReleaseflowEndpoint,nl as GetReleaseflowrunEndpoint,ul as GetSecretEndpoint,hl as GetSecretdetailsEndpoint,pl as GetSecretlinkEndpoint,Al as GetServiceBranchesEndpoint,Dl as GetServiceBuildEndpoint,Ol as GetServiceBuildargumentdetailsEndpoint,kl as GetServiceBuildargumentsEndpoint,Rl as GetServiceBuildsEndpoint,Nl as GetServiceContainersEndpoint,Bl as GetServiceDeploymentEndpoint,Sl as GetServiceEndpoint,Fl as GetServiceHealthchecksEndpoint,Jl as GetServicePortsEndpoint,Wl as GetServicePullrequestsEndpoint,Hl as GetServiceRuntimeenvironmentEndpoint,Zl as GetServiceRuntimeenvironmentdetailsEndpoint,Vu as GetSubdomainEndpoint,up as GetTemplateEndpoint,fp as GetTemplaterunEndpoint,ep as GetVolumeEndpoint,Yc as ImportAddonBackupEndpoint,Rc as ListAddonsEndpoint,wc as ListBranchesEndpoint,_u as ListCloudClustersEndpoint,Cu as ListCloudDockerregistryEndpoint,xu as ListCloudIntegrationsEndpoint,Bu as ListCloudNodetypesEndpoint,Eu as ListCloudProvidersEndpoint,Lu as ListCloudRegionsEndpoint,Gu as ListDomainsEndpoint,ju as ListInvoicesEndpoint,ad as ListJobsEndpoint,ec as ListLogsinksEndpoint,ac as ListNotificationsEndpoint,zd as ListPipelinesEndpoint,jc as ListPlansEndpoint,Hd as ListPreviewtemplatepreviewsEndpoint,Zd as ListPreviewtemplaterunsEndpoint,Ic as ListProjectsEndpoint,ip as ListRegionsEndpoint,pc as ListRegistrycredentialsEndpoint,tl as ListReleaseflowrunsEndpoint,yc as ListReposEndpoint,ol as ListSecretsEndpoint,vl as ListServicesEndpoint,pp as ListTemplaterunsEndpoint,sp as ListTemplatesEndpoint,gc as ListVcsEndpoint,Xl as ListVolumesEndpoint,Ya as MetricType,ru as NorthflankApiCallError,nu as NorthflankExecCommand,mu as NorthflankLogFetch,yu as NorthflankMetricFetch,Qa as NorthflankPortForwarder,Oc as PatchAddonEndpoint,pu as PatchApiEndpoint,dd as PatchJobCronEndpoint,fd as PatchJobManualEndpoint,Sc as PatchProjectEndpoint,al as PatchSecretEndpoint,bl as PatchServiceBuildEndpoint,jl as PatchServiceCombinedEndpoint,_l as PatchServiceDeploymentEndpoint,Kc as PauseAddonEndpoint,Ud as PauseJobEndpoint,oc as PauseLogsinkEndpoint,Ml as PauseServiceEndpoint,cu as PostApiEndpoint,kc as PutAddonEndpoint,lu as PutApiEndpoint,cd as PutJobCronEndpoint,pd as PutJobManualEndpoint,_c as PutProjectEndpoint,sl as PutSecretEndpoint,gl as PutServiceBuildEndpoint,wl as PutServiceCombinedEndpoint,El as PutServiceDeploymentEndpoint,ed as ResetAddonEndpoint,td as RestartAddonEndpoint,Vl as RestartServiceEndpoint,zc as RestoreAddonBackupEndpoint,nd as ResumeAddonEndpoint,xd as ResumeJobEndpoint,ic as ResumeLogsinkEndpoint,$l as ResumeServiceEndpoint,Vc as RetainAddonBackupEndpoint,el as RunReleaseflowEndpoint,lp as RunTemplateEndpoint,rd as ScaleAddonEndpoint,Gd as ScaleJobEndpoint,Kl as ScaleServiceEndpoint,Xc as StartAddonPitrEndpoint,bd as StartJobBuildEndpoint,Dd as StartJobRunEndpoint,Cl as StartServiceBuildEndpoint,Jd as SuspendJobEndpoint,Yu as UnassignSubdomainEndpoint,Zc as UpdateAddonNetworksettingsEndpoint,od as UpdateAddonSecurityEndpoint,sd as UpdateAddonVersionEndpoint,Au as UpdateCloudClusterEndpoint,Tu as UpdateCloudIntegrationEndpoint,wd as UpdateJobBuildargumentsEndpoint,Id as UpdateJobBuildoptionsEndpoint,Ed as UpdateJobBuildsourceEndpoint,Rd as UpdateJobDeploymentEndpoint,kd as UpdateJobHealthchecksEndpoint,Ld as UpdateJobRuntimeenvironmentEndpoint,Md as UpdateJobSettingsEndpoint,sc as UpdateLogsinkEndpoint,dc as UpdateNotificationEndpoint,$d as UpdatePreviewtemplateEndpoint,mc as UpdateRegistrycredentialsEndpoint,Qd as UpdateReleaseflowEndpoint,dl as UpdateSecretEndpoint,ll as UpdateSecretlinkEndpoint,Ul as UpdateServiceBuildargumentsEndpoint,xl as UpdateServiceBuildoptionsEndpoint,ql as UpdateServiceBuildsourceEndpoint,Ll as UpdateServiceDeploymentEndpoint,Gl as UpdateServiceHealthchecksEndpoint,zl as UpdateServicePortsEndpoint,Yl as UpdateServiceRuntimeenvironmentEndpoint,cp as UpdateTemplateEndpoint,tp as UpdateVolumeEndpoint,Qu as VerifyDomainEndpoint,Xu as VerifySubdomainEndpoint};
1
+ import t,{EventEmitter as e}from"events";import*as n from"stream";import r,{Transform as o}from"stream";import i from"http";import s,{fileURLToPath as a}from"url";import u from"punycode";import c from"https";import d from"zlib";import l from"os";import*as p from"net";import f,{Socket as h}from"net";import{spawn as v,execSync as m}from"child_process";import g from"fs";import b from"path";import y from"buffer";import w from"crypto";import j from"tls";import I from"dgram";var E=function(t,e){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},E(t,e)};function _(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}E(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var S=function(){return S=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},S.apply(this,arguments)};function P(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{u(r.next(t))}catch(t){i(t)}}function a(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))}function A(t,e){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(u){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function R(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var C="object"==typeof global&&global&&global.Object===Object&&global,k="object"==typeof self&&self&&self.Object===Object&&self,U=C||k||Function("return this")(),O=U.Symbol,x=Object.prototype,q=x.hasOwnProperty,D=x.toString,T=O?O.toStringTag:void 0;var N=Object.prototype.toString;var B="[object Null]",L="[object Undefined]",F=O?O.toStringTag:void 0;function G(t){return null==t?void 0===t?L:B:F&&F in Object(t)?function(t){var e=q.call(t,T),n=t[T];try{t[T]=void 0;var r=!0}catch(t){}var o=D.call(t);return r&&(e?t[T]=n:delete t[T]),o}(t):function(t){return N.call(t)}(t)}function M(t){return null!=t&&"object"==typeof t}var J="[object Symbol]";function z(t){return"symbol"==typeof t||M(t)&&G(t)==J}function W(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}var V=Array.isArray,$=1/0,H=O?O.prototype:void 0,Y=H?H.toString:void 0;function Z(t){if("string"==typeof t)return t;if(V(t))return W(t,Z)+"";if(z(t))return Y?Y.call(t):"";var e=t+"";return"0"==e&&1/t==-$?"-0":e}function K(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function X(t){return t}var Q="[object AsyncFunction]",tt="[object Function]",et="[object GeneratorFunction]",nt="[object Proxy]";function rt(t){if(!K(t))return!1;var e=G(t);return e==tt||e==et||e==Q||e==nt}var ot,it=U["__core-js_shared__"],st=(ot=/[^.]+$/.exec(it&&it.keys&&it.keys.IE_PROTO||""))?"Symbol(src)_1."+ot:"";var at=Function.prototype.toString;function ut(t){if(null!=t){try{return at.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var ct=/^\[object .+?Constructor\]$/,dt=Function.prototype,lt=Object.prototype,pt=dt.toString,ft=lt.hasOwnProperty,ht=RegExp("^"+pt.call(ft).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vt(t){return!(!K(t)||(e=t,st&&st in e))&&(rt(t)?ht:ct).test(ut(t));var e}function mt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return vt(n)?n:void 0}var gt=mt(U,"WeakMap"),bt=Object.create,yt=function(){function t(){}return function(e){if(!K(e))return{};if(bt)return bt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var wt=Date.now;var jt,It,Et,_t=function(){try{var t=mt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),St=_t,Pt=St?function(t,e){return St(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:X,At=(jt=Pt,It=0,Et=0,function(){var t=wt(),e=16-(t-Et);if(Et=t,e>0){if(++It>=800)return arguments[0]}else It=0;return jt.apply(void 0,arguments)}),Rt=9007199254740991,Ct=/^(?:0|[1-9]\d*)$/;function kt(t,e){var n=typeof t;return!!(e=null==e?Rt:e)&&("number"==n||"symbol"!=n&&Ct.test(t))&&t>-1&&t%1==0&&t<e}function Ut(t,e,n){"__proto__"==e&&St?St(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ot(t,e){return t===e||t!=t&&e!=e}var xt=Object.prototype.hasOwnProperty;function qt(t,e,n){var r=t[e];xt.call(t,e)&&Ot(r,n)&&(void 0!==n||e in t)||Ut(t,e,n)}var Dt=Math.max;function Tt(t,e){return At(function(t,e,n){return e=Dt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=Dt(r.length-e,0),s=Array(i);++o<i;)s[o]=r[e+o];o=-1;for(var a=Array(e+1);++o<e;)a[o]=r[o];return a[e]=n(s),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,a)}}(t,e,X),t+"")}var Nt=9007199254740991;function Bt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Nt}function Lt(t){return null!=t&&Bt(t.length)&&!rt(t)}var Ft=Object.prototype;function Gt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ft)}function Mt(t){return M(t)&&"[object Arguments]"==G(t)}var Jt=Object.prototype,zt=Jt.hasOwnProperty,Wt=Jt.propertyIsEnumerable,Vt=Mt(function(){return arguments}())?Mt:function(t){return M(t)&&zt.call(t,"callee")&&!Wt.call(t,"callee")};var $t="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ht=$t&&"object"==typeof module&&module&&!module.nodeType&&module,Yt=Ht&&Ht.exports===$t?U.Buffer:void 0,Zt=(Yt?Yt.isBuffer:void 0)||function(){return!1},Kt={};Kt["[object Float32Array]"]=Kt["[object Float64Array]"]=Kt["[object Int8Array]"]=Kt["[object Int16Array]"]=Kt["[object Int32Array]"]=Kt["[object Uint8Array]"]=Kt["[object Uint8ClampedArray]"]=Kt["[object Uint16Array]"]=Kt["[object Uint32Array]"]=!0,Kt["[object Arguments]"]=Kt["[object Array]"]=Kt["[object ArrayBuffer]"]=Kt["[object Boolean]"]=Kt["[object DataView]"]=Kt["[object Date]"]=Kt["[object Error]"]=Kt["[object Function]"]=Kt["[object Map]"]=Kt["[object Number]"]=Kt["[object Object]"]=Kt["[object RegExp]"]=Kt["[object Set]"]=Kt["[object String]"]=Kt["[object WeakMap]"]=!1;var Xt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Qt=Xt&&"object"==typeof module&&module&&!module.nodeType&&module,te=Qt&&Qt.exports===Xt&&C.process,ee=function(){try{var t=Qt&&Qt.require&&Qt.require("util").types;return t||te&&te.binding&&te.binding("util")}catch(t){}}(),ne=ee&&ee.isTypedArray,re=ne?function(t){return function(e){return t(e)}}(ne):function(t){return M(t)&&Bt(t.length)&&!!Kt[G(t)]},oe=re,ie=Object.prototype.hasOwnProperty;function se(t,e){var n=V(t),r=!n&&Vt(t),o=!n&&!r&&Zt(t),i=!n&&!r&&!o&&oe(t),s=n||r||o||i,a=s?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],u=a.length;for(var c in t)!e&&!ie.call(t,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||kt(c,u))||a.push(c);return a}function ae(t,e){return function(n){return t(e(n))}}var ue=ae(Object.keys,Object),ce=Object.prototype.hasOwnProperty;function de(t){return Lt(t)?se(t):function(t){if(!Gt(t))return ue(t);var e=[];for(var n in Object(t))ce.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var le=Object.prototype.hasOwnProperty;function pe(t){if(!K(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Gt(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n}function fe(t){return Lt(t)?se(t,!0):pe(t)}var he=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ve=/^\w*$/;function me(t,e){if(V(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!z(t))||(ve.test(t)||!he.test(t)||null!=e&&t in Object(e))}var ge=mt(Object,"create");var be=Object.prototype.hasOwnProperty;var ye=Object.prototype.hasOwnProperty;function we(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function je(t,e){for(var n=t.length;n--;)if(Ot(t[n][0],e))return n;return-1}we.prototype.clear=function(){this.__data__=ge?ge(null):{},this.size=0},we.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},we.prototype.get=function(t){var e=this.__data__;if(ge){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return be.call(e,t)?e[t]:void 0},we.prototype.has=function(t){var e=this.__data__;return ge?void 0!==e[t]:ye.call(e,t)},we.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ge&&void 0===e?"__lodash_hash_undefined__":e,this};var Ie=Array.prototype.splice;function Ee(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ee.prototype.clear=function(){this.__data__=[],this.size=0},Ee.prototype.delete=function(t){var e=this.__data__,n=je(e,t);return!(n<0)&&(n==e.length-1?e.pop():Ie.call(e,n,1),--this.size,!0)},Ee.prototype.get=function(t){var e=this.__data__,n=je(e,t);return n<0?void 0:e[n][1]},Ee.prototype.has=function(t){return je(this.__data__,t)>-1},Ee.prototype.set=function(t,e){var n=this.__data__,r=je(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var _e=mt(U,"Map");function Se(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function Pe(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Pe.prototype.clear=function(){this.size=0,this.__data__={hash:new we,map:new(_e||Ee),string:new we}},Pe.prototype.delete=function(t){var e=Se(this,t).delete(t);return this.size-=e?1:0,e},Pe.prototype.get=function(t){return Se(this,t).get(t)},Pe.prototype.has=function(t){return Se(this,t).has(t)},Pe.prototype.set=function(t,e){var n=Se(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var Ae="Expected a function";function Re(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(Ae);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=t.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(Re.Cache||Pe),n}Re.Cache=Pe;var Ce=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ke=/\\(\\)?/g,Ue=function(t){var e=Re(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Ce,(function(t,n,r,o){e.push(r?o.replace(ke,"$1"):n||t)})),e})),Oe=Ue;function xe(t){return null==t?"":Z(t)}function qe(t,e){return V(t)?t:me(t,e)?[t]:Oe(xe(t))}var De=1/0;function Te(t){if("string"==typeof t||z(t))return t;var e=t+"";return"0"==e&&1/t==-De?"-0":e}function Ne(t,e){for(var n=0,r=(e=qe(e,t)).length;null!=t&&n<r;)t=t[Te(e[n++])];return n&&n==r?t:void 0}function Be(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}var Le=O?O.isConcatSpreadable:void 0;function Fe(t){return V(t)||Vt(t)||!!(Le&&t&&t[Le])}function Ge(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=Fe),o||(o=[]);++i<s;){var a=t[i];e>0&&n(a)?e>1?Ge(a,e-1,n,r,o):Be(o,a):r||(o[o.length]=a)}return o}var Me=ae(Object.getPrototypeOf,Object),Je="[object Object]",ze=Function.prototype,We=Object.prototype,Ve=ze.toString,$e=We.hasOwnProperty,He=Ve.call(Object);function Ye(t){var e=this.__data__=new Ee(t);this.size=e.size}Ye.prototype.clear=function(){this.__data__=new Ee,this.size=0},Ye.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Ye.prototype.get=function(t){return this.__data__.get(t)},Ye.prototype.has=function(t){return this.__data__.has(t)},Ye.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Ee){var r=n.__data__;if(!_e||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Pe(r)}return n.set(t,e),this.size=n.size,this};var Ze="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ke=Ze&&"object"==typeof module&&module&&!module.nodeType&&module,Xe=Ke&&Ke.exports===Ze?U.Buffer:void 0,Qe=Xe?Xe.allocUnsafe:void 0;var tn=Object.prototype.propertyIsEnumerable,en=Object.getOwnPropertySymbols,nn=en?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}(en(t),(function(e){return tn.call(t,e)})))}:function(){return[]};function rn(t){return function(t,e,n){var r=e(t);return V(t)?r:Be(r,n(t))}(t,de,nn)}var on=mt(U,"DataView"),sn=mt(U,"Promise"),an=mt(U,"Set"),un="[object Map]",cn="[object Promise]",dn="[object Set]",ln="[object WeakMap]",pn="[object DataView]",fn=ut(on),hn=ut(_e),vn=ut(sn),mn=ut(an),gn=ut(gt),bn=G;(on&&bn(new on(new ArrayBuffer(1)))!=pn||_e&&bn(new _e)!=un||sn&&bn(sn.resolve())!=cn||an&&bn(new an)!=dn||gt&&bn(new gt)!=ln)&&(bn=function(t){var e=G(t),n="[object Object]"==e?t.constructor:void 0,r=n?ut(n):"";if(r)switch(r){case fn:return pn;case hn:return un;case vn:return cn;case mn:return dn;case gn:return ln}return e});var yn=bn,wn=U.Uint8Array;function jn(t,e){var n,r,o=e?(n=t.buffer,r=new n.constructor(n.byteLength),new wn(r).set(new wn(n)),r):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}function In(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Pe;++e<n;)this.add(t[e])}function En(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}In.prototype.add=In.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},In.prototype.has=function(t){return this.__data__.has(t)};var _n=1,Sn=2;function Pn(t,e,n,r,o,i){var s=n&_n,a=t.length,u=e.length;if(a!=u&&!(s&&u>a))return!1;var c=i.get(t),d=i.get(e);if(c&&d)return c==e&&d==t;var l=-1,p=!0,f=n&Sn?new In:void 0;for(i.set(t,e),i.set(e,t);++l<a;){var h=t[l],v=e[l];if(r)var m=s?r(v,h,l,e,t,i):r(h,v,l,t,e,i);if(void 0!==m){if(m)continue;p=!1;break}if(f){if(!En(e,(function(t,e){if(s=e,!f.has(s)&&(h===t||o(h,t,n,r,i)))return f.push(e);var s}))){p=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){p=!1;break}}return i.delete(t),i.delete(e),p}function An(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Rn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var Cn=1,kn=2,Un="[object Boolean]",On="[object Date]",xn="[object Error]",qn="[object Map]",Dn="[object Number]",Tn="[object RegExp]",Nn="[object Set]",Bn="[object String]",Ln="[object Symbol]",Fn="[object ArrayBuffer]",Gn="[object DataView]",Mn=O?O.prototype:void 0,Jn=Mn?Mn.valueOf:void 0;var zn=1,Wn=Object.prototype.hasOwnProperty;var Vn=1,$n="[object Arguments]",Hn="[object Array]",Yn="[object Object]",Zn=Object.prototype.hasOwnProperty;function Kn(t,e,n,r,o,i){var s=V(t),a=V(e),u=s?Hn:yn(t),c=a?Hn:yn(e),d=(u=u==$n?Yn:u)==Yn,l=(c=c==$n?Yn:c)==Yn,p=u==c;if(p&&Zt(t)){if(!Zt(e))return!1;s=!0,d=!1}if(p&&!d)return i||(i=new Ye),s||oe(t)?Pn(t,e,n,r,o,i):function(t,e,n,r,o,i,s){switch(n){case Gn:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Fn:return!(t.byteLength!=e.byteLength||!i(new wn(t),new wn(e)));case Un:case On:case Dn:return Ot(+t,+e);case xn:return t.name==e.name&&t.message==e.message;case Tn:case Bn:return t==e+"";case qn:var a=An;case Nn:var u=r&Cn;if(a||(a=Rn),t.size!=e.size&&!u)return!1;var c=s.get(t);if(c)return c==e;r|=kn,s.set(t,e);var d=Pn(a(t),a(e),r,o,i,s);return s.delete(t),d;case Ln:if(Jn)return Jn.call(t)==Jn.call(e)}return!1}(t,e,u,n,r,o,i);if(!(n&Vn)){var f=d&&Zn.call(t,"__wrapped__"),h=l&&Zn.call(e,"__wrapped__");if(f||h){var v=f?t.value():t,m=h?e.value():e;return i||(i=new Ye),o(v,m,n,r,i)}}return!!p&&(i||(i=new Ye),function(t,e,n,r,o,i){var s=n&zn,a=rn(t),u=a.length;if(u!=rn(e).length&&!s)return!1;for(var c=u;c--;){var d=a[c];if(!(s?d in e:Wn.call(e,d)))return!1}var l=i.get(t),p=i.get(e);if(l&&p)return l==e&&p==t;var f=!0;i.set(t,e),i.set(e,t);for(var h=s;++c<u;){var v=t[d=a[c]],m=e[d];if(r)var g=s?r(m,v,d,e,t,i):r(v,m,d,t,e,i);if(!(void 0===g?v===m||o(v,m,n,r,i):g)){f=!1;break}h||(h="constructor"==d)}if(f&&!h){var b=t.constructor,y=e.constructor;b==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(f=!1)}return i.delete(t),i.delete(e),f}(t,e,n,r,o,i))}function Xn(t,e,n,r,o){return t===e||(null==t||null==e||!M(t)&&!M(e)?t!=t&&e!=e:Kn(t,e,n,r,Xn,o))}var Qn=1,tr=2;function er(t){return t==t&&!K(t)}function nr(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function rr(t){var e=function(t){for(var e=de(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,er(o)]}return e}(t);return 1==e.length&&e[0][2]?nr(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var o=n.length,i=o,s=!r;if(null==t)return!i;for(t=Object(t);o--;){var a=n[o];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++o<i;){var u=(a=n[o])[0],c=t[u],d=a[1];if(s&&a[2]){if(void 0===c&&!(u in t))return!1}else{var l=new Ye;if(r)var p=r(c,d,u,t,e,l);if(!(void 0===p?Xn(d,c,Qn|tr,r,l):p))return!1}}return!0}(n,t,e)}}function or(t,e){return null!=t&&e in Object(t)}function ir(t,e){return null!=t&&function(t,e,n){for(var r=-1,o=(e=qe(e,t)).length,i=!1;++r<o;){var s=Te(e[r]);if(!(i=null!=t&&n(t,s)))break;t=t[s]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Bt(o)&&kt(s,o)&&(V(t)||Vt(t))}(t,e,or)}var sr=1,ar=2;function ur(t,e){return me(t)&&er(e)?nr(Te(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:Ne(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?ir(n,t):Xn(e,r,sr|ar)}}function cr(t){return me(t)?(e=Te(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Ne(e,t)}}(t);var e}function dr(t){return"function"==typeof t?t:null==t?X:"object"==typeof t?V(t)?ur(t[0],t[1]):rr(t):cr(t)}var lr,pr=function(t,e,n){for(var r=-1,o=Object(t),i=n(t),s=i.length;s--;){var a=i[lr?s:++r];if(!1===e(o[a],a,o))break}return t};var fr=function(t,e){return function(n,r){if(null==n)return n;if(!Lt(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=Object(n);(e?i--:++i<o)&&!1!==r(s[i],i,s););return n}}((function(t,e){return t&&pr(t,e,de)})),hr=fr;function vr(t,e,n){(void 0!==n&&!Ot(t[e],n)||void 0===n&&!(e in t))&&Ut(t,e,n)}function mr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function gr(t){return function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,s=e.length;++i<s;){var a=e[i],u=r?r(n[a],t[a],a,n,t):void 0;void 0===u&&(u=t[a]),o?Ut(n,a,u):qt(n,a,u)}return n}(t,fe(t))}function br(t,e,n,r,o,i,s){var a=mr(t,n),u=mr(e,n),c=s.get(u);if(c)vr(t,n,c);else{var d,l=i?i(a,u,n+"",t,e,s):void 0,p=void 0===l;if(p){var f=V(u),h=!f&&Zt(u),v=!f&&!h&&oe(u);l=u,f||h||v?V(a)?l=a:M(d=a)&&Lt(d)?l=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}(a):h?(p=!1,l=function(t,e){if(e)return t.slice();var n=t.length,r=Qe?Qe(n):new t.constructor(n);return t.copy(r),r}(u,!0)):v?(p=!1,l=jn(u,!0)):l=[]:function(t){if(!M(t)||G(t)!=Je)return!1;var e=Me(t);if(null===e)return!0;var n=$e.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ve.call(n)==He}(u)||Vt(u)?(l=a,Vt(a)?l=gr(a):K(a)&&!rt(a)||(l=function(t){return"function"!=typeof t.constructor||Gt(t)?{}:yt(Me(t))}(u))):p=!1}p&&(s.set(u,l),o(l,u,r,i,s),s.delete(u)),vr(t,n,l)}}function yr(t,e,n,r,o){t!==e&&pr(e,(function(i,s){if(o||(o=new Ye),K(i))br(t,e,s,n,yr,r,o);else{var a=r?r(mr(t,s),i,s+"",t,e,o):void 0;void 0===a&&(a=i),vr(t,s,a)}}),fe)}var wr=/[\\^$.*+?()[\]{}|]/g,jr=RegExp(wr.source);function Ir(t,e){var n=-1,r=Lt(t)?Array(t.length):[];return hr(t,(function(t,o,i){r[++n]=e(t,o,i)})),r}function Er(t,e){return Ge(function(t,e){return(V(t)?W:Ir)(t,dr(e))}(t,e),1)}function _r(t,e){return t>e}function Sr(t){return"string"==typeof t||!V(t)&&M(t)&&"[object String]"==G(t)}function Pr(t,e){return t&&t.length?function(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],s=e(i);if(null!=s&&(void 0===a?s==s&&!z(s):n(s,a)))var a=s,u=i}return u}(t,dr(e),_r):void 0}var Ar,Rr=(Ar=function(t,e,n){yr(t,e,n)},Tt((function(t,e){var n=-1,r=e.length,o=r>1?e[r-1]:void 0,i=r>2?e[2]:void 0;for(o=Ar.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(t,e,n){if(!K(n))return!1;var r=typeof e;return!!("number"==r?Lt(n)&&kt(e,n.length):"string"==r&&e in n)&&Ot(n[e],t)}(e[0],e[1],i)&&(o=r<3?void 0:o,r=1),t=Object(t);++n<r;){var s=e[n];s&&Ar(t,s,n,o)}return t})));function Cr(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function kr(t,e){return t(e={exports:{}},e.exports),e.exports}var Ur={},Or=Ur;function xr(t){return t<0?-1:1}function qr(t,e){e.unsigned||--t;const n=e.unsigned?0:-Math.pow(2,t),r=Math.pow(2,t)-1,o=e.moduloBitLength?Math.pow(2,e.moduloBitLength):Math.pow(2,t),i=e.moduloBitLength?Math.pow(2,e.moduloBitLength-1):Math.pow(2,t-1);return function(t,s){s||(s={});let a=+t;if(s.enforceRange){if(!Number.isFinite(a))throw new TypeError("Argument is not a finite number");if(a=xr(a)*Math.floor(Math.abs(a)),a<n||a>r)throw new TypeError("Argument is not in byte range");return a}if(!isNaN(a)&&s.clamp)return a=function(t){return t%1==.5&&0==(1&t)?Math.floor(t):Math.round(t)}(a),a<n&&(a=n),a>r&&(a=r),a;if(!Number.isFinite(a)||0===a)return 0;if(a=xr(a)*Math.floor(Math.abs(a)),a%=o,!e.unsigned&&a>=i)return a-o;if(e.unsigned)if(a<0)a+=o;else if(-0===a)return 0;return a}}Ur.void=function(){},Ur.boolean=function(t){return!!t},Ur.byte=qr(8,{unsigned:!1}),Ur.octet=qr(8,{unsigned:!0}),Ur.short=qr(16,{unsigned:!1}),Ur["unsigned short"]=qr(16,{unsigned:!0}),Ur.long=qr(32,{unsigned:!1}),Ur["unsigned long"]=qr(32,{unsigned:!0}),Ur["long long"]=qr(32,{unsigned:!1,moduloBitLength:64}),Ur["unsigned long long"]=qr(32,{unsigned:!0,moduloBitLength:64}),Ur.double=function(t){const e=+t;if(!Number.isFinite(e))throw new TypeError("Argument is not a finite floating-point value");return e},Ur["unrestricted double"]=function(t){const e=+t;if(isNaN(e))throw new TypeError("Argument is NaN");return e},Ur.float=Ur.double,Ur["unrestricted float"]=Ur["unrestricted double"],Ur.DOMString=function(t,e){return e||(e={}),e.treatNullAsEmptyString&&null===t?"":String(t)},Ur.ByteString=function(t,e){const n=String(t);let r;for(let t=0;void 0!==(r=n.codePointAt(t));++t)if(r>255)throw new TypeError("Argument is not a valid bytestring");return n},Ur.USVString=function(t){const e=String(t),n=e.length,r=[];for(let t=0;t<n;++t){const o=e.charCodeAt(t);if(o<55296||o>57343)r.push(String.fromCodePoint(o));else if(56320<=o&&o<=57343)r.push(String.fromCodePoint(65533));else if(t===n-1)r.push(String.fromCodePoint(65533));else{const n=e.charCodeAt(t+1);if(56320<=n&&n<=57343){const e=1023&o,i=1023&n;r.push(String.fromCodePoint(65536+1024*e+i)),++t}else r.push(String.fromCodePoint(65533))}}return r.join("")},Ur.Date=function(t,e){if(!(t instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(t))return t},Ur.RegExp=function(t,e){return t instanceof RegExp||(t=new RegExp(t)),t};var Dr=kr((function(t){t.exports.mixin=function(t,e){const n=Object.getOwnPropertyNames(e);for(let r=0;r<n.length;++r)Object.defineProperty(t,n[r],Object.getOwnPropertyDescriptor(e,n[r]))},t.exports.wrapperSymbol=Symbol("wrapper"),t.exports.implSymbol=Symbol("impl"),t.exports.wrapperForImpl=function(e){return e[t.exports.wrapperSymbol]},t.exports.implForWrapper=function(e){return e[t.exports.implSymbol]}}));Dr.mixin,Dr.wrapperSymbol,Dr.implSymbol,Dr.wrapperForImpl,Dr.implForWrapper;var Tr,Nr=(Tr=Object.freeze({__proto__:null}))&&Tr.default||Tr,Br={TRANSITIONAL:0,NONTRANSITIONAL:1};function Lr(t){return t.split("\0").map((function(t){return t.normalize("NFC")})).join("\0")}function Fr(t){for(var e=0,n=Nr.length-1;e<=n;){var r=Math.floor((e+n)/2),o=Nr[r];if(o[0][0]<=t&&o[0][1]>=t)return o;o[0][0]>t?n=r-1:e=r+1}return null}var Gr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function Mr(t){return t.replace(Gr,"_").length}var Jr=/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/;function zr(t,e){"xn--"===t.substr(0,4)&&(t=u.toUnicode(t));var n=!1;(Lr(t)!==t||"-"===t[3]&&"-"===t[4]||"-"===t[0]||"-"===t[t.length-1]||-1!==t.indexOf(".")||0===t.search(Jr))&&(n=!0);for(var r=Mr(t),o=0;o<r;++o){var i=Fr(t.codePointAt(o));if(Wr===Br.TRANSITIONAL&&"valid"!==i[1]||Wr===Br.NONTRANSITIONAL&&"valid"!==i[1]&&"deviation"!==i[1]){n=!0;break}}return{label:t,error:n}}function Wr(t,e,n){var r=function(t,e,n){for(var r=!1,o="",i=Mr(t),s=0;s<i;++s){var a=t.codePointAt(s),u=Fr(a);switch(u[1]){case"disallowed":r=!0,o+=String.fromCodePoint(a);break;case"ignored":break;case"mapped":o+=String.fromCodePoint.apply(String,u[2]);break;case"deviation":n===Br.TRANSITIONAL?o+=String.fromCodePoint.apply(String,u[2]):o+=String.fromCodePoint(a);break;case"valid":o+=String.fromCodePoint(a);break;case"disallowed_STD3_mapped":e?(r=!0,o+=String.fromCodePoint(a)):o+=String.fromCodePoint.apply(String,u[2]);break;case"disallowed_STD3_valid":e&&(r=!0),o+=String.fromCodePoint(a)}}return{string:o,error:r}}(t,e,n);r.string=Lr(r.string);for(var o=r.string.split("."),i=0;i<o.length;++i)try{var s=zr(o[i]);o[i]=s.label,r.error=r.error||s.error}catch(t){r.error=!0}return{string:o.join("."),error:r.error}}var Vr={toASCII:function(t,e,n,r){var o=Wr(t,e,n),i=o.string.split(".");if(i=i.map((function(t){try{return u.toASCII(t)}catch(e){return o.error=!0,t}})),r){var s=i.slice(0,i.length-1).join(".").length;(s.length>253||0===s.length)&&(o.error=!0);for(var a=0;a<i.length;++a)if(i.length>63||0===i.length){o.error=!0;break}}return o.error?null:i.join(".")},toUnicode:function(t,e){var n=Wr(t,e,Br.NONTRANSITIONAL);return{domain:n.string,error:n.error}},PROCESSING_OPTIONS:Br},$r=kr((function(t){const e={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},n=Symbol("failure");function r(t){return u.ucs2.decode(t).length}function o(t,e){const n=t[e];return isNaN(n)?void 0:String.fromCodePoint(n)}function i(t){return t>=48&&t<=57}function s(t){return t>=65&&t<=90||t>=97&&t<=122}function a(t){return i(t)||t>=65&&t<=70||t>=97&&t<=102}function c(t){return"."===t||"%2e"===t.toLowerCase()}function d(t){return 2===t.length&&s(t.codePointAt(0))&&(":"===t[1]||"|"===t[1])}function l(t){return void 0!==e[t]}function p(t){return l(t.scheme)}function f(t){let e=t.toString(16).toUpperCase();return 1===e.length&&(e="0"+e),"%"+e}function h(t){return t<=31||t>126}const v=new Set([32,34,35,60,62,63,96,123,125]);function m(t){return h(t)||v.has(t)}const g=new Set([47,58,59,61,64,91,92,93,94,124]);function b(t){return m(t)||g.has(t)}function y(t,e){const n=String.fromCodePoint(t);return e(t)?function(t){const e=new Buffer(t);let n="";for(let t=0;t<e.length;++t)n+=f(e[t]);return n}(n):n}function w(t){let e=10;if(t.length>=2&&"0"===t.charAt(0)&&"x"===t.charAt(1).toLowerCase()?(t=t.substring(2),e=16):t.length>=2&&"0"===t.charAt(0)&&(t=t.substring(1),e=8),""===t)return 0;return(10===e?/[^0-9]/:16===e?/[^0-9A-Fa-f]/:/[^0-7]/).test(t)?n:parseInt(t,e)}function j(t,e){if("["===t[0])return"]"!==t[t.length-1]?n:function(t){const e=[0,0,0,0,0,0,0,0];let r=0,s=null,c=0;if(58===(t=u.ucs2.decode(t))[c]){if(58!==t[c+1])return n;c+=2,++r,s=r}for(;c<t.length;){if(8===r)return n;if(58===t[c]){if(null!==s)return n;++c,++r,s=r;continue}let u=0,d=0;for(;d<4&&a(t[c]);)u=16*u+parseInt(o(t,c),16),++c,++d;if(46===t[c]){if(0===d)return n;if(c-=d,r>6)return n;let s=0;for(;void 0!==t[c];){let a=null;if(s>0){if(!(46===t[c]&&s<4))return n;++c}if(!i(t[c]))return n;for(;i(t[c]);){const e=parseInt(o(t,c));if(null===a)a=e;else{if(0===a)return n;a=10*a+e}if(a>255)return n;++c}e[r]=256*e[r]+a,++s,2!==s&&4!==s||++r}if(4!==s)return n;break}if(58===t[c]){if(++c,void 0===t[c])return n}else if(void 0!==t[c])return n;e[r]=u,++r}if(null!==s){let t=r-s;for(r=7;0!==r&&t>0;){const n=e[s+t-1];e[s+t-1]=e[r],e[r]=n,--r,--t}}else if(null===s&&8!==r)return n;return e}(t.substring(1,t.length-1));if(!e)return function(t){if(e=t,-1!==e.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/))return n;var e;let r="";const o=u.ucs2.decode(t);for(let t=0;t<o.length;++t)r+=y(o[t],h);return r}(t);const r=function(t){const e=new Buffer(t),n=[];for(let t=0;t<e.length;++t)37!==e[t]?n.push(e[t]):37===e[t]&&a(e[t+1])&&a(e[t+2])?(n.push(parseInt(e.slice(t+1,t+3).toString(),16)),t+=2):n.push(e[t]);return new Buffer(n).toString()}(t),s=Vr.toASCII(r,!1,Vr.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===s)return n;if(-1!==s.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return n;const c=function(t){const e=t.split(".");if(""===e[e.length-1]&&e.length>1&&e.pop(),e.length>4)return t;const r=[];for(const o of e){if(""===o)return t;const e=w(o);if(e===n)return t;r.push(e)}for(let t=0;t<r.length-1;++t)if(r[t]>255)return n;if(r[r.length-1]>=Math.pow(256,5-r.length))return n;let o=r.pop(),i=0;for(const t of r)o+=t*Math.pow(256,3-i),++i;return o}(s);return"number"==typeof c||c===n?c:s}function I(t){return"number"==typeof t?function(t){let e="",n=t;for(let t=1;t<=4;++t)e=String(n%256)+e,4!==t&&(e="."+e),n=Math.floor(n/256);return e}(t):t instanceof Array?"["+function(t){let e="";const n=function(t){let e=null,n=1,r=null,o=0;for(let i=0;i<t.length;++i)0!==t[i]?(o>n&&(e=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(e=r,n=o),{idx:e,len:n}}(t).idx;let r=!1;for(let o=0;o<=7;++o)r&&0===t[o]||(r&&(r=!1),n!==o?(e+=t[o].toString(16),7!==o&&(e+=":")):(e+=0===o?"::":":",r=!0));return e}(t)+"]":t}function E(t){const e=t.path;var n;0!==e.length&&("file"===t.scheme&&1===e.length&&(n=e[0],/^[A-Za-z]:$/.test(n))||e.pop())}function _(t){return""!==t.username||""!==t.password}function S(t,e,r,o,i){if(this.pointer=0,this.input=t,this.base=e||null,this.encodingOverride=r||"utf-8",this.stateOverride=i,this.url=o,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,cannotBeABaseURL:!1};const t=function(t){return t.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}(this.input);t!==this.input&&(this.parseError=!0),this.input=t}const s=function(t){return t.replace(/\u0009|\u000A|\u000D/g,"")}(this.input);for(s!==this.input&&(this.parseError=!0),this.input=s,this.state=i||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=u.ucs2.decode(this.input);this.pointer<=this.input.length;++this.pointer){const t=this.input[this.pointer],e=isNaN(t)?void 0:String.fromCodePoint(t),r=this["parse "+this.state](t,e);if(!r)break;if(r===n){this.failure=!0;break}}}S.prototype["parse scheme start"]=function(t,e){if(s(t))this.buffer+=e.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,n;this.state="no scheme",--this.pointer}return!0},S.prototype["parse scheme"]=function(t,e){if(function(t){return s(t)||i(t)}(t)||43===t||45===t||46===t)this.buffer+=e.toLowerCase();else if(58===t){if(this.stateOverride){if(p(this.url)&&!l(this.buffer))return!1;if(!p(this.url)&&l(this.buffer))return!1;if((_(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&(""===this.url.host||null===this.url.host))return!1}if(this.url.scheme=this.buffer,this.buffer="",this.stateOverride)return!1;"file"===this.url.scheme?(47===this.input[this.pointer+1]&&47===this.input[this.pointer+2]||(this.parseError=!0),this.state="file"):p(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":p(this.url)?this.state="special authority slashes":47===this.input[this.pointer+1]?(this.state="path or authority",++this.pointer):(this.url.cannotBeABaseURL=!0,this.url.path.push(""),this.state="cannot-be-a-base-URL path")}else{if(this.stateOverride)return this.parseError=!0,n;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},S.prototype["parse no scheme"]=function(t){return null===this.base||this.base.cannotBeABaseURL&&35!==t?n:(this.base.cannotBeABaseURL&&35===t?(this.url.scheme=this.base.scheme,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.url.cannotBeABaseURL=!0,this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},S.prototype["parse special relative or authority"]=function(t){return 47===t&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},S.prototype["parse path or authority"]=function(t){return 47===t?this.state="authority":(this.state="path",--this.pointer),!0},S.prototype["parse relative"]=function(t){return this.url.scheme=this.base.scheme,isNaN(t)?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query):47===t?this.state="relative slash":63===t?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===t?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):p(this.url)&&92===t?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(0,this.base.path.length-1),this.state="path",--this.pointer),!0},S.prototype["parse relative slash"]=function(t){return!p(this.url)||47!==t&&92!==t?47===t?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(92===t&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},S.prototype["parse special authority slashes"]=function(t){return 47===t&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},S.prototype["parse special authority ignore slashes"]=function(t){return 47!==t&&92!==t?(this.state="authority",--this.pointer):this.parseError=!0,!0},S.prototype["parse authority"]=function(t,e){if(64===t){this.parseError=!0,this.atFlag&&(this.buffer="%40"+this.buffer),this.atFlag=!0;const t=r(this.buffer);for(let e=0;e<t;++e){const t=this.buffer.codePointAt(e);if(58===t&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const n=y(t,b);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(t)||47===t||63===t||35===t||p(this.url)&&92===t){if(this.atFlag&&""===this.buffer)return this.parseError=!0,n;this.pointer-=r(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=e;return!0},S.prototype["parse hostname"]=S.prototype["parse host"]=function(t,e){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(58!==t||this.arrFlag)if(isNaN(t)||47===t||63===t||35===t||p(this.url)&&92===t){if(--this.pointer,p(this.url)&&""===this.buffer)return this.parseError=!0,n;if(this.stateOverride&&""===this.buffer&&(_(this.url)||null!==this.url.port))return this.parseError=!0,!1;const t=j(this.buffer,p(this.url));if(t===n)return n;if(this.url.host=t,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===t?this.arrFlag=!0:93===t&&(this.arrFlag=!1),this.buffer+=e;else{if(""===this.buffer)return this.parseError=!0,n;const t=j(this.buffer,p(this.url));if(t===n)return n;if(this.url.host=t,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},S.prototype["parse port"]=function(t,r){if(i(t))this.buffer+=r;else{if(!(isNaN(t)||47===t||63===t||35===t||p(this.url)&&92===t||this.stateOverride))return this.parseError=!0,n;if(""!==this.buffer){const t=parseInt(this.buffer);if(t>Math.pow(2,16)-1)return this.parseError=!0,n;this.url.port=t===(o=this.url.scheme,e[o])?null:t,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var o;return!0};const P=new Set([47,92,63,35]);S.prototype["parse file"]=function(t){var e,n;return this.url.scheme="file",47===t||92===t?(92===t&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?isNaN(t)?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query):63===t?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===t?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):(this.input.length-this.pointer-1==0||(e=t,n=this.input[this.pointer+1],!s(e)||58!==n&&124!==n)||this.input.length-this.pointer-1>=2&&!P.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),E(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},S.prototype["parse file slash"]=function(t){var e;return 47===t||92===t?(92===t&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(2===(e=this.base.path[0]).length&&s(e.codePointAt(0))&&":"===e[1]?this.url.path.push(this.base.path[0]):this.url.host=this.base.host),this.state="path",--this.pointer),!0},S.prototype["parse file host"]=function(t,e){if(isNaN(t)||47===t||92===t||63===t||35===t)if(--this.pointer,!this.stateOverride&&d(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let t=j(this.buffer,p(this.url));if(t===n)return n;if("localhost"===t&&(t=""),this.url.host=t,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=e;return!0},S.prototype["parse path start"]=function(t){return p(this.url)?(92===t&&(this.parseError=!0),this.state="path",47!==t&&92!==t&&--this.pointer):this.stateOverride||63!==t?this.stateOverride||35!==t?void 0!==t&&(this.state="path",47!==t&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},S.prototype["parse path"]=function(t){if(isNaN(t)||47===t||p(this.url)&&92===t||!this.stateOverride&&(63===t||35===t)){if(p(this.url)&&92===t&&(this.parseError=!0),!function(t){return".."===(t=t.toLowerCase())||"%2e."===t||".%2e"===t||"%2e%2e"===t}(this.buffer)?!c(this.buffer)||47===t||p(this.url)&&92===t?c(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&d(this.buffer)&&(""!==this.url.host&&null!==this.url.host&&(this.parseError=!0,this.url.host=""),this.buffer=this.buffer[0]+":"),this.url.path.push(this.buffer)):this.url.path.push(""):(E(this.url),47===t||p(this.url)&&92===t||this.url.path.push("")),this.buffer="","file"===this.url.scheme&&(void 0===t||63===t||35===t))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===t&&(this.url.query="",this.state="query"),35===t&&(this.url.fragment="",this.state="fragment")}else 37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=y(t,m);return!0},S.prototype["parse cannot-be-a-base-URL path"]=function(t){return 63===t?(this.url.query="",this.state="query"):35===t?(this.url.fragment="",this.state="fragment"):(isNaN(t)||37===t||(this.parseError=!0),37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),isNaN(t)||(this.url.path[0]=this.url.path[0]+y(t,h))),!0},S.prototype["parse query"]=function(t,e){if(isNaN(t)||!this.stateOverride&&35===t){p(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const e=new Buffer(this.buffer);for(let t=0;t<e.length;++t)e[t]<33||e[t]>126||34===e[t]||35===e[t]||60===e[t]||62===e[t]?this.url.query+=f(e[t]):this.url.query+=String.fromCodePoint(e[t]);this.buffer="",35===t&&(this.url.fragment="",this.state="fragment")}else 37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=e;return!0},S.prototype["parse fragment"]=function(t){return isNaN(t)||(0===t?this.parseError=!0:(37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=y(t,h))),!0},t.exports.serializeURL=function(t,e){let n=t.scheme+":";if(null!==t.host?(n+="//",""===t.username&&""===t.password||(n+=t.username,""!==t.password&&(n+=":"+t.password),n+="@"),n+=I(t.host),null!==t.port&&(n+=":"+t.port)):null===t.host&&"file"===t.scheme&&(n+="//"),t.cannotBeABaseURL)n+=t.path[0];else for(const e of t.path)n+="/"+e;return null!==t.query&&(n+="?"+t.query),e||null===t.fragment||(n+="#"+t.fragment),n},t.exports.serializeURLOrigin=function(e){switch(e.scheme){case"blob":try{return t.exports.serializeURLOrigin(t.exports.parseURL(e.path[0]))}catch(t){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t){let e=t.scheme+"://";return e+=I(t.host),null!==t.port&&(e+=":"+t.port),e}({scheme:e.scheme,host:e.host,port:e.port});case"file":return"file://";default:return"null"}},t.exports.basicURLParse=function(t,e){void 0===e&&(e={});const n=new S(t,e.baseURL,e.encodingOverride,e.url,e.stateOverride);return n.failure?"failure":n.url},t.exports.setTheUsername=function(t,e){t.username="";const n=u.ucs2.decode(e);for(let e=0;e<n.length;++e)t.username+=y(n[e],b)},t.exports.setThePassword=function(t,e){t.password="";const n=u.ucs2.decode(e);for(let e=0;e<n.length;++e)t.password+=y(n[e],b)},t.exports.serializeHost=I,t.exports.cannotHaveAUsernamePasswordPort=function(t){return null===t.host||""===t.host||t.cannotBeABaseURL||"file"===t.scheme},t.exports.serializeInteger=function(t){return String(t)},t.exports.parseURL=function(e,n){return void 0===n&&(n={}),t.exports.basicURLParse(e,{baseURL:n.baseURL,encodingOverride:n.encodingOverride})}}));$r.serializeURL,$r.serializeURLOrigin,$r.basicURLParse,$r.setTheUsername,$r.setThePassword,$r.serializeHost,$r.cannotHaveAUsernamePasswordPort,$r.serializeInteger,$r.parseURL;var Hr=class{constructor(t){const e=t[0],n=t[1];let r=null;if(void 0!==n&&(r=$r.basicURLParse(n),"failure"===r))throw new TypeError("Invalid base URL");const o=$r.basicURLParse(e,{baseURL:r});if("failure"===o)throw new TypeError("Invalid URL");this._url=o}get href(){return $r.serializeURL(this._url)}set href(t){const e=$r.basicURLParse(t);if("failure"===e)throw new TypeError("Invalid URL");this._url=e}get origin(){return $r.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(t){$r.basicURLParse(t+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(t){$r.cannotHaveAUsernamePasswordPort(this._url)||$r.setTheUsername(this._url,t)}get password(){return this._url.password}set password(t){$r.cannotHaveAUsernamePasswordPort(this._url)||$r.setThePassword(this._url,t)}get host(){const t=this._url;return null===t.host?"":null===t.port?$r.serializeHost(t.host):$r.serializeHost(t.host)+":"+$r.serializeInteger(t.port)}set host(t){this._url.cannotBeABaseURL||$r.basicURLParse(t,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":$r.serializeHost(this._url.host)}set hostname(t){this._url.cannotBeABaseURL||$r.basicURLParse(t,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":$r.serializeInteger(this._url.port)}set port(t){$r.cannotHaveAUsernamePasswordPort(this._url)||(""===t?this._url.port=null:$r.basicURLParse(t,{url:this._url,stateOverride:"port"}))}get pathname(){return this._url.cannotBeABaseURL?this._url.path[0]:0===this._url.path.length?"":"/"+this._url.path.join("/")}set pathname(t){this._url.cannotBeABaseURL||(this._url.path=[],$r.basicURLParse(t,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":"?"+this._url.query}set search(t){const e=this._url;if(""===t)return void(e.query=null);const n="?"===t[0]?t.substring(1):t;e.query="",$r.basicURLParse(n,{url:e,stateOverride:"query"})}get hash(){return null===this._url.fragment||""===this._url.fragment?"":"#"+this._url.fragment}set hash(t){if(""===t)return void(this._url.fragment=null);const e="#"===t[0]?t.substring(1):t;this._url.fragment="",$r.basicURLParse(e,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}},Yr=kr((function(t){const e=Dr.implSymbol;function n(r){if(!this||this[e]||!(this instanceof n))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");if(arguments.length<1)throw new TypeError("Failed to construct 'URL': 1 argument required, but only "+arguments.length+" present.");const o=[];for(let t=0;t<arguments.length&&t<2;++t)o[t]=arguments[t];o[0]=Or.USVString(o[0]),void 0!==o[1]&&(o[1]=Or.USVString(o[1])),t.exports.setup(this,o)}n.prototype.toJSON=function(){if(!this||!t.exports.is(this))throw new TypeError("Illegal invocation");const n=[];for(let t=0;t<arguments.length&&t<0;++t)n[t]=arguments[t];return this[e].toJSON.apply(this[e],n)},Object.defineProperty(n.prototype,"href",{get(){return this[e].href},set(t){t=Or.USVString(t),this[e].href=t},enumerable:!0,configurable:!0}),n.prototype.toString=function(){if(!this||!t.exports.is(this))throw new TypeError("Illegal invocation");return this.href},Object.defineProperty(n.prototype,"origin",{get(){return this[e].origin},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get(){return this[e].protocol},set(t){t=Or.USVString(t),this[e].protocol=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"username",{get(){return this[e].username},set(t){t=Or.USVString(t),this[e].username=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"password",{get(){return this[e].password},set(t){t=Or.USVString(t),this[e].password=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"host",{get(){return this[e].host},set(t){t=Or.USVString(t),this[e].host=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hostname",{get(){return this[e].hostname},set(t){t=Or.USVString(t),this[e].hostname=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"port",{get(){return this[e].port},set(t){t=Or.USVString(t),this[e].port=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pathname",{get(){return this[e].pathname},set(t){t=Or.USVString(t),this[e].pathname=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"search",{get(){return this[e].search},set(t){t=Or.USVString(t),this[e].search=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hash",{get(){return this[e].hash},set(t){t=Or.USVString(t),this[e].hash=t},enumerable:!0,configurable:!0}),t.exports={is:t=>!!t&&t[e]instanceof Hr,create(t,e){let r=Object.create(n.prototype);return this.setup(r,t,e),r},setup(t,n,r){r||(r={}),r.wrapper=t,t[e]=new Hr(n,r),t[e][Dr.wrapperSymbol]=t},interface:n,expose:{Window:{URL:n},Worker:{URL:n}}}}));Yr.is,Yr.create,Yr.setup,Yr.expose;var Zr={URL:Yr.interface,serializeURL:$r.serializeURL,serializeURLOrigin:$r.serializeURLOrigin,basicURLParse:$r.basicURLParse,setTheUsername:$r.setTheUsername,setThePassword:$r.setThePassword,serializeHost:$r.serializeHost,serializeInteger:$r.serializeInteger,parseURL:$r.parseURL};const Kr=r.Readable,Xr=Symbol("buffer"),Qr=Symbol("type");class to{constructor(){this[Qr]="";const t=arguments[0],e=arguments[1],n=[];let r=0;if(t){const e=t,o=Number(e.length);for(let t=0;t<o;t++){const o=e[t];let i;i=o instanceof Buffer?o:ArrayBuffer.isView(o)?Buffer.from(o.buffer,o.byteOffset,o.byteLength):o instanceof ArrayBuffer?Buffer.from(o):o instanceof to?o[Xr]:Buffer.from("string"==typeof o?o:String(o)),r+=i.length,n.push(i)}}this[Xr]=Buffer.concat(n);let o=e&&void 0!==e.type&&String(e.type).toLowerCase();o&&!/[^\u0020-\u007E]/.test(o)&&(this[Qr]=o)}get size(){return this[Xr].length}get type(){return this[Qr]}text(){return Promise.resolve(this[Xr].toString())}arrayBuffer(){const t=this[Xr],e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return Promise.resolve(e)}stream(){const t=new Kr;return t._read=function(){},t.push(this[Xr]),t.push(null),t}toString(){return"[object Blob]"}slice(){const t=this.size,e=arguments[0],n=arguments[1];let r,o;r=void 0===e?0:e<0?Math.max(t+e,0):Math.min(e,t),o=void 0===n?t:n<0?Math.max(t+n,0):Math.min(n,t);const i=Math.max(o-r,0),s=this[Xr].slice(r,r+i),a=new to([],{type:arguments[2]});return a[Xr]=s,a}}function eo(t,e,n){Error.call(this,t),this.message=t,this.type=e,n&&(this.code=this.errno=n.code),Error.captureStackTrace(this,this.constructor)}let no;Object.defineProperties(to.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(to.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),eo.prototype=Object.create(Error.prototype),eo.prototype.constructor=eo,eo.prototype.name="FetchError";try{no=require("encoding").convert}catch(t){}const ro=Symbol("Body internals"),oo=r.PassThrough;function io(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.size;let i=void 0===o?0:o;var s=n.timeout;let a=void 0===s?0:s;null==t?t=null:ao(t)?t=Buffer.from(t.toString()):uo(t)||Buffer.isBuffer(t)||("[object ArrayBuffer]"===Object.prototype.toString.call(t)?t=Buffer.from(t):ArrayBuffer.isView(t)?t=Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof r||(t=Buffer.from(String(t)))),this[ro]={body:t,disturbed:!1,error:null},this.size=i,this.timeout=a,t instanceof r&&t.on("error",(function(t){const n="AbortError"===t.name?t:new eo(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t);e[ro].error=n}))}function so(){var t=this;if(this[ro].disturbed)return io.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[ro].disturbed=!0,this[ro].error)return io.Promise.reject(this[ro].error);let e=this.body;if(null===e)return io.Promise.resolve(Buffer.alloc(0));if(uo(e)&&(e=e.stream()),Buffer.isBuffer(e))return io.Promise.resolve(e);if(!(e instanceof r))return io.Promise.resolve(Buffer.alloc(0));let n=[],o=0,i=!1;return new io.Promise((function(r,s){let a;t.timeout&&(a=setTimeout((function(){i=!0,s(new eo(`Response timeout while trying to fetch ${t.url} (over ${t.timeout}ms)`,"body-timeout"))}),t.timeout)),e.on("error",(function(e){"AbortError"===e.name?(i=!0,s(e)):s(new eo(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e))})),e.on("data",(function(e){if(!i&&null!==e){if(t.size&&o+e.length>t.size)return i=!0,void s(new eo(`content size at ${t.url} over limit: ${t.size}`,"max-size"));o+=e.length,n.push(e)}})),e.on("end",(function(){if(!i){clearTimeout(a);try{r(Buffer.concat(n,o))}catch(e){s(new eo(`Could not create Buffer from response body for ${t.url}: ${e.message}`,"system",e))}}}))}))}function ao(t){return"object"==typeof t&&"function"==typeof t.append&&"function"==typeof t.delete&&"function"==typeof t.get&&"function"==typeof t.getAll&&"function"==typeof t.has&&"function"==typeof t.set&&("URLSearchParams"===t.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(t)||"function"==typeof t.sort)}function uo(t){return"object"==typeof t&&"function"==typeof t.arrayBuffer&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}function co(t){let e,n,o=t.body;if(t.bodyUsed)throw new Error("cannot clone body after it is used");return o instanceof r&&"function"!=typeof o.getBoundary&&(e=new oo,n=new oo,o.pipe(e),o.pipe(n),t[ro].body=e,o=n),o}function lo(t){return null===t?null:"string"==typeof t?"text/plain;charset=UTF-8":ao(t)?"application/x-www-form-urlencoded;charset=UTF-8":uo(t)?t.type||null:Buffer.isBuffer(t)||"[object ArrayBuffer]"===Object.prototype.toString.call(t)||ArrayBuffer.isView(t)?null:"function"==typeof t.getBoundary?`multipart/form-data;boundary=${t.getBoundary()}`:t instanceof r?null:"text/plain;charset=UTF-8"}function po(t){const e=t.body;return null===e?0:uo(e)?e.size:Buffer.isBuffer(e)?e.length:e&&"function"==typeof e.getLengthSync&&(e._lengthRetrievers&&0==e._lengthRetrievers.length||e.hasKnownLength&&e.hasKnownLength())?e.getLengthSync():null}io.prototype={get body(){return this[ro].body},get bodyUsed(){return this[ro].disturbed},arrayBuffer(){return so.call(this).then((function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}))},blob(){let t=this.headers&&this.headers.get("content-type")||"";return so.call(this).then((function(e){return Object.assign(new to([],{type:t.toLowerCase()}),{[Xr]:e})}))},json(){var t=this;return so.call(this).then((function(e){try{return JSON.parse(e.toString())}catch(e){return io.Promise.reject(new eo(`invalid json response body at ${t.url} reason: ${e.message}`,"invalid-json"))}}))},text(){return so.call(this).then((function(t){return t.toString()}))},buffer(){return so.call(this)},textConverted(){var t=this;return so.call(this).then((function(e){return function(t,e){if("function"!=typeof no)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=e.get("content-type");let r,o,i="utf-8";n&&(r=/charset=([^;]*)/i.exec(n));o=t.slice(0,1024).toString(),!r&&o&&(r=/<meta.+?charset=(['"])(.+?)\1/i.exec(o));!r&&o&&(r=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(o),r||(r=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(o),r&&r.pop()),r&&(r=/charset=(.*)/i.exec(r.pop())));!r&&o&&(r=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(o));r&&(i=r.pop(),"gb2312"!==i&&"gbk"!==i||(i="gb18030"));return no(t,"UTF-8",i).toString()}(e,t.headers)}))}},Object.defineProperties(io.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),io.mixIn=function(t){for(const e of Object.getOwnPropertyNames(io.prototype))if(!(e in t)){const n=Object.getOwnPropertyDescriptor(io.prototype,e);Object.defineProperty(t,e,n)}},io.Promise=global.Promise;const fo=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,ho=/[^\t\x20-\x7e\x80-\xff]/;function vo(t){if(t=`${t}`,fo.test(t)||""===t)throw new TypeError(`${t} is not a legal HTTP header name`)}function mo(t){if(t=`${t}`,ho.test(t))throw new TypeError(`${t} is not a legal HTTP header value`)}function go(t,e){e=e.toLowerCase();for(const n in t)if(n.toLowerCase()===e)return n}const bo=Symbol("map");class yo{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[bo]=Object.create(null),t instanceof yo){const e=t.raw(),n=Object.keys(e);for(const t of n)for(const n of e[t])this.append(t,n)}else if(null==t);else{if("object"!=typeof t)throw new TypeError("Provided initializer must be an object");{const e=t[Symbol.iterator];if(null!=e){if("function"!=typeof e)throw new TypeError("Header pairs must be iterable");const n=[];for(const e of t){if("object"!=typeof e||"function"!=typeof e[Symbol.iterator])throw new TypeError("Each header pair must be iterable");n.push(Array.from(e))}for(const t of n){if(2!==t.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(t[0],t[1])}}else for(const e of Object.keys(t)){const n=t[e];this.append(e,n)}}}}get(t){vo(t=`${t}`);const e=go(this[bo],t);return void 0===e?null:this[bo][e].join(", ")}forEach(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=wo(this),r=0;for(;r<n.length;){var o=n[r];const i=o[0],s=o[1];t.call(e,s,i,this),n=wo(this),r++}}set(t,e){e=`${e}`,vo(t=`${t}`),mo(e);const n=go(this[bo],t);this[bo][void 0!==n?n:t]=[e]}append(t,e){e=`${e}`,vo(t=`${t}`),mo(e);const n=go(this[bo],t);void 0!==n?this[bo][n].push(e):this[bo][t]=[e]}has(t){return vo(t=`${t}`),void 0!==go(this[bo],t)}delete(t){vo(t=`${t}`);const e=go(this[bo],t);void 0!==e&&delete this[bo][e]}raw(){return this[bo]}keys(){return Io(this,"key")}values(){return Io(this,"value")}[Symbol.iterator](){return Io(this,"key+value")}}function wo(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(t[bo]).sort().map("key"===e?function(t){return t.toLowerCase()}:"value"===e?function(e){return t[bo][e].join(", ")}:function(e){return[e.toLowerCase(),t[bo][e].join(", ")]})}yo.prototype.entries=yo.prototype[Symbol.iterator],Object.defineProperty(yo.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(yo.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const jo=Symbol("internal");function Io(t,e){const n=Object.create(Eo);return n[jo]={target:t,kind:e,index:0},n}const Eo=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==Eo)throw new TypeError("Value of `this` is not a HeadersIterator");var t=this[jo];const e=t.target,n=t.kind,r=t.index,o=wo(e,n);return r>=o.length?{value:void 0,done:!0}:(this[jo].index=r+1,{value:o[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function _o(t){const e=Object.assign({__proto__:null},t[bo]),n=go(t[bo],"Host");return void 0!==n&&(e[n]=e[n][0]),e}Object.defineProperty(Eo,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const So=Symbol("Response internals"),Po=i.STATUS_CODES;class Ao{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};io.call(this,t,e);const n=e.status||200,r=new yo(e.headers);if(null!=t&&!r.has("Content-Type")){const e=lo(t);e&&r.append("Content-Type",e)}this[So]={url:e.url,status:n,statusText:e.statusText||Po[n],headers:r,counter:e.counter}}get url(){return this[So].url||""}get status(){return this[So].status}get ok(){return this[So].status>=200&&this[So].status<300}get redirected(){return this[So].counter>0}get statusText(){return this[So].statusText}get headers(){return this[So].headers}clone(){return new Ao(co(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}io.mixIn(Ao.prototype),Object.defineProperties(Ao.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(Ao.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const Ro=Symbol("Request internals"),Co=s.URL||Zr.URL,ko=s.parse,Uo=s.format;function Oo(t){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(t)&&(t=new Co(t).toString()),ko(t)}const xo="destroy"in r.Readable.prototype;function qo(t){return"object"==typeof t&&"object"==typeof t[Ro]}class Do{constructor(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};qo(t)?e=Oo(t.url):(e=t&&t.href?Oo(t.href):Oo(`${t}`),t={});let r=n.method||t.method||"GET";if(r=r.toUpperCase(),(null!=n.body||qo(t)&&null!==t.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let o=null!=n.body?n.body:qo(t)&&null!==t.body?co(t):null;io.call(this,o,{timeout:n.timeout||t.timeout||0,size:n.size||t.size||0});const i=new yo(n.headers||t.headers||{});if(null!=o&&!i.has("Content-Type")){const t=lo(o);t&&i.append("Content-Type",t)}let s=qo(t)?t.signal:null;if("signal"in n&&(s=n.signal),null!=s&&!function(t){const e=t&&"object"==typeof t&&Object.getPrototypeOf(t);return!(!e||"AbortSignal"!==e.constructor.name)}(s))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[Ro]={method:r,redirect:n.redirect||t.redirect||"follow",headers:i,parsedURL:e,signal:s},this.follow=void 0!==n.follow?n.follow:void 0!==t.follow?t.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===t.compress||t.compress,this.counter=n.counter||t.counter||0,this.agent=n.agent||t.agent}get method(){return this[Ro].method}get url(){return Uo(this[Ro].parsedURL)}get headers(){return this[Ro].headers}get redirect(){return this[Ro].redirect}get signal(){return this[Ro].signal}clone(){return new Do(this)}}function To(t){Error.call(this,t),this.type="aborted",this.message=t,Error.captureStackTrace(this,this.constructor)}io.mixIn(Do.prototype),Object.defineProperty(Do.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Do.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),To.prototype=Object.create(Error.prototype),To.prototype.constructor=To,To.prototype.name="AbortError";const No=s.URL||Zr.URL,Bo=r.PassThrough;function Lo(t,e){if(!Lo.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return io.Promise=Lo.Promise,new Lo.Promise((function(n,o){const s=new Do(t,e),a=function(t){const e=t[Ro].parsedURL,n=new yo(t[Ro].headers);if(n.has("Accept")||n.set("Accept","*/*"),!e.protocol||!e.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(e.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(t.signal&&t.body instanceof r.Readable&&!xo)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let o=null;if(null==t.body&&/^(POST|PUT)$/i.test(t.method)&&(o="0"),null!=t.body){const e=po(t);"number"==typeof e&&(o=String(e))}o&&n.set("Content-Length",o),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),t.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let i=t.agent;return"function"==typeof i&&(i=i(e)),Object.assign({},e,{method:t.method,headers:_o(n),agent:i})}(s),u=("https:"===a.protocol?c:i).request,l=s.signal;let p=null;const f=function(){let t=new To("The user aborted a request.");o(t),s.body&&s.body instanceof r.Readable&&Fo(s.body,t),p&&p.body&&p.body.emit("error",t)};if(l&&l.aborted)return void f();const h=function(){f(),g()},v=u(a);let m;function g(){v.abort(),l&&l.removeEventListener("abort",h),clearTimeout(m)}l&&l.addEventListener("abort",h),s.timeout&&v.once("socket",(function(t){m=setTimeout((function(){o(new eo(`network timeout at: ${s.url}`,"request-timeout")),g()}),s.timeout)})),v.on("error",(function(t){o(new eo(`request to ${s.url} failed, reason: ${t.message}`,"system",t)),p&&p.body&&Fo(p.body,t),g()})),function(t,e){let n;t.on("socket",(function(t){n=t})),t.on("response",(function(t){const r=t.headers;"chunked"!==r["transfer-encoding"]||r["content-length"]||t.once("close",(function(t){if(n&&n.listenerCount("data")>0&&!t){const t=new Error("Premature close");t.code="ERR_STREAM_PREMATURE_CLOSE",e(t)}}))}))}(v,(function(t){l&&l.aborted||p&&p.body&&Fo(p.body,t)})),parseInt(process.version.substring(1))<14&&v.on("socket",(function(t){t.addListener("close",(function(e){const n=t.listenerCount("data")>0;if(p&&n&&!e&&(!l||!l.aborted)){const t=new Error("Premature close");t.code="ERR_STREAM_PREMATURE_CLOSE",p.body.emit("error",t)}}))})),v.on("response",(function(t){clearTimeout(m);const e=function(t){const e=new yo;for(const n of Object.keys(t))if(!fo.test(n))if(Array.isArray(t[n]))for(const r of t[n])ho.test(r)||(void 0===e[bo][n]?e[bo][n]=[r]:e[bo][n].push(r));else ho.test(t[n])||(e[bo][n]=[t[n]]);return e}(t.headers);if(Lo.isRedirect(t.statusCode)){const i=e.get("Location");let a=null;try{a=null===i?null:new No(i,s.url).toString()}catch(t){if("manual"!==s.redirect)return o(new eo(`uri requested responds with an invalid redirect URL: ${i}`,"invalid-redirect")),void g()}switch(s.redirect){case"error":return o(new eo(`uri requested responds with a redirect, redirect mode is set to error: ${s.url}`,"no-redirect")),void g();case"manual":if(null!==a)try{e.set("Location",a)}catch(t){o(t)}break;case"follow":if(null===a)break;if(s.counter>=s.follow)return o(new eo(`maximum redirect reached at: ${s.url}`,"max-redirect")),void g();const i={headers:new yo(s.headers),follow:s.follow,counter:s.counter+1,agent:s.agent,compress:s.compress,method:s.method,body:s.body,signal:s.signal,timeout:s.timeout,size:s.size};if(!function(t,e){const n=new No(e).hostname,r=new No(t).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(s.url,a)||(r=s.url,new No(a).protocol!==new No(r).protocol))for(const t of["authorization","www-authenticate","cookie","cookie2"])i.headers.delete(t);return 303!==t.statusCode&&s.body&&null===po(s)?(o(new eo("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void g()):(303!==t.statusCode&&(301!==t.statusCode&&302!==t.statusCode||"POST"!==s.method)||(i.method="GET",i.body=void 0,i.headers.delete("content-length")),n(Lo(new Do(a,i))),void g())}}var r;t.once("end",(function(){l&&l.removeEventListener("abort",h)}));let i=t.pipe(new Bo);const a={url:s.url,status:t.statusCode,statusText:t.statusMessage,headers:e,size:s.size,timeout:s.timeout,counter:s.counter},u=e.get("Content-Encoding");if(!s.compress||"HEAD"===s.method||null===u||204===t.statusCode||304===t.statusCode)return p=new Ao(i,a),void n(p);const c={flush:d.Z_SYNC_FLUSH,finishFlush:d.Z_SYNC_FLUSH};if("gzip"==u||"x-gzip"==u)return i=i.pipe(d.createGunzip(c)),p=new Ao(i,a),void n(p);if("deflate"==u||"x-deflate"==u){const e=t.pipe(new Bo);return e.once("data",(function(t){i=8==(15&t[0])?i.pipe(d.createInflate()):i.pipe(d.createInflateRaw()),p=new Ao(i,a),n(p)})),void e.on("end",(function(){p||(p=new Ao(i,a),n(p))}))}if("br"==u&&"function"==typeof d.createBrotliDecompress)return i=i.pipe(d.createBrotliDecompress()),p=new Ao(i,a),void n(p);p=new Ao(i,a),n(p)})),function(t,e){const n=e.body;null===n?t.end():uo(n)?n.stream().pipe(t):Buffer.isBuffer(n)?(t.write(n),t.end()):n.pipe(t)}(v,s)}))}function Fo(t,e){t.destroy?t.destroy(e):(t.emit("error",e),t.end())}Lo.isRedirect=function(t){return 301===t||302===t||303===t||307===t||308===t},Lo.Promise=global.Promise;var Go=function(){function t(t){this.contextProvider=t}return t.prototype.getServiceDetails=function(t,e){return P(this,void 0,void 0,(function(){return A(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(t,"/services/").concat(e))]}))}))},t.prototype.getAddonDetails=function(t,e){return P(this,void 0,void 0,(function(){return A(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(t,"/addons/").concat(e))]}))}))},t.prototype.fetch=function(t,e){return P(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return A(this,(function(u){switch(u.label){case 0:return n="Error while trying to connect, please try again.",r=Rr({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},S({},e)),[4,iu(2)((function(){return P(a,void 0,void 0,(function(){return A(this,(function(e){return[2,Lo(t,r)]}))}))})).catch((function(){throw new Error(n)}))];case 1:return(o=u.sent()).ok?[3,3]:[4,o.text()];case 2:i=u.sent(),s=n;try{s=JSON.parse(i)}catch(t){s=null!=i?i:n}finally{throw new Error(JSON.stringify(s))}case 3:return[4,o.json()];case 4:return[2,u.sent()]}}))}))},t}(),Mo=function(t,e,n){return P(void 0,void 0,void 0,(function(){var r,o,i,s,a;return A(this,(function(u){switch(u.label){case 0:if(r=Wo(e||"127.0.0.1"),(o=Wo(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===l.platform()&&(i=function(t){return P(void 0,void 0,void 0,(function(){var e;return A(this,(function(n){switch(n.label){case 0:return e="lo0 alias ".concat(t," up"),[4,zo.apply(void 0,e.split(" "))];case 1:return n.sent(),[2]}}))}))}),s=r,u.label=1;case 1:return s<=o?(a=Vo(s),[4,Jo(t,a)]):[3,6];case 2:return u.sent()?i?[4,i(a)]:[3,4]:[3,5];case 3:u.sent(),u.label=4;case 4:return[2,a];case 5:return s+=1,[3,1];case 6:throw new Error("Not possible to assign port '".concat(t,"' to an IP address on this machine. Please check if there is already a service running with this port which binds to the wildcard host address (0.0.0.0) and stop this service."))}}))}))},Jo=function(t,e){return new Promise((function(n){var r=new h,o=!1;r.on("connect",(function(){o=!0,r.destroy()})),r.setTimeout(400),r.on("timeout",(function(){o=!1,r.destroy()})),r.on("error",(function(){o=!1})),r.on("close",(function(){n(!o)})),e?r.connect(t,e):r.connect(t)}))},zo=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return P(void 0,void 0,void 0,(function(){return A(this,(function(e){switch(e.label){case 0:return"/sbin/ifconfig",[4,$o("/sbin/ifconfig",t).resultPromise];case 1:return[2,e.sent()]}}))}))},Wo=function(t){var e=t.split(".").reverse();if(4!==e.length)throw new Error("Invalid ip address: ".concat(t));for(var n=0,r=0;r<4;r+=1){var o=Number.parseInt(e[r],10);if(o<0||o>255)throw new Error("Invalid ip address: ".concat(t));n+=o<<8*r}return n},Vo=function(t){if(!Number.isSafeInteger(t))throw new Error("Number is not an integer");if(t<0||t>4294967295)throw new Error("Number is out of range 0x0-0xffffffff");for(var e=[],n=0;n<4;n+=1)e.push(t>>8*n&255);return e.reverse().join(".")},$o=function(t,e,n){var r=v(t,e,S({windowsHide:!0},n)),o=new Promise((function(o,i){var s="",a="";(null===(null==n?void 0:n.stdio)||void 0===(null==n?void 0:n.stdio))&&(r.stdout&&r.stdout.on("data",(function(t){s+=t})),r.stderr&&r.stderr.on("data",(function(t){a+=t}))),r.on("close",(function(n){var r={code:n,stdout:s,stderr:a};if(0!==n){var u="Error during execution of command '".concat(t," ").concat(e.join(" "),"': ").concat(a);i({message:u,result:r})}else o(r)}))}));return{process:r,resultPromise:o}},Ho=function(t,e,n){return P(void 0,void 0,void 0,(function(){var r,o;return A(this,(function(i){switch(i.label){case 0:return r=Yo(t,10),[4,g.promises.writeFile(r,e,n)];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,6]),[4,g.promises.rename(r,t)];case 3:return i.sent(),[3,6];case 4:return o=i.sent(),[4,g.promises.unlink(r).catch((function(){}))];case 5:throw i.sent(),o;case 6:return[2]}}))}))},Yo=function(t,e){for(var n,r=b.dirname(t),o=b.basename(t),i=0;null===(n=i<e)||void 0===n||n;i+=1){var s=R([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),a=".".concat(s,".").concat(o),u=b.join(r,a);if(!g.existsSync(u))return u}throw new Error("Could not write file to file '".concat(t,"'."))},Zo="win32"===process.platform?"\r\n":"\n",Ko=function(){function t(t,e){this.nodes=t,this.config=e}return t.prototype.add=function(t,e,n){var r=this;if(0===e.length)return this;var o=this.findOrCreateEntry(t,n);return e.forEach((function(t){if(!o.hosts.find((function(e){return e.host===t}))){var e=1;0===o.hosts.length&&(e=r.config.indent-"".concat(o.ipPrefixWhitespace).concat(o.ip).length),o.hosts.push({whitespace:" ".repeat(e<1?1:e),host:t})}})),this},t.prototype.remove=function(t,e){var n=this;return this.findEntries(t).forEach((function(t){e.forEach((function(e){var r=t.hosts.findIndex((function(t){return t.host===e}));r<0||(0===r&&void 0!==t.hosts[1]&&(t.hosts[1].whitespace=t.hosts[0].whitespace),t.hosts.splice(r,1),0===t.hosts.length&&n.removeEntry(t))}))})),this},t.prototype.removeHosts=function(t){var e=this;oi(this.nodes,"entry").forEach((function(n){e.remove(n.ip,t)}))},t.prototype.removeIps=function(t){var e=this;return t.forEach((function(t){e.findEntries(t).forEach((function(t){return e.removeEntry(t)}))})),this},t.prototype.resolveHosts=function(t){return Er(this.findEntries(t),(function(t){return t.hosts.map((function(t){return t.host}))}))},t.prototype.resolveIps=function(t){return oi(this.nodes,"entry").filter((function(e){return e.hosts.some((function(e){return e.host===t}))})).map((function(t){return t.ip}))},t.prototype.toString=function(){return ei(this.nodes,this.config.eol)},t.prototype.removeEntry=function(t){var e,n="number"==typeof(e=t)||M(e)&&"[object Number]"==G(e)?t:this.nodes.findIndex((function(e){return e===t}));n<0||this.nodes.splice(n,1)},t.prototype.findEntries=function(t){return oi(this.nodes,"entry").filter((function(e){return e.ip===t}))},t.prototype.findOrCreateEntry=function(t,e){var n=this.findEntries(t)[0];if(n)return n;var r=this.makeEntry(t);if(e){var o=ti(e),i=this.nodes.findIndex((function(t){return"comment"===t.type&&t.line===o}));if(i>=0)this.insertAt(i+1,r);else{var s="blank"!==this.nodes[this.nodes.length-1].type?[Xo(),Qo(o),r]:[Qo(o),r];this.insertAt.apply(this,R([this.nodes.length],s,!1))}}else this.insertAt(this.nodes.length,r);return r},t.prototype.insertAt=function(t){for(var e,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(e=this.nodes).splice.apply(e,R([t,0],n,!1))},t.prototype.makeEntry=function(t,e){var n=this.config.ipPrefixWhitespace;return S({type:"entry",ip:t,ipPrefixWhitespace:n,hosts:[]},e)},t.fromNodes=function(e,n){var r,o;return new t(e.filter((function(t){return"eol"!==t.type})),{eol:null!==(r=null==n?void 0:n.eol)&&void 0!==r?r:function(){var t,n=oi(e,"eol").map((function(t){return t.line}));return null!==(t=ii(n))&&void 0!==t?t:Zo}(),indent:null!==(o=null==n?void 0:n.indent)&&void 0!==o?o:function(){var t,n=Er(oi(e,"entry"),(function(t){var e=t.ipPrefixWhitespace,n=t.ip,r=t.hosts[0];return r?["".concat(e).concat(n).concat(r.whitespace).length]:[]}));return null!==(t=ii(n))&&void 0!==t?t:17}(),ipPrefixWhitespace:""})},t.parse=function(t,e){return this.fromNodes(ni(t),e)},t}(),Xo=function(){return{type:"blank",line:""}},Qo=function(t){return{type:"comment",line:ti(t)}},ti=function(t){return t.startsWith("#")?t:"# ".concat(t)},ei=function(t,e){var n=t.map((function(t){switch(t.type){case"entry":var e=t.hosts.map((function(t){var e=t.whitespace,n=t.host;return"".concat(e).concat(n)})).join("");return"".concat(t.ipPrefixWhitespace).concat(t.ip).concat(e);case"blank":case"comment":case"invalid":return t.line;default:return""}}));return n.join(null!=e?e:Zo)},ni=function(t){return t.split(/(\r?\n)/).map((function(t){return function(t){return t.match(/^\s*#.*$/)}(t)?{type:"comment",line:t}:function(t){return t.match(/^(\r?\n)$/)}(t)?{type:"eol",line:t}:function(t){return t.match(/^\s*$/)}(t)?{type:"blank",line:t}:ri(t)}))},ri=function(t){var e=t.match(/^(\s*)(\S+)(.+)?$/);if(!e)return{type:"invalid",line:t};var n=e[1],r=e[2],o=e.slice(3),i=!1,s=Er(o.filter((function(t){return void 0!==t})),(function(t){var e=t.match(/(\s+)(\S+)/g);return e?e.map((function(t){var e=t.match(/^(\s+)(\S+)$/);e||(i=!0);var n=null!=e?e:[];return{whitespace:n[1],host:n[2]}})):(i=!0,[])}));return i?{type:"invalid",line:t}:{type:"entry",ipPrefixWhitespace:n,ip:r,hosts:s}},oi=function(t,e){return t.filter((function(t){return t.type===e}))},ii=function(t){var e=new Map;t.forEach((function(t){var n;e.set(t,(null!==(n=e.get(t))&&void 0!==n?n:0)+1)}));var n=Pr(Array.from(e.entries()),(function(t){return t[1]}));if(n)return n[0]},si="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",ai=function(){function t(t){this.ast=Ko.fromNodes([]);var e={writeMode:"atomic",hostsFile:si};this.config=S(S({},e),t)}return t.prototype.add=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!Sr(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."));return e.forEach((function(t){if(!Sr(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.add(t,e,this.config.header),this},t.prototype.remove=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!Sr(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."));return e.forEach((function(t){if(!Sr(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.remove(t,e),this},t.prototype.removeHosts=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach((function(t){if(!Sr(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.removeHosts(t),this},t.prototype.removeIps=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach((function(t){if(!Sr(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."))})),this.ast.removeIps(t),this},t.prototype.read=function(){return P(this,void 0,void 0,(function(){var t;return A(this,(function(e){switch(e.label){case 0:return[4,g.promises.readFile(this.config.hostsFile)];case 1:return t=e.sent(),this.ast=Ko.parse(t.toString(),this.config),[2,this]}}))}))},t.prototype.write=function(t){return P(this,void 0,void 0,(function(){var e,n,r,o;return A(this,(function(i){switch(i.label){case 0:switch(e=S(S({},this.config),t),n=e.hostsFile,r=e.writeMode,o=this.ast.toString(),r){case void 0:case"atomic":return[3,1];case"standard":return[3,3];case"disabled":return[3,5]}return[3,5];case 1:return[4,Ho(n,o)];case 2:case 4:return i.sent(),[3,6];case 3:return[4,g.promises.writeFile(n,o)];case 5:return[3,6];case 6:return[2,this]}}))}))},t.prototype.backup=function(t){return P(this,void 0,void 0,(function(){var e,n,r,o;return A(this,(function(i){switch(i.label){case 0:return g.existsSync(this.config.hostsFile)?(e=b.dirname(this.config.hostsFile),n=b.basename(this.config.hostsFile),r="".concat(n).concat(t.suffix),o=b.resolve(e,r),g.existsSync(o)&&!t.rewrite?[3,2]:[4,g.promises.copyFile(this.config.hostsFile,o)]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))},t.load=function(e){return P(this,void 0,void 0,(function(){return A(this,(function(n){switch(n.label){case 0:return[4,new t(e).read()];case 1:return[2,n.sent()]}}))}))},t}(),ui=function(){function t(){this.previousPromise=Promise.resolve(),this._queueLength=0}return Object.defineProperty(t.prototype,"queueLength",{get:function(){return this._queueLength},enumerable:!1,configurable:!0}),t.prototype.enter=function(t){return P(this,void 0,void 0,(function(){var e,n=this;return A(this,(function(r){return this._queueLength+=1,e=this.previousPromise.then((function(){return n._queueLength-=1,t()}),(function(){return n._queueLength-=1,t()})),this.previousPromise=e,[2,e]}))}))},t}(),ci=function t(e,n){if(e&&n)return t(e)(n);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){r[t]=e[t]})),r;function r(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];var r=e.apply(this,t),o=t[t.length-1];return"function"==typeof r&&r!==o&&Object.keys(o).forEach((function(t){r[t]=o[t]})),r}};var di=ci(pi),li=ci(fi);function pi(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function fi(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},n=t.name||"Function wrapped with `once`";return e.onceError=n+" shouldn't be called more than once",e.called=!1,e}pi.proto=pi((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return pi(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return fi(this)},configurable:!0})})),di.strict=li;var hi=function(){},vi=function(t,e,n){if("function"==typeof e)return vi(t,null,e);e||(e={}),n=di(n||hi);var r=t._writableState,o=t._readableState,i=e.readable||!1!==e.readable&&t.readable,s=e.writable||!1!==e.writable&&t.writable,a=!1,u=function(){t.writable||c()},c=function(){s=!1,i||n.call(t)},d=function(){i=!1,s||n.call(t)},l=function(e){n.call(t,e?new Error("exited with error code: "+e):null)},p=function(e){n.call(t,e)},f=function(){process.nextTick(h)},h=function(){if(!a)return(!i||o&&o.ended&&!o.destroyed)&&(!s||r&&r.ended&&!r.destroyed)?void 0:n.call(t,new Error("premature close"))},v=function(){t.req.on("finish",c)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(t)?s&&!r&&(t.on("end",u),t.on("close",u)):(t.on("complete",c),t.on("abort",f),t.req?v():t.on("request",v)),function(t){return t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length}(t)&&t.on("exit",l),t.on("end",d),t.on("finish",c),!1!==e.error&&t.on("error",p),t.on("close",f),function(){a=!0,t.removeListener("complete",c),t.removeListener("abort",f),t.removeListener("request",v),t.req&&t.req.removeListener("finish",c),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("exit",l),t.removeListener("end",d),t.removeListener("error",p),t.removeListener("close",f)}},mi=vi,gi=function(){},bi=/^v?\.0/.test(process.version),yi=function(t){return"function"==typeof t},wi=function(t,e,n,r){r=di(r);var o=!1;t.on("close",(function(){o=!0})),mi(t,{readable:e,writable:n},(function(t){if(t)return r(t);o=!0,r()}));var i=!1;return function(e){if(!o&&!i)return i=!0,function(t){return!!bi&&!!g&&(t instanceof(g.ReadStream||gi)||t instanceof(g.WriteStream||gi))&&yi(t.close)}(t)?t.close(gi):function(t){return t.setHeader&&yi(t.abort)}(t)?t.abort():yi(t.destroy)?t.destroy():void r(e||new Error("stream was destroyed"))}},ji=function(t){t()},Ii=function(t,e){return t.pipe(e)},Ei=function(){var t,e=Array.prototype.slice.call(arguments),n=yi(e[e.length-1]||gi)&&e.pop()||gi;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r=e.map((function(o,i){var s=i<e.length-1;return wi(o,s,i>0,(function(e){t||(t=e),e&&r.forEach(ji),s||(r.forEach(ji),n(t))}))}));return e.reduce(Ii)};const{Duplex:_i}=r;function Si(t){t.emit("close")}function Pi(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Ai(t){this.removeListener("error",Ai),this.destroy(),0===this.listenerCount("error")&&this.emit("error",t)}var Ri=function(t,e){let n=!0;const r=new _i({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",(function(e,n){const o=!n&&r._readableState.objectMode?e.toString():e;r.push(o)||t.pause()})),t.once("error",(function(t){r.destroyed||(n=!1,r.destroy(t))})),t.once("close",(function(){r.destroyed||r.push(null)})),r._destroy=function(e,o){if(t.readyState===t.CLOSED)return o(e),void process.nextTick(Si,r);let i=!1;t.once("error",(function(t){i=!0,o(t)})),t.once("close",(function(){i||o(e),process.nextTick(Si,r)})),n&&t.terminate()},r._final=function(e){t.readyState!==t.CONNECTING?null!==t._socket&&(t._socket._writableState.finished?(e(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",(function(){e()})),t.close())):t.once("open",(function(){r._final(e)}))},r._read=function(){t.isPaused&&t.resume()},r._write=function(e,n,o){t.readyState!==t.CONNECTING?t.send(e,o):t.once("open",(function(){r._write(e,n,o)}))},r.on("end",Pi),r.on("error",Ai),r},Ci={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},ki="function"==typeof __webpack_require__?__non_webpack_require__:Cr,Ui=process.config&&process.config.variables||{},Oi=!!process.env.PREBUILDS_ONLY,xi=process.versions.modules,qi=!(!process.versions||!process.versions.electron)||!!process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":process.versions&&process.versions.nw?"node-webkit":"node",Di=process.env.npm_config_arch||l.arch(),Ti=process.env.npm_config_platform||l.platform(),Ni=process.env.LIBC||(function(t){return"linux"===t&&g.existsSync("/etc/alpine-release")}(Ti)?"musl":"glibc"),Bi=process.env.ARM_VERSION||("arm64"===Di?"8":Ui.arm_version)||"",Li=(process.versions.uv||"").split(".")[0],Fi=Gi;function Gi(t){return ki(Gi.resolve(t))}function Mi(t){try{return g.readdirSync(t)}catch(t){return[]}}function Ji(t,e){var n=Mi(t).filter(e);return n[0]&&b.join(t,n[0])}function zi(t){return/\.node$/.test(t)}function Wi(t){var e=t.split("-");if(2===e.length){var n=e[0],r=e[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:t,platform:n,architectures:r}}}function Vi(t,e){return function(n){return null!=n&&(n.platform===t&&n.architectures.includes(e))}}function $i(t,e){return t.architectures.length-e.architectures.length}function Hi(t){var e=t.split("."),n={file:t,specificity:0};if("node"===e.pop()){for(var r=0;r<e.length;r++){var o=e[r];if("node"===o||"electron"===o||"node-webkit"===o)n.runtime=o;else if("napi"===o)n.napi=!0;else if("abi"===o.slice(0,3))n.abi=o.slice(3);else if("uv"===o.slice(0,2))n.uv=o.slice(2);else if("armv"===o.slice(0,4))n.armv=o.slice(4);else{if("glibc"!==o&&"musl"!==o)continue;n.libc=o}n.specificity++}return n}}function Yi(t,e){return function(n){return null!=n&&(!(n.runtime!==t&&!function(t){return"node"===t.runtime&&t.napi}(n))&&(!(n.abi!==e&&!n.napi)&&((!n.uv||n.uv===Li)&&((!n.armv||n.armv===Bi)&&(!n.libc||n.libc===Ni)))))}}function Zi(t){return function(e,n){return e.runtime!==n.runtime?e.runtime===t?-1:1:e.abi!==n.abi?e.abi?-1:1:e.specificity!==n.specificity?e.specificity>n.specificity?-1:1:0}}Gi.resolve=Gi.path=function(t){t=b.resolve(t||".");try{var e=ki(b.join(t,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[e+"_PREBUILD"]&&(t=process.env[e+"_PREBUILD"])}catch(t){}if(!Oi){var n=Ji(b.join(t,"build/Release"),zi);if(n)return n;var r=Ji(b.join(t,"build/Debug"),zi);if(r)return r}var o=a(t);if(o)return o;var i=a(b.dirname(process.execPath));if(i)return i;var s=["platform="+Ti,"arch="+Di,"runtime="+qi,"abi="+xi,"uv="+Li,Bi?"armv="+Bi:"","libc="+Ni,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","function"==typeof __webpack_require__?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+s+"\n loaded from: "+t+"\n");function a(t){var e=Mi(b.join(t,"prebuilds")).map(Wi).filter(Vi(Ti,Di)).sort($i)[0];if(e){var n=b.join(t,"prebuilds",e.name),r=Mi(n).map(Hi).filter(Yi(qi,xi)).sort(Zi(qi))[0];return r?b.join(n,r.file):void 0}}},Gi.parseTags=Hi,Gi.matchTags=Yi,Gi.compareTags=Zi,Gi.parseTuple=Wi,Gi.matchTuple=Vi,Gi.compareTuples=$i;var Ki=kr((function(t){const e="function"==typeof __webpack_require__?__non_webpack_require__:Cr;"function"==typeof e.addon?t.exports=e.addon.bind(e):t.exports=Fi}));var Xi={mask:(t,e,n,r,o)=>{for(var i=0;i<o;i++)n[r+i]=t[i]^e[3&i]},unmask:(t,e)=>{const n=t.length;for(var r=0;r<n;r++)t[r]^=e[3&r]}},Qi=kr((function(t){try{t.exports=Ki(__dirname)}catch(e){t.exports=Xi}})),ts=kr((function(t){const{EMPTY_BUFFER:e}=Ci,n=Buffer[Symbol.species];function r(t,e,n,r,o){for(let i=0;i<o;i++)n[r+i]=t[i]^e[3&i]}function o(t,e){for(let n=0;n<t.length;n++)t[n]^=e[3&n]}if(t.exports={concat:function(t,r){if(0===t.length)return e;if(1===t.length)return t[0];const o=Buffer.allocUnsafe(r);let i=0;for(let e=0;e<t.length;e++){const n=t[e];o.set(n,i),i+=n.length}return i<r?new n(o.buffer,o.byteOffset,i):o},mask:r,toArrayBuffer:function(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)},toBuffer:function t(e){if(t.readOnly=!0,Buffer.isBuffer(e))return e;let r;return e instanceof ArrayBuffer?r=new n(e):ArrayBuffer.isView(e)?r=new n(e.buffer,e.byteOffset,e.byteLength):(r=Buffer.from(e),t.readOnly=!1),r},unmask:o},!process.env.WS_NO_BUFFER_UTIL)try{const e=Qi;t.exports.mask=function(t,n,o,i,s){s<48?r(t,n,o,i,s):e.mask(t,n,o,i,s)},t.exports.unmask=function(t,n){t.length<32?o(t,n):e.unmask(t,n)}}catch(t){}}));ts.concat,ts.mask,ts.toArrayBuffer,ts.toBuffer,ts.unmask;const es=Symbol("kDone"),ns=Symbol("kRun");var rs=class{constructor(t){this[es]=()=>{this.pending--,this[ns]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[ns]()}[ns](){if(this.pending!==this.concurrency&&this.jobs.length){const t=this.jobs.shift();this.pending++,t(this[es])}}};const{kStatusCode:os}=Ci,is=Buffer[Symbol.species],ss=Buffer.from([0,0,255,255]),as=Symbol("permessage-deflate"),us=Symbol("total-length"),cs=Symbol("callback"),ds=Symbol("buffers"),ls=Symbol("error");let ps;var fs=class{constructor(t,e,n){if(this._maxPayload=0|n,this._options=t||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!e,this._deflate=null,this._inflate=null,this.params=null,!ps){const t=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;ps=new rs(t)}}static get extensionName(){return"permessage-deflate"}offer(){const t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const t=this._deflate[cs];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){const e=this._options,n=t.find((t=>!(!1===e.serverNoContextTakeover&&t.server_no_context_takeover||t.server_max_window_bits&&(!1===e.serverMaxWindowBits||"number"==typeof e.serverMaxWindowBits&&e.serverMaxWindowBits>t.server_max_window_bits)||"number"==typeof e.clientMaxWindowBits&&!t.client_max_window_bits)));if(!n)throw new Error("None of the extension offers can be accepted");return e.serverNoContextTakeover&&(n.server_no_context_takeover=!0),e.clientNoContextTakeover&&(n.client_no_context_takeover=!0),"number"==typeof e.serverMaxWindowBits&&(n.server_max_window_bits=e.serverMaxWindowBits),"number"==typeof e.clientMaxWindowBits?n.client_max_window_bits=e.clientMaxWindowBits:!0!==n.client_max_window_bits&&!1!==e.clientMaxWindowBits||delete n.client_max_window_bits,n}acceptAsClient(t){const e=t[0];if(!1===this._options.clientNoContextTakeover&&e.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(e.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&e.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(e.client_max_window_bits=this._options.clientMaxWindowBits);return e}normalizeParams(t){return t.forEach((t=>{Object.keys(t).forEach((e=>{let n=t[e];if(n.length>1)throw new Error(`Parameter "${e}" must have only a single value`);if(n=n[0],"client_max_window_bits"===e){if(!0!==n){const t=+n;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${e}": ${n}`);n=t}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${e}": ${n}`)}else if("server_max_window_bits"===e){const t=+n;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${e}": ${n}`);n=t}else{if("client_no_context_takeover"!==e&&"server_no_context_takeover"!==e)throw new Error(`Unknown parameter "${e}"`);if(!0!==n)throw new TypeError(`Invalid value for parameter "${e}": ${n}`)}t[e]=n}))})),t}decompress(t,e,n){ps.add((r=>{this._decompress(t,e,((t,e)=>{r(),n(t,e)}))}))}compress(t,e,n){ps.add((r=>{this._compress(t,e,((t,e)=>{r(),n(t,e)}))}))}_decompress(t,e,n){const r=this._isServer?"client":"server";if(!this._inflate){const t=`${r}_max_window_bits`,e="number"!=typeof this.params[t]?d.Z_DEFAULT_WINDOWBITS:this.params[t];this._inflate=d.createInflateRaw({...this._options.zlibInflateOptions,windowBits:e}),this._inflate[as]=this,this._inflate[us]=0,this._inflate[ds]=[],this._inflate.on("error",ms),this._inflate.on("data",vs)}this._inflate[cs]=n,this._inflate.write(t),e&&this._inflate.write(ss),this._inflate.flush((()=>{const t=this._inflate[ls];if(t)return this._inflate.close(),this._inflate=null,void n(t);const o=ts.concat(this._inflate[ds],this._inflate[us]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[us]=0,this._inflate[ds]=[],e&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,o)}))}_compress(t,e,n){const r=this._isServer?"server":"client";if(!this._deflate){const t=`${r}_max_window_bits`,e="number"!=typeof this.params[t]?d.Z_DEFAULT_WINDOWBITS:this.params[t];this._deflate=d.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:e}),this._deflate[us]=0,this._deflate[ds]=[],this._deflate.on("data",hs)}this._deflate[cs]=n,this._deflate.write(t),this._deflate.flush(d.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let t=ts.concat(this._deflate[ds],this._deflate[us]);e&&(t=new is(t.buffer,t.byteOffset,t.length-4)),this._deflate[cs]=null,this._deflate[us]=0,this._deflate[ds]=[],e&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,t)}))}};function hs(t){this[ds].push(t),this[us]+=t.length}function vs(t){this[us]+=t.length,this[as]._maxPayload<1||this[us]<=this[as]._maxPayload?this[ds].push(t):(this[ls]=new RangeError("Max payload size exceeded"),this[ls].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[ls][os]=1009,this.removeListener("data",vs),this.reset())}function ms(t){this[as]._inflate=null,t[os]=1007,this[cs](t)}var gs=function(t){const e=t.length;let n=0;for(;n<e;)if(0==(128&t[n]))n++;else if(192==(224&t[n])){if(n+1===e||128!=(192&t[n+1])||192==(254&t[n]))return!1;n+=2}else if(224==(240&t[n])){if(n+2>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||224===t[n]&&128==(224&t[n+1])||237===t[n]&&160==(224&t[n+1]))return!1;n+=3}else{if(240!=(248&t[n]))return!1;if(n+3>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||128!=(192&t[n+3])||240===t[n]&&128==(240&t[n+1])||244===t[n]&&t[n+1]>143||t[n]>244)return!1;n+=4}return!0},bs=kr((function(t){try{t.exports=Ki(__dirname)}catch(e){t.exports=gs}})),ys=kr((function(t){const{isUtf8:e}=y;function n(t){const e=t.length;let n=0;for(;n<e;)if(0==(128&t[n]))n++;else if(192==(224&t[n])){if(n+1===e||128!=(192&t[n+1])||192==(254&t[n]))return!1;n+=2}else if(224==(240&t[n])){if(n+2>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||224===t[n]&&128==(224&t[n+1])||237===t[n]&&160==(224&t[n+1]))return!1;n+=3}else{if(240!=(248&t[n]))return!1;if(n+3>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||128!=(192&t[n+3])||240===t[n]&&128==(240&t[n+1])||244===t[n]&&t[n+1]>143||t[n]>244)return!1;n+=4}return!0}if(t.exports={isValidStatusCode:function(t){return t>=1e3&&t<=1014&&1004!==t&&1005!==t&&1006!==t||t>=3e3&&t<=4999},isValidUTF8:n,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},e)t.exports.isValidUTF8=function(t){return t.length<24?n(t):e(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{const e=bs;t.exports.isValidUTF8=function(t){return t.length<32?n(t):e(t)}}catch(t){}}));ys.isValidStatusCode,ys.isValidUTF8,ys.tokenChars;const{Writable:ws}=r,{BINARY_TYPES:js,EMPTY_BUFFER:Is,kStatusCode:Es,kWebSocket:_s}=Ci,{concat:Ss,toArrayBuffer:Ps,unmask:As}=ts,{isValidStatusCode:Rs,isValidUTF8:Cs}=ys,ks=Buffer[Symbol.species],Us=Promise.resolve(),Os="function"==typeof queueMicrotask?queueMicrotask:function(t){Us.then(t).catch(Ts)};var xs=class extends ws{constructor(t={}){super(),this._binaryType=t.binaryType||js[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxPayload=0|t.maxPayload,this._skipUTF8Validation=!!t.skipUTF8Validation,this[_s]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._state=0,this._loop=!1}_write(t,e,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(n)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t<this._buffers[0].length){const e=this._buffers[0];return this._buffers[0]=new ks(e.buffer,e.byteOffset+t,e.length-t),new ks(e.buffer,e.byteOffset,t)}const e=Buffer.allocUnsafe(t);do{const n=this._buffers[0],r=e.length-t;t>=n.length?e.set(this._buffers.shift(),r):(e.set(new Uint8Array(n.buffer,n.byteOffset,t),r),this._buffers[0]=new ks(n.buffer,n.byteOffset+t,n.length-t)),t-=n.length}while(t>0);return e}startLoop(t){let e;this._loop=!0;do{switch(this._state){case 0:e=this.getInfo();break;case 1:e=this.getPayloadLength16();break;case 2:e=this.getPayloadLength64();break;case 3:this.getMask();break;case 4:e=this.getData(t);break;case 5:return void(this._loop=!1);default:return this._loop=!1,void Os((()=>{this._state=0,this.startLoop(t)}))}}while(this._loop);t(e)}getInfo(){if(this._bufferedBytes<2)return void(this._loop=!1);const t=this.consume(2);if(0!=(48&t[0]))return this._loop=!1,qs(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");const e=64==(64&t[0]);if(e&&!this._extensions[fs.extensionName])return this._loop=!1,qs(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._fin=128==(128&t[0]),this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(e)return this._loop=!1,qs(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(!this._fragmented)return this._loop=!1,qs(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return this._loop=!1,qs(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");this._compressed=e}else{if(!(this._opcode>7&&this._opcode<11))return this._loop=!1,qs(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");if(!this._fin)return this._loop=!1,qs(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");if(e)return this._loop=!1,qs(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength)return this._loop=!1,qs(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH")}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=128==(128&t[1]),this._isServer){if(!this._masked)return this._loop=!1,qs(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK")}else if(this._masked)return this._loop=!1,qs(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");if(126===this._payloadLength)this._state=1;else{if(127!==this._payloadLength)return this.haveLength();this._state=2}}getPayloadLength16(){if(!(this._bufferedBytes<2))return this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength();this._loop=!1}getPayloadLength64(){if(this._bufferedBytes<8)return void(this._loop=!1);const t=this.consume(8),e=t.readUInt32BE(0);return e>Math.pow(2,21)-1?(this._loop=!1,qs(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=e*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength())}haveLength(){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0))return this._loop=!1,qs(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(t){let e=Is;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);e=this.consume(this._payloadLength),this._masked&&0!=(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])&&As(e,this._mask)}return this._opcode>7?this.controlMessage(e):this._compressed?(this._state=5,void this.decompress(e,t)):(e.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(e)),this.dataMessage())}decompress(t,e){this._extensions[fs.extensionName].decompress(t,this._fin,((t,n)=>{if(t)return e(t);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return e(qs(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(n)}const r=this.dataMessage();if(r)return e(r);this.startLoop(e)}))}dataMessage(){if(this._fin){const t=this._messageLength,e=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let n;n="nodebuffer"===this._binaryType?Ss(e,t):"arraybuffer"===this._binaryType?Ps(Ss(e,t)):e,this.emit("message",n,!0)}else{const n=Ss(e,t);if(!this._skipUTF8Validation&&!Cs(n))return this._loop=!1,qs(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("message",n,!1)}}this._state=6}controlMessage(t){if(8===this._opcode)if(this._loop=!1,0===t.length)this.emit("conclude",1005,Is),this.end(),this._state=0;else{const e=t.readUInt16BE(0);if(!Rs(e))return qs(RangeError,`invalid status code ${e}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");const n=new ks(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!Cs(n))return qs(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");this.emit("conclude",e,n),this.end(),this._state=0}else 9===this._opcode?(this.emit("ping",t),this._state=6):(this.emit("pong",t),this._state=6)}};function qs(t,e,n,r,o){const i=new t(n?`Invalid WebSocket frame: ${e}`:e);return Error.captureStackTrace(i,qs),i.code=o,i[Es]=r,i}function Ds(t){throw t}function Ts(t){process.nextTick(Ds,t)}const{randomFillSync:Ns}=w,{EMPTY_BUFFER:Bs}=Ci,{isValidStatusCode:Ls}=ys,{mask:Fs,toBuffer:Gs}=ts,Ms=Symbol("kByteLength"),Js=Buffer.alloc(4);class zs{constructor(t,e,n){this._extensions=e||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(t,e){let n,r,o=!1,i=2,s=!1;e.mask&&(n=e.maskBuffer||Js,e.generateMask?e.generateMask(n):Ns(n,0,4),s=0==(n[0]|n[1]|n[2]|n[3]),i=6),"string"==typeof t?r=e.mask&&!s||void 0===e[Ms]?(t=Buffer.from(t)).length:e[Ms]:(r=t.length,o=e.mask&&e.readOnly&&!s);let a=r;r>=65536?(i+=8,a=127):r>125&&(i+=2,a=126);const u=Buffer.allocUnsafe(o?r+i:i);return u[0]=e.fin?128|e.opcode:e.opcode,e.rsv1&&(u[0]|=64),u[1]=a,126===a?u.writeUInt16BE(r,2):127===a&&(u[2]=u[3]=0,u.writeUIntBE(r,4,6)),e.mask?(u[1]|=128,u[i-4]=n[0],u[i-3]=n[1],u[i-2]=n[2],u[i-1]=n[3],s?[u,t]:o?(Fs(t,n,u,i,r),[u]):(Fs(t,n,t,0,r),[u,t])):[u,t]}close(t,e,n,r){let o;if(void 0===t)o=Bs;else{if("number"!=typeof t||!Ls(t))throw new TypeError("First argument must be a valid error code number");if(void 0!==e&&e.length){const n=Buffer.byteLength(e);if(n>123)throw new RangeError("The message must not be greater than 123 bytes");o=Buffer.allocUnsafe(2+n),o.writeUInt16BE(t,0),"string"==typeof e?o.write(e,2):o.set(e,2)}else o=Buffer.allocUnsafe(2),o.writeUInt16BE(t,0)}const i={[Ms]:o.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,o,!1,i,r]):this.sendFrame(zs.frame(o,i),r)}ping(t,e,n){let r,o;if("string"==typeof t?(r=Buffer.byteLength(t),o=!1):(r=(t=Gs(t)).length,o=Gs.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[Ms]:r,fin:!0,generateMask:this._generateMask,mask:e,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,i,n]):this.sendFrame(zs.frame(t,i),n)}pong(t,e,n){let r,o;if("string"==typeof t?(r=Buffer.byteLength(t),o=!1):(r=(t=Gs(t)).length,o=Gs.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[Ms]:r,fin:!0,generateMask:this._generateMask,mask:e,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,i,n]):this.sendFrame(zs.frame(t,i),n)}send(t,e,n){const r=this._extensions[fs.extensionName];let o,i,s=e.binary?2:1,a=e.compress;if("string"==typeof t?(o=Buffer.byteLength(t),i=!1):(o=(t=Gs(t)).length,i=Gs.readOnly),this._firstFragment?(this._firstFragment=!1,a&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=o>=r._threshold),this._compress=a):(a=!1,s=0),e.fin&&(this._firstFragment=!0),r){const r={[Ms]:o,fin:e.fin,generateMask:this._generateMask,mask:e.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:i,rsv1:a};this._deflating?this.enqueue([this.dispatch,t,this._compress,r,n]):this.dispatch(t,this._compress,r,n)}else this.sendFrame(zs.frame(t,{[Ms]:o,fin:e.fin,generateMask:this._generateMask,mask:e.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:i,rsv1:!1}),n)}dispatch(t,e,n,r){if(!e)return void this.sendFrame(zs.frame(t,n),r);const o=this._extensions[fs.extensionName];this._bufferedBytes+=n[Ms],this._deflating=!0,o.compress(t,n.fin,((t,e)=>{if(this._socket.destroyed){const t=new Error("The socket was closed while data was being compressed");"function"==typeof r&&r(t);for(let e=0;e<this._queue.length;e++){const n=this._queue[e],r=n[n.length-1];"function"==typeof r&&r(t)}}else this._bufferedBytes-=n[Ms],this._deflating=!1,n.readOnly=!1,this.sendFrame(zs.frame(e,n),r),this.dequeue()}))}dequeue(){for(;!this._deflating&&this._queue.length;){const t=this._queue.shift();this._bufferedBytes-=t[3][Ms],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][Ms],this._queue.push(t)}sendFrame(t,e){2===t.length?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],e),this._socket.uncork()):this._socket.write(t[0],e)}}var Ws=zs;const{kForOnEventAttribute:Vs,kListener:$s}=Ci,Hs=Symbol("kCode"),Ys=Symbol("kData"),Zs=Symbol("kError"),Ks=Symbol("kMessage"),Xs=Symbol("kReason"),Qs=Symbol("kTarget"),ta=Symbol("kType"),ea=Symbol("kWasClean");class na{constructor(t){this[Qs]=null,this[ta]=t}get target(){return this[Qs]}get type(){return this[ta]}}Object.defineProperty(na.prototype,"target",{enumerable:!0}),Object.defineProperty(na.prototype,"type",{enumerable:!0});class ra extends na{constructor(t,e={}){super(t),this[Hs]=void 0===e.code?0:e.code,this[Xs]=void 0===e.reason?"":e.reason,this[ea]=void 0!==e.wasClean&&e.wasClean}get code(){return this[Hs]}get reason(){return this[Xs]}get wasClean(){return this[ea]}}Object.defineProperty(ra.prototype,"code",{enumerable:!0}),Object.defineProperty(ra.prototype,"reason",{enumerable:!0}),Object.defineProperty(ra.prototype,"wasClean",{enumerable:!0});class oa extends na{constructor(t,e={}){super(t),this[Zs]=void 0===e.error?null:e.error,this[Ks]=void 0===e.message?"":e.message}get error(){return this[Zs]}get message(){return this[Ks]}}Object.defineProperty(oa.prototype,"error",{enumerable:!0}),Object.defineProperty(oa.prototype,"message",{enumerable:!0});class ia extends na{constructor(t,e={}){super(t),this[Ys]=void 0===e.data?null:e.data}get data(){return this[Ys]}}Object.defineProperty(ia.prototype,"data",{enumerable:!0});const sa={addEventListener(t,e,n={}){for(const r of this.listeners(t))if(!n[Vs]&&r[$s]===e&&!r[Vs])return;let r;if("message"===t)r=function(t,n){const r=new ia("message",{data:n?t:t.toString()});r[Qs]=this,ua(e,this,r)};else if("close"===t)r=function(t,n){const r=new ra("close",{code:t,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[Qs]=this,ua(e,this,r)};else if("error"===t)r=function(t){const n=new oa("error",{error:t,message:t.message});n[Qs]=this,ua(e,this,n)};else{if("open"!==t)return;r=function(){const t=new na("open");t[Qs]=this,ua(e,this,t)}}r[Vs]=!!n[Vs],r[$s]=e,n.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(const n of this.listeners(t))if(n[$s]===e&&!n[Vs]){this.removeListener(t,n);break}}};var aa={CloseEvent:ra,ErrorEvent:oa,Event:na,EventTarget:sa,MessageEvent:ia};function ua(t,e,n){"object"==typeof t&&t.handleEvent?t.handleEvent.call(t,n):t.call(e,n)}const{tokenChars:ca}=ys;function da(t,e,n){void 0===t[e]?t[e]=[n]:t[e].push(n)}var la={format:function(t){return Object.keys(t).map((e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map((t=>[e].concat(Object.keys(t).map((e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map((t=>!0===t?e:`${e}=${t}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(t){const e=Object.create(null);let n,r,o=Object.create(null),i=!1,s=!1,a=!1,u=-1,c=-1,d=-1,l=0;for(;l<t.length;l++)if(c=t.charCodeAt(l),void 0===n)if(-1===d&&1===ca[c])-1===u&&(u=l);else if(0===l||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);const r=t.slice(u,d);44===c?(da(e,r,o),o=Object.create(null)):n=r,u=d=-1}}else-1===d&&-1!==u&&(d=l);else if(void 0===r)if(-1===d&&1===ca[c])-1===u&&(u=l);else if(32===c||9===c)-1===d&&-1!==u&&(d=l);else if(59===c||44===c){if(-1===u)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l),da(o,t.slice(u,d),!0),44===c&&(da(e,n,o),o=Object.create(null),n=void 0),u=d=-1}else{if(61!==c||-1===u||-1!==d)throw new SyntaxError(`Unexpected character at index ${l}`);r=t.slice(u,l),u=d=-1}else if(s){if(1!==ca[c])throw new SyntaxError(`Unexpected character at index ${l}`);-1===u?u=l:i||(i=!0),s=!1}else if(a)if(1===ca[c])-1===u&&(u=l);else if(34===c&&-1!==u)a=!1,d=l;else{if(92!==c)throw new SyntaxError(`Unexpected character at index ${l}`);s=!0}else if(34===c&&61===t.charCodeAt(l-1))a=!0;else if(-1===d&&1===ca[c])-1===u&&(u=l);else if(-1===u||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===u)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);let s=t.slice(u,d);i&&(s=s.replace(/\\/g,""),i=!1),da(o,r,s),44===c&&(da(e,n,o),o=Object.create(null),n=void 0),r=void 0,u=d=-1}}else-1===d&&(d=l);if(-1===u||a||32===c||9===c)throw new SyntaxError("Unexpected end of input");-1===d&&(d=l);const p=t.slice(u,d);return void 0===n?da(e,p,o):(void 0===r?da(o,p,!0):da(o,r,i?p.replace(/\\/g,""):p),da(e,n,o)),e}};const{randomBytes:pa,createHash:fa}=w,{URL:ha}=s,{BINARY_TYPES:va,EMPTY_BUFFER:ma,GUID:ga,kForOnEventAttribute:ba,kListener:ya,kStatusCode:wa,kWebSocket:ja,NOOP:Ia}=Ci,{EventTarget:{addEventListener:Ea,removeEventListener:_a}}=aa,{format:Sa,parse:Pa}=la,{toBuffer:Aa}=ts,Ra=Symbol("kAborted"),Ca=[8,13],ka=["CONNECTING","OPEN","CLOSING","CLOSED"],Ua=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class Oa extends t{constructor(t,e,n){super(),this._binaryType=va[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ma,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Oa.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==t?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===e?e=[]:Array.isArray(e)||("object"==typeof e&&null!==e?(n=e,e=[]):e=[e]),qa(this,t,e,n)):this._isServer=!0}get binaryType(){return this._binaryType}set binaryType(t){va.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,e,n){const r=new xs({binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new Ws(t,this._extensions,n.generateMask),this._receiver=r,this._socket=t,r[ja]=this,t[ja]=this,r.on("conclude",Fa),r.on("drain",Ga),r.on("error",Ma),r.on("message",za),r.on("ping",Wa),r.on("pong",Va),t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),e.length>0&&t.unshift(e),t.on("close",Ha),t.on("data",Ya),t.on("end",Za),t.on("error",Ka),this._readyState=Oa.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=Oa.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[fs.extensionName]&&this._extensions[fs.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Oa.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,e){if(this.readyState!==Oa.CLOSED)if(this.readyState!==Oa.CONNECTING)this.readyState!==Oa.CLOSING?(this._readyState=Oa.CLOSING,this._sender.close(t,e,!this._isServer,(t=>{t||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),3e4)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();else{const t="WebSocket was closed before the connection was established";Ba(this,this._req,t)}}pause(){this.readyState!==Oa.CONNECTING&&this.readyState!==Oa.CLOSED&&(this._paused=!0,this._socket.pause())}ping(t,e,n){if(this.readyState===Oa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(n=t,t=e=void 0):"function"==typeof e&&(n=e,e=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===Oa.OPEN?(void 0===e&&(e=!this._isServer),this._sender.ping(t||ma,e,n)):La(this,t,n)}pong(t,e,n){if(this.readyState===Oa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(n=t,t=e=void 0):"function"==typeof e&&(n=e,e=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===Oa.OPEN?(void 0===e&&(e=!this._isServer),this._sender.pong(t||ma,e,n)):La(this,t,n)}resume(){this.readyState!==Oa.CONNECTING&&this.readyState!==Oa.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,e,n){if(this.readyState===Oa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof e&&(n=e,e={}),"number"==typeof t&&(t=t.toString()),this.readyState!==Oa.OPEN)return void La(this,t,n);const r={binary:"string"!=typeof t,mask:!this._isServer,compress:!0,fin:!0,...e};this._extensions[fs.extensionName]||(r.compress=!1),this._sender.send(t||ma,r,n)}terminate(){if(this.readyState!==Oa.CLOSED)if(this.readyState!==Oa.CONNECTING)this._socket&&(this._readyState=Oa.CLOSING,this._socket.destroy());else{const t="WebSocket was closed before the connection was established";Ba(this,this._req,t)}}}Object.defineProperty(Oa,"CONNECTING",{enumerable:!0,value:ka.indexOf("CONNECTING")}),Object.defineProperty(Oa.prototype,"CONNECTING",{enumerable:!0,value:ka.indexOf("CONNECTING")}),Object.defineProperty(Oa,"OPEN",{enumerable:!0,value:ka.indexOf("OPEN")}),Object.defineProperty(Oa.prototype,"OPEN",{enumerable:!0,value:ka.indexOf("OPEN")}),Object.defineProperty(Oa,"CLOSING",{enumerable:!0,value:ka.indexOf("CLOSING")}),Object.defineProperty(Oa.prototype,"CLOSING",{enumerable:!0,value:ka.indexOf("CLOSING")}),Object.defineProperty(Oa,"CLOSED",{enumerable:!0,value:ka.indexOf("CLOSED")}),Object.defineProperty(Oa.prototype,"CLOSED",{enumerable:!0,value:ka.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((t=>{Object.defineProperty(Oa.prototype,t,{enumerable:!0})})),["open","error","close","message"].forEach((t=>{Object.defineProperty(Oa.prototype,`on${t}`,{enumerable:!0,get(){for(const e of this.listeners(t))if(e[ba])return e[ya];return null},set(e){for(const e of this.listeners(t))if(e[ba]){this.removeListener(t,e);break}"function"==typeof e&&this.addEventListener(t,e,{[ba]:!0})}})})),Oa.prototype.addEventListener=Ea,Oa.prototype.removeEventListener=_a;var xa=Oa;function qa(t,e,n,r){const o={protocolVersion:Ca[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,createConnection:void 0,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(!Ca.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${Ca.join(", ")})`);let s;if(e instanceof ha)s=e;else try{s=new ha(e)}catch(t){throw new SyntaxError(`Invalid URL: ${e}`)}"http:"===s.protocol?s.protocol="ws:":"https:"===s.protocol&&(s.protocol="wss:"),t._url=s.href;const a="wss:"===s.protocol,u="ws+unix:"===s.protocol;let d;if("ws:"===s.protocol||a||u?u&&!s.pathname?d="The URL's pathname is empty":s.hash&&(d="The URL contains a fragment identifier"):d='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"',d){const e=new SyntaxError(d);if(0===t._redirects)throw e;return void Da(t,e)}const l=a?443:80,p=pa(16).toString("base64"),f=a?c.request:i.request,h=new Set;let v,m;if(o.createConnection=a?Na:Ta,o.defaultPort=o.defaultPort||l,o.port=s.port||l,o.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":p,Connection:"Upgrade",Upgrade:"websocket"},o.path=s.pathname+s.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(v=new fs(!0!==o.perMessageDeflate?o.perMessageDeflate:{},!1,o.maxPayload),o.headers["Sec-WebSocket-Extensions"]=Sa({[fs.extensionName]:v.offer()})),n.length){for(const t of n){if("string"!=typeof t||!Ua.test(t)||h.has(t))throw new SyntaxError("An invalid or duplicated subprotocol was specified");h.add(t)}o.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(o.origin&&(o.protocolVersion<13?o.headers["Sec-WebSocket-Origin"]=o.origin:o.headers.Origin=o.origin),(s.username||s.password)&&(o.auth=`${s.username}:${s.password}`),u){const t=o.path.split(":");o.socketPath=t[0],o.path=t[1]}if(o.followRedirects){if(0===t._redirects){t._originalIpc=u,t._originalSecure=a,t._originalHostOrSocketPath=u?o.socketPath:s.host;const e=r&&r.headers;if(r={...r,headers:{}},e)for(const[t,n]of Object.entries(e))r.headers[t.toLowerCase()]=n}else if(0===t.listenerCount("redirect")){const e=u?!!t._originalIpc&&o.socketPath===t._originalHostOrSocketPath:!t._originalIpc&&s.host===t._originalHostOrSocketPath;(!e||t._originalSecure&&!a)&&(delete o.headers.authorization,delete o.headers.cookie,e||delete o.headers.host,o.auth=void 0)}o.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(o.auth).toString("base64")),m=t._req=f(o),t._redirects&&t.emit("redirect",t.url,m)}else m=t._req=f(o);o.timeout&&m.on("timeout",(()=>{Ba(t,m,"Opening handshake has timed out")})),m.on("error",(e=>{null===m||m[Ra]||(m=t._req=null,Da(t,e))})),m.on("response",(i=>{const s=i.headers.location,a=i.statusCode;if(s&&o.followRedirects&&a>=300&&a<400){if(++t._redirects>o.maxRedirects)return void Ba(t,m,"Maximum redirects exceeded");let i;m.abort();try{i=new ha(s,e)}catch(e){const n=new SyntaxError(`Invalid URL: ${s}`);return void Da(t,n)}qa(t,i,n,r)}else t.emit("unexpected-response",m,i)||Ba(t,m,`Unexpected server response: ${i.statusCode}`)})),m.on("upgrade",((e,n,r)=>{if(t.emit("upgrade",e),t.readyState!==Oa.CONNECTING)return;if(m=t._req=null,"websocket"!==e.headers.upgrade.toLowerCase())return void Ba(t,n,"Invalid Upgrade header");const i=fa("sha1").update(p+ga).digest("base64");if(e.headers["sec-websocket-accept"]!==i)return void Ba(t,n,"Invalid Sec-WebSocket-Accept header");const s=e.headers["sec-websocket-protocol"];let a;if(void 0!==s?h.size?h.has(s)||(a="Server sent an invalid subprotocol"):a="Server sent a subprotocol but none was requested":h.size&&(a="Server sent no subprotocol"),a)return void Ba(t,n,a);s&&(t._protocol=s);const u=e.headers["sec-websocket-extensions"];if(void 0!==u){if(!v){return void Ba(t,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let e;try{e=Pa(u)}catch(e){return void Ba(t,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(e);if(1!==r.length||r[0]!==fs.extensionName){return void Ba(t,n,"Server indicated an extension that was not requested")}try{v.accept(e[fs.extensionName])}catch(e){return void Ba(t,n,"Invalid Sec-WebSocket-Extensions header")}t._extensions[fs.extensionName]=v}t.setSocket(n,r,{generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})})),o.finishRequest?o.finishRequest(m,t):m.end()}function Da(t,e){t._readyState=Oa.CLOSING,t.emit("error",e),t.emitClose()}function Ta(t){return t.path=t.socketPath,f.connect(t)}function Na(t){return t.path=void 0,t.servername||""===t.servername||(t.servername=f.isIP(t.host)?"":t.host),j.connect(t)}function Ba(t,e,n){t._readyState=Oa.CLOSING;const r=new Error(n);Error.captureStackTrace(r,Ba),e.setHeader?(e[Ra]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(Da,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function La(t,e,n){if(e){const n=Aa(e).length;t._socket?t._sender._bufferedBytes+=n:t._bufferedAmount+=n}if(n){const e=new Error(`WebSocket is not open: readyState ${t.readyState} (${ka[t.readyState]})`);process.nextTick(n,e)}}function Fa(t,e){const n=this[ja];n._closeFrameReceived=!0,n._closeMessage=e,n._closeCode=t,void 0!==n._socket[ja]&&(n._socket.removeListener("data",Ya),process.nextTick($a,n._socket),1005===t?n.close():n.close(t,e))}function Ga(){const t=this[ja];t.isPaused||t._socket.resume()}function Ma(t){const e=this[ja];void 0!==e._socket[ja]&&(e._socket.removeListener("data",Ya),process.nextTick($a,e._socket),e.close(t[wa])),e.emit("error",t)}function Ja(){this[ja].emitClose()}function za(t,e){this[ja].emit("message",t,e)}function Wa(t){const e=this[ja];e.pong(t,!e._isServer,Ia),e.emit("ping",t)}function Va(t){this[ja].emit("pong",t)}function $a(t){t.resume()}function Ha(){const t=this[ja];let e;this.removeListener("close",Ha),this.removeListener("data",Ya),this.removeListener("end",Za),t._readyState=Oa.CLOSING,this._readableState.endEmitted||t._closeFrameReceived||t._receiver._writableState.errorEmitted||null===(e=t._socket.read())||t._receiver.write(e),t._receiver.end(),this[ja]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",Ja),t._receiver.on("finish",Ja))}function Ya(t){this[ja]._receiver.write(t)||this.pause()}function Za(){const t=this[ja];t._readyState=Oa.CLOSING,t._receiver.end(),this.end()}function Ka(){const t=this[ja];this.removeListener("error",Ka),this.on("error",Ia),t&&(t._readyState=Oa.CLOSING,this.destroy())}var Xa=function(t){function e(e,n,r,o,i){void 0===i&&(i=5e3);var s=t.call(this)||this;s.endpoint=e,s.headers=n,s.rewriteHostHeader=r,s.bindToAssign=o,s.closeTimeout=i,s.protocol="TCP",s.openConnections=new Set,s.tcpServer=p.createServer(s.handleConnection.bind(s));var a=null==r?void 0:r.altHostnames.map((function(t){return(e=xe(e=t))&&jr.test(e)?e.replace(wr,"\\$&"):e;var e})).join("|");return s.hostRegex=new RegExp("Host: (?:".concat(a,")(:.*$|$)"),"im"),s}return _(e,t),Object.defineProperty(e.prototype,"bindTo",{get:function(){var t;return null!==(t=this.boundTo)&&void 0!==t?t:this.bindToAssign},enumerable:!1,configurable:!0}),e.prototype.open=function(){return P(this,void 0,void 0,(function(){var t=this;return A(this,(function(e){return[2,new Promise((function(e){if(t.bindToAssign){var n=t.bindToAssign,r=n.port,o=n.address;t.tcpServer.listen(r,o,(function(){t.emit("tunnel-open",{address:o,port:r}),e({address:o,port:r})}))}else t.tcpServer.listen(0,(function(){var n=t.tcpServer.address(),r=n.address,o=n.port,i="0.0.0.0"===r||"::"===r?"127.0.0.1":r;t.boundTo={address:i,port:o},t.emit("tunnel-open",t.boundTo),e(t.boundTo)}))}))]}))}))},e.prototype.close=function(){return P(this,void 0,void 0,(function(){var t,e=this;return A(this,(function(n){switch(n.label){case 0:return t=!1,[4,Promise.race([new Promise((function(n){e.tcpServer.close((function(){t=!0,e.emit("tunnel-close"),n()}))})),new Promise((function(n){new Promise((function(t){return setTimeout(t,e.closeTimeout)})).then((function(){t||(e.openConnections.forEach((function(t){t.destroy(),e.openConnections.delete(t)})),n())}))}))])];case 1:return n.sent(),[2]}}))}))},e.prototype.handleConnection=function(t){var e=this;this.openConnections.add(t);var n=new xa(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Ri(n),o=this.getHeaderTransform();this.rewriteHostHeader&&o?Ei(t,o,r):Ei(t,r),Ei(r,t),n.on("close",(function(t,n,r){e.emit("connection-close",t,n,r)})),r.on("error",(function(t){e.emit("connection-error",t)})),t.on("error",(function(t){e.emit("connection-error",t)})),this.emit("connection-accept")},e.prototype.getHeaderTransform=function(){if(this.rewriteHostHeader){var t=this.rewriteHostHeader.targetHostname,e=this.hostRegex;return new o({transform:function(n,r,o){var i=n.toString();if(i.split("\n",1)[0].includes("HTTP")){var s=i.replace(e,"Host: ".concat(t));o(null,Buffer.from(s))}else o(null,n)}})}},e}(e),Qa=function(t){function e(e,n,r){var o=t.call(this)||this;return o.endpoint=e,o.headers=n,o.bindToAssign=r,o.protocol="UDP",o.udpSocket=I.createSocket("udp4"),o.handleConnection(),o}return _(e,t),Object.defineProperty(e.prototype,"bindTo",{get:function(){var t;return null!==(t=this.boundTo)&&void 0!==t?t:this.bindToAssign},enumerable:!1,configurable:!0}),e.prototype.open=function(){return P(this,void 0,void 0,(function(){var t=this;return A(this,(function(e){return[2,new Promise((function(e){if(t.bindToAssign){var n=t.bindToAssign,r=n.port,o=n.address;t.udpSocket.bind(r,o,(function(){t.emit("tunnel-open",{address:o,port:r}),e({address:o,port:r})}))}else t.udpSocket.bind(0,(function(){var n=t.udpSocket.address(),r=n.address,o=n.port,i="0.0.0.0"===r||"::"===r?"127.0.0.1":r;t.boundTo={address:i,port:o},t.emit("tunnel-open",t.boundTo),e(t.boundTo)}))}))]}))}))},e.prototype.close=function(){return P(this,void 0,void 0,(function(){var t=this;return A(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e){t.udpSocket.close((function(){t.emit("tunnel-close"),e()}))}))];case 1:return e.sent(),[2]}}))}))},e.prototype.handleConnection=function(){var t,e=this,n=new xa(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Ri(n);this.udpSocket.on("message",(function(e,n){t=n,r.write(e)})),r.on("data",(function(n){t&&e.udpSocket.send(n,t.port,t.address,(function(t){t&&e.emit("connection-error",t)}))})),this.udpSocket.on("error",(function(t){e.emit("connection-error",t)})),r.on("error",(function(t){e.emit("connection-error",t)})),n.on("connection-close",(function(t,n,r){e.emit("connection-close",t,n,r)})),n.on("connection-error",(function(t){e.emit("connection-error",t)})),this.emit("connection-accept")},e}(e);var tu,eu="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,nu=function(t,e){return P(void 0,void 0,void 0,(function(){var n;return A(this,(function(r){return n=Promise.resolve([]),[2,t.reduce((function(t,n){return t.then((function(t){return e(n).then((function(e){return t.push(e),t}))}))}),n)]}))}))},ru=function(t){function e(e){void 0===e&&(e=8192);var n=t.call(this)||this;return n.bufferDefaultSize=e,n._size=0,n.buffer=Buffer.alloc(n.bufferDefaultSize),n}return _(e,t),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.getContentsAsString=function(t,e){void 0===t&&(t="utf8");var n=this.buffer.toString(t,0,Math.min(e||this.size,this.size)),r=Buffer.byteLength(n);return r<this.size&&this.buffer.copy(this.buffer,0,r),this._size-=r,n},e.prototype.adaptBuffer=function(t){if(this.buffer.length-this.size<t){var e=Math.ceil((t-(this.buffer.length-this.size))/this.bufferDefaultSize),n=Buffer.alloc(this.buffer.length+this.bufferDefaultSize*e);this.buffer.copy(n,0,0,this.size),this.buffer=n}},e.prototype._write=function(t,e,n){this.adaptBuffer(t.length),t.copy(this.buffer,this.size,0),this._size+=t.length,n()},e}(r.Writable),ou=function(t){function e(e,n,r){var o=t.call(this)||this;return o.contextProvider=e,o.listServices=n,o.listAddons=r,o.connections=[],o.hostsFileMutex=new ui,o.ipAllocationMutex=new ui,o.stopForwarding=function(t){return P(o,void 0,void 0,(function(){var e,n,r,o,i,s,a;return A(this,(function(u){switch(u.label){case 0:return[4,t.tunnel.close()];case 1:return u.sent(),e=t.forwardingContext,n=e.projectId,r=e.type,o=e.id,i=e.hostnames,s=e.ipOnly,i.length>0&&!s?[4,this.unregisterHostnames(null===(a=t.tunnel.bindTo)||void 0===a?void 0:a.address,i)]:[3,3];case 2:u.sent(),u.label=3;case 3:return this.connections.splice(this.connections.findIndex((function(t){var e=t.forwardingContext,i=e.type,s=e.id,a=e.projectId;return s===o&&a===n&&i===r})),1),[2]}}))}))},o.canExecuteWithHostnames=function(){return"win32"!==process.platform?process.getuid&&0!==process.getuid()?{error:!0,message:"You are not running this command with sufficient privileges (uid=".concat(null===(t=null===process||void 0===process?void 0:process.getuid)||void 0===t?void 0:t.call(process),"). Try running with 'sudo -E'.")}:{error:!1,type:"unix-admin"}:function(){try{return m("fsutil dirty query %systemdrive%"),!0}catch(t){if("ENOENT"===t.code)try{return m("fltmc"),!0}catch(t){return!1}return!1}}()?{error:!1,type:"windows-admin"}:{error:!0,message:"You are not running this command as administrator. Please start command line with admin rights."};var t},o.assertStartedWithNodejs=function(){if(!eu)throw new Error("Port forwarding only possible when started with nodejs")},o.proxyApiClient=new Go(e),o}return _(e,t),e.prototype.withProjectForwarding=function(t,e,n){return void 0===n&&(n=!0),P(this,void 0,void 0,(function(){var r;return A(this,(function(o){switch(o.label){case 0:return[4,this.forwardProject(t,n)];case 1:r=o.sent(),o.label=2;case 2:return o.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,o.sent()];case 4:return[4,this.stopProjectForwarding(t)];case 5:return o.sent(),[7];case 6:return[2]}}))}))},e.prototype.forwardProject=function(t,e){return void 0===e&&(e=!0),P(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return A(this,(function(u){switch(u.label){case 0:return this.assertStartedWithNodejs(),n=t.projectId,[4,this.listServices({parameters:{projectId:n}})];case 1:return r=u.sent(),[4,this.listAddons({parameters:{projectId:n}})];case 2:return o=u.sent(),[4,Promise.all(r.data.services.map((function(t){return P(a,void 0,void 0,(function(){return A(this,(function(r){return[2,this.forwardService({projectId:n,serviceId:t.id},e)]}))}))})))];case 3:return i=u.sent(),[4,Promise.all(o.data.addons.map((function(t){return P(a,void 0,void 0,(function(){return A(this,(function(r){switch(r.label){case 0:return[4,this.forwardAddon({projectId:n,addonId:t.id},e)];case 1:return[2,r.sent()]}}))}))})))];case 4:return s=u.sent(),[2,{services:i,addons:s}]}}))}))},e.prototype.withServiceForwarding=function(t,e,n){return void 0===n&&(n=!0),P(this,void 0,void 0,(function(){var r;return A(this,(function(o){switch(o.label){case 0:return[4,this.forwardService(t,n)];case 1:r=o.sent(),o.label=2;case 2:return o.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,o.sent()];case 4:return[4,this.stopServiceForwarding(t)];case 5:return o.sent(),[7];case 6:return[2]}}))}))},e.prototype.forwardService=function(t,e){return void 0===e&&(e=!0),P(this,void 0,void 0,(function(){var n,r,o,i,s,a,u,c=this;return A(this,(function(d){switch(d.label){case 0:return this.assertStartedWithNodejs(),n=t.projectId,r=t.serviceId,[4,this.proxyApiClient.getServiceDetails(n,r)];case 1:return o=d.sent(),i=o.namespace,s=o.targetDomain,a=o.instances,u=o.ports,0===a.length?[2,[]]:[4,nu(u,(function(t){var o,u="https://".concat(s,"/tunnel/projects/").concat(n,"/services/").concat(r,"/instance/").concat(a[0].podName,"/port/").concat(t.internalPort),d="".concat(r,".").concat(i,".svc.cluster.local"),l=["".concat(r)];t.name&&l.push("".concat(t.name,".").concat(r)),"HTTP"===t.protocol&&(o={altHostnames:l,targetHostname:d});var p=R([d],l,!0);return c.forwardPort(u,t,p,"service",r,n,e,o)}))];case 2:return[2,d.sent()]}}))}))},e.prototype.withAddonForwarding=function(t,e,n){return void 0===n&&(n=!0),P(this,void 0,void 0,(function(){var r;return A(this,(function(o){switch(o.label){case 0:return[4,this.forwardAddon(t,n)];case 1:r=o.sent(),o.label=2;case 2:return o.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,o.sent()];case 4:return[4,this.stopAddonForwarding(t)];case 5:return o.sent(),[7];case 6:return[2]}}))}))},e.prototype.forwardAddon=function(t,e){return void 0===e&&(e=!0),P(this,void 0,void 0,(function(){var n,r,o,i,s=this;return A(this,(function(a){switch(a.label){case 0:return this.assertStartedWithNodejs(),n=t.addonId,r=t.projectId,[4,this.proxyApiClient.getAddonDetails(r,n)];case 1:return o=a.sent(),i=o.instances.map((function(t){var e=t.podName,n=t.internalHostname;return t.ports.map((function(t){return{podName:e,internalHostname:n,port:t}}))})),[4,nu((u=i,null!=u&&u.length?Ge(u,1/0):[]),(function(t){var i=t.podName,a=t.internalHostname,u=t.port;return P(s,void 0,void 0,(function(){var t;return A(this,(function(s){return t="https://".concat(o.targetDomain,"/tunnel/projects/").concat(r,"/addons/").concat(n,"/instance/").concat(i,"/port/").concat(u.internalPort),[2,this.forwardPort(t,u,[a],"addon",n,r,e)]}))}))}))];case 2:return[2,a.sent()]}var u}))}))},e.prototype.allocateIpAddress=function(t){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return P(e,void 0,void 0,(function(){var e,n,r,o,i;return A(this,(function(s){switch(s.label){case 0:return e="127.24.1.1",n="127.24.255.255",r=null!==(i=this.nextIpAddress)&&void 0!==i?i:e,[4,Mo(t,r,n)];case 1:return o=s.sent(),this.nextIpAddress=Vo(Wo(o)+1),Wo(this.nextIpAddress)>Wo(n)&&(this.nextIpAddress=e),[2,o]}}))}))}))]}))}))},e.prototype.forwardPort=function(t,e,n,r,o,i,s,a){var u;return void 0===s&&(s=!0),P(this,void 0,void 0,(function(){var c,d,l,p,f,h,v=this;return A(this,(function(m){switch(m.label){case 0:if(c={Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken())},!s&&(d=this.canExecuteWithHostnames()).error)throw new Error("".concat(d.message," Alternatively, you can use the ipOnly mode when port-forwarding (apiClient.forwarding.forwardAddon({ projectId, addonId }, true))"));return[4,this.determineSocketAddress(i,o,n,r,e,s)];case 1:return l=m.sent(),p="UDP"===e.protocol?new Qa(t,c,l):new Xa(t,c,a,l),s?[3,3]:[4,this.registerHostnames(null===(u=p.bindTo)||void 0===u?void 0:u.address,n)];case 2:m.sent(),m.label=3;case 3:return p.on("connection-accept",(function(){return v.emit("connection-accept",p)})),p.on("connection-close",(function(){return P(v,void 0,void 0,(function(){return A(this,(function(t){return[2,this.emit("connection-close",p)]}))}))})),[4,p.open()];case 4:return f=m.sent(),h={projectId:i,id:o,type:r,hostnames:n,ipOnly:s,port:f.port,address:f.address,protocol:e.protocol,portName:e.name},this.emit("tunnel-open",p,h),p.on("connection-error",(function(t){return v.emit("connection-error",p,h,t)})),p.on("tunnel-close",(function(){return v.emit("tunnel-close",p,h)})),this.connections.push({tunnel:p,forwardingContext:h}),[2,{data:h}]}}))}))},e.prototype.determineSocketAddress=function(t,e,n,r,o,i){return P(this,void 0,void 0,(function(){var s,a,u;return A(this,(function(c){switch(c.label){case 0:return i&&"darwin"===l.platform()?[2,void 0]:(s=this.connections.filter((function(n){return n.forwardingContext.projectId===t&&n.forwardingContext.id===e&&n.forwardingContext.type===r})),(a=null==s?void 0:s.find((function(t){return n.find((function(e){return t.forwardingContext.hostnames.includes(e)}))})))?[2,{address:null==a?void 0:a.forwardingContext.address,port:o.internalPort}]:(u={},[4,this.allocateIpAddress(o.internalPort)]));case 1:return[2,(u.address=c.sent(),u.port=o.internalPort,u)]}}))}))},e.prototype.registerHostnames=function(t,e){return P(this,void 0,void 0,(function(){return A(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.removeHosts.apply(n,e),n.add.apply(n,R([t],e,!1))}))];case 1:return n.sent(),[2]}}))}))},e.prototype.unregisterHostnames=function(t,e){return P(this,void 0,void 0,(function(){return A(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.remove.apply(n,R([t],e,!1))}))];case 1:return n.sent(),[2]}}))}))},e.prototype.modifyHostsFile=function(t){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter((function(){return P(e,void 0,void 0,(function(){var e,n=this;return A(this,(function(r){switch(r.label){case 0:return[4,ai.load({header:"Northflank Proxy"})];case 1:return e=r.sent(),t(e),[4,e.backup({suffix:".backup-pre-northflank"})];case 2:r.sent(),r.label=3;case 3:return r.trys.push([3,5,,7]),[4,iu(5)((function(){return P(n,void 0,void 0,(function(){return A(this,(function(t){switch(t.label){case 0:return[4,e.write({writeMode:"atomic"})];case 1:return t.sent(),[2]}}))}))}))];case 4:return r.sent(),[3,7];case 5:return r.sent(),[4,iu(5)((function(){return P(n,void 0,void 0,(function(){return A(this,(function(t){switch(t.label){case 0:return[4,e.write({writeMode:"standard"})];case 1:return t.sent(),[2]}}))}))}))];case 6:return r.sent(),[3,7];case 7:return[2]}}))}))}))];case 1:return n.sent(),[2]}}))}))},e.prototype.stopProjectForwarding=function(t){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return e.forwardingContext.projectId===t.projectId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},e.prototype.stopServiceForwarding=function(t){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return"service"===e.forwardingContext.type&&e.forwardingContext.projectId===t.projectId&&e.forwardingContext.id===t.serviceId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},e.prototype.stopAddonForwarding=function(t){return P(this,void 0,void 0,(function(){var e=this;return A(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return"addon"===e.forwardingContext.type&&e.forwardingContext.projectId===t.projectId&&e.forwardingContext.id===t.addonId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},e.prototype.stop=function(){return P(this,void 0,void 0,(function(){var t=this;return A(this,(function(e){switch(e.label){case 0:return[4,Promise.all(this.connections.map((function(e){return P(t,void 0,void 0,(function(){return A(this,(function(t){return[2,this.stopForwarding(e)]}))}))})))];case 1:return e.sent(),[2]}}))}))},e}(e),iu=function(t,e){return void 0===e&&(e=50),function(n){var r=t,o=function(){return P(void 0,void 0,void 0,(function(){var t;return A(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,4]),[4,n()];case 1:return[2,i.sent()];case 2:if(t=i.sent(),r<=0)throw t;return r-=1,[4,new Promise((function(t){return setTimeout((function(){return t()}),e)}))];case 3:return i.sent(),[2,o()];case 4:return[2]}}))}))};return o()}},su=function(t){function e(e,r,o,i,s,a){void 0===i&&(i=new n.PassThrough),void 0===s&&(s=new n.PassThrough),void 0===a&&(a=new n.PassThrough);var u=t.call(this)||this;return u.baseUrl=e,u.execConfig=r,u.token=o,u.stdOut=i,u.stdErr=s,u.stdIn=a,u.waitForCommandResult=function(){return P(u,void 0,void 0,(function(){return A(this,(function(t){switch(t.label){case 0:if(void 0===this.currentCommand)throw new Error("No command is running");return[4,this.currentCommand];case 1:return[2,t.sent()]}}))}))},u.sendInputToCurrentCommand=function(t){return P(u,void 0,void 0,(function(){var e;return A(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running");return null===(e=this.duplex)||void 0===e||e.write(this.constructPayloadPacket(t)),[2]}))}))},u.resizeTerminal=function(t){return P(u,void 0,void 0,(function(){var e;return A(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running, can't resize terminal");return null===(e=this.duplex)||void 0===e||e.write(JSON.stringify({type:"resize",data:{ttyRows:null==t?void 0:t.rows,ttyColumns:null==t?void 0:t.columns}})),[2]}))}))},u.constructPayloadPacket=function(t){return JSON.stringify({type:"payload",data:t.toString()})},u}return _(e,t),Object.defineProperty(e.prototype,"execEndpoint",{get:function(){var t=this.execConfig,e=t.entityId,n=t.entityType,r=t.projectId,o="".concat(this.baseUrl,"/v1/command-exec/projects/").concat(r,"/");return"".concat(o).concat(function(){switch(n){case"service":return"services/".concat(e);case"job":return"jobs/".concat(e);case"addon":return"addons/".concat(e);case"build":return"builds/".concat(e);default:throw new Error("Unexpected Northflank entity type received in command exec endpoint generation: ".concat(n))}}())},enumerable:!1,configurable:!0}),e.prototype.start=function(){return P(this,void 0,void 0,(function(){var t=this;return A(this,(function(e){if(void 0!==this.currentCommand)throw new Error("Command is already running");return this.currentCommand=new Promise((function(e,n){var r,o,i;void 0!==t.remote&&n(Error("Command is already running"));var s,a=t.execEndpoint.replace("https:","wss:").replace("http:","ws:");t.remote=new xa(a);try{t.duplex=Ri(t.remote)}catch(t){throw new Error("Failed to establish connection to command execution proxy: ".concat(t.message))}t.initialAuth(),t.stdIn.on("data",(function(e){var n,r;(null===(n=t.duplex)||void 0===n?void 0:n.writable)&&(null===(r=t.duplex)||void 0===r||r.write(t.constructPayloadPacket(e)))})),null===(r=t.duplex)||void 0===r||r.on("data",(function(e){var n,r,o,i=JSON.parse(e.toString());switch(null==i?void 0:i.type){case"init":var a=i.data;"successful"!==a.auth&&u("Command initialization failed: ".concat(null!==(n=null==a?void 0:a.message)&&void 0!==n?n:"Reason unknown"));break;case"completion":s=i.data,t.emit("command-result",s),null===(r=t.duplex)||void 0===r||r.end();break;case"stdOut":t.emit("std-out-data",i.data),t.stdOut.write(i.data);break;case"stdErr":t.emit("std-err-data",i.data),t.stdErr.write(i.data);break;case"error":u(null===(o=i.data)||void 0===o?void 0:o.message);break;default:var c="unable to parse message: ".concat(JSON.stringify(i));u(c)}})),null===(o=t.duplex)||void 0===o||o.on("end",(function(){t.emit("command-completed"),t.reset(),e(s)})),null===(i=t.duplex)||void 0===i||i.on("error",(function(n){t.emit("error",n),t.emit("command-completed"),t.reset(),e(s)}));var u=function(e){t.emit("error",e),t.reset(),n(new Error(e))};t.emit("command-started")})),[2,this.currentCommand]}))}))},e.prototype.initialAuth=function(){var t,e=this.execConfig,n=e.command,r=e.containerName,o=e.shell,i=e.user,s=e.group,a=e.ttyColumns,u=e.ttyRows,c={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{containerId:r,command:n,shell:o,user:i,group:s,ttyColumns:a,ttyRows:u}}};null===(t=this.duplex)||void 0===t||t.write(JSON.stringify(c))},e.prototype.reset=function(){var t;this.remote=void 0,this.currentCommand=void 0,null===(t=this.duplex)||void 0===t||t.destroy(),this.duplex=void 0},e}(e),au=function(){function t(t){this.contextProvider=t,this.assertStartedWithNodejs=function(){if(!eu)throw new Error("Command exec only possible when started with nodejs")}}return t.prototype.execServiceCommand=function(t,e){return P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){return n=t.serviceId,r=t.projectId,"service",o=S({projectId:r,entityId:n,entityType:"service"},e),[2,this.execCommand(o)]}))}))},t.prototype.execServiceSession=function(t,e){return P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){return n=t.serviceId,r=t.projectId,"service",o=S({projectId:r,entityId:n,entityType:"service"},e),[2,this.shellSession(o)]}))}))},t.prototype.execJobCommand=function(t,e){return P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){return n=t.jobId,r=t.projectId,"job",o=S({projectId:r,entityId:n,entityType:"job"},e),[2,this.execCommand(o)]}))}))},t.prototype.execJobSession=function(t,e){return P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){return n=t.jobId,r=t.projectId,"job",o=S({projectId:r,entityId:n,entityType:"job"},e),[2,this.shellSession(o)]}))}))},t.prototype.execCommand=function(t){return P(this,void 0,void 0,(function(){var e,n,r;return A(this,(function(o){switch(o.label){case 0:return this.assertStartedWithNodejs(),e=this.getCommandRunner(S({shell:"none"},t)),n=new ru,r=new ru,e.stdOut.pipe(n),e.stdErr.pipe(r),e.on("error",(function(t){throw new Error(t)})),[4,e.start()];case 1:return[2,{commandResult:o.sent(),stdOut:n.getContentsAsString(),stdErr:r.getContentsAsString()}]}}))}))},t.prototype.shellSession=function(t){this.assertStartedWithNodejs();var e=this.getCommandRunner(t);return e.start(),e},t.prototype.getCommandRunner=function(t){var e=this.contextProvider.getCurrentBaseUrl(!0),n=this.contextProvider.getCurrentToken();if(!n)throw Error("API token not found");return new su(e,t,n)},t}(),uu=function(t){function e(e){var n=this.constructor,r=t.call(this,e.message)||this;r.name="NorthflankApiCallError",r.message=e.message,r.status=e.status,r.id=e.id,r.details=e.details;var o=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,o):r.__proto__=o,r}return _(e,t),e}(Error),cu=function(t){function e(e,n,r){var o=t.call(this)||this;return o.baseUrl=e,o.logsConfig=n,o.token=r,o.stop=function(){return P(o,void 0,void 0,(function(){var t;return A(this,(function(e){if(void 0===this.logSession)throw new Error("No command is running");return null===(t=this.remote)||void 0===t||t.close(),[2]}))}))},o}return _(e,t),e.getLogsEndpoint=function(t){var e=t.containerName,n=t.types,r=t.entityId,o=t.entityType,i=t.buildId,s=t.runId,a=t.backupId,u=t.restoreId,c=t.isBuild,d=t.lineLimit,l=t.projectId,p=t.queryType,f=t.startTime,h=t.endTime,v=t.duration,m=t.direction,g=t.textIncludes,b=t.textNotIncludes,y=t.regexIncludes,w=t.regexNotIncludes,j="/v1/projects/".concat(l,"/"),I=new URLSearchParams;return I.append("queryType",p),void 0!==f&&I.append("startTime",f.toISOString()),void 0!==h&&I.append("endTime",h.toISOString()),void 0!==d&&I.append("lineLimit",d.toString()),void 0!==e&&I.append("containerName",e),void 0!==s&&I.append("runId",s),void 0!==i&&I.append("buildId",i),void 0!==g&&I.append("textIncludes",g),void 0!==b&&I.append("textNotIncludes",b),void 0!==y&&I.append("regexIncludes",y),void 0!==w&&I.append("regexNotIncludes",w),void 0!==m&&I.append("direction",m),void 0!==v&&I.append("duration",v.toString()),void 0!==n&&n.forEach((function(t){return I.append("type",t)})),"".concat(j).concat(function(){var t=c?"/build-logs":"/logs";switch(o){case"service":return"services/".concat(r).concat(t);case"job":return"jobs/".concat(r).concat(t);case"addon":return"addons/".concat(r).concat(t);case"addonBackup":return"addons/".concat(r,"/backups/").concat(a).concat(t);case"addonRestore":return"addons/".concat(r,"/backups/").concat(a,"/restores/").concat(u).concat(t);default:throw new Error("Unexpected Northflank entity type received in logs endpoint generation: ".concat(o))}}(),"?").concat(I.toString())},Object.defineProperty(e.prototype,"logsEndpoint",{get:function(){return"".concat(this.baseUrl).concat(e.getLogsEndpoint(this.logsConfig))},enumerable:!1,configurable:!0}),e.prototype.start=function(){return P(this,void 0,void 0,(function(){var t=this;return A(this,(function(e){switch(e.label){case 0:if(void 0!==this.logSession)throw new Error("Command is already running");return this.logSession=new Promise((function(e,n){var r,o,i,s;void 0!==t.remote&&n(Error("Command is already running"));var a=t.logsEndpoint.replace("https:","wss:").replace("http:","ws:");t.remote=new xa(a),null===(r=t.remote)||void 0===r||r.on("message",(function(e){var n,r,o=JSON.parse(e.toString());switch(null==o?void 0:o.type){case"init":var i=o.data;"successful"!==i.auth&&u("Log tail initialization failed: ".concat(null!==(n=null==i?void 0:i.message)&&void 0!==n?n:"Reason unknown"));break;case"log-lines":var s=o.data;t.emit("logs-received",s.map(ju));break;case"error":u(null===(r=o.data)||void 0===r?void 0:r.message);break;default:var a="unable to parse message: ".concat(JSON.stringify(o));u(a)}})),null===(o=t.remote)||void 0===o||o.on("close",(function(){t.emit("close"),t.reset(),e()})),null===(i=t.remote)||void 0===i||i.on("open",(function(){t.emit("open")})),null===(s=t.remote)||void 0===s||s.on("error",(function(n){t.emit("error",n),t.reset(),e()}));var u=function(e){t.emit("error",{message:e}),t.reset(),n(new Error(e))}})),[4,new Promise((function(e){var n;t.remote.on("open",(function(){return e()})),null===(n=t.remote)||void 0===n||n.on("error",(function(){e()}))}))];case 1:return e.sent(),this.initialAuth(),[2,this.logSession]}}))}))},e.prototype.initialAuth=function(){var t,e={type:"init",data:{auth:{type:"apiToken",apiToken:this.token}}};null===(t=this.remote)||void 0===t||t.send(JSON.stringify(e))},e.prototype.reset=function(){this.remote=void 0,this.logSession=void 0},e}(e),du=eu?Lo:window.fetch,lu=function(){if(eu)try{return JSON.parse(g.readFileSync(b.join(b.dirname(a(import.meta.url)),"../../package.json")).toString())}catch(t){return console.log("Failed to check version of northflank CLI (".concat(t.message,")")),{}}return{}},pu=function(){function t(t,e){var n=this;this.opts=e,this.call=function(t){return P(n,void 0,void 0,(function(){var e,n,r,o,i,s,a,u,c,d,l,p,f=this;return A(this,(function(h){switch(h.label){case 0:if(e=this.method,n={method:e,headers:this.getDefaultHeaders()},!(r=null===(p=this.contextProvider)||void 0===p?void 0:p.getCurrentBaseUrl()))throw new Error("Api client context not correctly initialized, please provide a url to the context.");return o="".concat(r).concat(this.endpointUrl(t)),i=this.body(t),s=S(S({url:o},n),{body:i}),[4,bu(o,S(S({},n),{body:i}))];case 1:return[4,(a=h.sent()).text()];case 2:return u=h.sent(),c=function(){if(200!==a.status){var t=null==d?void 0:d.error,e=(null==t?void 0:t.message)||"",n={status:a.status,message:e,id:null==t?void 0:t.id,details:null==t?void 0:t.details};if(f.opts.throwErrorOnHttpErrorCode)throw new uu(n);return n}},d=function(){try{return JSON.parse(u)}catch(t){throw Error("Failed reading api request result: \n\tStatus: ".concat(a.statusText," (").concat(a.status,")\n\tMessage: ").concat(u))}}(),l=c(),[2,{data:null==d?void 0:d.data,rawResponse:a,request:s,error:l,pagination:null==d?void 0:d.pagination}]}}))}))},this.contextProvider=t}return t.prototype.getDefaultHeaders=function(){var t,e,n=this.contextProvider.getCurrentToken(),r=(null===(t=this.opts)||void 0===t?void 0:t.customUserAgent)?" (".concat(this.opts.customUserAgent,")"):"";return{Authorization:this.withAuth?"Bearer ".concat(n):void 0,"Content-Type":"application/json","User-Agent":"northflank-js-client/".concat(null===(e=lu())||void 0===e?void 0:e.version).concat(r)}},t}(),fu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="get",e.body=function(){},e}return _(e,t),e}(pu),hu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="post",e}return _(e,t),e}(pu),vu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="delete",e.body=function(){},e}return _(e,t),e}(pu),mu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="put",e}return _(e,t),e}(pu),gu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="patch",e}return _(e,t),e}(pu),bu=function(t,e,n,r){return void 0===e&&(e={}),void 0===n&&(n=3),void 0===r&&(r=500),new Promise((function(o,i){var s=function(n){return du(t,e).then((function(t){o(t)})).catch((function(t){return P(void 0,void 0,void 0,(function(){return A(this,(function(e){switch(e.label){case 0:return n>0?[4,(o=r,new Promise((function(t){setTimeout((function(){t()}),o)})))]:[3,2];case 1:return e.sent(),[2,s(n-1)];case 2:return[2,i(t)]}var o}))}))}))};return s(n)}))},yu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetch log lines over a specific time span",e.withAuth=!0,e.requiredPermissions="Account > Service | Job | Addon > General > Read",e.endpointUrl=function(t){return cu.getLogsEndpoint(t)},e.body=function(){},e}return _(e,t),e}(fu);!function(t){t.CDN="cdn",t.Mesh="mesh",t.Ingress="ingress",t.Runtime="runtime"}(tu||(tu={}));var wu,ju=function(t){return{containerId:t.containerId,log:t.log,ts:new Date(t.ts)}},Iu=function(t){var e=this;this.contextProvider=t,this.getServiceLogs=function(t){return P(e,void 0,void 0,(function(){var e,n,r;return A(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.logRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildLogs=function(t){return P(e,void 0,void 0,(function(){var e,n,r,o,i;return A(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,o=e.serviceId,i={entityId:o,projectId:r},[2,this.logRange(i,S(S({},n),{isBuild:!0}),"service")]}))}))},this.getJobLogs=function(t){return P(e,void 0,void 0,(function(){var e,n,r;return A(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.logRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildLogs=function(t){return P(e,void 0,void 0,(function(){var e,n,r,o,i;return A(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,o=e.jobId,i={entityId:o,projectId:r},[2,this.logRange(i,S(S({},n),{isBuild:!0}),"job")]}))}))},this.getAddonLogs=function(t){return P(e,void 0,void 0,(function(){var e,n,r;return A(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logRange(r,null!=n?n:{},"addon")]}))}))},this.getAddonBackupLogs=function(t){return P(e,void 0,void 0,(function(){var e,n,r;return A(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logRange(r,S(S({},n),{backupId:e.backupId}),"addonBackup")]}))}))},this.getAddonRestoresLogs=function(t){return P(e,void 0,void 0,(function(){var e,n,r,o;return A(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},o={backupId:e.backupId,restoreId:e.restoreId},[2,this.logRange(r,S(S({},n),o),"addonRestore")]}))}))},this.logRange=function(t,n,r){return P(e,void 0,void 0,(function(){var e,o,i,s,a;return A(this,(function(u){switch(u.label){case 0:return e=t.entityId,o=t.projectId,i=S(S({projectId:o,entityId:e,entityType:r},n),{queryType:"range"}),[4,new yu(this.contextProvider,{}).call(i)];case 1:return(s=u.sent()).error?[2,s]:[2,S(S({},s),{data:null===(a=null==s?void 0:s.data)||void 0===a?void 0:a.map(ju)})]}}))}))},this.tailServiceLogs=function(t){return P(e,void 0,void 0,(function(){var e,n,r;return A(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.logTail(r,null!=n?n:{},"service")]}))}))},this.tailServiceBuildLogs=function(t){return P(e,void 0,void 0,(function(){var e,n,r,o,i;return A(this,(function(s){return e=t.parameters,n=t.options,r=e.serviceId,o=e.projectId,i={entityId:r,projectId:o},[2,this.logTail(i,S(S({},n),{isBuild:!0}),"service")]}))}))},this.tailJobLogs=function(t){return P(e,void 0,void 0,(function(){var e,n,r;return A(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.logTail(r,null!=n?n:{},"job")]}))}))},this.tailJobBuildLogs=function(t){return P(e,void 0,void 0,(function(){var e,n,r,o,i;return A(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,o=e.jobId,i={entityId:o,projectId:r},[2,this.logTail(i,S(S({},n),{isBuild:!0}),"job")]}))}))},this.tailAddonLogs=function(t){return P(e,void 0,void 0,(function(){var e,n,r;return A(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logTail(r,null!=n?n:{},"addon")]}))}))},this.tailAddonBackupLogs=function(t){return P(e,void 0,void 0,(function(){var e,n,r;return A(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logTail(r,S(S({},n),{backupId:e.backupId}),"addonBackup")]}))}))},this.tailAddonRestoresLogs=function(t){return P(e,void 0,void 0,(function(){var e,n,r,o;return A(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},o={backupId:e.backupId,restoreId:e.restoreId},[2,this.logTail(r,S(S({},n),o),"addonRestore")]}))}))},this.logTail=function(t,n,r){return P(e,void 0,void 0,(function(){var e,o,i,s,a;return A(this,(function(u){if(e=t.entityId,o=t.projectId,i=S({queryType:"tail",projectId:o,entityId:e,entityType:r},n),this.assertStartedWithNodejs(),s=this.contextProvider.getCurrentBaseUrl(!0),!(a=this.contextProvider.getCurrentToken()))throw new Error("API token not found");return[2,new cu(s,i,a)]}))}))},this.assertStartedWithNodejs=function(){if(!eu)throw new Error("Command exec only possible when started with nodejs")}},Eu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetch metrics entries over a specific time span",e.withAuth=!0,e.requiredPermissions="Account > Service | Job | Addon > General > Read",e.endpointUrl=function(t){var e=t.projectId,n=t.entityId,r=t.entityType,o=t.runId,i=t.buildId,s=t.isBuild,a=t.queryType,u=t.metricTypes,c=t.startTime,d=t.endTime,l=t.duration,p=t.containerName,f=t.timestamp,h="/v1/projects/".concat(e,"/");var v=new URLSearchParams;return v.append("queryType",a),void 0!==c&&v.append("startTime",c.toISOString()),void 0!==d&&v.append("endTime",d.toISOString()),void 0!==p&&v.append("containerName",p),void 0!==o&&v.append("runId",o),void 0!==i&&v.append("buildId",i),void 0!==f&&v.append("timestamp",f.toISOString()),void 0!==l&&v.append("duration",l.toString()),void 0!==u&&u.forEach((function(t){return v.append("metricTypes",t)})),"".concat(h).concat(function(){var t=s?"/build-metrics":"/metrics";switch(r){case"service":return"services/".concat(n).concat(t);case"job":return"jobs/".concat(n).concat(t);case"addon":return"addons/".concat(n).concat(t);default:throw new Error("Unexpected Northflank entity type received in metrics endpoint generation: ".concat(r))}}(),"?").concat(v.toString())},e.body=function(){},e}return _(e,t),e}(fu),_u=function(t){return{metadata:t.metadata,data:t.data.map((function(t){return{value:t.value,ts:new Date(t.ts)}}))}};!function(t){t.Cpu="cpu",t.Memory="memory",t.NetworkIngress="networkIngress",t.NetworkEgress="networkEgress",t.TcpConnectionOpen="tcpConnectionsOpen",t.PvcUsage="diskUsage",t.Requests="requests",t.Http4xxResponses="http4xxResponses",t.Http5xxResponses="http5xxResponses",t.Bandwidth="bandwidth",t.BandwidthVolume="bandwidthVolume"}(wu||(wu={}));var Su=function(t){var e=this;this.contextProvider=t,this.getServiceMetrics=function(t){return P(e,void 0,void 0,(function(){var e,n,r;return A(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.metricsSingle(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetrics=function(t){return P(e,void 0,void 0,(function(){var e,n,r,o,i;return A(this,(function(s){return e=t.parameters,n=t.options,r=e.serviceId,o=e.projectId,i={entityId:r,projectId:o},[2,this.metricsSingle(i,S(S({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetrics=function(t){return P(e,void 0,void 0,(function(){var e,n,r;return A(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.metricsSingle(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetrics=function(t){return P(e,void 0,void 0,(function(){var e,n,r,o,i;return A(this,(function(s){return e=t.parameters,n=t.options,r=e.jobId,o=e.projectId,i={entityId:r,projectId:o},[2,this.metricsSingle(i,S(S({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetrics=function(t){return P(e,void 0,void 0,(function(){var e,n,r;return A(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.metricsSingle(r,null!=n?n:{},"addon")]}))}))},this.metricsSingle=function(t,n,r){return P(e,void 0,void 0,(function(){var e,o,i;return A(this,(function(s){return e=t.entityId,o=t.projectId,i=S(S({projectId:o,entityId:e,entityType:r},n),{queryType:"single"}),[2,this.getMetrics(i)]}))}))},this.getServiceMetricsRange=function(t){return P(e,void 0,void 0,(function(){var e,n,r;return A(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.metricsRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetricsRange=function(t){return P(e,void 0,void 0,(function(){var e,n,r,o,i;return A(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,o=e.serviceId,i={entityId:o,projectId:r},[2,this.metricsRange(i,S(S({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetricsRange=function(t){return P(e,void 0,void 0,(function(){var e,n,r;return A(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.metricsRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetricsRange=function(t){return P(e,void 0,void 0,(function(){var e,n,r,o,i;return A(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,o=e.jobId,i={entityId:o,projectId:r},[2,this.metricsRange(i,S(S({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetricsRange=function(t){return P(e,void 0,void 0,(function(){var e,n,r;return A(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.metricsRange(r,null!=n?n:{},"addon")]}))}))},this.metricsRange=function(t,n,r){return P(e,void 0,void 0,(function(){var e,o,i;return A(this,(function(s){return e=t.entityId,o=t.projectId,i=S(S({projectId:o,entityId:e,entityType:r},n),{queryType:"range"}),[2,this.getMetrics(i)]}))}))},this.getMetrics=function(t){return P(e,void 0,void 0,(function(){var e;return A(this,(function(n){switch(n.label){case 0:return[4,new Eu(this.contextProvider,{}).call(t)];case 1:return(e=n.sent()).error?[2,e]:[2,S(S({},e),{data:Object.fromEntries(Object.entries(e.data).map((function(t){var e=t[0],n=t[1];return[e,S(S({},n),{values:n.values.map(_u)})]})))})]}}))}))}},Pu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the available addon types",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/addon-types"},e.body=function(){},e}return _(e,t),e}(fu),Au=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of past invoices",e.withAuth=!0,e.requiredPermissions="Account > Billing > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/billing/invoices".concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Ru=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about an invoice. If `timestamp` is passed in as a query parameter, this endpoint returns details about the invoice containing that timestamp. Otherwise, returns a preview invoice displaying billing data from after the most recent invoice.",e.withAuth=!0,e.requiredPermissions="Account > Billing > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/billing/invoices/details".concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Cu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud providers",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/cloud-providers"},e.body=function(){},e}return _(e,t),e}(fu),ku=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists clusters for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/clusters".concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Uu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters"},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Ou=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given cluster",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){return["clusterId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(t.parameters.clusterId)},e.body=function(){},e}return _(e,t),e}(fu),xu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update an existing cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(t.parameters.clusterId)},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),qu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given cluster. Fails if the cluster has associated projects.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Delete",e.endpointUrl=function(t){return["clusterId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(t.parameters.clusterId)},e.body=function(){},e}return _(e,t),e}(vu),Du=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists docker registries for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/docker-registries".concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Tu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new docker registry.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/docker-registries"},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Nu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given docker registry",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Read",e.endpointUrl=function(t){return["registryId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/docker-registries/".concat(t.parameters.registryId)},e.body=function(){},e}return _(e,t),e}(fu),Bu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given docker registry. Fails if the docker registry is associated with existing clusters.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Delete",e.endpointUrl=function(t){return["registryId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/docker-registries/".concat(t.parameters.registryId)},e.body=function(){},e}return _(e,t),e}(vu),Lu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists integrations for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/integrations".concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Fu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new integration.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/integrations"},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Gu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given integration",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Read",e.endpointUrl=function(t){return["integrationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/integrations/".concat(t.parameters.integrationId)},e.body=function(){},e}return _(e,t),e}(fu),Mu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update information about the given integration",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Update",e.endpointUrl=function(t){return["integrationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/integrations/".concat(t.parameters.integrationId)},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Ju=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given integration. Fails if the integration is associated with existing clusters.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Delete",e.endpointUrl=function(t){return["integrationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/integrations/".concat(t.parameters.integrationId)},e.body=function(){},e}return _(e,t),e}(vu),zu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud provider node types",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/node-types".concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Wu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud provider regions",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/regions".concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Vu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the partially random string used when generating host names for the authenticated account.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){return"/v1/dns-id"},e.body=function(){},e}return _(e,t),e}(fu),$u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available domains",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/domains".concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Hu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Registers a new domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Create",e.endpointUrl=function(t){return"/v1/domains"},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Yu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(t.parameters.domain)},e.body=function(){},e}return _(e,t),e}(fu),Zu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a domain and each of its registered subdomains.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Delete",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(t.parameters.domain)},e.body=function(){},e}return _(e,t),e}(vu),Ku=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Import a certificate for the domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(t.parameters.domain,"/import")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Xu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new subdomain to the domain.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(t.parameters.domain,"/subdomains")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Qu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain)},e.body=function(){},e}return _(e,t),e}(fu),tc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes a subdomain from a domain.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain)},e.body=function(){},e}return _(e,t),e}(vu),ec=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Assigns a service port to the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain,"/assign")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),nc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes a subdomain from its assigned service",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain,"/assign")},e.body=function(){},e}return _(e,t),e}(vu),rc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes the CDN integration from the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain,"/cdn/disable")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),oc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Enables a CDN integration on the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain,"/cdn/enable")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),ic=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(t.parameters.domain,"/subdomains/").concat(t.parameters.subdomain,"/verify")},e.body=function(){},e}return _(e,t),e}(hu),sc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Attempts to verify the domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Create",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(t.parameters.domain,"/verify")},e.body=function(){},e}return _(e,t),e}(hu),ac=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of log sinks added to this account.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/log-sinks".concat(r)},e.body=function(){},e}return _(e,t),e}(fu),uc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Create",e.endpointUrl=function(t){return"/v1/integrations/log-sinks"},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),cc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a given log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Read",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(t.parameters.logSinkId)},e.body=function(){},e}return _(e,t),e}(fu),dc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Delete",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(t.parameters.logSinkId)},e.body=function(){},e}return _(e,t),e}(vu),lc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pauses a given log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(t.parameters.logSinkId,"/pause")},e.body=function(){},e}return _(e,t),e}(hu),pc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes a paused log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(t.parameters.logSinkId,"/resume")},e.body=function(){},e}return _(e,t),e}(hu),fc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the settings for a log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(t.parameters.logSinkId,"/settings")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),hc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists notification integrations for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/notifications".concat(r)},e.body=function(){},e}return _(e,t),e}(fu),vc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a new notification integration.",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Manage",e.endpointUrl=function(t){return["notificationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/notifications"},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),mc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a notification integration.",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Read",e.endpointUrl=function(t){return["notificationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/notifications/".concat(t.parameters.notificationId)},e.body=function(){},e}return _(e,t),e}(fu),gc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a notification integration",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Manage",e.endpointUrl=function(t){return["notificationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/notifications/".concat(t.parameters.notificationId)},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),bc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a notification integration",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Manage",e.endpointUrl=function(t){return["notificationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/notifications/".concat(t.parameters.notificationId)},e.body=function(){},e}return _(e,t),e}(vu),yc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the container registry credentials saved to this account. Does not display secrets.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/registries".concat(r)},e.body=function(){},e}return _(e,t),e}(fu),wc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new set of container registry credentials to this account.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Create",e.endpointUrl=function(t){return"/v1/integrations/registries"},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),jc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Views a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Read Encrypted",e.endpointUrl=function(t){return["credentialId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/registries/".concat(t.parameters.credentialId)},e.body=function(){},e}return _(e,t),e}(fu),Ic=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Delete",e.endpointUrl=function(t){return["credentialId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/registries/".concat(t.parameters.credentialId)},e.body=function(){},e}return _(e,t),e}(vu),Ec=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Update",e.endpointUrl=function(t){return["credentialId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/registries/".concat(t.parameters.credentialId,"/modify")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),_c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists linked version control providers",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){return"/v1/integrations/vcs"},e.body=function(){},e}return _(e,t),e}(fu),Sc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Generate a token for a specific VCS link.",e.withAuth=!0,e.requiredPermissions="Account > Git > Tokens > Read",e.endpointUrl=function(t){var e;["customVCSId","vcsLinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/vcs/custom/".concat(t.parameters.customVCSId,"/token/").concat(t.parameters.vcsLinkId).concat(r)},e.body=function(){},e}return _(e,t),e}(hu),Pc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of repositories accessible to this account",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/vcs/repos".concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Ac=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of branches for the repo",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){var e;["vcsService","repositoryOwner","repositoryName"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/vcs/repos/".concat(t.parameters.vcsService,"/").concat(t.parameters.repositoryOwner,"/").concat(t.parameters.repositoryName,"/branches").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Rc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available billing plans",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/plans"},e.body=function(){},e}return _(e,t),e}(fu),Cc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists projects for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects".concat(r)},e.body=function(){},e}return _(e,t),e}(fu),kc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Create",e.endpointUrl=function(t){return"/v1/projects"},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Uc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Create",e.endpointUrl=function(t){return"/v1/projects"},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(mu),Oc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Update",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId)},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(gu),xc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given project",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId)},e.body=function(){},e}return _(e,t),e}(fu),qc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given project. Fails if the project isn't empty.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Delete",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId).concat(r)},e.body=function(){},e}return _(e,t),e}(vu),Dc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of addons belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/addons").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Tc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Nc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates an addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(mu),Bc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId)},e.body=function(){},e}return _(e,t),e}(fu),Lc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates an addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId)},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(gu),Fc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Delete",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId)},e.body=function(){},e}return _(e,t),e}(vu),Gc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about an addon's backup schedules",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backup-schedules").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Mc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a new backup schedule for an addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backup-schedules")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Jc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a backup schedule for an addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","scheduleId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backup-schedules/").concat(t.parameters.scheduleId)},e.body=function(){},e}return _(e,t),e}(vu),zc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns a list of backups for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Wc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Initiates a backup for the given addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Vc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId)},e.body=function(){},e}return _(e,t),e}(fu),$c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a given backup",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId)},e.body=function(){},e}return _(e,t),e}(vu),Hc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the in progress backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/abort")},e.body=function(){},e}return _(e,t),e}(hu),Yc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts an in-progress backup restore.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/abort-restore")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Zc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Generates a temporary download link for downloading the given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/download-link")},e.body=function(){},e}return _(e,t),e}(fu),Kc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restores the given addon to the given backup state.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/restore")},e.body=function(){},e}return _(e,t),e}(hu),Xc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of restores for the given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/restores").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Qc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Flags a temporary backup generated by a backup schedule to be retained indefinitely rather than being deleted after the expiry date.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/backups/").concat(t.parameters.backupId,"/retain")},e.body=function(){},e}return _(e,t),e}(hu),td=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > Deployment > View Instances",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/containers").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),ed=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the credentials for connecting to the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/credentials")},e.body=function(){},e}return _(e,t),e}(fu),nd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Imports a database from an external archive or existing live database.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/import")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),rd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the network settings for the addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/network-settings")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),od=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/pause")},e.body=function(){},e}return _(e,t),e}(hu),id=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restores an addon to a specific point in time.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/pitr")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),sd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the valid window for performing a point-in-time restore (PITR) on this addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/pitr-window")},e.body=function(){},e}return _(e,t),e}(fu),ad=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Reset the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Delete",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/reset")},e.body=function(){},e}return _(e,t),e}(hu),ud=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restart the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/restart")},e.body=function(){},e}return _(e,t),e}(hu),cd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resume the given addon if it is paused.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/resume")},e.body=function(){},e}return _(e,t),e}(hu),dd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the allocated resources for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),ld=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the security rules for the addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/security")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),pd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the current addon version including available upgrades and upgrade history.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/version")},e.body=function(){},e}return _(e,t),e}(fu),fd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Upgrades the addon to a new version.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/addons/").concat(t.parameters.addonId,"/version")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),hd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of jobs belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),vd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/cron")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),md=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/cron")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(mu),gd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/cron/").concat(t.parameters.jobId)},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(gu),bd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/manual")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),yd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/manual")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(mu),wd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/manual/").concat(t.parameters.jobId)},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(gu),jd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId)},e.body=function(){},e}return _(e,t),e}(fu),Id=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Delete",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId)},e.body=function(){},e}return _(e,t),e}(vu),Ed=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the branches of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/branches").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),_d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists builds for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Sd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Start a new build for the given job. Given a commit sha, it will build that commit.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Pd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the build arguments of the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > View Build Parameters",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-arguments").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Ad=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets build arguments for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > Update Build Parameters",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-arguments")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Rd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the build arguments accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > View Build Parameters",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-arguments/details")},e.body=function(){},e}return _(e,t),e}(fu),Cd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the build options for a given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-options")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),kd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the version control source for a given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build-source")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Ud=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about a build for the job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId","buildId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build/").concat(t.parameters.buildId)},e.body=function(){},e}return _(e,t),e}(fu),Od=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given job build",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId","buildId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/build/").concat(t.parameters.buildId)},e.body=function(){},e}return _(e,t),e}(vu),xd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > View Instance Logs",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/containers").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),qd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the deployment of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/deployment")},e.body=function(){},e}return _(e,t),e}(fu),Dd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the deployment settings of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Update Deployment",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Td=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the health checks for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/health-checks")},e.body=function(){},e}return _(e,t),e}(fu),Nd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates health checks for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/health-checks")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Bd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/pause")},e.body=function(){},e}return _(e,t),e}(hu),Ld=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the pull-requests of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/pull-requests").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Fd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes the given job. Optionally takes several arguments to override resumed settings.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/resume")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Gd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetches run history for the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runs").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Md=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Starts a new job run for the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Jd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns data about the given job run",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId","runId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runs/").concat(t.parameters.runId)},e.body=function(){},e}return _(e,t),e}(fu),zd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given job run",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId","runId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runs/").concat(t.parameters.runId)},e.body=function(){},e}return _(e,t),e}(vu),Wd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the runtime environment for the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > View Environment Variables",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runtime-environment").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Vd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the runtime environment for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > Update Environment Variables",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runtime-environment")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),$d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the runtime environment accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Configuration > View Environment Variables",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/runtime-environment/details")},e.body=function(){},e}return _(e,t),e}(fu),Hd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the scaling settings for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Scale Job",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Yd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates settings for the job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/settings")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Zd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modify cron job to toggle suspending of its schedule.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/jobs/").concat(t.parameters.jobId,"/suspend")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Kd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists all pipelines for a project",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/pipelines").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Xd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a pipeline",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId)},e.body=function(){},e}return _(e,t),e}(fu),Qd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given preview template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/preview-envs").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),tl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a given preview template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Create",e.endpointUrl=function(t){return["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/preview-envs")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),el=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of active preview environments for a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/preview-envs/previews").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),nl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a preview environment generated by a preview template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Delete",e.endpointUrl=function(t){return["projectId","pipelineId","previewId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/preview-envs/previews/").concat(t.parameters.previewId)},e.body=function(){},e}return _(e,t),e}(vu),rl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of preview template runs",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/preview-envs/runs").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),ol=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given preview template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId","templateRunId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/preview-envs/runs/").concat(t.parameters.templateRunId)},e.body=function(){},e}return _(e,t),e}(fu),il=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a release flow",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId","stage"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/release-flows/").concat(t.parameters.stage)},e.body=function(){},e}return _(e,t),e}(fu),sl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a release flow",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Update",e.endpointUrl=function(t){return["projectId","pipelineId","stage"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/release-flows/").concat(t.parameters.stage)},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),al=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Runs a given release flow with given arguments. This endpoint can be used as part of a CI pipeline to automatically trigger a release process.",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Update",e.endpointUrl=function(t){return["projectId","pipelineId","stage"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/release-flows/").concat(t.parameters.stage,"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),ul=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists runs of a release flow",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId","stage"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/release-flows/").concat(t.parameters.stage,"/runs").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),cl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given release flow run",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId","stage","runId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/release-flows/").concat(t.parameters.stage,"/runs/").concat(t.parameters.runId)},e.body=function(){},e}return _(e,t),e}(fu),dl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Abort the given release flow run",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Update",e.endpointUrl=function(t){return["projectId","pipelineId","stage","runId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/pipelines/").concat(t.parameters.pipelineId,"/release-flows/").concat(t.parameters.stage,"/runs/").concat(t.parameters.runId,"/abort")},e.body=function(){},e}return _(e,t),e}(hu),ll=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of secrets belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/secrets").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),pl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/secrets")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),fl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/secrets")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(mu),hl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Update",e.endpointUrl=function(t){return["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId)},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(gu),vl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a secret including its contents",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Read",e.endpointUrl=function(t){var e;["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId).concat(r)},e.body=function(){},e}return _(e,t),e}(fu),ml=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a secret",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Delete",e.endpointUrl=function(t){return["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId)},e.body=function(){},e}return _(e,t),e}(vu),gl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a secret",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Update",e.endpointUrl=function(t){return["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId)},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),bl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Link an addon to the secret group or edit the settings of the linked addon.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Update",e.endpointUrl=function(t){return["projectId","secretId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId,"/addons/").concat(t.parameters.addonId)},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),yl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a given addon link.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Update",e.endpointUrl=function(t){return["projectId","secretId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId,"/addons/").concat(t.parameters.addonId)},e.body=function(){},e}return _(e,t),e}(fu),wl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Unlinks an addon from the secret group.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Update",e.endpointUrl=function(t){return["projectId","secretId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId,"/addons/").concat(t.parameters.addonId)},e.body=function(){},e}return _(e,t),e}(vu),jl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a secret with details about its linked addons",e.withAuth=!0,e.requiredPermissions="Project > Secrets > General > Read",e.endpointUrl=function(t){return["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/secrets/").concat(t.parameters.secretId,"/details")},e.body=function(){},e}return _(e,t),e}(fu),Il=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of services belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),El=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/build")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),_l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/build")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(mu),Sl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/build/").concat(t.parameters.serviceId)},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(gu),Pl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/combined")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Al=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/combined")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(mu),Rl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/combined/").concat(t.parameters.serviceId)},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(gu),Cl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),kl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(mu),Ul=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/deployment/").concat(t.parameters.serviceId)},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(gu),Ol=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId)},e.body=function(){},e}return _(e,t),e}(fu),xl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Delete",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId).concat(r)},e.body=function(){},e}return _(e,t),e}(vu),ql=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the branches of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/branches").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Dl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the builds for the service",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Tl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Start a new build for the given combined or build service. If given a commit sha, it will build that commit. Otherwise, the most recent relevant commit will be built. If the service provided is a build service, a branch name or pull request to build from is required.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Nl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the build arguments of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > View Build Parameters",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-arguments").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Bl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the build arguments for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > Update Build Parameters",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-arguments")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Ll=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the build arguments accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > View Build Parameters",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-arguments/details")},e.body=function(){},e}return _(e,t),e}(fu),Fl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the build options for a given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-options")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Gl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the version control source for a given build or combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build-source")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Ml=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about a build for the service",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId","buildId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build/").concat(t.parameters.buildId)},e.body=function(){},e}return _(e,t),e}(fu),Jl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given service build",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","serviceId","buildId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/build/").concat(t.parameters.buildId)},e.body=function(){},e}return _(e,t),e}(vu),zl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > View Instances",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/containers").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Wl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the deployment of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > View Instances",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/deployment")},e.body=function(){},e}return _(e,t),e}(fu),Vl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the deployment settings of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Update Deployment",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),$l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the health checks for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/health-checks")},e.body=function(){},e}return _(e,t),e}(fu),Hl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates health checks for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/health-checks")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Yl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/pause")},e.body=function(){},e}return _(e,t),e}(hu),Zl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the ports for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/ports")},e.body=function(){},e}return _(e,t),e}(fu),Kl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the list of ports for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/ports")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),Xl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the pull-requests of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/pull-requests").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),Ql=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restarts the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/restart")},e.body=function(){},e}return _(e,t),e}(hu),tp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes the given service. Optionally takes several arguments to override resumed settings.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/resume")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),ep=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the runtime environment of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > View Environment Variables",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/runtime-environment").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),np=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the runtime environment for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > Update Environment Variables",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/runtime-environment")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),rp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the runtime environment accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Services > Configuration > View Environment Variables",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/runtime-environment/details")},e.body=function(){},e}return _(e,t),e}(fu),op=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the scaling settings for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Scale Service",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/services/").concat(t.parameters.serviceId,"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),ip=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of volumes belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Read",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/volumes")},e.body=function(){},e}return _(e,t),e}(fu),sp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a volume with the specified payload",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/volumes")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),ap=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Retrieve a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Read",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId)},e.body=function(){},e}return _(e,t),e}(fu),up=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update volume mounts and storage size",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId)},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),cp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes this volume and its associated data.",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Delete",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId)},e.body=function(){},e}return _(e,t),e}(vu),dp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Attach a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId,"/attach")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),lp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Detach a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(t.parameters.projectId,"/volumes/").concat(t.parameters.volumeId,"/detach")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),pp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available project regions",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/regions"},e.body=function(){},e}return _(e,t),e}(fu),fp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of templates",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates".concat(r)},e.body=function(){},e}return _(e,t),e}(fu),hp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Create",e.endpointUrl=function(t){return"/v1/templates"},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),vp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates/".concat(t.parameters.templateId).concat(r)},e.body=function(){},e}return _(e,t),e}(fu),mp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Update",e.endpointUrl=function(t){return["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(t.parameters.templateId)},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),gp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Delete",e.endpointUrl=function(t){return["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(t.parameters.templateId)},e.body=function(){},e}return _(e,t),e}(vu),bp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Run a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Run",e.endpointUrl=function(t){return["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(t.parameters.templateId,"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return _(e,t),e}(hu),yp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of template runs",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates/".concat(t.parameters.templateId,"/runs").concat(r)},e.body=function(){},e}return _(e,t),e}(fu),wp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){return["templateId","templateRunId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(t.parameters.templateId,"/runs/").concat(t.parameters.templateRunId)},e.body=function(){},e}return _(e,t),e}(fu),jp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Abort the given template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > Runs > Abort",e.endpointUrl=function(t){return["templateId","templateRunId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(t.parameters.templateId,"/runs/").concat(t.parameters.templateRunId,"/abort")},e.body=function(){},e}return _(e,t),e}(hu),Ip=function(){function t(){this.loadContext()}return t.prototype.loadContext=function(){this.contextWrapper=this.loadContextWrapper()},t.prototype.getInfo=function(){return""},t.prototype.storeContext=function(t){return P(this,void 0,void 0,(function(){return A(this,(function(e){switch(e.label){case 0:return[4,this.writeContext(t)];case 1:return e.sent(),this.contextWrapper=t,[2]}}))}))},t.prototype.addContext=function(t,e){return void 0===e&&(e=!0),P(this,void 0,void 0,(function(){var n,r,o;return A(this,(function(i){switch(i.label){case 0:if(e||void 0===this.findContext(t.name))return[3,1];throw new Error("Context with name ".concat(t.name," already exists"));case 1:return[4,this.removeContext(t.name)];case 2:i.sent(),i.label=3;case 3:return n=S({host:"https://api.northflank.com"},t),r=this.contextWrapper,o={current:n.name,contexts:R(R([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(o)];case 4:return i.sent(),[2]}}))}))},t.prototype.removeContext=function(t){return P(this,void 0,void 0,(function(){var e,n,r,o;return A(this,(function(i){switch(i.label){case 0:return e=this.contextWrapper,n=e.contexts.filter((function(e){return e.name!==t})),r=e.current===t?void 0:e.current,o={current:r,contexts:R([],n,!0),lastUpdateCheck:e.lastUpdateCheck},[4,this.storeContext(o)];case 1:return i.sent(),[2]}}))}))},t.prototype.getCurrentContext=function(){var t=this.contextWrapper.current;return void 0===t?t:this.findContext(t)},t.prototype.findContext=function(t){return this.contextWrapper.contexts.find((function(e){return e.name===t}))},t.prototype.getCurrentBaseUrl=function(t){var e=this.getCurrentContext();if(!0===t&&!(null==e?void 0:e.host))throw new Error("Context (".concat(null==e?void 0:e.name,") doesn't have a target API host. Please login again."));return null==e?void 0:e.host},t.prototype.getCurrentProjectName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.project},t.prototype.getCurrentName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.name},t.prototype.getCurrentToken=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.token},t.prototype.getCurrentServiceName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.service},t.prototype.getCurrentJobName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.job},t.prototype.getCurrentPlanId=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.plan},t.prototype.getCurrentRegion=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.region},t.prototype.useContext=function(t){return P(this,void 0,void 0,(function(){var e,n;return A(this,(function(r){switch(r.label){case 0:if(!this.findContext(t))throw new Error("Context with name ".concat(t," doesn't exist"));return e=this.contextWrapper,n=S(S({},e),{current:t}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.updateToken=function(t,e){return P(this,void 0,void 0,(function(){var n,r,o,i,s;return A(this,(function(a){switch(a.label){case 0:if(n=null!=e?e:this.getCurrentName(),!(r=this.findContext(n)))throw new Error("Context with name ".concat(e," doesn't exist"));return o=this.contextWrapper,i=o.contexts.map((function(e){return e.name===n?S(S({},r),{token:t}):e})),s=S(S({},o),{contexts:i}),[4,this.storeContext(s)];case 1:return a.sent(),[2]}}))}))},t.prototype.useProjectId=function(t){return P(this,void 0,void 0,(function(){var e,n;return A(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set project id to current context, current context not defined");return n=S(S({},e),{project:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useServiceId=function(t){return P(this,void 0,void 0,(function(){var e,n;return A(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set service id to current context, current context not defined");return n=S(S({},e),{service:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useJobId=function(t){return P(this,void 0,void 0,(function(){var e,n;return A(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set job id to current context, current context not defined");return n=S(S({},e),{job:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.usePlanId=function(t){return P(this,void 0,void 0,(function(){var e,n;return A(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set plan id to current context, current context not defined");return n=S(S({},e),{plan:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useRegion=function(t){return P(this,void 0,void 0,(function(){var e,n;return A(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set region id to current context, current context not defined");return n=S(S({},e),{region:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.getLastUpdateCheck=function(){return this.contextWrapper.lastUpdateCheck||new Date},t.prototype.setLastUpdateCheck=function(t){return P(this,void 0,void 0,(function(){var e,n;return A(this,(function(r){switch(r.label){case 0:return e=this.contextWrapper,n=S(S({},e),{lastUpdateCheck:t}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},t}(),Ep=function(t){function e(e){var n=t.call(this)||this;return n.assertDir=function(t){return P(n,void 0,void 0,(function(){var e;return A(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,g.promises.mkdir(t,{recursive:!0})];case 1:return[2,n.sent()];case 2:throw e=n.sent(),console.log("Failed to login, local files could not be created: ".concat(t,", error: ").concat(e.message)),e;case 3:return[2]}}))}))},n.configPath=e||"".concat(l.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return _(e,t),e.prototype.loadContextWrapper=function(){try{return JSON.parse(g.readFileSync(this.configFile,"utf8"))}catch(t){return{contexts:[],lastUpdateCheck:new Date(0)}}},e.prototype.writeContext=function(t){return P(this,void 0,void 0,(function(){var e;return A(this,(function(n){switch(n.label){case 0:return[4,this.assertConfigDir()];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,g.promises.writeFile(this.configFile,JSON.stringify(t,null,"\t"),{mode:416})];case 3:return n.sent(),[3,5];case 4:throw e=n.sent(),console.log("Failed to persist api context, local files could not be created, error: ".concat(e.message)),e;case 5:return[2]}}))}))},e.prototype.assertConfigDir=function(){return P(this,void 0,void 0,(function(){return A(this,(function(t){switch(t.label){case 0:return[4,this.assertDir(this.configPath)];case 1:return t.sent(),[2]}}))}))},e.prototype.getInfo=function(){return"Cli config stored in: ".concat(this.configPath)},e}(Ip),_p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},e}return _(e,t),e.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},e.prototype.writeContext=function(t){return P(this,void 0,void 0,(function(){return A(this,(function(e){return this.inMemoryContextWrapper=t,[2]}))}))},e}(Ip),Sp=function(t,e){void 0===e&&(e={});var n,r,o,i=this;this.baseUrl=function(){return i.contextProvider.getCurrentBaseUrl()},this.contextProvider=t,this.forwarding=new ou(t,new Il(t,e).call,new Dc(t,e).call),this.exec=new au(t),this.logs=new Iu(t),this.metrics=new Su(t),this.endpoints={get:(o={},o.addon=((r=new Bc(t,e)).types=new Pu(t,e),r.backupSchedules=new Gc(t,e),r.backups=new zc(t,e),r.backup=((n=new Vc(t,e)).download=new Zc(t,e),n),r.restores=new Xc(t,e),r.containers=new td(t,e),r.credentials=new ed(t,e),r.pitrWindow=new sd(t,e),r.version=new pd(t,e),r),o.invoice=function(){var n={};return n.details=new Ru(t,e),n}(),o.cloud=function(){var n={};return n.cluster=new Ou(t,e),n.dockerRegistry=new Nu(t,e),n.integration=new Gu(t,e),n}(),o.dnsId=new Vu(t,e),o.domain=new Yu(t,e),o.subdomain=new Qu(t,e),o.logSink=new cc(t,e),o.notification=new mc(t,e),o.registryCredentials=new jc(t,e),o.project=new xc(t,e),o.job=function(){var n=new jd(t,e);return n.branches=new Ed(t,e),n.builds=new _d(t,e),n.buildArguments=new Pd(t,e),n.buildArgumentDetails=new Rd(t,e),n.build=new Ud(t,e),n.containers=new xd(t,e),n.deployment=new qd(t,e),n.healthChecks=new Td(t,e),n.pullRequests=new Ld(t,e),n.runs=new Gd(t,e),n.run=new Jd(t,e),n.runtimeEnvironment=new Wd(t,e),n.runtimeEnvironmentDetails=new $d(t,e),n}(),o.pipeline=new Xd(t,e),o.previewTemplate=new Qd(t,e),o.previewTemplateRun=new ol(t,e),o.releaseFlow=new il(t,e),o.releaseFlowRun=new cl(t,e),o.secret=new vl(t,e),o.secretLink=new yl(t,e),o.secretDetails=new jl(t,e),o.service=function(){var n=new Ol(t,e);return n.branches=new ql(t,e),n.builds=new Dl(t,e),n.buildArguments=new Nl(t,e),n.buildArgumentDetails=new Ll(t,e),n.build=new Ml(t,e),n.containers=new zl(t,e),n.deployment=new Wl(t,e),n.healthChecks=new $l(t,e),n.ports=new Zl(t,e),n.pullRequests=new Xl(t,e),n.runtimeEnvironment=new ep(t,e),n.runtimeEnvironmentDetails=new rp(t,e),n}(),o.volume=new ap(t,e),o.template=new vp(t,e),o.templateRun=new wp(t,e),o),list:function(){var n={};return n.invoices=new Au(t,e),n.cloud=function(){var n={};return n.providers=new Cu(t,e),n.clusters=new ku(t,e),n.dockerRegistry=new Du(t,e),n.integrations=new Lu(t,e),n.nodeTypes=new zu(t,e),n.regions=new Wu(t,e),n}(),n.domains=new $u(t,e),n.logSinks=new ac(t,e),n.notifications=new hc(t,e),n.registryCredentials=new yc(t,e),n.vcs=new _c(t,e),n.repos=new Pc(t,e),n.branches=new Ac(t,e),n.plans=new Rc(t,e),n.projects=new Cc(t,e),n.addons=new Dc(t,e),n.jobs=new hd(t,e),n.pipelines=new Kd(t,e),n.previewTemplatePreviews=new el(t,e),n.previewTemplateRuns=new rl(t,e),n.releaseFlowRuns=new ul(t,e),n.secrets=new ll(t,e),n.services=new Il(t,e),n.volumes=new ip(t,e),n.regions=new pp(t,e),n.templates=new fp(t,e),n.templateRuns=new yp(t,e),n}(),create:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Uu(t,e),n.dockerRegistry=new Tu(t,e),n.integration=new Fu(t,e),n}(),n.domain=new Hu(t,e),n.logSink=new uc(t,e),n.notification=new vc(t,e),n.customVcs=function(){var n={};return n.token=new Sc(t,e),n}(),n.project=new kc(t,e),n.addon=function(){var n=new Tc(t,e);return n.backupSchedule=new Mc(t,e),n}(),n.job=function(){var n={};return n.cron=new vd(t,e),n.manual=new bd(t,e),n}(),n.secret=new pl(t,e),n.service=function(){var n={};return n.build=new El(t,e),n.combined=new Pl(t,e),n.deployment=new Cl(t,e),n}(),n.volume=new sp(t,e),n.template=new hp(t,e),n}(),update:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new xu(t,e),n.integration=new Mu(t,e),n}(),n.logSink=new fc(t,e),n.notification=new gc(t,e),n.registryCredentials=new Ec(t,e),n.addon=function(){var n={};return n.networkSettings=new rd(t,e),n.security=new ld(t,e),n.version=new fd(t,e),n}(),n.job=function(){var n={};return n.buildArguments=new Ad(t,e),n.buildOptions=new Cd(t,e),n.buildSource=new kd(t,e),n.deployment=new Dd(t,e),n.healthChecks=new Nd(t,e),n.runtimeEnvironment=new Vd(t,e),n.settings=new Yd(t,e),n}(),n.previewTemplate=new tl(t,e),n.releaseFlow=new sl(t,e),n.secret=new gl(t,e),n.secretLink=new bl(t,e),n.service=function(){var n={};return n.buildArguments=new Bl(t,e),n.buildOptions=new Fl(t,e),n.buildSource=new Gl(t,e),n.deployment=new Vl(t,e),n.healthChecks=new Hl(t,e),n.ports=new Kl(t,e),n.runtimeEnvironment=new np(t,e),n}(),n.volume=new up(t,e),n.template=new mp(t,e),n}(),delete:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new qu(t,e),n.dockerRegistry=new Bu(t,e),n.integration=new Ju(t,e),n}(),n.domain=new Zu(t,e),n.subdomain=new tc(t,e),n.logSink=new dc(t,e),n.notification=new bc(t,e),n.registryCredentials=new Ic(t,e),n.project=new qc(t,e),n.addon=function(){var n=new Fc(t,e);return n.backupSchedule=new Jc(t,e),n}(),n.backup=new $c(t,e),n.job=new Id(t,e),n.previewTemplatePreview=new nl(t,e),n.secret=new ml(t,e),n.secretLink=new wl(t,e),n.service=new xl(t,e),n.volume=new cp(t,e),n.template=new gp(t,e),n}(),import:function(){var n={};return n.domainCertificate=new Ku(t,e),n.addon=function(){var n={};return n.backup=new nd(t,e),n}(),n}(),add:function(){var n={};return n.domain=function(){var n={};return n.subdomain=new Xu(t,e),n}(),n.registryCredentials=new wc(t,e),n}(),assign:function(){var n={};return n.subdomain=function(){var n={};return n.service=new ec(t,e),n}(),n}(),unassign:function(){var n={};return n.subdomain=new nc(t,e),n}(),disable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new rc(t,e),n}(),n}(),enable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new oc(t,e),n}(),n}(),verify:function(){var n={};return n.subdomain=new ic(t,e),n.domain=new sc(t,e),n}(),pause:function(){var n={};return n.logSink=new lc(t,e),n.addon=new od(t,e),n.job=new Bd(t,e),n.service=new Yl(t,e),n}(),resume:function(){var n={};return n.logSink=new pc(t,e),n.addon=new cd(t,e),n.job=new Fd(t,e),n.service=new tp(t,e),n}(),put:function(){var n={};return n.project=new Uc(t,e),n.addon=new Nc(t,e),n.job=function(){var n={};return n.cron=new md(t,e),n.manual=new yd(t,e),n}(),n.secret=new fl(t,e),n.service=function(){var n={};return n.build=new _l(t,e),n.combined=new Al(t,e),n.deployment=new kl(t,e),n}(),n}(),patch:function(){var n={};return n.project=new Oc(t,e),n.addon=new Lc(t,e),n.job=function(){var n={};return n.cron=new gd(t,e),n.manual=new wd(t,e),n}(),n.secret=new hl(t,e),n.service=function(){var n={};return n.build=new Sl(t,e),n.combined=new Rl(t,e),n.deployment=new Ul(t,e),n}(),n}(),backup:function(){var n={};return n.addon=new Wc(t,e),n}(),abort:function(){var n={};return n.addon=function(){var n={};return n.backup=new Hc(t,e),n.restore=new Yc(t,e),n}(),n.job=function(){var n={};return n.build=new Od(t,e),n.run=new zd(t,e),n}(),n.releaseFlowRun=new dl(t,e),n.service=function(){var n={};return n.build=new Jl(t,e),n}(),n.templateRun=new jp(t,e),n}(),restore:function(){var n={};return n.addon=function(){var n={};return n.backup=new Kc(t,e),n}(),n}(),retain:function(){var n={};return n.addon=function(){var n={};return n.backup=new Qc(t,e),n}(),n}(),start:function(){var n={};return n.addon=function(){var n={};return n.pitr=new id(t,e),n}(),n.job=function(){var n={};return n.build=new Sd(t,e),n.run=new Md(t,e),n}(),n.service=function(){var n={};return n.build=new Tl(t,e),n}(),n}(),reset:function(){var n={};return n.addon=new ad(t,e),n}(),restart:function(){var n={};return n.addon=new ud(t,e),n.service=new Ql(t,e),n}(),scale:function(){var n={};return n.addon=new dd(t,e),n.job=new Hd(t,e),n.service=new op(t,e),n}(),suspend:function(){var n={};return n.job=new Zd(t,e),n}(),run:function(){var n={};return n.releaseFlow=new al(t,e),n.template=new bp(t,e),n}(),attach:function(){var n={};return n.volume=new dp(t,e),n}(),detach:function(){var n={};return n.volume=new lp(t,e),n}()},this.get=function(){var t={};return t.addon=function(){var t=i.endpoints.get.addon.call;return t.types=i.endpoints.get.addon.types.call,t.backupSchedules=i.endpoints.get.addon.backupSchedules.call,t.backups=i.endpoints.get.addon.backups.call,t.backup=function(){var t=i.endpoints.get.addon.backup.call;return t.download=i.endpoints.get.addon.backup.download.call,t.logs=i.logs.getAddonBackupLogs,t.logTail=i.logs.tailAddonBackupLogs,t}(),t.restores=function(){var t=i.endpoints.get.addon.restores.call;return t.logs=i.logs.getAddonRestoresLogs,t.logTail=i.logs.tailAddonRestoresLogs,t}(),t.containers=i.endpoints.get.addon.containers.call,t.credentials=i.endpoints.get.addon.credentials.call,t.pitrWindow=i.endpoints.get.addon.pitrWindow.call,t.version=i.endpoints.get.addon.version.call,t.logs=i.logs.getAddonLogs,t.logTail=i.logs.tailAddonLogs,t.metrics=i.metrics.getAddonMetrics,t.metricsRange=i.metrics.getAddonMetricsRange,t}(),t.invoice=function(){var t={};return t.details=i.endpoints.get.invoice.details.call,t}(),t.cloud=function(){var t={};return t.cluster=i.endpoints.get.cloud.cluster.call,t.dockerRegistry=i.endpoints.get.cloud.dockerRegistry.call,t.integration=i.endpoints.get.cloud.integration.call,t}(),t.dnsId=i.endpoints.get.dnsId.call,t.domain=i.endpoints.get.domain.call,t.subdomain=i.endpoints.get.subdomain.call,t.logSink=i.endpoints.get.logSink.call,t.notification=i.endpoints.get.notification.call,t.registryCredentials=i.endpoints.get.registryCredentials.call,t.project=i.endpoints.get.project.call,t.job=function(){var t=i.endpoints.get.job.call;return t.branches=i.endpoints.get.job.branches.call,t.builds=i.endpoints.get.job.builds.call,t.buildArguments=i.endpoints.get.job.buildArguments.call,t.buildArgumentDetails=i.endpoints.get.job.buildArgumentDetails.call,t.build=i.endpoints.get.job.build.call,t.containers=i.endpoints.get.job.containers.call,t.deployment=i.endpoints.get.job.deployment.call,t.healthChecks=i.endpoints.get.job.healthChecks.call,t.pullRequests=i.endpoints.get.job.pullRequests.call,t.runs=i.endpoints.get.job.runs.call,t.run=i.endpoints.get.job.run.call,t.runtimeEnvironment=i.endpoints.get.job.runtimeEnvironment.call,t.runtimeEnvironmentDetails=i.endpoints.get.job.runtimeEnvironmentDetails.call,t.logs=i.logs.getJobLogs,t.buildLogs=i.logs.getJobBuildLogs,t.logTail=i.logs.tailJobLogs,t.buildLogTail=i.logs.tailJobBuildLogs,t.metrics=i.metrics.getJobMetrics,t.buildMetrics=i.metrics.getJobBuildMetrics,t.metricsRange=i.metrics.getJobMetricsRange,t.buildMetricsRange=i.metrics.getJobBuildMetricsRange,t}(),t.pipeline=i.endpoints.get.pipeline.call,t.previewTemplate=i.endpoints.get.previewTemplate.call,t.previewTemplateRun=i.endpoints.get.previewTemplateRun.call,t.releaseFlow=i.endpoints.get.releaseFlow.call,t.releaseFlowRun=i.endpoints.get.releaseFlowRun.call,t.secret=i.endpoints.get.secret.call,t.secretLink=i.endpoints.get.secretLink.call,t.secretDetails=i.endpoints.get.secretDetails.call,t.service=function(){var t=i.endpoints.get.service.call;return t.branches=i.endpoints.get.service.branches.call,t.builds=i.endpoints.get.service.builds.call,t.buildArguments=i.endpoints.get.service.buildArguments.call,t.buildArgumentDetails=i.endpoints.get.service.buildArgumentDetails.call,t.build=i.endpoints.get.service.build.call,t.containers=i.endpoints.get.service.containers.call,t.deployment=i.endpoints.get.service.deployment.call,t.healthChecks=i.endpoints.get.service.healthChecks.call,t.ports=i.endpoints.get.service.ports.call,t.pullRequests=i.endpoints.get.service.pullRequests.call,t.runtimeEnvironment=i.endpoints.get.service.runtimeEnvironment.call,t.runtimeEnvironmentDetails=i.endpoints.get.service.runtimeEnvironmentDetails.call,t.logs=i.logs.getServiceLogs,t.buildLogs=i.logs.getServiceBuildLogs,t.logTail=i.logs.tailServiceLogs,t.buildLogTail=i.logs.tailServiceBuildLogs,t.metrics=i.metrics.getServiceMetrics,t.buildMetrics=i.metrics.getServiceBuildMetrics,t.metricsRange=i.metrics.getServiceMetricsRange,t.buildMetricsRange=i.metrics.getServiceBuildMetricsRange,t}(),t.volume=i.endpoints.get.volume.call,t.template=i.endpoints.get.template.call,t.templateRun=i.endpoints.get.templateRun.call,t}(),this.list=function(){var t={};return t.invoices=i.endpoints.list.invoices.call,t.cloud=function(){var t={};return t.providers=i.endpoints.list.cloud.providers.call,t.clusters=i.endpoints.list.cloud.clusters.call,t.dockerRegistry=i.endpoints.list.cloud.dockerRegistry.call,t.integrations=i.endpoints.list.cloud.integrations.call,t.nodeTypes=i.endpoints.list.cloud.nodeTypes.call,t.regions=i.endpoints.list.cloud.regions.call,t}(),t.domains=i.endpoints.list.domains.call,t.logSinks=i.endpoints.list.logSinks.call,t.notifications=i.endpoints.list.notifications.call,t.registryCredentials=i.endpoints.list.registryCredentials.call,t.vcs=i.endpoints.list.vcs.call,t.repos=i.endpoints.list.repos.call,t.branches=i.endpoints.list.branches.call,t.plans=i.endpoints.list.plans.call,t.projects=i.endpoints.list.projects.call,t.addons=i.endpoints.list.addons.call,t.jobs=i.endpoints.list.jobs.call,t.pipelines=i.endpoints.list.pipelines.call,t.previewTemplatePreviews=i.endpoints.list.previewTemplatePreviews.call,t.previewTemplateRuns=i.endpoints.list.previewTemplateRuns.call,t.releaseFlowRuns=i.endpoints.list.releaseFlowRuns.call,t.secrets=i.endpoints.list.secrets.call,t.services=i.endpoints.list.services.call,t.volumes=i.endpoints.list.volumes.call,t.regions=i.endpoints.list.regions.call,t.templates=i.endpoints.list.templates.call,t.templateRuns=i.endpoints.list.templateRuns.call,t}(),this.create=function(){var t={};return t.cloud=function(){var t={};return t.cluster=i.endpoints.create.cloud.cluster.call,t.dockerRegistry=i.endpoints.create.cloud.dockerRegistry.call,t.integration=i.endpoints.create.cloud.integration.call,t}(),t.domain=i.endpoints.create.domain.call,t.logSink=i.endpoints.create.logSink.call,t.notification=i.endpoints.create.notification.call,t.customVcs=function(){var t={};return t.token=i.endpoints.create.customVcs.token.call,t}(),t.project=i.endpoints.create.project.call,t.addon=function(){var t=i.endpoints.create.addon.call;return t.backupSchedule=i.endpoints.create.addon.backupSchedule.call,t}(),t.job=function(){var t={};return t.cron=i.endpoints.create.job.cron.call,t.manual=i.endpoints.create.job.manual.call,t}(),t.secret=i.endpoints.create.secret.call,t.service=function(){var t={};return t.build=i.endpoints.create.service.build.call,t.combined=i.endpoints.create.service.combined.call,t.deployment=i.endpoints.create.service.deployment.call,t}(),t.volume=i.endpoints.create.volume.call,t.template=i.endpoints.create.template.call,t}(),this.update=function(){var t={};return t.cloud=function(){var t={};return t.cluster=i.endpoints.update.cloud.cluster.call,t.integration=i.endpoints.update.cloud.integration.call,t}(),t.logSink=i.endpoints.update.logSink.call,t.notification=i.endpoints.update.notification.call,t.registryCredentials=i.endpoints.update.registryCredentials.call,t.addon=function(){var t={};return t.networkSettings=i.endpoints.update.addon.networkSettings.call,t.security=i.endpoints.update.addon.security.call,t.version=i.endpoints.update.addon.version.call,t}(),t.job=function(){var t={};return t.buildArguments=i.endpoints.update.job.buildArguments.call,t.buildOptions=i.endpoints.update.job.buildOptions.call,t.buildSource=i.endpoints.update.job.buildSource.call,t.deployment=i.endpoints.update.job.deployment.call,t.healthChecks=i.endpoints.update.job.healthChecks.call,t.runtimeEnvironment=i.endpoints.update.job.runtimeEnvironment.call,t.settings=i.endpoints.update.job.settings.call,t}(),t.previewTemplate=i.endpoints.update.previewTemplate.call,t.releaseFlow=i.endpoints.update.releaseFlow.call,t.secret=i.endpoints.update.secret.call,t.secretLink=i.endpoints.update.secretLink.call,t.service=function(){var t={};return t.buildArguments=i.endpoints.update.service.buildArguments.call,t.buildOptions=i.endpoints.update.service.buildOptions.call,t.buildSource=i.endpoints.update.service.buildSource.call,t.deployment=i.endpoints.update.service.deployment.call,t.healthChecks=i.endpoints.update.service.healthChecks.call,t.ports=i.endpoints.update.service.ports.call,t.runtimeEnvironment=i.endpoints.update.service.runtimeEnvironment.call,t}(),t.volume=i.endpoints.update.volume.call,t.template=i.endpoints.update.template.call,t}(),this.delete=function(){var t={};return t.cloud=function(){var t={};return t.cluster=i.endpoints.delete.cloud.cluster.call,t.dockerRegistry=i.endpoints.delete.cloud.dockerRegistry.call,t.integration=i.endpoints.delete.cloud.integration.call,t}(),t.domain=i.endpoints.delete.domain.call,t.subdomain=i.endpoints.delete.subdomain.call,t.logSink=i.endpoints.delete.logSink.call,t.notification=i.endpoints.delete.notification.call,t.registryCredentials=i.endpoints.delete.registryCredentials.call,t.project=i.endpoints.delete.project.call,t.addon=function(){var t=i.endpoints.delete.addon.call;return t.backupSchedule=i.endpoints.delete.addon.backupSchedule.call,t}(),t.backup=i.endpoints.delete.backup.call,t.job=i.endpoints.delete.job.call,t.previewTemplatePreview=i.endpoints.delete.previewTemplatePreview.call,t.secret=i.endpoints.delete.secret.call,t.secretLink=i.endpoints.delete.secretLink.call,t.service=i.endpoints.delete.service.call,t.volume=i.endpoints.delete.volume.call,t.template=i.endpoints.delete.template.call,t}(),this.import=function(){var t={};return t.domainCertificate=i.endpoints.import.domainCertificate.call,t.addon=function(){var t={};return t.backup=i.endpoints.import.addon.backup.call,t}(),t}(),this.add=function(){var t={};return t.domain=function(){var t={};return t.subdomain=i.endpoints.add.domain.subdomain.call,t}(),t.registryCredentials=i.endpoints.add.registryCredentials.call,t}(),this.assign=function(){var t={};return t.subdomain=function(){var t={};return t.service=i.endpoints.assign.subdomain.service.call,t}(),t}(),this.unassign=function(){var t={};return t.subdomain=i.endpoints.unassign.subdomain.call,t}(),this.disable=function(){var t={};return t.subdomain=function(){var t={};return t.cdn=i.endpoints.disable.subdomain.cdn.call,t}(),t}(),this.enable=function(){var t={};return t.subdomain=function(){var t={};return t.cdn=i.endpoints.enable.subdomain.cdn.call,t}(),t}(),this.verify=function(){var t={};return t.subdomain=i.endpoints.verify.subdomain.call,t.domain=i.endpoints.verify.domain.call,t}(),this.pause=function(){var t={};return t.logSink=i.endpoints.pause.logSink.call,t.addon=i.endpoints.pause.addon.call,t.job=i.endpoints.pause.job.call,t.service=i.endpoints.pause.service.call,t}(),this.resume=function(){var t={};return t.logSink=i.endpoints.resume.logSink.call,t.addon=i.endpoints.resume.addon.call,t.job=i.endpoints.resume.job.call,t.service=i.endpoints.resume.service.call,t}(),this.put=function(){var t={};return t.project=i.endpoints.put.project.call,t.addon=i.endpoints.put.addon.call,t.job=function(){var t={};return t.cron=i.endpoints.put.job.cron.call,t.manual=i.endpoints.put.job.manual.call,t}(),t.secret=i.endpoints.put.secret.call,t.service=function(){var t={};return t.build=i.endpoints.put.service.build.call,t.combined=i.endpoints.put.service.combined.call,t.deployment=i.endpoints.put.service.deployment.call,t}(),t}(),this.patch=function(){var t={};return t.project=i.endpoints.patch.project.call,t.addon=i.endpoints.patch.addon.call,t.job=function(){var t={};return t.cron=i.endpoints.patch.job.cron.call,t.manual=i.endpoints.patch.job.manual.call,t}(),t.secret=i.endpoints.patch.secret.call,t.service=function(){var t={};return t.build=i.endpoints.patch.service.build.call,t.combined=i.endpoints.patch.service.combined.call,t.deployment=i.endpoints.patch.service.deployment.call,t}(),t}(),this.backup=function(){var t={};return t.addon=i.endpoints.backup.addon.call,t}(),this.abort=function(){var t={};return t.addon=function(){var t={};return t.backup=i.endpoints.abort.addon.backup.call,t.restore=i.endpoints.abort.addon.restore.call,t}(),t.job=function(){var t={};return t.build=i.endpoints.abort.job.build.call,t.run=i.endpoints.abort.job.run.call,t}(),t.releaseFlowRun=i.endpoints.abort.releaseFlowRun.call,t.service=function(){var t={};return t.build=i.endpoints.abort.service.build.call,t}(),t.templateRun=i.endpoints.abort.templateRun.call,t}(),this.restore=function(){var t={};return t.addon=function(){var t={};return t.backup=i.endpoints.restore.addon.backup.call,t}(),t}(),this.retain=function(){var t={};return t.addon=function(){var t={};return t.backup=i.endpoints.retain.addon.backup.call,t}(),t}(),this.start=function(){var t={};return t.addon=function(){var t={};return t.pitr=i.endpoints.start.addon.pitr.call,t}(),t.job=function(){var t={};return t.build=i.endpoints.start.job.build.call,t.run=i.endpoints.start.job.run.call,t}(),t.service=function(){var t={};return t.build=i.endpoints.start.service.build.call,t}(),t}(),this.reset=function(){var t={};return t.addon=i.endpoints.reset.addon.call,t}(),this.restart=function(){var t={};return t.addon=i.endpoints.restart.addon.call,t.service=i.endpoints.restart.service.call,t}(),this.scale=function(){var t={};return t.addon=i.endpoints.scale.addon.call,t.job=i.endpoints.scale.job.call,t.service=i.endpoints.scale.service.call,t}(),this.suspend=function(){var t={};return t.job=i.endpoints.suspend.job.call,t}(),this.run=function(){var t={};return t.releaseFlow=i.endpoints.run.releaseFlow.call,t.template=i.endpoints.run.template.call,t}(),this.attach=function(){var t={};return t.volume=i.endpoints.attach.volume.call,t}(),this.detach=function(){var t={};return t.volume=i.endpoints.detach.volume.call,t}()};export{Hc as AbortAddonBackupEndpoint,Yc as AbortAddonRestoreEndpoint,Od as AbortJobBuildEndpoint,zd as AbortJobRunEndpoint,dl as AbortReleaseflowrunEndpoint,Jl as AbortServiceBuildEndpoint,jp as AbortTemplaterunEndpoint,Xu as AddDomainSubdomainEndpoint,wc as AddRegistrycredentialsEndpoint,Sp as ApiClient,Ip as ApiClientContextProvider,Ep as ApiClientFileContextProvider,_p as ApiClientInMemoryContextProvider,pu as ApiEndpoint,ec as AssignSubdomainServiceEndpoint,dp as AttachVolumeEndpoint,Wc as BackupAddonEndpoint,Mc as CreateAddonBackupscheduleEndpoint,Tc as CreateAddonEndpoint,Uu as CreateCloudClusterEndpoint,Tu as CreateCloudDockerregistryEndpoint,Fu as CreateCloudIntegrationEndpoint,Sc as CreateCustomvcsTokenEndpoint,Hu as CreateDomainEndpoint,vd as CreateJobCronEndpoint,bd as CreateJobManualEndpoint,uc as CreateLogsinkEndpoint,vc as CreateNotificationEndpoint,kc as CreateProjectEndpoint,pl as CreateSecretEndpoint,El as CreateServiceBuildEndpoint,Pl as CreateServiceCombinedEndpoint,Cl as CreateServiceDeploymentEndpoint,hp as CreateTemplateEndpoint,sp as CreateVolumeEndpoint,Jc as DeleteAddonBackupscheduleEndpoint,Fc as DeleteAddonEndpoint,vu as DeleteApiEndpoint,$c as DeleteBackupEndpoint,qu as DeleteCloudClusterEndpoint,Bu as DeleteCloudDockerregistryEndpoint,Ju as DeleteCloudIntegrationEndpoint,Zu as DeleteDomainEndpoint,Id as DeleteJobEndpoint,dc as DeleteLogsinkEndpoint,bc as DeleteNotificationEndpoint,nl as DeletePreviewtemplatepreviewEndpoint,qc as DeleteProjectEndpoint,Ic as DeleteRegistrycredentialsEndpoint,ml as DeleteSecretEndpoint,wl as DeleteSecretlinkEndpoint,xl as DeleteServiceEndpoint,tc as DeleteSubdomainEndpoint,gp as DeleteTemplateEndpoint,cp as DeleteVolumeEndpoint,lp as DetachVolumeEndpoint,rc as DisableSubdomainCdnEndpoint,oc as EnableSubdomainCdnEndpoint,su as ExecCommandStandard,Zc as GetAddonBackupDownloadEndpoint,Vc as GetAddonBackupEndpoint,zc as GetAddonBackupsEndpoint,Gc as GetAddonBackupschedulesEndpoint,td as GetAddonContainersEndpoint,ed as GetAddonCredentialsEndpoint,Bc as GetAddonEndpoint,sd as GetAddonPitrwindowEndpoint,Xc as GetAddonRestoresEndpoint,Pu as GetAddonTypesEndpoint,pd as GetAddonVersionEndpoint,fu as GetApiEndpoint,Ou as GetCloudClusterEndpoint,Nu as GetCloudDockerregistryEndpoint,Gu as GetCloudIntegrationEndpoint,Vu as GetDnsidEndpoint,Yu as GetDomainEndpoint,Ru as GetInvoiceDetailsEndpoint,Ed as GetJobBranchesEndpoint,Ud as GetJobBuildEndpoint,Rd as GetJobBuildargumentdetailsEndpoint,Pd as GetJobBuildargumentsEndpoint,_d as GetJobBuildsEndpoint,xd as GetJobContainersEndpoint,qd as GetJobDeploymentEndpoint,jd as GetJobEndpoint,Td as GetJobHealthchecksEndpoint,Ld as GetJobPullrequestsEndpoint,Jd as GetJobRunEndpoint,Gd as GetJobRunsEndpoint,Wd as GetJobRuntimeenvironmentEndpoint,$d as GetJobRuntimeenvironmentdetailsEndpoint,cc as GetLogsinkEndpoint,mc as GetNotificationEndpoint,Xd as GetPipelineEndpoint,Qd as GetPreviewtemplateEndpoint,ol as GetPreviewtemplaterunEndpoint,xc as GetProjectEndpoint,jc as GetRegistrycredentialsEndpoint,il as GetReleaseflowEndpoint,cl as GetReleaseflowrunEndpoint,vl as GetSecretEndpoint,jl as GetSecretdetailsEndpoint,yl as GetSecretlinkEndpoint,ql as GetServiceBranchesEndpoint,Ml as GetServiceBuildEndpoint,Ll as GetServiceBuildargumentdetailsEndpoint,Nl as GetServiceBuildargumentsEndpoint,Dl as GetServiceBuildsEndpoint,zl as GetServiceContainersEndpoint,Wl as GetServiceDeploymentEndpoint,Ol as GetServiceEndpoint,$l as GetServiceHealthchecksEndpoint,Zl as GetServicePortsEndpoint,Xl as GetServicePullrequestsEndpoint,ep as GetServiceRuntimeenvironmentEndpoint,rp as GetServiceRuntimeenvironmentdetailsEndpoint,Qu as GetSubdomainEndpoint,vp as GetTemplateEndpoint,wp as GetTemplaterunEndpoint,ap as GetVolumeEndpoint,nd as ImportAddonBackupEndpoint,Ku as ImportDomaincertificateEndpoint,Dc as ListAddonsEndpoint,Ac as ListBranchesEndpoint,ku as ListCloudClustersEndpoint,Du as ListCloudDockerregistryEndpoint,Lu as ListCloudIntegrationsEndpoint,zu as ListCloudNodetypesEndpoint,Cu as ListCloudProvidersEndpoint,Wu as ListCloudRegionsEndpoint,$u as ListDomainsEndpoint,Au as ListInvoicesEndpoint,hd as ListJobsEndpoint,ac as ListLogsinksEndpoint,hc as ListNotificationsEndpoint,Kd as ListPipelinesEndpoint,Rc as ListPlansEndpoint,el as ListPreviewtemplatepreviewsEndpoint,rl as ListPreviewtemplaterunsEndpoint,Cc as ListProjectsEndpoint,pp as ListRegionsEndpoint,yc as ListRegistrycredentialsEndpoint,ul as ListReleaseflowrunsEndpoint,Pc as ListReposEndpoint,ll as ListSecretsEndpoint,Il as ListServicesEndpoint,yp as ListTemplaterunsEndpoint,fp as ListTemplatesEndpoint,_c as ListVcsEndpoint,ip as ListVolumesEndpoint,tu as LogType,wu as MetricType,uu as NorthflankApiCallError,au as NorthflankExecCommand,Iu as NorthflankLogFetch,Su as NorthflankMetricFetch,ou as NorthflankPortForwarder,Lc as PatchAddonEndpoint,gu as PatchApiEndpoint,gd as PatchJobCronEndpoint,wd as PatchJobManualEndpoint,Oc as PatchProjectEndpoint,hl as PatchSecretEndpoint,Sl as PatchServiceBuildEndpoint,Rl as PatchServiceCombinedEndpoint,Ul as PatchServiceDeploymentEndpoint,od as PauseAddonEndpoint,Bd as PauseJobEndpoint,lc as PauseLogsinkEndpoint,Yl as PauseServiceEndpoint,hu as PostApiEndpoint,Nc as PutAddonEndpoint,mu as PutApiEndpoint,md as PutJobCronEndpoint,yd as PutJobManualEndpoint,Uc as PutProjectEndpoint,fl as PutSecretEndpoint,_l as PutServiceBuildEndpoint,Al as PutServiceCombinedEndpoint,kl as PutServiceDeploymentEndpoint,ad as ResetAddonEndpoint,ud as RestartAddonEndpoint,Ql as RestartServiceEndpoint,Kc as RestoreAddonBackupEndpoint,cd as ResumeAddonEndpoint,Fd as ResumeJobEndpoint,pc as ResumeLogsinkEndpoint,tp as ResumeServiceEndpoint,Qc as RetainAddonBackupEndpoint,al as RunReleaseflowEndpoint,bp as RunTemplateEndpoint,dd as ScaleAddonEndpoint,Hd as ScaleJobEndpoint,op as ScaleServiceEndpoint,id as StartAddonPitrEndpoint,Sd as StartJobBuildEndpoint,Md as StartJobRunEndpoint,Tl as StartServiceBuildEndpoint,Zd as SuspendJobEndpoint,nc as UnassignSubdomainEndpoint,rd as UpdateAddonNetworksettingsEndpoint,ld as UpdateAddonSecurityEndpoint,fd as UpdateAddonVersionEndpoint,xu as UpdateCloudClusterEndpoint,Mu as UpdateCloudIntegrationEndpoint,Ad as UpdateJobBuildargumentsEndpoint,Cd as UpdateJobBuildoptionsEndpoint,kd as UpdateJobBuildsourceEndpoint,Dd as UpdateJobDeploymentEndpoint,Nd as UpdateJobHealthchecksEndpoint,Vd as UpdateJobRuntimeenvironmentEndpoint,Yd as UpdateJobSettingsEndpoint,fc as UpdateLogsinkEndpoint,gc as UpdateNotificationEndpoint,tl as UpdatePreviewtemplateEndpoint,Ec as UpdateRegistrycredentialsEndpoint,sl as UpdateReleaseflowEndpoint,gl as UpdateSecretEndpoint,bl as UpdateSecretlinkEndpoint,Bl as UpdateServiceBuildargumentsEndpoint,Fl as UpdateServiceBuildoptionsEndpoint,Gl as UpdateServiceBuildsourceEndpoint,Vl as UpdateServiceDeploymentEndpoint,Hl as UpdateServiceHealthchecksEndpoint,Kl as UpdateServicePortsEndpoint,np as UpdateServiceRuntimeenvironmentEndpoint,mp as UpdateTemplateEndpoint,up as UpdateVolumeEndpoint,sc as VerifyDomainEndpoint,ic as VerifySubdomainEndpoint};