@northflank/js-client 0.7.19 → 0.7.21

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
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("events"),t=require("stream"),n=require("http"),r=require("url"),o=require("punycode"),i=require("https"),s=require("zlib"),a=require("os"),c=require("net"),u=require("child_process"),d=require("fs"),l=require("path"),p=require("buffer"),f=require("crypto"),h=require("tls"),v=require("dgram");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function b(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var g=m(e),y=m(t),w=b(t),I=m(n),j=m(r),E=m(o),R=m(i),C=m(s),U=m(a),S=m(c),_=b(c),A=m(d),P=m(l),x=m(p),k=m(f),q=m(h),O=m(v),D=function(e,t){return D=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])},D(e,t)};function T(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}D(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var N=function(){return N=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},N.apply(this,arguments)};function L(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))}function B(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(c){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,c])}}}function G(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 F="object"==typeof global&&global&&global.Object===Object&&global,J="object"==typeof self&&self&&self.Object===Object&&self,M=F||J||Function("return this")(),z=M.Symbol,W=Object.prototype,$=W.hasOwnProperty,V=W.toString,H=z?z.toStringTag:void 0;var Y=Object.prototype.toString;var Z="[object Null]",K="[object Undefined]",X=z?z.toStringTag:void 0;function Q(e){return null==e?void 0===e?K:Z:X&&X in Object(e)?function(e){var t=$.call(e,H),n=e[H];try{e[H]=void 0;var r=!0}catch(e){}var o=V.call(e);return r&&(t?e[H]=n:delete e[H]),o}(e):function(e){return Y.call(e)}(e)}function ee(e){return null!=e&&"object"==typeof e}var te="[object Symbol]";function ne(e){return"symbol"==typeof e||ee(e)&&Q(e)==te}function re(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 oe=Array.isArray,ie=1/0,se=z?z.prototype:void 0,ae=se?se.toString:void 0;function ce(e){if("string"==typeof e)return e;if(oe(e))return re(e,ce)+"";if(ne(e))return ae?ae.call(e):"";var t=e+"";return"0"==t&&1/e==-ie?"-0":t}function ue(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function de(e){return e}var le="[object AsyncFunction]",pe="[object Function]",fe="[object GeneratorFunction]",he="[object Proxy]";function ve(e){if(!ue(e))return!1;var t=Q(e);return t==pe||t==fe||t==le||t==he}var me,be=M["__core-js_shared__"],ge=(me=/[^.]+$/.exec(be&&be.keys&&be.keys.IE_PROTO||""))?"Symbol(src)_1."+me:"";var ye=Function.prototype.toString;function we(e){if(null!=e){try{return ye.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Ie=/^\[object .+?Constructor\]$/,je=Function.prototype,Ee=Object.prototype,Re=je.toString,Ce=Ee.hasOwnProperty,Ue=RegExp("^"+Re.call(Ce).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Se(e){return!(!ue(e)||(t=e,ge&&ge in t))&&(ve(e)?Ue:Ie).test(we(e));var t}function _e(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Se(n)?n:void 0}var Ae=_e(M,"WeakMap"),Pe=Object.create,xe=function(){function e(){}return function(t){if(!ue(t))return{};if(Pe)return Pe(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var ke=Date.now;var qe,Oe,De,Te=function(){try{var e=_e(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ne=Te,Le=Ne?function(e,t){return Ne(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:de,Be=(qe=Le,Oe=0,De=0,function(){var e=ke(),t=16-(e-De);if(De=e,t>0){if(++Oe>=800)return arguments[0]}else Oe=0;return qe.apply(void 0,arguments)}),Ge=9007199254740991,Fe=/^(?:0|[1-9]\d*)$/;function Je(e,t){var n=typeof e;return!!(t=null==t?Ge:t)&&("number"==n||"symbol"!=n&&Fe.test(e))&&e>-1&&e%1==0&&e<t}function Me(e,t,n){"__proto__"==t&&Ne?Ne(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ze(e,t){return e===t||e!=e&&t!=t}var We=Object.prototype.hasOwnProperty;function $e(e,t,n){var r=e[t];We.call(e,t)&&ze(r,n)&&(void 0!==n||t in e)||Me(e,t,n)}var Ve=Math.max;function He(e,t){return Be(function(e,t,n){return t=Ve(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Ve(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,de),e+"")}var Ye=9007199254740991;function Ze(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Ye}function Ke(e){return null!=e&&Ze(e.length)&&!ve(e)}var Xe=Object.prototype;function Qe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Xe)}function et(e){return ee(e)&&"[object Arguments]"==Q(e)}var tt=Object.prototype,nt=tt.hasOwnProperty,rt=tt.propertyIsEnumerable,ot=et(function(){return arguments}())?et:function(e){return ee(e)&&nt.call(e,"callee")&&!rt.call(e,"callee")};var it="object"==typeof exports&&exports&&!exports.nodeType&&exports,st=it&&"object"==typeof module&&module&&!module.nodeType&&module,at=st&&st.exports===it?M.Buffer:void 0,ct=(at?at.isBuffer:void 0)||function(){return!1},ut={};ut["[object Float32Array]"]=ut["[object Float64Array]"]=ut["[object Int8Array]"]=ut["[object Int16Array]"]=ut["[object Int32Array]"]=ut["[object Uint8Array]"]=ut["[object Uint8ClampedArray]"]=ut["[object Uint16Array]"]=ut["[object Uint32Array]"]=!0,ut["[object Arguments]"]=ut["[object Array]"]=ut["[object ArrayBuffer]"]=ut["[object Boolean]"]=ut["[object DataView]"]=ut["[object Date]"]=ut["[object Error]"]=ut["[object Function]"]=ut["[object Map]"]=ut["[object Number]"]=ut["[object Object]"]=ut["[object RegExp]"]=ut["[object Set]"]=ut["[object String]"]=ut["[object WeakMap]"]=!1;var dt="object"==typeof exports&&exports&&!exports.nodeType&&exports,lt=dt&&"object"==typeof module&&module&&!module.nodeType&&module,pt=lt&&lt.exports===dt&&F.process,ft=function(){try{var e=lt&&lt.require&&lt.require("util").types;return e||pt&&pt.binding&&pt.binding("util")}catch(e){}}(),ht=ft&&ft.isTypedArray,vt=ht?function(e){return function(t){return e(t)}}(ht):function(e){return ee(e)&&Ze(e.length)&&!!ut[Q(e)]},mt=vt,bt=Object.prototype.hasOwnProperty;function gt(e,t){var n=oe(e),r=!n&&ot(e),o=!n&&!r&&ct(e),i=!n&&!r&&!o&&mt(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):[],c=a.length;for(var u in e)!t&&!bt.call(e,u)||s&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Je(u,c))||a.push(u);return a}function yt(e,t){return function(n){return e(t(n))}}var wt=yt(Object.keys,Object),It=Object.prototype.hasOwnProperty;function jt(e){return Ke(e)?gt(e):function(e){if(!Qe(e))return wt(e);var t=[];for(var n in Object(e))It.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var Et=Object.prototype.hasOwnProperty;function Rt(e){if(!ue(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Qe(e),n=[];for(var r in e)("constructor"!=r||!t&&Et.call(e,r))&&n.push(r);return n}function Ct(e){return Ke(e)?gt(e,!0):Rt(e)}var Ut=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,St=/^\w*$/;function _t(e,t){if(oe(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ne(e))||(St.test(e)||!Ut.test(e)||null!=t&&e in Object(t))}var At=_e(Object,"create");var Pt=Object.prototype.hasOwnProperty;var xt=Object.prototype.hasOwnProperty;function kt(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 qt(e,t){for(var n=e.length;n--;)if(ze(e[n][0],t))return n;return-1}kt.prototype.clear=function(){this.__data__=At?At(null):{},this.size=0},kt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},kt.prototype.get=function(e){var t=this.__data__;if(At){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Pt.call(t,e)?t[e]:void 0},kt.prototype.has=function(e){var t=this.__data__;return At?void 0!==t[e]:xt.call(t,e)},kt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=At&&void 0===t?"__lodash_hash_undefined__":t,this};var Ot=Array.prototype.splice;function Dt(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])}}Dt.prototype.clear=function(){this.__data__=[],this.size=0},Dt.prototype.delete=function(e){var t=this.__data__,n=qt(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ot.call(t,n,1),--this.size,!0)},Dt.prototype.get=function(e){var t=this.__data__,n=qt(t,e);return n<0?void 0:t[n][1]},Dt.prototype.has=function(e){return qt(this.__data__,e)>-1},Dt.prototype.set=function(e,t){var n=this.__data__,r=qt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Tt=_e(M,"Map");function Nt(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 Lt(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])}}Lt.prototype.clear=function(){this.size=0,this.__data__={hash:new kt,map:new(Tt||Dt),string:new kt}},Lt.prototype.delete=function(e){var t=Nt(this,e).delete(e);return this.size-=t?1:0,t},Lt.prototype.get=function(e){return Nt(this,e).get(e)},Lt.prototype.has=function(e){return Nt(this,e).has(e)},Lt.prototype.set=function(e,t){var n=Nt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Bt="Expected a function";function Gt(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(Bt);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(Gt.Cache||Lt),n}Gt.Cache=Lt;var Ft=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jt=/\\(\\)?/g,Mt=function(e){var t=Gt(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(Ft,(function(e,n,r,o){t.push(r?o.replace(Jt,"$1"):n||e)})),t})),zt=Mt;function Wt(e){return null==e?"":ce(e)}function $t(e,t){return oe(e)?e:_t(e,t)?[e]:zt(Wt(e))}var Vt=1/0;function Ht(e){if("string"==typeof e||ne(e))return e;var t=e+"";return"0"==t&&1/e==-Vt?"-0":t}function Yt(e,t){for(var n=0,r=(t=$t(t,e)).length;null!=e&&n<r;)e=e[Ht(t[n++])];return n&&n==r?e:void 0}function Zt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Kt=z?z.isConcatSpreadable:void 0;function Xt(e){return oe(e)||ot(e)||!!(Kt&&e&&e[Kt])}function Qt(e,t,n,r,o){var i=-1,s=e.length;for(n||(n=Xt),o||(o=[]);++i<s;){var a=e[i];t>0&&n(a)?t>1?Qt(a,t-1,n,r,o):Zt(o,a):r||(o[o.length]=a)}return o}var en=yt(Object.getPrototypeOf,Object),tn="[object Object]",nn=Function.prototype,rn=Object.prototype,on=nn.toString,sn=rn.hasOwnProperty,an=on.call(Object);function cn(e){var t=this.__data__=new Dt(e);this.size=t.size}cn.prototype.clear=function(){this.__data__=new Dt,this.size=0},cn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},cn.prototype.get=function(e){return this.__data__.get(e)},cn.prototype.has=function(e){return this.__data__.has(e)},cn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Dt){var r=n.__data__;if(!Tt||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Lt(r)}return n.set(e,t),this.size=n.size,this};var un="object"==typeof exports&&exports&&!exports.nodeType&&exports,dn=un&&"object"==typeof module&&module&&!module.nodeType&&module,ln=dn&&dn.exports===un?M.Buffer:void 0,pn=ln?ln.allocUnsafe:void 0;var fn=Object.prototype.propertyIsEnumerable,hn=Object.getOwnPropertySymbols,vn=hn?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}(hn(e),(function(t){return fn.call(e,t)})))}:function(){return[]};function mn(e){return function(e,t,n){var r=t(e);return oe(e)?r:Zt(r,n(e))}(e,jt,vn)}var bn=_e(M,"DataView"),gn=_e(M,"Promise"),yn=_e(M,"Set"),wn="[object Map]",In="[object Promise]",jn="[object Set]",En="[object WeakMap]",Rn="[object DataView]",Cn=we(bn),Un=we(Tt),Sn=we(gn),_n=we(yn),An=we(Ae),Pn=Q;(bn&&Pn(new bn(new ArrayBuffer(1)))!=Rn||Tt&&Pn(new Tt)!=wn||gn&&Pn(gn.resolve())!=In||yn&&Pn(new yn)!=jn||Ae&&Pn(new Ae)!=En)&&(Pn=function(e){var t=Q(e),n="[object Object]"==t?e.constructor:void 0,r=n?we(n):"";if(r)switch(r){case Cn:return Rn;case Un:return wn;case Sn:return In;case _n:return jn;case An:return En}return t});var xn=Pn,kn=M.Uint8Array;function qn(e,t){var n,r,o=t?(n=e.buffer,r=new n.constructor(n.byteLength),new kn(r).set(new kn(n)),r):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function On(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Lt;++t<n;)this.add(e[t])}function Dn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}On.prototype.add=On.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},On.prototype.has=function(e){return this.__data__.has(e)};var Tn=1,Nn=2;function Ln(e,t,n,r,o,i){var s=n&Tn,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var l=-1,p=!0,f=n&Nn?new On: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(!Dn(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 Bn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Gn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Fn=1,Jn=2,Mn="[object Boolean]",zn="[object Date]",Wn="[object Error]",$n="[object Map]",Vn="[object Number]",Hn="[object RegExp]",Yn="[object Set]",Zn="[object String]",Kn="[object Symbol]",Xn="[object ArrayBuffer]",Qn="[object DataView]",er=z?z.prototype:void 0,tr=er?er.valueOf:void 0;var nr=1,rr=Object.prototype.hasOwnProperty;var or=1,ir="[object Arguments]",sr="[object Array]",ar="[object Object]",cr=Object.prototype.hasOwnProperty;function ur(e,t,n,r,o,i){var s=oe(e),a=oe(t),c=s?sr:xn(e),u=a?sr:xn(t),d=(c=c==ir?ar:c)==ar,l=(u=u==ir?ar:u)==ar,p=c==u;if(p&&ct(e)){if(!ct(t))return!1;s=!0,d=!1}if(p&&!d)return i||(i=new cn),s||mt(e)?Ln(e,t,n,r,o,i):function(e,t,n,r,o,i,s){switch(n){case Qn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Xn:return!(e.byteLength!=t.byteLength||!i(new kn(e),new kn(t)));case Mn:case zn:case Vn:return ze(+e,+t);case Wn:return e.name==t.name&&e.message==t.message;case Hn:case Zn:return e==t+"";case $n:var a=Bn;case Yn:var c=r&Fn;if(a||(a=Gn),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;r|=Jn,s.set(e,t);var d=Ln(a(e),a(t),r,o,i,s);return s.delete(e),d;case Kn:if(tr)return tr.call(e)==tr.call(t)}return!1}(e,t,c,n,r,o,i);if(!(n&or)){var f=d&&cr.call(e,"__wrapped__"),h=l&&cr.call(t,"__wrapped__");if(f||h){var v=f?e.value():e,m=h?t.value():t;return i||(i=new cn),o(v,m,n,r,i)}}return!!p&&(i||(i=new cn),function(e,t,n,r,o,i){var s=n&nr,a=mn(e),c=a.length;if(c!=mn(t).length&&!s)return!1;for(var u=c;u--;){var d=a[u];if(!(s?d in t:rr.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;++u<c;){var v=e[d=a[u]],m=t[d];if(r)var b=s?r(m,v,d,t,e,i):r(v,m,d,e,t,i);if(!(void 0===b?v===m||o(v,m,n,r,i):b)){f=!1;break}h||(h="constructor"==d)}if(f&&!h){var g=e.constructor,y=t.constructor;g==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof y&&y instanceof y||(f=!1)}return i.delete(e),i.delete(t),f}(e,t,n,r,o,i))}function dr(e,t,n,r,o){return e===t||(null==e||null==t||!ee(e)&&!ee(t)?e!=e&&t!=t:ur(e,t,n,r,dr,o))}var lr=1,pr=2;function fr(e){return e==e&&!ue(e)}function hr(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function vr(e){var t=function(e){for(var t=jt(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,fr(o)]}return t}(e);return 1==t.length&&t[0][2]?hr(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 c=(a=n[o])[0],u=e[c],d=a[1];if(s&&a[2]){if(void 0===u&&!(c in e))return!1}else{var l=new cn;if(r)var p=r(u,d,c,e,t,l);if(!(void 0===p?dr(d,u,lr|pr,r,l):p))return!1}}return!0}(n,e,t)}}function mr(e,t){return null!=e&&t in Object(e)}function br(e,t){return null!=e&&function(e,t,n){for(var r=-1,o=(t=$t(t,e)).length,i=!1;++r<o;){var s=Ht(t[r]);if(!(i=null!=e&&n(e,s)))break;e=e[s]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Ze(o)&&Je(s,o)&&(oe(e)||ot(e))}(e,t,mr)}var gr=1,yr=2;function wr(e,t){return _t(e)&&fr(t)?hr(Ht(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Yt(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?br(n,e):dr(t,r,gr|yr)}}function Ir(e){return _t(e)?(t=Ht(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Yt(t,e)}}(e);var t}function jr(e){return"function"==typeof e?e:null==e?de:"object"==typeof e?oe(e)?wr(e[0],e[1]):vr(e):Ir(e)}var Er,Rr=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),s=i.length;s--;){var a=i[Er?s:++r];if(!1===t(o[a],a,o))break}return e};var Cr=function(e,t){return function(n,r){if(null==n)return n;if(!Ke(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&&Rr(e,t,jt)})),Ur=Cr;function Sr(e,t,n){(void 0!==n&&!ze(e[t],n)||void 0===n&&!(t in e))&&Me(e,t,n)}function _r(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Ar(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],c=r?r(n[a],e[a],a,n,e):void 0;void 0===c&&(c=e[a]),o?Me(n,a,c):$e(n,a,c)}return n}(e,Ct(e))}function Pr(e,t,n,r,o,i,s){var a=_r(e,n),c=_r(t,n),u=s.get(c);if(u)Sr(e,n,u);else{var d,l=i?i(a,c,n+"",e,t,s):void 0,p=void 0===l;if(p){var f=oe(c),h=!f&&ct(c),v=!f&&!h&&mt(c);l=c,f||h||v?oe(a)?l=a:ee(d=a)&&Ke(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=pn?pn(n):new e.constructor(n);return e.copy(r),r}(c,!0)):v?(p=!1,l=qn(c,!0)):l=[]:function(e){if(!ee(e)||Q(e)!=tn)return!1;var t=en(e);if(null===t)return!0;var n=sn.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&on.call(n)==an}(c)||ot(c)?(l=a,ot(a)?l=Ar(a):ue(a)&&!ve(a)||(l=function(e){return"function"!=typeof e.constructor||Qe(e)?{}:xe(en(e))}(c))):p=!1}p&&(s.set(c,l),o(l,c,r,i,s),s.delete(c)),Sr(e,n,l)}}function xr(e,t,n,r,o){e!==t&&Rr(t,(function(i,s){if(o||(o=new cn),ue(i))Pr(e,t,s,n,xr,r,o);else{var a=r?r(_r(e,s),i,s+"",e,t,o):void 0;void 0===a&&(a=i),Sr(e,s,a)}}),Ct)}var kr=/[\\^$.*+?()[\]{}|]/g,qr=RegExp(kr.source);function Or(e,t){var n=-1,r=Ke(e)?Array(e.length):[];return Ur(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function Dr(e,t){return Qt(function(e,t){return(oe(e)?re:Or)(e,jr(t))}(e,t),1)}var Tr=1/0;function Nr(e,t){return e>t}function Lr(e){return"string"==typeof e||!oe(e)&&ee(e)&&"[object String]"==Q(e)}function Br(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&&!ne(s):n(s,a)))var a=s,c=i}return c}(e,jr(t),Nr):void 0}var Gr,Fr=(Gr=function(e,t,n){xr(e,t,n)},He((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=Gr.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!ue(n))return!1;var r=typeof t;return!!("number"==r?Ke(n)&&Je(t,n.length):"string"==r&&t in n)&&ze(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&&Gr(e,s,n,o)}return e})));function Jr(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function Mr(e,t){return e(t={exports:{}},t.exports),t.exports}var zr={},Wr=zr;function $r(e){return e<0?-1:1}function Vr(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=$r(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||1&e?Math.round(e):Math.floor(e)}(a),a<n&&(a=n),a>r&&(a=r),a;if(!Number.isFinite(a)||0===a)return 0;if(a=$r(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}}zr.void=function(){},zr.boolean=function(e){return!!e},zr.byte=Vr(8,{unsigned:!1}),zr.octet=Vr(8,{unsigned:!0}),zr.short=Vr(16,{unsigned:!1}),zr["unsigned short"]=Vr(16,{unsigned:!0}),zr.long=Vr(32,{unsigned:!1}),zr["unsigned long"]=Vr(32,{unsigned:!0}),zr["long long"]=Vr(32,{unsigned:!1,moduloBitLength:64}),zr["unsigned long long"]=Vr(32,{unsigned:!0,moduloBitLength:64}),zr.double=function(e){const t=+e;if(!Number.isFinite(t))throw new TypeError("Argument is not a finite floating-point value");return t},zr["unrestricted double"]=function(e){const t=+e;if(isNaN(t))throw new TypeError("Argument is NaN");return t},zr.float=zr.double,zr["unrestricted float"]=zr["unrestricted double"],zr.DOMString=function(e,t){return t||(t={}),t.treatNullAsEmptyString&&null===e?"":String(e)},zr.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},zr.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("")},zr.Date=function(e,t){if(!(e instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(e))return e},zr.RegExp=function(e,t){return e instanceof RegExp||(e=new RegExp(e)),e};var Hr=Mr((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]}}));Hr.mixin,Hr.wrapperSymbol,Hr.implSymbol,Hr.wrapperForImpl,Hr.implForWrapper;var Yr,Zr=(Yr=Object.freeze({__proto__:null}))&&Yr.default||Yr,Kr={TRANSITIONAL:0,NONTRANSITIONAL:1};function Xr(e){return e.split("\0").map((function(e){return e.normalize("NFC")})).join("\0")}function Qr(e){for(var t=0,n=Zr.length-1;t<=n;){var r=Math.floor((t+n)/2),o=Zr[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 eo=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function to(e){return e.replace(eo,"_").length}var no=/[\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 ro(e,t){"xn--"===e.substr(0,4)&&(e=E.default.toUnicode(e));var n=!1;(Xr(e)!==e||"-"===e[3]&&"-"===e[4]||"-"===e[0]||"-"===e[e.length-1]||-1!==e.indexOf(".")||0===e.search(no))&&(n=!0);for(var r=to(e),o=0;o<r;++o){var i=Qr(e.codePointAt(o));if(oo===Kr.TRANSITIONAL&&"valid"!==i[1]||oo===Kr.NONTRANSITIONAL&&"valid"!==i[1]&&"deviation"!==i[1]){n=!0;break}}return{label:e,error:n}}function oo(e,t,n){var r=function(e,t,n){for(var r=!1,o="",i=to(e),s=0;s<i;++s){var a=e.codePointAt(s),c=Qr(a);switch(c[1]){case"disallowed":r=!0,o+=String.fromCodePoint(a);break;case"ignored":break;case"mapped":o+=String.fromCodePoint.apply(String,c[2]);break;case"deviation":n===Kr.TRANSITIONAL?o+=String.fromCodePoint.apply(String,c[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,c[2]);break;case"disallowed_STD3_valid":t&&(r=!0),o+=String.fromCodePoint(a)}}return{string:o,error:r}}(e,t,n);r.string=Xr(r.string);for(var o=r.string.split("."),i=0;i<o.length;++i)try{var s=ro(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 io={toASCII:function(e,t,n,r){var o=oo(e,t,n),i=o.string.split(".");if(i=i.map((function(e){try{return E.default.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=oo(e,t,Kr.NONTRANSITIONAL);return{domain:n.string,error:n.error}},PROCESSING_OPTIONS:Kr},so=Mr((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 E.default.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 u(e){return 2===e.length&&s(e.codePointAt(0))&&(":"===e[1]||"|"===e[1])}function d(e){return void 0!==t[e]}function l(e){return d(e.scheme)}function p(e){let t=e.toString(16).toUpperCase();return 1===t.length&&(t="0"+t),"%"+t}function f(e){return e<=31||e>126}const h=new Set([32,34,35,60,62,63,96,123,125]);function v(e){return f(e)||h.has(e)}const m=new Set([47,58,59,61,64,91,92,93,94,124]);function b(e){return v(e)||m.has(e)}function g(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+=p(t[e]);return n}(n):n}function y(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 w(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=E.default.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=E.default.ucs2.decode(e);for(let e=0;e<o.length;++e)r+=g(o[e],f);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=io.toASCII(r,!1,io.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=y(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 j(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 R(e){return""!==e.username||""!==e.password}function C(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=E.default.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}}}C.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},C.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(l(this.url)&&!d(this.buffer))return!1;if(!l(this.url)&&d(this.buffer))return!1;if((R(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"):l(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":l(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},C.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)},C.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},C.prototype["parse path or authority"]=function(e){return 47===e?this.state="authority":(this.state="path",--this.pointer),!0},C.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"):l(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},C.prototype["parse relative slash"]=function(e){return!l(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},C.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},C.prototype["parse special authority ignore slashes"]=function(e){return 47!==e&&92!==e?(this.state="authority",--this.pointer):this.parseError=!0,!0},C.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=g(e,b);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(e)||47===e||63===e||35===e||l(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},C.prototype["parse hostname"]=C.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||l(this.url)&&92===e){if(--this.pointer,l(this.url)&&""===this.buffer)return this.parseError=!0,n;if(this.stateOverride&&""===this.buffer&&(R(this.url)||null!==this.url.port))return this.parseError=!0,!1;const e=w(this.buffer,l(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=w(this.buffer,l(this.url));if(e===n)return n;if(this.url.host=e,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},C.prototype["parse port"]=function(e,r){if(i(e))this.buffer+=r;else{if(!(isNaN(e)||47===e||63===e||35===e||l(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 U=new Set([47,92,63,35]);C.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&&!U.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),j(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},C.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},C.prototype["parse file host"]=function(e,t){if(isNaN(e)||47===e||92===e||63===e||35===e)if(--this.pointer,!this.stateOverride&&u(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=w(this.buffer,l(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},C.prototype["parse path start"]=function(e){return l(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},C.prototype["parse path"]=function(e){if(isNaN(e)||47===e||l(this.url)&&92===e||!this.stateOverride&&(63===e||35===e)){if(l(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||l(this.url)&&92===e?c(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&u(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(""):(j(this.url),47===e||l(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+=g(e,v);return!0},C.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]+g(e,f))),!0},C.prototype["parse query"]=function(e,t){if(isNaN(e)||!this.stateOverride&&35===e){l(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+=p(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},C.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+=g(e,f))),!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 C(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=E.default.ucs2.decode(t);for(let t=0;t<n.length;++t)e.username+=g(n[t],b)},e.exports.setThePassword=function(e,t){e.password="";const n=E.default.ucs2.decode(t);for(let t=0;t<n.length;++t)e.password+=g(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})}}));so.serializeURL,so.serializeURLOrigin,so.basicURLParse,so.setTheUsername,so.setThePassword,so.serializeHost,so.cannotHaveAUsernamePasswordPort,so.serializeInteger,so.parseURL;var ao=class{constructor(e){const t=e[0],n=e[1];let r=null;if(void 0!==n&&(r=so.basicURLParse(n),"failure"===r))throw new TypeError("Invalid base URL");const o=so.basicURLParse(t,{baseURL:r});if("failure"===o)throw new TypeError("Invalid URL");this._url=o}get href(){return so.serializeURL(this._url)}set href(e){const t=so.basicURLParse(e);if("failure"===t)throw new TypeError("Invalid URL");this._url=t}get origin(){return so.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(e){so.basicURLParse(e+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(e){so.cannotHaveAUsernamePasswordPort(this._url)||so.setTheUsername(this._url,e)}get password(){return this._url.password}set password(e){so.cannotHaveAUsernamePasswordPort(this._url)||so.setThePassword(this._url,e)}get host(){const e=this._url;return null===e.host?"":null===e.port?so.serializeHost(e.host):so.serializeHost(e.host)+":"+so.serializeInteger(e.port)}set host(e){this._url.cannotBeABaseURL||so.basicURLParse(e,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":so.serializeHost(this._url.host)}set hostname(e){this._url.cannotBeABaseURL||so.basicURLParse(e,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":so.serializeInteger(this._url.port)}set port(e){so.cannotHaveAUsernamePasswordPort(this._url)||(""===e?this._url.port=null:so.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=[],so.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="",so.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="",so.basicURLParse(t,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}},co=Mr((function(e){const t=Hr.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]=Wr.USVString(o[0]),void 0!==o[1]&&(o[1]=Wr.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=Wr.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=Wr.USVString(e),this[t].protocol=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"username",{get(){return this[t].username},set(e){e=Wr.USVString(e),this[t].username=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"password",{get(){return this[t].password},set(e){e=Wr.USVString(e),this[t].password=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"host",{get(){return this[t].host},set(e){e=Wr.USVString(e),this[t].host=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hostname",{get(){return this[t].hostname},set(e){e=Wr.USVString(e),this[t].hostname=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"port",{get(){return this[t].port},set(e){e=Wr.USVString(e),this[t].port=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pathname",{get(){return this[t].pathname},set(e){e=Wr.USVString(e),this[t].pathname=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"search",{get(){return this[t].search},set(e){e=Wr.USVString(e),this[t].search=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hash",{get(){return this[t].hash},set(e){e=Wr.USVString(e),this[t].hash=e},enumerable:!0,configurable:!0}),e.exports={is:e=>!!e&&e[t]instanceof ao,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 ao(n,r),e[t][Hr.wrapperSymbol]=e},interface:n,expose:{Window:{URL:n},Worker:{URL:n}}}}));co.is,co.create,co.setup,co.expose;var uo={URL:co.interface,serializeURL:so.serializeURL,serializeURLOrigin:so.serializeURLOrigin,basicURLParse:so.basicURLParse,setTheUsername:so.setTheUsername,setThePassword:so.setThePassword,serializeHost:so.serializeHost,serializeInteger:so.serializeInteger,parseURL:so.parseURL};const lo=y.default.Readable,po=Symbol("buffer"),fo=Symbol("type");class ho{constructor(){this[fo]="";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 ho?o[po]:Buffer.from("string"==typeof o?o:String(o)),r+=i.length,n.push(i)}}this[po]=Buffer.concat(n);let o=t&&void 0!==t.type&&String(t.type).toLowerCase();o&&!/[^\u0020-\u007E]/.test(o)&&(this[fo]=o)}get size(){return this[po].length}get type(){return this[fo]}text(){return Promise.resolve(this[po].toString())}arrayBuffer(){const e=this[po],t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return Promise.resolve(t)}stream(){const e=new lo;return e._read=function(){},e.push(this[po]),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[po].slice(r,r+i),a=new ho([],{type:arguments[2]});return a[po]=s,a}}function vo(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 mo;Object.defineProperties(ho.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(ho.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),vo.prototype=Object.create(Error.prototype),vo.prototype.constructor=vo,vo.prototype.name="FetchError";try{mo=require("encoding").convert}catch(e){}const bo=Symbol("Body internals"),go=y.default.PassThrough;function yo(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.size;let o=void 0===r?0:r;var i=n.timeout;let s=void 0===i?0:i;null==e?e=null:Io(e)?e=Buffer.from(e.toString()):jo(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 y.default||(e=Buffer.from(String(e)))),this[bo]={body:e,disturbed:!1,error:null},this.size=o,this.timeout=s,e instanceof y.default&&e.on("error",(function(e){const n="AbortError"===e.name?e:new vo(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[bo].error=n}))}function wo(){var e=this;if(this[bo].disturbed)return yo.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[bo].disturbed=!0,this[bo].error)return yo.Promise.reject(this[bo].error);let t=this.body;if(null===t)return yo.Promise.resolve(Buffer.alloc(0));if(jo(t)&&(t=t.stream()),Buffer.isBuffer(t))return yo.Promise.resolve(t);if(!(t instanceof y.default))return yo.Promise.resolve(Buffer.alloc(0));let n=[],r=0,o=!1;return new yo.Promise((function(i,s){let a;e.timeout&&(a=setTimeout((function(){o=!0,s(new vo(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)),t.on("error",(function(t){"AbortError"===t.name?(o=!0,s(t)):s(new vo(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))})),t.on("data",(function(t){if(!o&&null!==t){if(e.size&&r+t.length>e.size)return o=!0,void s(new vo(`content size at ${e.url} over limit: ${e.size}`,"max-size"));r+=t.length,n.push(t)}})),t.on("end",(function(){if(!o){clearTimeout(a);try{i(Buffer.concat(n,r))}catch(t){s(new vo(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}}))}))}function Io(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 jo(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 Eo(e){let t,n,r=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof y.default&&"function"!=typeof r.getBoundary&&(t=new go,n=new go,r.pipe(t),r.pipe(n),e[bo].body=t,r=n),r}function Ro(e){return null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":Io(e)?"application/x-www-form-urlencoded;charset=UTF-8":jo(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 y.default?null:"text/plain;charset=UTF-8"}function Co(e){const t=e.body;return null===t?0:jo(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}yo.prototype={get body(){return this[bo].body},get bodyUsed(){return this[bo].disturbed},arrayBuffer(){return wo.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 wo.call(this).then((function(t){return Object.assign(new ho([],{type:e.toLowerCase()}),{[po]:t})}))},json(){var e=this;return wo.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return yo.Promise.reject(new vo(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}}))},text(){return wo.call(this).then((function(e){return e.toString()}))},buffer(){return wo.call(this)},textConverted(){var e=this;return wo.call(this).then((function(t){return function(e,t){if("function"!=typeof mo)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 mo(e,"UTF-8",i).toString()}(t,e.headers)}))}},Object.defineProperties(yo.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),yo.mixIn=function(e){for(const t of Object.getOwnPropertyNames(yo.prototype))if(!(t in e)){const n=Object.getOwnPropertyDescriptor(yo.prototype,t);Object.defineProperty(e,t,n)}},yo.Promise=global.Promise;const Uo=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,So=/[^\t\x20-\x7e\x80-\xff]/;function _o(e){if(e=`${e}`,Uo.test(e)||""===e)throw new TypeError(`${e} is not a legal HTTP header name`)}function Ao(e){if(e=`${e}`,So.test(e))throw new TypeError(`${e} is not a legal HTTP header value`)}function Po(e,t){t=t.toLowerCase();for(const n in e)if(n.toLowerCase()===t)return n}const xo=Symbol("map");class ko{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[xo]=Object.create(null),e instanceof ko){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){_o(e=`${e}`);const t=Po(this[xo],e);return void 0===t?null:this[xo][t].join(", ")}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=qo(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=qo(this),r++}}set(e,t){t=`${t}`,_o(e=`${e}`),Ao(t);const n=Po(this[xo],e);this[xo][void 0!==n?n:e]=[t]}append(e,t){t=`${t}`,_o(e=`${e}`),Ao(t);const n=Po(this[xo],e);void 0!==n?this[xo][n].push(t):this[xo][e]=[t]}has(e){return _o(e=`${e}`),void 0!==Po(this[xo],e)}delete(e){_o(e=`${e}`);const t=Po(this[xo],e);void 0!==t&&delete this[xo][t]}raw(){return this[xo]}keys(){return Do(this,"key")}values(){return Do(this,"value")}[Symbol.iterator](){return Do(this,"key+value")}}function qo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(e[xo]).sort().map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[xo][t].join(", ")}:function(t){return[t.toLowerCase(),e[xo][t].join(", ")]})}ko.prototype.entries=ko.prototype[Symbol.iterator],Object.defineProperty(ko.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(ko.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 Oo=Symbol("internal");function Do(e,t){const n=Object.create(To);return n[Oo]={target:e,kind:t,index:0},n}const To=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==To)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[Oo];const t=e.target,n=e.kind,r=e.index,o=qo(t,n);return r>=o.length?{value:void 0,done:!0}:(this[Oo].index=r+1,{value:o[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function No(e){const t=Object.assign({__proto__:null},e[xo]),n=Po(e[xo],"Host");return void 0!==n&&(t[n]=t[n][0]),t}Object.defineProperty(To,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const Lo=Symbol("Response internals"),Bo=I.default.STATUS_CODES;class Go{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};yo.call(this,e,t);const n=t.status||200,r=new ko(t.headers);if(null!=e&&!r.has("Content-Type")){const t=Ro(e);t&&r.append("Content-Type",t)}this[Lo]={url:t.url,status:n,statusText:t.statusText||Bo[n],headers:r,counter:t.counter}}get url(){return this[Lo].url||""}get status(){return this[Lo].status}get ok(){return this[Lo].status>=200&&this[Lo].status<300}get redirected(){return this[Lo].counter>0}get statusText(){return this[Lo].statusText}get headers(){return this[Lo].headers}clone(){return new Go(Eo(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}yo.mixIn(Go.prototype),Object.defineProperties(Go.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(Go.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const Fo=Symbol("Request internals"),Jo=j.default.URL||uo.URL,Mo=j.default.parse,zo=j.default.format;function Wo(e){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(e)&&(e=new Jo(e).toString()),Mo(e)}const $o="destroy"in y.default.Readable.prototype;function Vo(e){return"object"==typeof e&&"object"==typeof e[Fo]}class Ho{constructor(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Vo(e)?t=Wo(e.url):(t=e&&e.href?Wo(e.href):Wo(`${e}`),e={});let r=n.method||e.method||"GET";if(r=r.toUpperCase(),(null!=n.body||Vo(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:Vo(e)&&null!==e.body?Eo(e):null;yo.call(this,o,{timeout:n.timeout||e.timeout||0,size:n.size||e.size||0});const i=new ko(n.headers||e.headers||{});if(null!=o&&!i.has("Content-Type")){const e=Ro(o);e&&i.append("Content-Type",e)}let s=Vo(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[Fo]={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[Fo].method}get url(){return zo(this[Fo].parsedURL)}get headers(){return this[Fo].headers}get redirect(){return this[Fo].redirect}get signal(){return this[Fo].signal}clone(){return new Ho(this)}}function Yo(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}yo.mixIn(Ho.prototype),Object.defineProperty(Ho.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Ho.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),Yo.prototype=Object.create(Error.prototype),Yo.prototype.constructor=Yo,Yo.prototype.name="AbortError";const Zo=j.default.URL||uo.URL,Ko=y.default.PassThrough;function Xo(e,t){if(!Xo.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return yo.Promise=Xo.Promise,new Xo.Promise((function(n,r){const o=new Ho(e,t),i=function(e){const t=e[Fo].parsedURL,n=new ko(e[Fo].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 y.default.Readable&&!$o)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let r=null;if(null==e.body&&/^(POST|PUT)$/i.test(e.method)&&(r="0"),null!=e.body){const t=Co(e);"number"==typeof t&&(r=String(t))}r&&n.set("Content-Length",r),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 o=e.agent;return"function"==typeof o&&(o=o(t)),Object.assign({},t,{method:e.method,headers:No(n),agent:o})}(o),s=("https:"===i.protocol?R.default:I.default).request,a=o.signal;let c=null;const u=function(){let e=new Yo("The user aborted a request.");r(e),o.body&&o.body instanceof y.default.Readable&&Qo(o.body,e),c&&c.body&&c.body.emit("error",e)};if(a&&a.aborted)return void u();const d=function(){u(),f()},l=s(i);let p;function f(){l.abort(),a&&a.removeEventListener("abort",d),clearTimeout(p)}a&&a.addEventListener("abort",d),o.timeout&&l.once("socket",(function(e){p=setTimeout((function(){r(new vo(`network timeout at: ${o.url}`,"request-timeout")),f()}),o.timeout)})),l.on("error",(function(e){r(new vo(`request to ${o.url} failed, reason: ${e.message}`,"system",e)),c&&c.body&&Qo(c.body,e),f()})),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)}}))}))}(l,(function(e){a&&a.aborted||c&&c.body&&Qo(c.body,e)})),parseInt(process.version.substring(1))<14&&l.on("socket",(function(e){e.addListener("close",(function(t){const n=e.listenerCount("data")>0;if(c&&n&&!t&&(!a||!a.aborted)){const e=new Error("Premature close");e.code="ERR_STREAM_PREMATURE_CLOSE",c.body.emit("error",e)}}))})),l.on("response",(function(e){clearTimeout(p);const t=function(e){const t=new ko;for(const n of Object.keys(e))if(!Uo.test(n))if(Array.isArray(e[n]))for(const r of e[n])So.test(r)||(void 0===t[xo][n]?t[xo][n]=[r]:t[xo][n].push(r));else So.test(e[n])||(t[xo][n]=[e[n]]);return t}(e.headers);if(Xo.isRedirect(e.statusCode)){const s=t.get("Location");let a=null;try{a=null===s?null:new Zo(s,o.url).toString()}catch(e){if("manual"!==o.redirect)return r(new vo(`uri requested responds with an invalid redirect URL: ${s}`,"invalid-redirect")),void f()}switch(o.redirect){case"error":return r(new vo(`uri requested responds with a redirect, redirect mode is set to error: ${o.url}`,"no-redirect")),void f();case"manual":if(null!==a)try{t.set("Location",a)}catch(e){r(e)}break;case"follow":if(null===a)break;if(o.counter>=o.follow)return r(new vo(`maximum redirect reached at: ${o.url}`,"max-redirect")),void f();const s={headers:new ko(o.headers),follow:o.follow,counter:o.counter+1,agent:o.agent,compress:o.compress,method:o.method,body:o.body,signal:o.signal,timeout:o.timeout,size:o.size};if(!function(e,t){const n=new Zo(t).hostname,r=new Zo(e).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(o.url,a)||(i=o.url,new Zo(a).protocol!==new Zo(i).protocol))for(const e of["authorization","www-authenticate","cookie","cookie2"])s.headers.delete(e);return 303!==e.statusCode&&o.body&&null===Co(o)?(r(new vo("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void f()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==o.method)||(s.method="GET",s.body=void 0,s.headers.delete("content-length")),n(Xo(new Ho(a,s))),void f())}}var i;e.once("end",(function(){a&&a.removeEventListener("abort",d)}));let s=e.pipe(new Ko);const u={url:o.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:o.size,timeout:o.timeout,counter:o.counter},l=t.get("Content-Encoding");if(!o.compress||"HEAD"===o.method||null===l||204===e.statusCode||304===e.statusCode)return c=new Go(s,u),void n(c);const h={flush:C.default.Z_SYNC_FLUSH,finishFlush:C.default.Z_SYNC_FLUSH};if("gzip"==l||"x-gzip"==l)return s=s.pipe(C.default.createGunzip(h)),c=new Go(s,u),void n(c);if("deflate"==l||"x-deflate"==l){const t=e.pipe(new Ko);return t.once("data",(function(e){s=8==(15&e[0])?s.pipe(C.default.createInflate()):s.pipe(C.default.createInflateRaw()),c=new Go(s,u),n(c)})),void t.on("end",(function(){c||(c=new Go(s,u),n(c))}))}if("br"==l&&"function"==typeof C.default.createBrotliDecompress)return s=s.pipe(C.default.createBrotliDecompress()),c=new Go(s,u),void n(c);c=new Go(s,u),n(c)})),function(e,t){const n=t.body;null===n?e.end():jo(n)?n.stream().pipe(e):Buffer.isBuffer(n)?(e.write(n),e.end()):n.pipe(e)}(l,o)}))}function Qo(e,t){e.destroy?e.destroy(t):(e.emit("error",t),e.end())}Xo.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},Xo.Promise=global.Promise;var ei=function(){function e(e){this.contextProvider=e}return e.prototype.getServiceDetails=function(e,t){return L(this,void 0,void 0,(function(){return B(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 L(this,void 0,void 0,(function(){return B(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 L(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return B(this,(function(c){switch(c.label){case 0:return n="Error while trying to connect, please try again.",r=Fr({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},N({},t)),[4,mc(2)((function(){return L(a,void 0,void 0,(function(){return B(this,(function(t){return[2,Xo(e,r)]}))}))})).catch((function(){throw new Error(n)}))];case 1:return(o=c.sent()).ok?[3,3]:[4,o.text()];case 2:i=c.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,c.sent()]}}))}))},e}(),ti=function(e,t,n){return L(void 0,void 0,void 0,(function(){var r,o,i,s,a;return B(this,(function(c){switch(c.label){case 0:if(r=oi(t||"127.0.0.1"),(o=oi(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===U.default.platform()&&(i=function(e){return L(void 0,void 0,void 0,(function(){var t;return B(this,(function(n){switch(n.label){case 0:return t="lo0 alias ".concat(e," up"),[4,ri.apply(void 0,t.split(" "))];case 1:return n.sent(),[2]}}))}))}),s=r,c.label=1;case 1:return s<=o?(a=ii(s),[4,ni(e,a)]):[3,6];case 2:return c.sent()?i?[4,i(a)]:[3,4]:[3,5];case 3:c.sent(),c.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."))}}))}))},ni=function(e,t){return new Promise((function(n){var r=new c.Socket,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)}))},ri=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return L(void 0,void 0,void 0,(function(){return B(this,(function(t){switch(t.label){case 0:return[4,si("/sbin/ifconfig",e).resultPromise];case 1:return[2,t.sent()]}}))}))},oi=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},ii=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(".")},si=function(e,t,n){var r=u.spawn(e,t,N({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 c="Error during execution of command '".concat(e," ").concat(t.join(" "),"': ").concat(a);i({message:c,result:r})}else o(r)}))}));return{process:r,resultPromise:o}},ai=function(e,t,n){return L(void 0,void 0,void 0,(function(){var r,o;return B(this,(function(i){switch(i.label){case 0:return r=ci(e,10),[4,A.default.promises.writeFile(r,t,n)];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,6]),[4,A.default.promises.rename(r,e)];case 3:return i.sent(),[3,6];case 4:return o=i.sent(),[4,A.default.promises.unlink(r).catch((function(){}))];case 5:throw i.sent(),o;case 6:return[2]}}))}))},ci=function(e,t){for(var n,r=P.default.dirname(e),o=P.default.basename(e),i=0;null===(n=i<t)||void 0===n||n;i+=1){var s=G([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),a=".".concat(s,".").concat(o),c=P.default.join(r,a);if(!A.default.existsSync(c))return c}throw new Error("Could not write file to file '".concat(e,"'."))},ui="win32"===process.platform?"\r\n":"\n",di=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;bi(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 Dr(this.findEntries(e),(function(e){return e.hosts.map((function(e){return e.host}))}))},e.prototype.resolveIps=function(e){return bi(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 hi(this.nodes,this.config.eol)},e.prototype.removeEntry=function(e){var t,n="number"==typeof(t=e)||ee(t)&&"[object Number]"==Q(t)?e:this.nodes.findIndex((function(t){return t===e}));n<0||this.nodes.splice(n,1)},e.prototype.findEntries=function(e){return bi(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=fi(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?[li(),pi(o),r]:[pi(o),r];this.insertAt.apply(this,G([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,G([e,0],n,!1))},e.prototype.makeEntry=function(e,t){var n=this.config.ipPrefixWhitespace;return N({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=bi(t,"eol").map((function(e){return e.line}));return null!==(e=gi(n))&&void 0!==e?e:ui}(),indent:null!==(o=null==n?void 0:n.indent)&&void 0!==o?o:function(){var e,n=Dr(bi(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=gi(n))&&void 0!==e?e:17}(),ipPrefixWhitespace:""})},e.parse=function(e,t){return this.fromNodes(vi(e),t)},e}(),li=function(){return{type:"blank",line:""}},pi=function(e){return{type:"comment",line:fi(e)}},fi=function(e){return e.startsWith("#")?e:"# ".concat(e)},hi=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:ui)},vi=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}:mi(e)}))},mi=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=Dr(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}},bi=function(e,t){return e.filter((function(e){return e.type===t}))},gi=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=Br(Array.from(t.entries()),(function(e){return e[1]}));if(n)return n[0]},yi="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",wi=function(){function e(e){this.ast=di.fromNodes([]);var t={writeMode:"atomic",hostsFile:yi};this.config=N(N({},t),e)}return e.prototype.add=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!Lr(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!Lr(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(!Lr(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!Lr(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(!Lr(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(!Lr(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 L(this,void 0,void 0,(function(){var e;return B(this,(function(t){switch(t.label){case 0:return[4,A.default.promises.readFile(this.config.hostsFile)];case 1:return e=t.sent(),this.ast=di.parse(e.toString(),this.config),[2,this]}}))}))},e.prototype.write=function(e){return L(this,void 0,void 0,(function(){var t,n,r,o;return B(this,(function(i){switch(i.label){case 0:switch(t=N(N({},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,ai(n,o)];case 2:case 4:return i.sent(),[3,6];case 3:return[4,A.default.promises.writeFile(n,o)];case 5:return[3,6];case 6:return[2,this]}}))}))},e.prototype.backup=function(e){return L(this,void 0,void 0,(function(){var t,n,r,o;return B(this,(function(i){switch(i.label){case 0:return A.default.existsSync(this.config.hostsFile)?(t=P.default.dirname(this.config.hostsFile),n=P.default.basename(this.config.hostsFile),r="".concat(n).concat(e.suffix),o=P.default.resolve(t,r),A.default.existsSync(o)&&!e.rewrite?[3,2]:[4,A.default.promises.copyFile(this.config.hostsFile,o)]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))},e.load=function(t){return L(this,void 0,void 0,(function(){return B(this,(function(n){switch(n.label){case 0:return[4,new e(t).read()];case 1:return[2,n.sent()]}}))}))},e}(),Ii=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 L(this,void 0,void 0,(function(){var t,n=this;return B(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}(),ji=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 Ei=ji(Ci),Ri=ji(Ui);function Ci(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function Ui(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}Ci.proto=Ci((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Ci(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Ui(this)},configurable:!0})})),Ei.strict=Ri;var Si=function(){},_i=function(e,t,n){if("function"==typeof t)return _i(e,null,t);t||(t={}),n=Ei(n||Si);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,c=function(){e.writable||u()},u=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",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?s&&!r&&(e.on("end",c),e.on("close",c)):(e.on("complete",u),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",u),!1!==t.error&&e.on("error",p),e.on("close",f),function(){a=!0,e.removeListener("complete",u),e.removeListener("abort",f),e.removeListener("request",v),e.req&&e.req.removeListener("finish",u),e.removeListener("end",c),e.removeListener("close",c),e.removeListener("finish",u),e.removeListener("exit",l),e.removeListener("end",d),e.removeListener("error",p),e.removeListener("close",f)}},Ai=_i,Pi=function(){},xi=/^v?\.0/.test(process.version),ki=function(e){return"function"==typeof e},qi=function(e,t,n,r){r=Ei(r);var o=!1;e.on("close",(function(){o=!0})),Ai(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!!xi&&!!A.default&&(e instanceof(A.default.ReadStream||Pi)||e instanceof(A.default.WriteStream||Pi))&&ki(e.close)}(e)?e.close(Pi):function(e){return e.setHeader&&ki(e.abort)}(e)?e.abort():ki(e.destroy)?e.destroy():void r(t||new Error("stream was destroyed"))}},Oi=function(e){e()},Di=function(e,t){return e.pipe(t)},Ti=function(){var e,t=Array.prototype.slice.call(arguments),n=ki(t[t.length-1]||Pi)&&t.pop()||Pi;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 qi(o,s,i>0,(function(t){e||(e=t),t&&r.forEach(Oi),s||(r.forEach(Oi),n(e))}))}));return t.reduce(Di)};const{Duplex:Ni}=y.default;function Li(e){e.emit("close")}function Bi(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Gi(e){this.removeListener("error",Gi),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}var Fi=function(e,t){let n=!0;const r=new Ni({...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(Li,r);let i=!1;e.once("error",(function(e){i=!0,o(e)})),e.once("close",(function(){i||o(t),process.nextTick(Li,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",Bi),r.on("error",Gi),r},Ji={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:()=>{}},Mi="function"==typeof __webpack_require__?__non_webpack_require__:Jr,zi=process.config&&process.config.variables||{},Wi=!!process.env.PREBUILDS_ONLY,$i=process.versions.modules,Vi=!(!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",Hi=process.env.npm_config_arch||U.default.arch(),Yi=process.env.npm_config_platform||U.default.platform(),Zi=process.env.LIBC||(function(e){return"linux"===e&&A.default.existsSync("/etc/alpine-release")}(Yi)?"musl":"glibc"),Ki=process.env.ARM_VERSION||("arm64"===Hi?"8":zi.arm_version)||"",Xi=(process.versions.uv||"").split(".")[0],Qi=es;function es(e){return Mi(es.resolve(e))}function ts(e){try{return A.default.readdirSync(e)}catch(e){return[]}}function ns(e,t){var n=ts(e).filter(t);return n[0]&&P.default.join(e,n[0])}function rs(e){return/\.node$/.test(e)}function os(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 is(e,t){return function(n){return null!=n&&(n.platform===e&&n.architectures.includes(t))}}function ss(e,t){return e.architectures.length-t.architectures.length}function as(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 cs(e,t){return function(n){return null!=n&&(!(n.runtime&&n.runtime!==e&&!function(e){return"node"===e.runtime&&e.napi}(n))&&(!(n.abi&&n.abi!==t&&!n.napi)&&((!n.uv||n.uv===Xi)&&((!n.armv||n.armv===Ki)&&(!n.libc||n.libc===Zi)))))}}function us(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}}es.resolve=es.path=function(e){e=P.default.resolve(e||".");try{var t=Mi(P.default.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[t+"_PREBUILD"]&&(e=process.env[t+"_PREBUILD"])}catch(e){}if(!Wi){var n=ns(P.default.join(e,"build/Release"),rs);if(n)return n;var r=ns(P.default.join(e,"build/Debug"),rs);if(r)return r}var o=a(e);if(o)return o;var i=a(P.default.dirname(process.execPath));if(i)return i;var s=["platform="+Yi,"arch="+Hi,"runtime="+Vi,"abi="+$i,"uv="+Xi,Ki?"armv="+Ki:"","libc="+Zi,"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=ts(P.default.join(e,"prebuilds")).map(os).filter(is(Yi,Hi)).sort(ss)[0];if(t){var n=P.default.join(e,"prebuilds",t.name),r=ts(n).map(as).filter(cs(Vi,$i)).sort(us(Vi))[0];return r?P.default.join(n,r.file):void 0}}},es.parseTags=as,es.matchTags=cs,es.compareTags=us,es.parseTuple=os,es.matchTuple=is,es.compareTuples=ss;var ds=Mr((function(e){const t="function"==typeof __webpack_require__?__non_webpack_require__:Jr;"function"==typeof t.addon?e.exports=t.addon.bind(t):e.exports=Qi}));var ls={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]}},ps=Mr((function(e){try{e.exports=ds(__dirname)}catch(t){e.exports=ls}})),fs=Mr((function(e){const{EMPTY_BUFFER:t}=Ji,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=ps;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){}}));fs.concat,fs.mask,fs.toArrayBuffer,fs.toBuffer,fs.unmask;const hs=Symbol("kDone"),vs=Symbol("kRun");var ms=class{constructor(e){this[hs]=()=>{this.pending--,this[vs]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[vs]()}[vs](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[hs])}}};const{kStatusCode:bs}=Ji,gs=Buffer[Symbol.species],ys=Buffer.from([0,0,255,255]),ws=Symbol("permessage-deflate"),Is=Symbol("total-length"),js=Symbol("callback"),Es=Symbol("buffers"),Rs=Symbol("error");let Cs;var Us=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,!Cs){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;Cs=new ms(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[js];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){Cs.add((r=>{this._decompress(e,t,((e,t)=>{r(),n(e,t)}))}))}compress(e,t,n){Cs.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]?C.default.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=C.default.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[ws]=this,this._inflate[Is]=0,this._inflate[Es]=[],this._inflate.on("error",As),this._inflate.on("data",_s)}this._inflate[js]=n,this._inflate.write(e),t&&this._inflate.write(ys),this._inflate.flush((()=>{const e=this._inflate[Rs];if(e)return this._inflate.close(),this._inflate=null,void n(e);const o=fs.concat(this._inflate[Es],this._inflate[Is]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Is]=0,this._inflate[Es]=[],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]?C.default.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=C.default.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[Is]=0,this._deflate[Es]=[],this._deflate.on("data",Ss)}this._deflate[js]=n,this._deflate.write(e),this._deflate.flush(C.default.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let e=fs.concat(this._deflate[Es],this._deflate[Is]);t&&(e=new gs(e.buffer,e.byteOffset,e.length-4)),this._deflate[js]=null,this._deflate[Is]=0,this._deflate[Es]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,e)}))}};function Ss(e){this[Es].push(e),this[Is]+=e.length}function _s(e){this[Is]+=e.length,this[ws]._maxPayload<1||this[Is]<=this[ws]._maxPayload?this[Es].push(e):(this[Rs]=new RangeError("Max payload size exceeded"),this[Rs].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Rs][bs]=1009,this.removeListener("data",_s),this.reset())}function As(e){this[ws]._inflate=null,e[bs]=1007,this[js](e)}var Ps=function(e){const t=e.length;let n=0;for(;n<t;)if(128&e[n])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}else n++;return!0},xs=Mr((function(e){try{e.exports=ds(__dirname)}catch(t){e.exports=Ps}})),ks=Mr((function(e){const{isUtf8:t}=x.default;function n(e){const t=e.length;let n=0;for(;n<t;)if(128&e[n])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}else n++;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=xs;e.exports.isValidUTF8=function(e){return e.length<32?n(e):t(e)}}catch(e){}}));ks.isValidStatusCode,ks.isValidUTF8,ks.tokenChars;const{Writable:qs}=y.default,{BINARY_TYPES:Os,EMPTY_BUFFER:Ds,kStatusCode:Ts,kWebSocket:Ns}=Ji,{concat:Ls,toArrayBuffer:Bs,unmask:Gs}=fs,{isValidStatusCode:Fs,isValidUTF8:Js}=ks,Ms=Buffer[Symbol.species];var zs=class extends qs{constructor(e={}){super(),this._allowSynchronousEvents=void 0===e.allowSynchronousEvents||e.allowSynchronousEvents,this._binaryType=e.binaryType||Os[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Ns]=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._errored=!1,this._loop=!1,this._state=0}_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 Ms(t.buffer,t.byteOffset+e,t.length-e),new Ms(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 Ms(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do{switch(this._state){case 0:this.getInfo(e);break;case 1:this.getPayloadLength16(e);break;case 2:this.getPayloadLength64(e);break;case 3:this.getMask();break;case 4:this.getData(e);break;case 5:case 6:return void(this._loop=!1)}}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2)return void(this._loop=!1);const t=this.consume(2);if(48&t[0]){return void e(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"))}const n=!(64&~t[0]);if(!n||this._extensions[Us.extensionName]){if(this._fin=!(128&~t[0]),this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(n){return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(!this._fragmented){return void e(this.createError(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 void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}this._compressed=n}else{if(!(this._opcode>7&&this._opcode<11)){return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}if(!this._fin){return void e(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"))}if(n){return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength){return void e(this.createError(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&~t[1]),this._isServer){if(!this._masked){return void e(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}}else if(this._masked){return void e(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"))}126===this._payloadLength?this._state=1:127===this._payloadLength?this._state=2:this.haveLength(e)}else{e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}}getPayloadLength16(e){this._bufferedBytes<2?this._loop=!1:(this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e))}getPayloadLength64(e){if(this._bufferedBytes<8)return void(this._loop=!1);const t=this.consume(8),n=t.readUInt32BE(0);if(n>Math.pow(2,21)-1){e(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"))}else this._payloadLength=n*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){e(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"))}else 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=Ds;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);t=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&Gs(t,this._mask)}if(this._opcode>7)this.controlMessage(t,e);else{if(this._compressed)return this._state=5,void this.decompress(t,e);t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}}decompress(e,t){this._extensions[Us.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){const e=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");return void t(e)}this._fragments.push(n)}this.dataMessage(t),0===this._state&&this.startLoop(t)}))}dataMessage(e){if(!this._fin)return void(this._state=0);const t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let r;r="nodebuffer"===this._binaryType?Ls(n,t):"arraybuffer"===this._binaryType?Bs(Ls(n,t)):n,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!0),this._state=0,this.startLoop(e)})))}else{const r=Ls(n,t);if(!this._skipUTF8Validation&&!Js(r)){const t=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void e(t)}5===this._state||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!1),this._state=0,this.startLoop(e)})))}}controlMessage(e,t){if(8!==this._opcode)this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",e),this._state=0):(this._state=6,setImmediate((()=>{this.emit(9===this._opcode?"ping":"pong",e),this._state=0,this.startLoop(t)})));else{if(0===e.length)this._loop=!1,this.emit("conclude",1005,Ds),this.end();else{const n=e.readUInt16BE(0);if(!Fs(n)){const e=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");return void t(e)}const r=new Ms(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Js(r)){const e=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void t(e)}this._loop=!1,this.emit("conclude",n,r),this.end()}this._state=0}}createError(e,t,n,r,o){this._loop=!1,this._errored=!0;const i=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(i,this.createError),i.code=o,i[Ts]=r,i}};const{randomFillSync:Ws}=k.default,{EMPTY_BUFFER:$s}=Ji,{isValidStatusCode:Vs}=ks,{mask:Hs,toBuffer:Ys}=fs,Zs=Symbol("kByteLength"),Ks=Buffer.alloc(4),Xs=8192;let Qs,ea=Xs;class ta{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||Ks,t.generateMask?t.generateMask(n):(ea===Xs&&(void 0===Qs&&(Qs=Buffer.alloc(Xs)),Ws(Qs,0,Xs),ea=0),n[0]=Qs[ea++],n[1]=Qs[ea++],n[2]=Qs[ea++],n[3]=Qs[ea++]),s=!(n[0]|n[1]|n[2]|n[3]),i=6),"string"==typeof e?r=t.mask&&!s||void 0===t[Zs]?(e=Buffer.from(e)).length:t[Zs]:(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 c=Buffer.allocUnsafe(o?r+i:i);return c[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(c[0]|=64),c[1]=a,126===a?c.writeUInt16BE(r,2):127===a&&(c[2]=c[3]=0,c.writeUIntBE(r,4,6)),t.mask?(c[1]|=128,c[i-4]=n[0],c[i-3]=n[1],c[i-2]=n[2],c[i-1]=n[3],s?[c,e]:o?(Hs(e,n,c,i,r),[c]):(Hs(e,n,e,0,r),[c,e])):[c,e]}close(e,t,n,r){let o;if(void 0===e)o=$s;else{if("number"!=typeof e||!Vs(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={[Zs]: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(ta.frame(o,i),r)}ping(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):(r=(e=Ys(e)).length,o=Ys.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[Zs]: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(ta.frame(e,i),n)}pong(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):(r=(e=Ys(e)).length,o=Ys.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[Zs]: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(ta.frame(e,i),n)}send(e,t,n){const r=this._extensions[Us.extensionName];let o,i,s=t.binary?2:1,a=t.compress;if("string"==typeof e?(o=Buffer.byteLength(e),i=!1):(o=(e=Ys(e)).length,i=Ys.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={[Zs]: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(ta.frame(e,{[Zs]: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(ta.frame(e,n),r);const o=this._extensions[Us.extensionName];this._bufferedBytes+=n[Zs],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[Zs],this._deflating=!1,n.readOnly=!1,this.sendFrame(ta.frame(t,n),r),this.dequeue()}))}dequeue(){for(;!this._deflating&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[3][Zs],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][Zs],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 na=ta;const{kForOnEventAttribute:ra,kListener:oa}=Ji,ia=Symbol("kCode"),sa=Symbol("kData"),aa=Symbol("kError"),ca=Symbol("kMessage"),ua=Symbol("kReason"),da=Symbol("kTarget"),la=Symbol("kType"),pa=Symbol("kWasClean");class fa{constructor(e){this[da]=null,this[la]=e}get target(){return this[da]}get type(){return this[la]}}Object.defineProperty(fa.prototype,"target",{enumerable:!0}),Object.defineProperty(fa.prototype,"type",{enumerable:!0});class ha extends fa{constructor(e,t={}){super(e),this[ia]=void 0===t.code?0:t.code,this[ua]=void 0===t.reason?"":t.reason,this[pa]=void 0!==t.wasClean&&t.wasClean}get code(){return this[ia]}get reason(){return this[ua]}get wasClean(){return this[pa]}}Object.defineProperty(ha.prototype,"code",{enumerable:!0}),Object.defineProperty(ha.prototype,"reason",{enumerable:!0}),Object.defineProperty(ha.prototype,"wasClean",{enumerable:!0});class va extends fa{constructor(e,t={}){super(e),this[aa]=void 0===t.error?null:t.error,this[ca]=void 0===t.message?"":t.message}get error(){return this[aa]}get message(){return this[ca]}}Object.defineProperty(va.prototype,"error",{enumerable:!0}),Object.defineProperty(va.prototype,"message",{enumerable:!0});class ma extends fa{constructor(e,t={}){super(e),this[sa]=void 0===t.data?null:t.data}get data(){return this[sa]}}Object.defineProperty(ma.prototype,"data",{enumerable:!0});const ba={addEventListener(e,t,n={}){for(const r of this.listeners(e))if(!n[ra]&&r[oa]===t&&!r[ra])return;let r;if("message"===e)r=function(e,n){const r=new ma("message",{data:n?e:e.toString()});r[da]=this,ya(t,this,r)};else if("close"===e)r=function(e,n){const r=new ha("close",{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[da]=this,ya(t,this,r)};else if("error"===e)r=function(e){const n=new va("error",{error:e,message:e.message});n[da]=this,ya(t,this,n)};else{if("open"!==e)return;r=function(){const e=new fa("open");e[da]=this,ya(t,this,e)}}r[ra]=!!n[ra],r[oa]=t,n.once?this.once(e,r):this.on(e,r)},removeEventListener(e,t){for(const n of this.listeners(e))if(n[oa]===t&&!n[ra]){this.removeListener(e,n);break}}};var ga={CloseEvent:ha,ErrorEvent:va,Event:fa,EventTarget:ba,MessageEvent:ma};function ya(e,t,n){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}const{tokenChars:wa}=ks;function Ia(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var ja={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,c=-1,u=-1,d=-1,l=0;for(;l<e.length;l++)if(u=e.charCodeAt(l),void 0===n)if(-1===d&&1===wa[u])-1===c&&(c=l);else if(0===l||32!==u&&9!==u){if(59!==u&&44!==u)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);const r=e.slice(c,d);44===u?(Ia(t,r,o),o=Object.create(null)):n=r,c=d=-1}}else-1===d&&-1!==c&&(d=l);else if(void 0===r)if(-1===d&&1===wa[u])-1===c&&(c=l);else if(32===u||9===u)-1===d&&-1!==c&&(d=l);else if(59===u||44===u){if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l),Ia(o,e.slice(c,d),!0),44===u&&(Ia(t,n,o),o=Object.create(null),n=void 0),c=d=-1}else{if(61!==u||-1===c||-1!==d)throw new SyntaxError(`Unexpected character at index ${l}`);r=e.slice(c,l),c=d=-1}else if(s){if(1!==wa[u])throw new SyntaxError(`Unexpected character at index ${l}`);-1===c?c=l:i||(i=!0),s=!1}else if(a)if(1===wa[u])-1===c&&(c=l);else if(34===u&&-1!==c)a=!1,d=l;else{if(92!==u)throw new SyntaxError(`Unexpected character at index ${l}`);s=!0}else if(34===u&&61===e.charCodeAt(l-1))a=!0;else if(-1===d&&1===wa[u])-1===c&&(c=l);else if(-1===c||32!==u&&9!==u){if(59!==u&&44!==u)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);let s=e.slice(c,d);i&&(s=s.replace(/\\/g,""),i=!1),Ia(o,r,s),44===u&&(Ia(t,n,o),o=Object.create(null),n=void 0),r=void 0,c=d=-1}}else-1===d&&(d=l);if(-1===c||a||32===u||9===u)throw new SyntaxError("Unexpected end of input");-1===d&&(d=l);const p=e.slice(c,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:Ea,createHash:Ra}=k.default,{URL:Ca}=j.default,{BINARY_TYPES:Ua,EMPTY_BUFFER:Sa,GUID:_a,kForOnEventAttribute:Aa,kListener:Pa,kStatusCode:xa,kWebSocket:ka,NOOP:qa}=Ji,{EventTarget:{addEventListener:Oa,removeEventListener:Da}}=ga,{format:Ta,parse:Na}=ja,{toBuffer:La}=fs,Ba=Symbol("kAborted"),Ga=[8,13],Fa=["CONNECTING","OPEN","CLOSING","CLOSED"],Ja=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class Ma extends g.default{constructor(e,t,n){super(),this._binaryType=Ua[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Sa,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Ma.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]),Wa(this,e,t,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){Ua.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 zs({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new na(e,this._extensions,n.generateMask),this._receiver=r,this._socket=e,r[ka]=this,e[ka]=this,r.on("conclude",Ka),r.on("drain",Xa),r.on("error",Qa),r.on("message",tc),r.on("ping",nc),r.on("pong",rc),e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",ic),e.on("data",sc),e.on("end",ac),e.on("error",cc),this._readyState=Ma.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=Ma.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[Us.extensionName]&&this._extensions[Us.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Ma.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==Ma.CLOSED)if(this.readyState!==Ma.CONNECTING)this.readyState!==Ma.CLOSING?(this._readyState=Ma.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";Ya(this,this._req,e)}}pause(){this.readyState!==Ma.CONNECTING&&this.readyState!==Ma.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===Ma.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===Ma.OPEN?(void 0===t&&(t=!this._isServer),this._sender.ping(e||Sa,t,n)):Za(this,e,n)}pong(e,t,n){if(this.readyState===Ma.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===Ma.OPEN?(void 0===t&&(t=!this._isServer),this._sender.pong(e||Sa,t,n)):Za(this,e,n)}resume(){this.readyState!==Ma.CONNECTING&&this.readyState!==Ma.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===Ma.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!==Ma.OPEN)return void Za(this,e,n);const r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[Us.extensionName]||(r.compress=!1),this._sender.send(e||Sa,r,n)}terminate(){if(this.readyState!==Ma.CLOSED)if(this.readyState!==Ma.CONNECTING)this._socket&&(this._readyState=Ma.CLOSING,this._socket.destroy());else{const e="WebSocket was closed before the connection was established";Ya(this,this._req,e)}}}Object.defineProperty(Ma,"CONNECTING",{enumerable:!0,value:Fa.indexOf("CONNECTING")}),Object.defineProperty(Ma.prototype,"CONNECTING",{enumerable:!0,value:Fa.indexOf("CONNECTING")}),Object.defineProperty(Ma,"OPEN",{enumerable:!0,value:Fa.indexOf("OPEN")}),Object.defineProperty(Ma.prototype,"OPEN",{enumerable:!0,value:Fa.indexOf("OPEN")}),Object.defineProperty(Ma,"CLOSING",{enumerable:!0,value:Fa.indexOf("CLOSING")}),Object.defineProperty(Ma.prototype,"CLOSING",{enumerable:!0,value:Fa.indexOf("CLOSING")}),Object.defineProperty(Ma,"CLOSED",{enumerable:!0,value:Fa.indexOf("CLOSED")}),Object.defineProperty(Ma.prototype,"CLOSED",{enumerable:!0,value:Fa.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((e=>{Object.defineProperty(Ma.prototype,e,{enumerable:!0})})),["open","error","close","message"].forEach((e=>{Object.defineProperty(Ma.prototype,`on${e}`,{enumerable:!0,get(){for(const t of this.listeners(e))if(t[Aa])return t[Pa];return null},set(t){for(const t of this.listeners(e))if(t[Aa]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[Aa]:!0})}})})),Ma.prototype.addEventListener=Oa,Ma.prototype.removeEventListener=Da;var za=Ma;function Wa(e,t,n,r){const o={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Ga[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=o.autoPong,!Ga.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${Ga.join(", ")})`);let i;if(t instanceof Ca)i=t;else try{i=new Ca(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}"http:"===i.protocol?i.protocol="ws:":"https:"===i.protocol&&(i.protocol="wss:"),e._url=i.href;const s="wss:"===i.protocol,a="ws+unix:"===i.protocol;let c;if("ws:"===i.protocol||s||a?a&&!i.pathname?c="The URL's pathname is empty":i.hash&&(c="The URL contains a fragment identifier"):c='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"',c){const t=new SyntaxError(c);if(0===e._redirects)throw t;return void $a(e,t)}const u=s?443:80,d=Ea(16).toString("base64"),l=s?R.default.request:I.default.request,p=new Set;let f,h;if(o.createConnection=o.createConnection||(s?Ha:Va),o.defaultPort=o.defaultPort||u,o.port=i.port||u,o.host=i.hostname.startsWith("[")?i.hostname.slice(1,-1):i.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":d,Connection:"Upgrade",Upgrade:"websocket"},o.path=i.pathname+i.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(f=new Us(!0!==o.perMessageDeflate?o.perMessageDeflate:{},!1,o.maxPayload),o.headers["Sec-WebSocket-Extensions"]=Ta({[Us.extensionName]:f.offer()})),n.length){for(const e of n){if("string"!=typeof e||!Ja.test(e)||p.has(e))throw new SyntaxError("An invalid or duplicated subprotocol was specified");p.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),(i.username||i.password)&&(o.auth=`${i.username}:${i.password}`),a){const e=o.path.split(":");o.socketPath=e[0],o.path=e[1]}if(o.followRedirects){if(0===e._redirects){e._originalIpc=a,e._originalSecure=s,e._originalHostOrSocketPath=a?o.socketPath:i.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=a?!!e._originalIpc&&o.socketPath===e._originalHostOrSocketPath:!e._originalIpc&&i.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!s)&&(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")),h=e._req=l(o),e._redirects&&e.emit("redirect",e.url,h)}else h=e._req=l(o);o.timeout&&h.on("timeout",(()=>{Ya(e,h,"Opening handshake has timed out")})),h.on("error",(t=>{null===h||h[Ba]||(h=e._req=null,$a(e,t))})),h.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 Ya(e,h,"Maximum redirects exceeded");let i;h.abort();try{i=new Ca(s,t)}catch(t){const n=new SyntaxError(`Invalid URL: ${s}`);return void $a(e,n)}Wa(e,i,n,r)}else e.emit("unexpected-response",h,i)||Ya(e,h,`Unexpected server response: ${i.statusCode}`)})),h.on("upgrade",((t,n,r)=>{if(e.emit("upgrade",t),e.readyState!==Ma.CONNECTING)return;h=e._req=null;const i=t.headers.upgrade;if(void 0===i||"websocket"!==i.toLowerCase())return void Ya(e,n,"Invalid Upgrade header");const s=Ra("sha1").update(d+_a).digest("base64");if(t.headers["sec-websocket-accept"]!==s)return void Ya(e,n,"Invalid Sec-WebSocket-Accept header");const a=t.headers["sec-websocket-protocol"];let c;if(void 0!==a?p.size?p.has(a)||(c="Server sent an invalid subprotocol"):c="Server sent a subprotocol but none was requested":p.size&&(c="Server sent no subprotocol"),c)return void Ya(e,n,c);a&&(e._protocol=a);const u=t.headers["sec-websocket-extensions"];if(void 0!==u){if(!f){return void Ya(e,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let t;try{t=Na(u)}catch(t){return void Ya(e,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(t);if(1!==r.length||r[0]!==Us.extensionName){return void Ya(e,n,"Server indicated an extension that was not requested")}try{f.accept(t[Us.extensionName])}catch(t){return void Ya(e,n,"Invalid Sec-WebSocket-Extensions header")}e._extensions[Us.extensionName]=f}e.setSocket(n,r,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})})),o.finishRequest?o.finishRequest(h,e):h.end()}function $a(e,t){e._readyState=Ma.CLOSING,e.emit("error",t),e.emitClose()}function Va(e){return e.path=e.socketPath,S.default.connect(e)}function Ha(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=S.default.isIP(e.host)?"":e.host),q.default.connect(e)}function Ya(e,t,n){e._readyState=Ma.CLOSING;const r=new Error(n);Error.captureStackTrace(r,Ya),t.setHeader?(t[Ba]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick($a,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function Za(e,t,n){if(t){const n=La(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){const t=new Error(`WebSocket is not open: readyState ${e.readyState} (${Fa[e.readyState]})`);process.nextTick(n,t)}}function Ka(e,t){const n=this[ka];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,void 0!==n._socket[ka]&&(n._socket.removeListener("data",sc),process.nextTick(oc,n._socket),1005===e?n.close():n.close(e,t))}function Xa(){const e=this[ka];e.isPaused||e._socket.resume()}function Qa(e){const t=this[ka];void 0!==t._socket[ka]&&(t._socket.removeListener("data",sc),process.nextTick(oc,t._socket),t.close(e[xa])),t.emit("error",e)}function ec(){this[ka].emitClose()}function tc(e,t){this[ka].emit("message",e,t)}function nc(e){const t=this[ka];t._autoPong&&t.pong(e,!this._isServer,qa),t.emit("ping",e)}function rc(e){this[ka].emit("pong",e)}function oc(e){e.resume()}function ic(){const e=this[ka];let t;this.removeListener("close",ic),this.removeListener("data",sc),this.removeListener("end",ac),e._readyState=Ma.CLOSING,this._readableState.endEmitted||e._closeFrameReceived||e._receiver._writableState.errorEmitted||null===(t=e._socket.read())||e._receiver.write(t),e._receiver.end(),this[ka]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",ec),e._receiver.on("finish",ec))}function sc(e){this[ka]._receiver.write(e)||this.pause()}function ac(){const e=this[ka];e._readyState=Ma.CLOSING,e._receiver.end(),this.end()}function cc(){const e=this[ka];this.removeListener("error",cc),this.on("error",qa),e&&(e._readyState=Ma.CLOSING,this.destroy())}var uc=function(e){function n(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=_.createServer(s.handleConnection.bind(s));var a=null==r?void 0:r.altHostnames.map((function(e){return(t=Wt(t=e))&&qr.test(t)?t.replace(kr,"\\$&"):t;var t})).join("|");return s.hostRegex=new RegExp("Host: (?:".concat(a,")(:.*$|$)"),"im"),s}return T(n,e),Object.defineProperty(n.prototype,"bindTo",{get:function(){var e;return null!==(e=this.boundTo)&&void 0!==e?e:this.bindToAssign},enumerable:!1,configurable:!0}),n.prototype.open=function(){return L(this,void 0,void 0,(function(){var e=this;return B(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)}))}))]}))}))},n.prototype.close=function(){return L(this,void 0,void 0,(function(){var e,t=this;return B(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]}}))}))},n.prototype.handleConnection=function(e){var t=this;this.openConnections.add(e);var n=new za(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Fi(n),o=this.getHeaderTransform();this.rewriteHostHeader&&o?Ti(e,o,r):Ti(e,r),Ti(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")},n.prototype.getHeaderTransform=function(){if(this.rewriteHostHeader){var e=this.rewriteHostHeader.targetHostname,n=this.hostRegex;return new t.Transform({transform:function(t,r,o){var i=t.toString();if(i.split("\n",1)[0].includes("HTTP")){var s=i.replace(n,"Host: ".concat(e));o(null,Buffer.from(s))}else o(null,t)}})}},n}(e.EventEmitter),dc=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=O.default.createSocket("udp4"),o.handleConnection(),o}return T(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 L(this,void 0,void 0,(function(){var e=this;return B(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 L(this,void 0,void 0,(function(){var e=this;return B(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 za(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Fi(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}(e.EventEmitter);var lc,pc="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,fc=function(e,t){return L(void 0,void 0,void 0,(function(){var n;return B(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)]}))}))},hc=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(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}(y.default.Writable),vc=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 Ii,o.ipAllocationMutex=new Ii,o.stopForwarding=function(e){return L(o,void 0,void 0,(function(){var t,n,r,o,i,s,a;return B(this,(function(c){switch(c.label){case 0:return[4,e.tunnel.close()];case 1:return c.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:c.sent(),c.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 u.execSync("fsutil dirty query %systemdrive%"),!0}catch(e){if("ENOENT"===e.code)try{return u.execSync("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(!pc)throw new Error("Port forwarding only possible when started with nodejs")},o.proxyApiClient=new ei(t),o}return T(t,e),t.prototype.withProjectForwarding=function(e,t,n){return void 0===n&&(n=!0),L(this,void 0,void 0,(function(){var r;return B(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),L(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return B(this,(function(c){switch(c.label){case 0:return this.assertStartedWithNodejs(),n=e.projectId,[4,this.listServices({parameters:{projectId:n}})];case 1:return r=c.sent(),[4,this.listAddons({parameters:{projectId:n}})];case 2:return o=c.sent(),[4,Promise.all(r.data.services.map((function(e){return L(a,void 0,void 0,(function(){return B(this,(function(r){return[2,this.forwardService({projectId:n,serviceId:e.id},t)]}))}))})))];case 3:return i=c.sent(),[4,Promise.all(o.data.addons.map((function(e){return L(a,void 0,void 0,(function(){return B(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=c.sent(),[2,{services:i,addons:s}]}}))}))},t.prototype.withServiceForwarding=function(e,t,n){return void 0===n&&(n=!0),L(this,void 0,void 0,(function(){var r;return B(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),L(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,u=this;return B(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,c=o.ports,0===a.length?[2,[]]:[4,fc(c,(function(e){var o,c="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=G([d],l,!0);return u.forwardPort(c,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),L(this,void 0,void 0,(function(){var r;return B(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),L(this,void 0,void 0,(function(){var n,r,o,i,s=this;return B(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,fc((c=i,null!=c&&c.length?Qt(c,Tr):[]),(function(e){var i=e.podName,a=e.internalHostname,c=e.port;return L(s,void 0,void 0,(function(){var e;return B(this,(function(s){return e="https://".concat(o.targetDomain,"/tunnel/projects/").concat(r,"/addons/").concat(n,"/instance/").concat(i,"/port/").concat(c.internalPort),[2,this.forwardPort(e,c,[a],"addon",n,r,t)]}))}))}))];case 2:return[2,a.sent()]}var c}))}))},t.prototype.allocateIpAddress=function(e){return L(this,void 0,void 0,(function(){var t=this;return B(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return L(t,void 0,void 0,(function(){var t,n,r,o,i;return B(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,ti(e,r,n)];case 1:return o=s.sent(),this.nextIpAddress=ii(oi(o)+1),oi(this.nextIpAddress)>oi(n)&&(this.nextIpAddress=t),[2,o]}}))}))}))]}))}))},t.prototype.forwardPort=function(e,t,n,r,o,i,s,a){var c;return void 0===s&&(s=!0),L(this,void 0,void 0,(function(){var u,d,l,p,f,h,v=this;return B(this,(function(m){switch(m.label){case 0:if(u={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,t,s)];case 1:return l=m.sent(),p="UDP"===t.protocol?new dc(e,u,l):new uc(e,u,a,l),s?[3,3]:[4,this.registerHostnames(null===(c=p.bindTo)||void 0===c?void 0:c.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 L(v,void 0,void 0,(function(){return B(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,i){return L(this,void 0,void 0,(function(){var s,a,c;return B(this,(function(u){switch(u.label){case 0:return i&&"darwin"===U.default.platform()?[2,void 0]:(s=this.connections.filter((function(n){return n.forwardingContext.projectId===e&&n.forwardingContext.id===t&&n.forwardingContext.type===r})),(a=null==s?void 0:s.find((function(e){return n.find((function(t){return e.forwardingContext.hostnames.includes(t)}))})))?[2,{address:null==a?void 0:a.forwardingContext.address,port:o.internalPort}]:(c={},[4,this.allocateIpAddress(o.internalPort)]));case 1:return[2,(c.address=u.sent(),c.port=o.internalPort,c)]}}))}))},t.prototype.registerHostnames=function(e,t){return L(this,void 0,void 0,(function(){return B(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.removeHosts.apply(n,t),n.add.apply(n,G([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.unregisterHostnames=function(e,t){return L(this,void 0,void 0,(function(){return B(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.remove.apply(n,G([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.modifyHostsFile=function(e){return L(this,void 0,void 0,(function(){var t=this;return B(this,(function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter((function(){return L(t,void 0,void 0,(function(){var t,n=this;return B(this,(function(r){switch(r.label){case 0:return[4,wi.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,mc(5)((function(){return L(n,void 0,void 0,(function(){return B(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,mc(5)((function(){return L(n,void 0,void 0,(function(){return B(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 L(this,void 0,void 0,(function(){var t=this;return B(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 L(this,void 0,void 0,(function(){var t=this;return B(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 L(this,void 0,void 0,(function(){var t=this;return B(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 L(this,void 0,void 0,(function(){var e=this;return B(this,(function(t){switch(t.label){case 0:return[4,Promise.all(this.connections.map((function(t){return L(e,void 0,void 0,(function(){return B(this,(function(e){return[2,this.stopForwarding(t)]}))}))})))];case 1:return t.sent(),[2]}}))}))},t}(e.EventEmitter),mc=function(e,t){return void 0===t&&(t=50),function(n){var r=e,o=function(){return L(void 0,void 0,void 0,(function(){var e;return B(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()}},bc=function(e){function t(t,n,r,o,i,s){void 0===o&&(o=new w.PassThrough),void 0===i&&(i=new w.PassThrough),void 0===s&&(s=new w.PassThrough);var a=e.call(this)||this;return a.baseUrl=t,a.execConfig=n,a.token=r,a.stdOut=o,a.stdErr=i,a.stdIn=s,a.waitForCommandResult=function(){return L(a,void 0,void 0,(function(){return B(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()]}}))}))},a.sendInputToCurrentCommand=function(e){return L(a,void 0,void 0,(function(){var t;return B(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]}))}))},a.resizeTerminal=function(e){return L(a,void 0,void 0,(function(){var t;return B(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]}))}))},a.constructPayloadPacket=function(e){return JSON.stringify({type:"payload",data:e.toString()})},a}return T(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 L(this,void 0,void 0,(function(){var e=this;return B(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 za(a);try{e.duplex=Fi(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&&c("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":c(null===(o=i.data)||void 0===o?void 0:o.message);break;default:var u="unable to parse message: ".concat(JSON.stringify(i));c(u)}})),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 c=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,c=t.ttyRows,u={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{containerId:r,command:n,shell:o,user:i,group:s,ttyColumns:a,ttyRows:c}}};null===(e=this.duplex)||void 0===e||e.write(JSON.stringify(u))},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}(e.EventEmitter),gc=function(){function e(e){this.contextProvider=e,this.assertStartedWithNodejs=function(){if(!pc)throw new Error("Command exec only possible when started with nodejs")}}return e.prototype.execServiceCommand=function(e,t){return L(this,void 0,void 0,(function(){var n,r,o;return B(this,(function(i){return n=e.serviceId,r=e.projectId,o=N({projectId:r,entityId:n,entityType:"service"},t),[2,this.execCommand(o)]}))}))},e.prototype.execServiceSession=function(e,t){return L(this,void 0,void 0,(function(){var n,r,o;return B(this,(function(i){return n=e.serviceId,r=e.projectId,o=N({projectId:r,entityId:n,entityType:"service"},t),[2,this.shellSession(o)]}))}))},e.prototype.execJobCommand=function(e,t){return L(this,void 0,void 0,(function(){var n,r,o;return B(this,(function(i){return n=e.jobId,r=e.projectId,o=N({projectId:r,entityId:n,entityType:"job"},t),[2,this.execCommand(o)]}))}))},e.prototype.execJobSession=function(e,t){return L(this,void 0,void 0,(function(){var n,r,o;return B(this,(function(i){return n=e.jobId,r=e.projectId,o=N({projectId:r,entityId:n,entityType:"job"},t),[2,this.shellSession(o)]}))}))},e.prototype.execCommand=function(e){return L(this,void 0,void 0,(function(){var t,n,r;return B(this,(function(o){switch(o.label){case 0:return this.assertStartedWithNodejs(),t=this.getCommandRunner(N({shell:"none"},e)),n=new hc,r=new hc,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 bc(t,e,n)},e}(),yc=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(t,e),t}(Error),wc=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 L(o,void 0,void 0,(function(){var e;return B(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(t,e),t.getLogsEndpoint=function(e){var t=e.containerName,n=e.types,r=e.entityId,o=e.entityType,i=e.buildId,s=e.runId,a=e.backupId,c=e.restoreId,u=e.deploymentId,d=e.isBuild,l=e.lineLimit,p=e.projectId,f=e.queryType,h=e.startTime,v=e.endTime,m=e.duration,b=e.direction,g=e.textIncludes,y=e.textNotIncludes,w=e.regexIncludes,I=e.regexNotIncludes,j="/v1/projects/".concat(p,"/"),E=new URLSearchParams;return E.append("queryType",f),void 0!==h&&E.append("startTime",h.toISOString()),void 0!==v&&E.append("endTime",v.toISOString()),void 0!==l&&E.append("lineLimit",l.toString()),void 0!==t&&E.append("containerName",t),void 0!==u&&E.append("deploymentId",u),void 0!==s&&E.append("runId",s),void 0!==i&&E.append("buildId",i),void 0!==g&&E.append("textIncludes",g),void 0!==y&&E.append("textNotIncludes",y),void 0!==w&&E.append("regexIncludes",w),void 0!==I&&E.append("regexNotIncludes",I),void 0!==b&&E.append("direction",b),void 0!==m&&E.append("duration",m.toString()),void 0!==n&&n.forEach((function(e){return E.append("type",e)})),"".concat(j).concat(function(){var e=d?"/build-logs":"/logs";switch(o){case"service":return"services/".concat(r).concat(e);case"job":return"jobs/".concat(r).concat(e);case"addon":return"addons/".concat(r).concat(e);case"addonBackup":return"addons/".concat(r,"/backups/").concat(a).concat(e);case"addonRestore":return"addons/".concat(r,"/backups/").concat(a,"/restores/").concat(c).concat(e);default:throw new Error("Unexpected Northflank entity type received in logs endpoint generation: ".concat(o))}}(),"?").concat(E.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 L(this,void 0,void 0,(function(){var e=this;return B(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 za(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&&c("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(kc));break;case"error":c(null===(r=o.data)||void 0===r?void 0:r.message);break;default:var a="unable to parse message: ".concat(JSON.stringify(o));c(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 c=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}(e.EventEmitter),Ic=pc?Xo:window.fetch,jc=function(){if(pc)try{return JSON.parse(A.default.readFileSync(P.default.join(P.default.dirname(r.fileURLToPath("undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("api-client.js",document.baseURI).href)),"../../package.json")).toString())}catch(e){return console.log("Failed to check version of northflank CLI (".concat(e.message,")")),{}}return{}},Ec=function(){function e(e,t){var n=this;this.opts=t,this.call=function(e){return L(n,void 0,void 0,(function(){var t,n,r,o,i,s,a,c,u,d,l,p,f=this;return B(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=N(N({url:o},n),{body:i}),[4,Ac(o,N(N({},n),{body:i}))];case 1:return[4,(a=h.sent()).text()];case 2:return c=h.sent(),u=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 yc(n);return n}},d=function(){try{return JSON.parse(c)}catch(e){throw Error("Failed reading api request result: \n\tStatus: ".concat(a.statusText," (").concat(a.status,")\n\tMessage: ").concat(c))}}(),l=u(),[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=jc())||void 0===t?void 0:t.version).concat(r)}},e}(),Rc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="get",t.body=function(){},t}return T(t,e),t}(Ec),Cc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="post",t}return T(t,e),t}(Ec),Uc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="delete",t.body=function(){},t}return T(t,e),t}(Ec),Sc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="put",t}return T(t,e),t}(Ec),_c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="patch",t}return T(t,e),t}(Ec),Ac=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 Ic(e,t).then((function(e){o(e)})).catch((function(e){return L(void 0,void 0,void 0,(function(){return B(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)}))},Pc=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 wc.getLogsEndpoint(e)},t.body=function(){},t}return T(t,e),t}(Rc);exports.LogType=void 0,(lc=exports.LogType||(exports.LogType={})).CDN="cdn",lc.Mesh="mesh",lc.Ingress="ingress",lc.Runtime="runtime";var xc,kc=function(e){return{containerId:e.containerId,log:e.log,ts:new Date(e.ts)}},qc=function(e){var t=this;this.contextProvider=e,this.getServiceLogs=function(e){return L(t,void 0,void 0,(function(){var t,n,r;return B(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 L(t,void 0,void 0,(function(){var t,n,r,o,i;return B(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,N(N({},n),{isBuild:!0}),"service")]}))}))},this.getJobLogs=function(e){return L(t,void 0,void 0,(function(){var t,n,r;return B(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 L(t,void 0,void 0,(function(){var t,n,r,o,i;return B(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,N(N({},n),{isBuild:!0}),"job")]}))}))},this.getAddonLogs=function(e){return L(t,void 0,void 0,(function(){var t,n,r;return B(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 L(t,void 0,void 0,(function(){var t,n,r;return B(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logRange(r,N(N({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.getAddonRestoresLogs=function(e){return L(t,void 0,void 0,(function(){var t,n,r,o;return B(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,N(N({},n),o),"addonRestore")]}))}))},this.logRange=function(e,n,r){return L(t,void 0,void 0,(function(){var t,o,i,s,a;return B(this,(function(c){switch(c.label){case 0:return t=e.entityId,o=e.projectId,i=N(N({projectId:o,entityId:t,entityType:r},n),{queryType:"range"}),[4,new Pc(this.contextProvider,{}).call(i)];case 1:return(s=c.sent()).error?[2,s]:[2,N(N({},s),{data:null===(a=null==s?void 0:s.data)||void 0===a?void 0:a.map(kc)})]}}))}))},this.tailServiceLogs=function(e){return L(t,void 0,void 0,(function(){var t,n,r;return B(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 L(t,void 0,void 0,(function(){var t,n,r,o,i;return B(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,N(N({},n),{isBuild:!0}),"service")]}))}))},this.tailJobLogs=function(e){return L(t,void 0,void 0,(function(){var t,n,r;return B(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 L(t,void 0,void 0,(function(){var t,n,r,o,i;return B(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,N(N({},n),{isBuild:!0}),"job")]}))}))},this.tailAddonLogs=function(e){return L(t,void 0,void 0,(function(){var t,n,r;return B(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 L(t,void 0,void 0,(function(){var t,n,r;return B(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logTail(r,N(N({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.tailAddonRestoresLogs=function(e){return L(t,void 0,void 0,(function(){var t,n,r,o;return B(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,N(N({},n),o),"addonRestore")]}))}))},this.logTail=function(e,n,r){return L(t,void 0,void 0,(function(){var t,o,i,s,a;return B(this,(function(c){if(t=e.entityId,o=e.projectId,i=N({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 wc(s,i,a)]}))}))},this.assertStartedWithNodejs=function(){if(!pc)throw new Error("Command exec only possible when started with nodejs")}},Oc=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.deploymentId,i=e.runId,s=e.buildId,a=e.isBuild,c=e.queryType,u=e.metricTypes,d=e.startTime,l=e.endTime,p=e.duration,f=e.containerName,h=e.timestamp,v="/v1/projects/".concat(t,"/");var m=new URLSearchParams;return m.append("queryType",c),void 0!==d&&m.append("startTime",d.toISOString()),void 0!==l&&m.append("endTime",l.toISOString()),void 0!==f&&m.append("containerName",f),void 0!==o&&m.append("deploymentId",o),void 0!==i&&m.append("runId",i),void 0!==s&&m.append("buildId",s),void 0!==h&&m.append("timestamp",h.toISOString()),void 0!==p&&m.append("duration",p.toString()),void 0!==u&&u.forEach((function(e){return m.append("metricTypes",e)})),"".concat(v).concat(function(){var e=a?"/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(m.toString())},t.body=function(){},t}return T(t,e),t}(Rc),Dc=function(e){return{metadata:e.metadata,data:e.data.map((function(e){return{value:e.value,ts:new Date(e.ts)}}))}};exports.MetricType=void 0,(xc=exports.MetricType||(exports.MetricType={})).Cpu="cpu",xc.Memory="memory",xc.NetworkIngress="networkIngress",xc.NetworkEgress="networkEgress",xc.TcpConnectionOpen="tcpConnectionsOpen",xc.PvcUsage="diskUsage",xc.Requests="requests",xc.Http4xxResponses="http4xxResponses",xc.Http5xxResponses="http5xxResponses",xc.Bandwidth="bandwidth",xc.BandwidthVolume="bandwidthVolume";var Tc=function(e){var t=this;this.contextProvider=e,this.getServiceMetrics=function(e){return L(t,void 0,void 0,(function(){var t,n,r;return B(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 L(t,void 0,void 0,(function(){var t,n,r,o,i;return B(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,N(N({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetrics=function(e){return L(t,void 0,void 0,(function(){var t,n,r;return B(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 L(t,void 0,void 0,(function(){var t,n,r,o,i;return B(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,N(N({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetrics=function(e){return L(t,void 0,void 0,(function(){var t,n,r;return B(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 L(t,void 0,void 0,(function(){var t,o,i;return B(this,(function(s){return t=e.entityId,o=e.projectId,i=N(N({projectId:o,entityId:t,entityType:r},n),{queryType:"single"}),[2,this.getMetrics(i)]}))}))},this.getServiceMetricsRange=function(e){return L(t,void 0,void 0,(function(){var t,n,r;return B(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 L(t,void 0,void 0,(function(){var t,n,r,o,i;return B(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,N(N({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetricsRange=function(e){return L(t,void 0,void 0,(function(){var t,n,r;return B(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 L(t,void 0,void 0,(function(){var t,n,r,o,i;return B(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,N(N({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetricsRange=function(e){return L(t,void 0,void 0,(function(){var t,n,r;return B(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 L(t,void 0,void 0,(function(){var t,o,i;return B(this,(function(s){return t=e.entityId,o=e.projectId,i=N(N({projectId:o,entityId:t,entityType:r},n),{queryType:"range"}),[2,this.getMetrics(i)]}))}))},this.getMetrics=function(e){return L(t,void 0,void 0,(function(){var t;return B(this,(function(n){switch(n.label){case 0:return[4,new Oc(this.contextProvider,{}).call(e)];case 1:return(t=n.sent()).error?[2,t]:[2,N(N({},t),{data:Object.fromEntries(Object.entries(t.data).map((function(e){var t=e[0],n=e[1];return[t,N(N({},n),{values:n.values.map(Dc)})]})))})]}}))}))}},Nc=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(t,e),t}(Rc),Lc=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(t,e),t}(Rc),Bc=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(t,e),t}(Rc),Gc=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(t,e),t}(Rc),Fc=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(t,e),t}(Rc),Jc=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(t,e),t}(Cc),Mc=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(encodeURIComponent(e.parameters.clusterId))},t.body=function(){},t}return T(t,e),t}(Rc),zc=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(encodeURIComponent(e.parameters.clusterId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Wc=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(encodeURIComponent(e.parameters.clusterId))},t.body=function(){},t}return T(t,e),t}(Uc),$c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of nodes for the given cluster",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Read",t.endpointUrl=function(e){var t;["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,"'"))}));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/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId),"/nodes").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),Vc=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(t,e),t}(Rc),Hc=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(t,e),t}(Cc),Yc=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(encodeURIComponent(e.parameters.registryId))},t.body=function(){},t}return T(t,e),t}(Rc),Zc=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(encodeURIComponent(e.parameters.registryId))},t.body=function(){},t}return T(t,e),t}(Uc),Kc=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(t,e),t}(Rc),Xc=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(t,e),t}(Cc),Qc=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(encodeURIComponent(e.parameters.integrationId))},t.body=function(){},t}return T(t,e),t}(Rc),eu=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(encodeURIComponent(e.parameters.integrationId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),tu=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(encodeURIComponent(e.parameters.integrationId))},t.body=function(){},t}return T(t,e),t}(Uc),nu=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(t,e),t}(Rc),ru=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(t,e),t}(Rc),ou=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(t,e),t}(Rc),iu=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(t,e),t}(Rc),su=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(t,e),t}(Cc),au=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(encodeURIComponent(e.parameters.domain))},t.body=function(){},t}return T(t,e),t}(Rc),cu=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(encodeURIComponent(e.parameters.domain))},t.body=function(){},t}return T(t,e),t}(Uc),uu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Import a certificate for 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(encodeURIComponent(e.parameters.domain),"/import")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),du=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),lu=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain))},t.body=function(){},t}return T(t,e),t}(Rc),pu=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain))},t.body=function(){},t}return T(t,e),t}(Uc),fu=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/assign")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),hu=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/assign")},t.body=function(){},t}return T(t,e),t}(Uc),vu=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/cdn/disable")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),mu=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/cdn/enable")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),bu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new path to the subdomain.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Create",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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),gu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="List paths for a given subdomain.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths")},t.body=function(){},t}return T(t,e),t}(Rc),yu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get subdomain path details.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Read",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath))},t.body=function(){},t}return T(t,e),t}(Rc),wu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a path.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath))},t.body=function(){},t}return T(t,e),t}(Uc),Iu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a subdomain path.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),ju=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Assign a subdomain path to a port.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath),"/assign")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Eu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Unassign a subdomain path to a port.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath),"/assign")},t.body=function(){},t}return T(t,e),t}(Uc),Ru=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/verify")},t.body=function(){},t}return T(t,e),t}(Cc),Cu=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(encodeURIComponent(e.parameters.domain),"/verify")},t.body=function(){},t}return T(t,e),t}(Cc),Uu=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(t,e),t}(Rc),Su=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(t,e),t}(Cc),_u=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(encodeURIComponent(e.parameters.logSinkId))},t.body=function(){},t}return T(t,e),t}(Rc),Au=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(encodeURIComponent(e.parameters.logSinkId))},t.body=function(){},t}return T(t,e),t}(Uc),Pu=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(encodeURIComponent(e.parameters.logSinkId),"/pause")},t.body=function(){},t}return T(t,e),t}(Cc),xu=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(encodeURIComponent(e.parameters.logSinkId),"/resume")},t.body=function(){},t}return T(t,e),t}(Cc),ku=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(encodeURIComponent(e.parameters.logSinkId),"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),qu=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(t,e),t}(Rc),Ou=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(t,e),t}(Cc),Du=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(encodeURIComponent(e.parameters.notificationId))},t.body=function(){},t}return T(t,e),t}(Rc),Tu=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(encodeURIComponent(e.parameters.notificationId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Nu=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(encodeURIComponent(e.parameters.notificationId))},t.body=function(){},t}return T(t,e),t}(Uc),Lu=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(t,e),t}(Rc),Bu=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(t,e),t}(Cc),Gu=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(encodeURIComponent(e.parameters.credentialId))},t.body=function(){},t}return T(t,e),t}(Rc),Fu=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(encodeURIComponent(e.parameters.credentialId))},t.body=function(){},t}return T(t,e),t}(Uc),Ju=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(encodeURIComponent(e.parameters.credentialId),"/modify")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Mu=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(t,e),t}(Rc),zu=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(encodeURIComponent(e.parameters.customVCSId),"/token/").concat(encodeURIComponent(e.parameters.vcsLinkId)).concat(r)},t.body=function(){},t}return T(t,e),t}(Cc),Wu=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(t,e),t}(Rc),$u=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(encodeURIComponent(e.parameters.vcsService),"/").concat(encodeURIComponent(e.parameters.repositoryOwner),"/").concat(encodeURIComponent(e.parameters.repositoryName),"/branches").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),Vu=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(t,e),t}(Rc),Hu=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(t,e),t}(Rc),Yu=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(t,e),t}(Cc),Zu=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(t,e),t}(Sc),Ku=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(encodeURIComponent(e.parameters.projectId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(_c),Xu=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(encodeURIComponent(e.parameters.projectId))},t.body=function(){},t}return T(t,e),t}(Rc),Qu=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(encodeURIComponent(e.parameters.projectId)).concat(r)},t.body=function(){},t}return T(t,e),t}(Uc),ed=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(encodeURIComponent(e.parameters.projectId),"/addons").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),td=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(encodeURIComponent(e.parameters.projectId),"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),nd=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(encodeURIComponent(e.parameters.projectId),"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Sc),rd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return T(t,e),t}(Rc),od=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(_c),id=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return T(t,e),t}(Uc),sd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backup-schedules").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),ad=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backup-schedules")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),cd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backup-schedules/").concat(encodeURIComponent(e.parameters.scheduleId))},t.body=function(){},t}return T(t,e),t}(Uc),ud=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),dd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),ld=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId))},t.body=function(){},t}return T(t,e),t}(Rc),pd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId))},t.body=function(){},t}return T(t,e),t}(Uc),fd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/abort")},t.body=function(){},t}return T(t,e),t}(Cc),hd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/abort-restore")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),vd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/download-link")},t.body=function(){},t}return T(t,e),t}(Rc),md=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/restore")},t.body=function(){},t}return T(t,e),t}(Cc),bd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/restores").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),gd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/retain")},t.body=function(){},t}return T(t,e),t}(Cc),yd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/containers").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),wd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/credentials")},t.body=function(){},t}return T(t,e),t}(Rc),Id=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/import")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),jd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/network-settings")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Ed=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/pause")},t.body=function(){},t}return T(t,e),t}(Cc),Rd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/pitr")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Cd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/pitr-window")},t.body=function(){},t}return T(t,e),t}(Rc),Ud=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/reset")},t.body=function(){},t}return T(t,e),t}(Cc),Sd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/restart")},t.body=function(){},t}return T(t,e),t}(Cc),_d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Restores the given backup to the specified 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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/restore")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Ad=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/resume")},t.body=function(){},t}return T(t,e),t}(Cc),Pd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),xd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/security")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),kd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/version")},t.body=function(){},t}return T(t,e),t}(Rc),qd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/version")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Od=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(encodeURIComponent(e.parameters.projectId),"/jobs").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),Dd=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(encodeURIComponent(e.parameters.projectId),"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Td=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(encodeURIComponent(e.parameters.projectId),"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Sc),Nd=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(encodeURIComponent(e.parameters.projectId),"/jobs/cron/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(_c),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(encodeURIComponent(e.parameters.projectId),"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Bd=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(encodeURIComponent(e.parameters.projectId),"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Sc),Gd=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(encodeURIComponent(e.parameters.projectId),"/jobs/manual/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(_c),Fd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(){},t}return T(t,e),t}(Rc),Jd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(){},t}return T(t,e),t}(Uc),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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/branches").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),zd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),Wd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),$d=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-arguments").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),Vd=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Hd=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-arguments/details")},t.body=function(){},t}return T(t,e),t}(Rc),Yd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Zd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Kd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return T(t,e),t}(Rc),Xd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return T(t,e),t}(Uc),Qd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/containers").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),el=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/deployment")},t.body=function(){},t}return T(t,e),t}(Rc),tl=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),nl=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/health-checks")},t.body=function(){},t}return T(t,e),t}(Rc),rl=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),ol=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/pause")},t.body=function(){},t}return T(t,e),t}(Cc),il=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/pull-requests").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),sl=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),al=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),cl=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),ul=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs/").concat(encodeURIComponent(e.parameters.runId))},t.body=function(){},t}return T(t,e),t}(Rc),dl=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs/").concat(encodeURIComponent(e.parameters.runId))},t.body=function(){},t}return T(t,e),t}(Uc),ll=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runtime-environment").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),pl=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),fl=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runtime-environment/details")},t.body=function(){},t}return T(t,e),t}(Rc),hl=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),vl=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),ml=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/suspend")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),bl=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(encodeURIComponent(e.parameters.projectId),"/pipelines").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),gl=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId))},t.body=function(){},t}return T(t,e),t}(Rc),yl=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),wl=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Il=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/previews").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),jl=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/previews/").concat(encodeURIComponent(e.parameters.previewId))},t.body=function(){},t}return T(t,e),t}(Uc),El=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/runs").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),Rl=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/runs/").concat(encodeURIComponent(e.parameters.templateRunId))},t.body=function(){},t}return T(t,e),t}(Rc),Cl=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage))},t.body=function(){},t}return T(t,e),t}(Rc),Ul=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Sl=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),_l=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),Al=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs/").concat(encodeURIComponent(e.parameters.runId))},t.body=function(){},t}return T(t,e),t}(Rc),Pl=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs/").concat(encodeURIComponent(e.parameters.runId),"/abort")},t.body=function(){},t}return T(t,e),t}(Cc),xl=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),kl=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),ql=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Sc),Ol=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(_c),Dl=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId)).concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),Tl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a secret",t.withAuth=!0,t.requiredPermissions="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId))},t.body=function(){},t}return T(t,e),t}(Uc),Nl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a secret",t.withAuth=!0,t.requiredPermissions="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Bl=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return T(t,e),t}(Rc),Gl=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return T(t,e),t}(Uc),Fl=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/details")},t.body=function(){},t}return T(t,e),t}(Rc),Jl=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(encodeURIComponent(e.parameters.projectId),"/services").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),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(encodeURIComponent(e.parameters.projectId),"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),zl=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(encodeURIComponent(e.parameters.projectId),"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Sc),Wl=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(encodeURIComponent(e.parameters.projectId),"/services/build/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(_c),$l=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(encodeURIComponent(e.parameters.projectId),"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Vl=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(encodeURIComponent(e.parameters.projectId),"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Sc),Hl=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(encodeURIComponent(e.parameters.projectId),"/services/combined/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(_c),Yl=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(encodeURIComponent(e.parameters.projectId),"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Zl=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(encodeURIComponent(e.parameters.projectId),"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Sc),Kl=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(encodeURIComponent(e.parameters.projectId),"/services/deployment/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(_c),Xl=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(){},t}return T(t,e),t}(Rc),Ql=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId)).concat(r)},t.body=function(){},t}return T(t,e),t}(Uc),ep=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/branches").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),tp=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),np=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),rp=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-arguments").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),op=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),ip=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-arguments/details")},t.body=function(){},t}return T(t,e),t}(Rc),sp=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),ap=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),cp=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return T(t,e),t}(Rc),up=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return T(t,e),t}(Uc),dp=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/containers").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),lp=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/deployment")},t.body=function(){},t}return T(t,e),t}(Rc),pp=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),fp=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/health-checks")},t.body=function(){},t}return T(t,e),t}(Rc),hp=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),vp=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/pause")},t.body=function(){},t}return T(t,e),t}(Cc),mp=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/ports")},t.body=function(){},t}return T(t,e),t}(Rc),bp=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/ports")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),gp=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/pull-requests").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),yp=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/restart")},t.body=function(){},t}return T(t,e),t}(Cc),wp=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Ip=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/runtime-environment").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),jp=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Ep=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/runtime-environment/details")},t.body=function(){},t}return T(t,e),t}(Rc),Rp=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Cp=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(encodeURIComponent(e.parameters.projectId),"/volumes")},t.body=function(){},t}return T(t,e),t}(Rc),Up=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(encodeURIComponent(e.parameters.projectId),"/volumes")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Sp=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(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId))},t.body=function(){},t}return T(t,e),t}(Rc),_p=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(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Ap=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(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId))},t.body=function(){},t}return T(t,e),t}(Uc),Pp=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(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId),"/attach")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),xp=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(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId),"/detach")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),kp=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(t,e),t}(Rc),qp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="List the resource tags for this entity.",t.withAuth=!0,t.requiredPermissions="Account > Tags > 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/tags".concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),Op=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Add a new resource tag for this entity.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Create",t.endpointUrl=function(e){return"/v1/tags"},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Dp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update or create a resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Update",t.endpointUrl=function(e){return["resourceTagId"].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/tags"},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Sc),Tp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View details for a given resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Read",t.endpointUrl=function(e){return["resourceTagId"].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/tags/".concat(encodeURIComponent(e.parameters.resourceTagId))},t.body=function(){},t}return T(t,e),t}(Rc),Np=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Patch a resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Update",t.endpointUrl=function(e){return["resourceTagId"].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/tags/".concat(encodeURIComponent(e.parameters.resourceTagId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(_c),Lp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Delete",t.endpointUrl=function(e){return["resourceTagId"].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/tags/".concat(encodeURIComponent(e.parameters.resourceTagId))},t.body=function(){},t}return T(t,e),t}(Uc),Bp=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(t,e),t}(Rc),Gp=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(t,e),t}(Cc),Fp=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(encodeURIComponent(e.parameters.templateId)).concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),Jp=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(encodeURIComponent(e.parameters.templateId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Mp=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(encodeURIComponent(e.parameters.templateId))},t.body=function(){},t}return T(t,e),t}(Uc),zp=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(encodeURIComponent(e.parameters.templateId),"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(Cc),Wp=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(encodeURIComponent(e.parameters.templateId),"/runs").concat(r)},t.body=function(){},t}return T(t,e),t}(Rc),$p=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(encodeURIComponent(e.parameters.templateId),"/runs/").concat(encodeURIComponent(e.parameters.templateRunId))},t.body=function(){},t}return T(t,e),t}(Rc),Vp=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(encodeURIComponent(e.parameters.templateId),"/runs/").concat(encodeURIComponent(e.parameters.templateRunId),"/abort")},t.body=function(){},t}return T(t,e),t}(Cc),Hp=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 L(this,void 0,void 0,(function(){return B(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),L(this,void 0,void 0,(function(){var n,r,o;return B(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=N({host:"https://api.northflank.com"},e),r=this.contextWrapper,o={current:n.name,contexts:G(G([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(o)];case 4:return i.sent(),[2]}}))}))},e.prototype.removeContext=function(e){return L(this,void 0,void 0,(function(){var t,n,r,o;return B(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:G([],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 L(this,void 0,void 0,(function(){var t,n;return B(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=N(N({},t),{current:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.updateToken=function(e,t){return L(this,void 0,void 0,(function(){var n,r,o,i,s;return B(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?N(N({},r),{token:e}):t})),s=N(N({},o),{contexts:i}),[4,this.storeContext(s)];case 1:return a.sent(),[2]}}))}))},e.prototype.useProjectId=function(e){return L(this,void 0,void 0,(function(){var t,n;return B(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=N(N({},t),{project:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useServiceId=function(e){return L(this,void 0,void 0,(function(){var t,n;return B(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=N(N({},t),{service:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useJobId=function(e){return L(this,void 0,void 0,(function(){var t,n;return B(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=N(N({},t),{job:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.usePlanId=function(e){return L(this,void 0,void 0,(function(){var t,n;return B(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=N(N({},t),{plan:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useRegion=function(e){return L(this,void 0,void 0,(function(){var t,n;return B(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=N(N({},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 L(this,void 0,void 0,(function(){var t,n;return B(this,(function(r){switch(r.label){case 0:return t=this.contextWrapper,n=N(N({},t),{lastUpdateCheck:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e}(),Yp=function(e){function t(t){var n=e.call(this)||this;return n.assertDir=function(e){return L(n,void 0,void 0,(function(){var t;return B(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),A.default.existsSync(e)?[3,2]:[4,A.default.promises.mkdir(e,{recursive:!0})];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:throw t=n.sent(),console.log("Failed to login, local files could not be created: ".concat(e,", error: ").concat(t.message)),t;case 4:return[2]}}))}))},n.configPath=t||"".concat(U.default.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return T(t,e),t.prototype.loadContextWrapper=function(){try{return JSON.parse(A.default.readFileSync(this.configFile,"utf8"))}catch(e){return{contexts:[],lastUpdateCheck:new Date(0)}}},t.prototype.writeContext=function(e){return L(this,void 0,void 0,(function(){var t;return B(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,A.default.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 L(this,void 0,void 0,(function(){return B(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}(Hp),Zp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},t}return T(t,e),t.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},t.prototype.writeContext=function(e){return L(this,void 0,void 0,(function(){return B(this,(function(t){return this.inMemoryContextWrapper=e,[2]}))}))},t}(Hp),Kp=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 vc(e,new Jl(e,t).call,new ed(e,t).call),this.exec=new gc(e),this.logs=new qc(e),this.metrics=new Tc(e),this.endpoints={get:(o={},o.addon=((r=new rd(e,t)).types=new Nc(e,t),r.backupSchedules=new sd(e,t),r.backups=new ud(e,t),r.backup=((n=new ld(e,t)).download=new vd(e,t),n),r.restores=new bd(e,t),r.containers=new yd(e,t),r.credentials=new wd(e,t),r.pitrWindow=new Cd(e,t),r.version=new kd(e,t),r),o.invoice=function(){var n={};return n.details=new Bc(e,t),n}(),o.cloud=function(){var n={};return n.cluster=new Mc(e,t),n.dockerRegistry=new Yc(e,t),n.integration=new Qc(e,t),n}(),o.dnsId=new ou(e,t),o.domain=new au(e,t),o.subdomain=function(){var n=new lu(e,t);return n.path=new yu(e,t),n}(),o.logSink=new _u(e,t),o.notification=new Du(e,t),o.registryCredentials=new Gu(e,t),o.project=new Xu(e,t),o.job=function(){var n=new Fd(e,t);return n.branches=new Md(e,t),n.builds=new zd(e,t),n.buildArguments=new $d(e,t),n.buildArgumentDetails=new Hd(e,t),n.build=new Kd(e,t),n.containers=new Qd(e,t),n.deployment=new el(e,t),n.healthChecks=new nl(e,t),n.pullRequests=new il(e,t),n.runs=new al(e,t),n.run=new ul(e,t),n.runtimeEnvironment=new ll(e,t),n.runtimeEnvironmentDetails=new fl(e,t),n}(),o.pipeline=new gl(e,t),o.previewTemplate=new yl(e,t),o.previewTemplateRun=new Rl(e,t),o.releaseFlow=new Cl(e,t),o.releaseFlowRun=new Al(e,t),o.secret=new Dl(e,t),o.secretLink=new Bl(e,t),o.secretDetails=new Fl(e,t),o.service=function(){var n=new Xl(e,t);return n.branches=new ep(e,t),n.builds=new tp(e,t),n.buildArguments=new rp(e,t),n.buildArgumentDetails=new ip(e,t),n.build=new cp(e,t),n.containers=new dp(e,t),n.deployment=new lp(e,t),n.healthChecks=new fp(e,t),n.ports=new mp(e,t),n.pullRequests=new gp(e,t),n.runtimeEnvironment=new Ip(e,t),n.runtimeEnvironmentDetails=new Ep(e,t),n}(),o.volume=new Sp(e,t),o.tag=new Tp(e,t),o.template=new Fp(e,t),o.templateRun=new $p(e,t),o),list:function(){var n={};return n.invoices=new Lc(e,t),n.cloud=function(){var n={};return n.providers=new Gc(e,t),n.clusters=new Fc(e,t),n.cluster=function(){var n={};return n.nodes=new $c(e,t),n}(),n.dockerRegistry=new Vc(e,t),n.integrations=new Kc(e,t),n.nodeTypes=new nu(e,t),n.regions=new ru(e,t),n}(),n.domains=new iu(e,t),n.subdomain=function(){var n={};return n.path=new gu(e,t),n}(),n.logSinks=new Uu(e,t),n.notifications=new qu(e,t),n.registryCredentials=new Lu(e,t),n.vcs=new Mu(e,t),n.repos=new Wu(e,t),n.branches=new $u(e,t),n.plans=new Vu(e,t),n.projects=new Hu(e,t),n.addons=new ed(e,t),n.jobs=new Od(e,t),n.pipelines=new bl(e,t),n.previewTemplatePreviews=new Il(e,t),n.previewTemplateRuns=new El(e,t),n.releaseFlowRuns=new _l(e,t),n.secrets=new xl(e,t),n.services=new Jl(e,t),n.volumes=new Cp(e,t),n.regions=new kp(e,t),n.tags=new qp(e,t),n.templates=new Bp(e,t),n.templateRuns=new Wp(e,t),n}(),create:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Jc(e,t),n.dockerRegistry=new Hc(e,t),n.integration=new Xc(e,t),n}(),n.domain=new su(e,t),n.logSink=new Su(e,t),n.notification=new Ou(e,t),n.customVcs=function(){var n={};return n.token=new zu(e,t),n}(),n.project=new Yu(e,t),n.addon=function(){var n=new td(e,t);return n.backupSchedule=new ad(e,t),n}(),n.job=function(){var n={};return n.cron=new Dd(e,t),n.manual=new Ld(e,t),n}(),n.secret=new kl(e,t),n.service=function(){var n={};return n.build=new Ml(e,t),n.combined=new $l(e,t),n.deployment=new Yl(e,t),n}(),n.volume=new Up(e,t),n.template=new Gp(e,t),n}(),update:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new zc(e,t),n.integration=new eu(e,t),n}(),n.subdomain=function(){var n={};return n.path=new Iu(e,t),n}(),n.logSink=new ku(e,t),n.notification=new Tu(e,t),n.registryCredentials=new Ju(e,t),n.addon=function(){var n={};return n.networkSettings=new jd(e,t),n.security=new xd(e,t),n.version=new qd(e,t),n}(),n.job=function(){var n={};return n.buildArguments=new Vd(e,t),n.buildOptions=new Yd(e,t),n.buildSource=new Zd(e,t),n.deployment=new tl(e,t),n.healthChecks=new rl(e,t),n.runtimeEnvironment=new pl(e,t),n.settings=new vl(e,t),n}(),n.previewTemplate=new wl(e,t),n.releaseFlow=new Ul(e,t),n.secret=new Nl(e,t),n.secretLink=new Ll(e,t),n.service=function(){var n={};return n.buildArguments=new op(e,t),n.buildOptions=new sp(e,t),n.buildSource=new ap(e,t),n.deployment=new pp(e,t),n.healthChecks=new hp(e,t),n.ports=new bp(e,t),n.runtimeEnvironment=new jp(e,t),n}(),n.volume=new _p(e,t),n.template=new Jp(e,t),n}(),delete:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Wc(e,t),n.dockerRegistry=new Zc(e,t),n.integration=new tu(e,t),n}(),n.domain=new cu(e,t),n.subdomain=function(){var n=new pu(e,t);return n.path=new wu(e,t),n}(),n.logSink=new Au(e,t),n.notification=new Nu(e,t),n.registryCredentials=new Fu(e,t),n.project=new Qu(e,t),n.addon=function(){var n=new id(e,t);return n.backupSchedule=new cd(e,t),n}(),n.backup=new pd(e,t),n.job=new Jd(e,t),n.previewTemplatePreview=new jl(e,t),n.secret=new Tl(e,t),n.secretLink=new Gl(e,t),n.service=new Ql(e,t),n.volume=new Ap(e,t),n.tag=new Lp(e,t),n.template=new Mp(e,t),n}(),import:function(){var n={};return n.domainCertificate=new uu(e,t),n.addon=function(){var n={};return n.backup=new Id(e,t),n}(),n}(),add:function(){var n={};return n.domain=function(){var n={};return n.subdomain=new du(e,t),n}(),n.subdomain=function(){var n={};return n.path=new bu(e,t),n}(),n.registryCredentials=new Bu(e,t),n.tag=new Op(e,t),n}(),assign:function(){var n={};return n.subdomain=function(){var n={};return n.service=new fu(e,t),n.path=new ju(e,t),n}(),n}(),unassign:function(){var n={};return n.subdomain=function(){var n=new hu(e,t);return n.path=new Eu(e,t),n}(),n}(),disable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new vu(e,t),n}(),n}(),enable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new mu(e,t),n}(),n}(),verify:function(){var n={};return n.subdomain=new Ru(e,t),n.domain=new Cu(e,t),n}(),pause:function(){var n={};return n.logSink=new Pu(e,t),n.addon=new Ed(e,t),n.job=new ol(e,t),n.service=new vp(e,t),n}(),resume:function(){var n={};return n.logSink=new xu(e,t),n.addon=new Ad(e,t),n.job=new sl(e,t),n.service=new wp(e,t),n}(),put:function(){var n={};return n.project=new Zu(e,t),n.addon=new nd(e,t),n.job=function(){var n={};return n.cron=new Td(e,t),n.manual=new Bd(e,t),n}(),n.secret=new ql(e,t),n.service=function(){var n={};return n.build=new zl(e,t),n.combined=new Vl(e,t),n.deployment=new Zl(e,t),n}(),n.tag=new Dp(e,t),n}(),patch:function(){var n={};return n.project=new Ku(e,t),n.addon=new od(e,t),n.job=function(){var n={};return n.cron=new Nd(e,t),n.manual=new Gd(e,t),n}(),n.secret=new Ol(e,t),n.service=function(){var n={};return n.build=new Wl(e,t),n.combined=new Hl(e,t),n.deployment=new Kl(e,t),n}(),n.tag=new Np(e,t),n}(),backup:function(){var n={};return n.addon=new dd(e,t),n}(),abort:function(){var n={};return n.addon=function(){var n={};return n.backup=new fd(e,t),n.restore=new hd(e,t),n}(),n.job=function(){var n={};return n.build=new Xd(e,t),n.run=new dl(e,t),n}(),n.releaseFlowRun=new Pl(e,t),n.service=function(){var n={};return n.build=new up(e,t),n}(),n.templateRun=new Vp(e,t),n}(),restore:function(){var n={};return n.addon=function(){var n={};return n.backup=function(){var n=new md(e,t);return n.global=new _d(e,t),n}(),n}(),n}(),retain:function(){var n={};return n.addon=function(){var n={};return n.backup=new gd(e,t),n}(),n}(),start:function(){var n={};return n.addon=function(){var n={};return n.pitr=new Rd(e,t),n}(),n.job=function(){var n={};return n.build=new Wd(e,t),n.run=new cl(e,t),n}(),n.service=function(){var n={};return n.build=new np(e,t),n}(),n}(),reset:function(){var n={};return n.addon=new Ud(e,t),n}(),restart:function(){var n={};return n.addon=new Sd(e,t),n.service=new yp(e,t),n}(),scale:function(){var n={};return n.addon=new Pd(e,t),n.job=new hl(e,t),n.service=new Rp(e,t),n}(),suspend:function(){var n={};return n.job=new ml(e,t),n}(),run:function(){var n={};return n.releaseFlow=new Sl(e,t),n.template=new zp(e,t),n}(),attach:function(){var n={};return n.volume=new Pp(e,t),n}(),detach:function(){var n={};return n.volume=new xp(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=function(){var e=i.endpoints.get.subdomain.call;return e.path=i.endpoints.get.subdomain.path.call,e}(),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.tag=i.endpoints.get.tag.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.cluster=function(){var e={};return e.nodes=i.endpoints.list.cloud.cluster.nodes.call,e}(),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.subdomain=function(){var e={};return e.path=i.endpoints.list.subdomain.path.call,e}(),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.tags=i.endpoints.list.tags.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.subdomain=function(){var e={};return e.path=i.endpoints.update.subdomain.path.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=function(){var e=i.endpoints.delete.subdomain.call;return e.path=i.endpoints.delete.subdomain.path.call,e}(),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.tag=i.endpoints.delete.tag.call,e.template=i.endpoints.delete.template.call,e}(),this.import=function(){var e={};return e.domainCertificate=i.endpoints.import.domainCertificate.call,e.addon=function(){var e={};return e.backup=i.endpoints.import.addon.backup.call,e}(),e}(),this.add=function(){var e={};return e.domain=function(){var e={};return e.subdomain=i.endpoints.add.domain.subdomain.call,e}(),e.subdomain=function(){var e={};return e.path=i.endpoints.add.subdomain.path.call,e}(),e.registryCredentials=i.endpoints.add.registryCredentials.call,e.tag=i.endpoints.add.tag.call,e}(),this.assign=function(){var e={};return e.subdomain=function(){var e={};return e.service=i.endpoints.assign.subdomain.service.call,e.path=i.endpoints.assign.subdomain.path.call,e}(),e}(),this.unassign=function(){var e={};return e.subdomain=function(){var e=i.endpoints.unassign.subdomain.call;return e.path=i.endpoints.unassign.subdomain.path.call,e}(),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.tag=i.endpoints.put.tag.call,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.tag=i.endpoints.patch.tag.call,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=function(){var e=i.endpoints.restore.addon.backup.call;return e.global=i.endpoints.restore.addon.backup.global.call,e}(),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.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}()};exports.AbortAddonBackupEndpoint=fd,exports.AbortAddonRestoreEndpoint=hd,exports.AbortJobBuildEndpoint=Xd,exports.AbortJobRunEndpoint=dl,exports.AbortReleaseflowrunEndpoint=Pl,exports.AbortServiceBuildEndpoint=up,exports.AbortTemplaterunEndpoint=Vp,exports.AddDomainSubdomainEndpoint=du,exports.AddRegistrycredentialsEndpoint=Bu,exports.AddSubdomainPathEndpoint=bu,exports.AddTagEndpoint=Op,exports.ApiClient=Kp,exports.ApiClientContextProvider=Hp,exports.ApiClientFileContextProvider=Yp,exports.ApiClientInMemoryContextProvider=Zp,exports.ApiEndpoint=Ec,exports.AssignSubdomainPathEndpoint=ju,exports.AssignSubdomainServiceEndpoint=fu,exports.AttachVolumeEndpoint=Pp,exports.BackupAddonEndpoint=dd,exports.CreateAddonBackupscheduleEndpoint=ad,exports.CreateAddonEndpoint=td,exports.CreateCloudClusterEndpoint=Jc,exports.CreateCloudDockerregistryEndpoint=Hc,exports.CreateCloudIntegrationEndpoint=Xc,exports.CreateCustomvcsTokenEndpoint=zu,exports.CreateDomainEndpoint=su,exports.CreateJobCronEndpoint=Dd,exports.CreateJobManualEndpoint=Ld,exports.CreateLogsinkEndpoint=Su,exports.CreateNotificationEndpoint=Ou,exports.CreateProjectEndpoint=Yu,exports.CreateSecretEndpoint=kl,exports.CreateServiceBuildEndpoint=Ml,exports.CreateServiceCombinedEndpoint=$l,exports.CreateServiceDeploymentEndpoint=Yl,exports.CreateTemplateEndpoint=Gp,exports.CreateVolumeEndpoint=Up,exports.DeleteAddonBackupscheduleEndpoint=cd,exports.DeleteAddonEndpoint=id,exports.DeleteApiEndpoint=Uc,exports.DeleteBackupEndpoint=pd,exports.DeleteCloudClusterEndpoint=Wc,exports.DeleteCloudDockerregistryEndpoint=Zc,exports.DeleteCloudIntegrationEndpoint=tu,exports.DeleteDomainEndpoint=cu,exports.DeleteJobEndpoint=Jd,exports.DeleteLogsinkEndpoint=Au,exports.DeleteNotificationEndpoint=Nu,exports.DeletePreviewtemplatepreviewEndpoint=jl,exports.DeleteProjectEndpoint=Qu,exports.DeleteRegistrycredentialsEndpoint=Fu,exports.DeleteSecretEndpoint=Tl,exports.DeleteSecretlinkEndpoint=Gl,exports.DeleteServiceEndpoint=Ql,exports.DeleteSubdomainEndpoint=pu,exports.DeleteSubdomainPathEndpoint=wu,exports.DeleteTagEndpoint=Lp,exports.DeleteTemplateEndpoint=Mp,exports.DeleteVolumeEndpoint=Ap,exports.DetachVolumeEndpoint=xp,exports.DisableSubdomainCdnEndpoint=vu,exports.EnableSubdomainCdnEndpoint=mu,exports.ExecCommandStandard=bc,exports.GetAddonBackupDownloadEndpoint=vd,exports.GetAddonBackupEndpoint=ld,exports.GetAddonBackupsEndpoint=ud,exports.GetAddonBackupschedulesEndpoint=sd,exports.GetAddonContainersEndpoint=yd,exports.GetAddonCredentialsEndpoint=wd,exports.GetAddonEndpoint=rd,exports.GetAddonPitrwindowEndpoint=Cd,exports.GetAddonRestoresEndpoint=bd,exports.GetAddonTypesEndpoint=Nc,exports.GetAddonVersionEndpoint=kd,exports.GetApiEndpoint=Rc,exports.GetCloudClusterEndpoint=Mc,exports.GetCloudDockerregistryEndpoint=Yc,exports.GetCloudIntegrationEndpoint=Qc,exports.GetDnsidEndpoint=ou,exports.GetDomainEndpoint=au,exports.GetInvoiceDetailsEndpoint=Bc,exports.GetJobBranchesEndpoint=Md,exports.GetJobBuildEndpoint=Kd,exports.GetJobBuildargumentdetailsEndpoint=Hd,exports.GetJobBuildargumentsEndpoint=$d,exports.GetJobBuildsEndpoint=zd,exports.GetJobContainersEndpoint=Qd,exports.GetJobDeploymentEndpoint=el,exports.GetJobEndpoint=Fd,exports.GetJobHealthchecksEndpoint=nl,exports.GetJobPullrequestsEndpoint=il,exports.GetJobRunEndpoint=ul,exports.GetJobRunsEndpoint=al,exports.GetJobRuntimeenvironmentEndpoint=ll,exports.GetJobRuntimeenvironmentdetailsEndpoint=fl,exports.GetLogsinkEndpoint=_u,exports.GetNotificationEndpoint=Du,exports.GetPipelineEndpoint=gl,exports.GetPreviewtemplateEndpoint=yl,exports.GetPreviewtemplaterunEndpoint=Rl,exports.GetProjectEndpoint=Xu,exports.GetRegistrycredentialsEndpoint=Gu,exports.GetReleaseflowEndpoint=Cl,exports.GetReleaseflowrunEndpoint=Al,exports.GetSecretEndpoint=Dl,exports.GetSecretdetailsEndpoint=Fl,exports.GetSecretlinkEndpoint=Bl,exports.GetServiceBranchesEndpoint=ep,exports.GetServiceBuildEndpoint=cp,exports.GetServiceBuildargumentdetailsEndpoint=ip,exports.GetServiceBuildargumentsEndpoint=rp,exports.GetServiceBuildsEndpoint=tp,exports.GetServiceContainersEndpoint=dp,exports.GetServiceDeploymentEndpoint=lp,exports.GetServiceEndpoint=Xl,exports.GetServiceHealthchecksEndpoint=fp,exports.GetServicePortsEndpoint=mp,exports.GetServicePullrequestsEndpoint=gp,exports.GetServiceRuntimeenvironmentEndpoint=Ip,exports.GetServiceRuntimeenvironmentdetailsEndpoint=Ep,exports.GetSubdomainEndpoint=lu,exports.GetSubdomainPathEndpoint=yu,exports.GetTagEndpoint=Tp,exports.GetTemplateEndpoint=Fp,exports.GetTemplaterunEndpoint=$p,exports.GetVolumeEndpoint=Sp,exports.ImportAddonBackupEndpoint=Id,exports.ImportDomaincertificateEndpoint=uu,exports.ListAddonsEndpoint=ed,exports.ListBranchesEndpoint=$u,exports.ListCloudClusterNodesEndpoint=$c,exports.ListCloudClustersEndpoint=Fc,exports.ListCloudDockerregistryEndpoint=Vc,exports.ListCloudIntegrationsEndpoint=Kc,exports.ListCloudNodetypesEndpoint=nu,exports.ListCloudProvidersEndpoint=Gc,exports.ListCloudRegionsEndpoint=ru,exports.ListDomainsEndpoint=iu,exports.ListInvoicesEndpoint=Lc,exports.ListJobsEndpoint=Od,exports.ListLogsinksEndpoint=Uu,exports.ListNotificationsEndpoint=qu,exports.ListPipelinesEndpoint=bl,exports.ListPlansEndpoint=Vu,exports.ListPreviewtemplatepreviewsEndpoint=Il,exports.ListPreviewtemplaterunsEndpoint=El,exports.ListProjectsEndpoint=Hu,exports.ListRegionsEndpoint=kp,exports.ListRegistrycredentialsEndpoint=Lu,exports.ListReleaseflowrunsEndpoint=_l,exports.ListReposEndpoint=Wu,exports.ListSecretsEndpoint=xl,exports.ListServicesEndpoint=Jl,exports.ListSubdomainPathEndpoint=gu,exports.ListTagsEndpoint=qp,exports.ListTemplaterunsEndpoint=Wp,exports.ListTemplatesEndpoint=Bp,exports.ListVcsEndpoint=Mu,exports.ListVolumesEndpoint=Cp,exports.NorthflankApiCallError=yc,exports.NorthflankExecCommand=gc,exports.NorthflankLogFetch=qc,exports.NorthflankMetricFetch=Tc,exports.NorthflankPortForwarder=vc,exports.PatchAddonEndpoint=od,exports.PatchApiEndpoint=_c,exports.PatchJobCronEndpoint=Nd,exports.PatchJobManualEndpoint=Gd,exports.PatchProjectEndpoint=Ku,exports.PatchSecretEndpoint=Ol,exports.PatchServiceBuildEndpoint=Wl,exports.PatchServiceCombinedEndpoint=Hl,exports.PatchServiceDeploymentEndpoint=Kl,exports.PatchTagEndpoint=Np,exports.PauseAddonEndpoint=Ed,exports.PauseJobEndpoint=ol,exports.PauseLogsinkEndpoint=Pu,exports.PauseServiceEndpoint=vp,exports.PostApiEndpoint=Cc,exports.PutAddonEndpoint=nd,exports.PutApiEndpoint=Sc,exports.PutJobCronEndpoint=Td,exports.PutJobManualEndpoint=Bd,exports.PutProjectEndpoint=Zu,exports.PutSecretEndpoint=ql,exports.PutServiceBuildEndpoint=zl,exports.PutServiceCombinedEndpoint=Vl,exports.PutServiceDeploymentEndpoint=Zl,exports.PutTagEndpoint=Dp,exports.ResetAddonEndpoint=Ud,exports.RestartAddonEndpoint=Sd,exports.RestartServiceEndpoint=yp,exports.RestoreAddonBackupEndpoint=md,exports.RestoreAddonBackupGlobalEndpoint=_d,exports.ResumeAddonEndpoint=Ad,exports.ResumeJobEndpoint=sl,exports.ResumeLogsinkEndpoint=xu,exports.ResumeServiceEndpoint=wp,exports.RetainAddonBackupEndpoint=gd,exports.RunReleaseflowEndpoint=Sl,exports.RunTemplateEndpoint=zp,exports.ScaleAddonEndpoint=Pd,exports.ScaleJobEndpoint=hl,exports.ScaleServiceEndpoint=Rp,exports.StartAddonPitrEndpoint=Rd,exports.StartJobBuildEndpoint=Wd,exports.StartJobRunEndpoint=cl,exports.StartServiceBuildEndpoint=np,exports.SuspendJobEndpoint=ml,exports.UnassignSubdomainEndpoint=hu,exports.UnassignSubdomainPathEndpoint=Eu,exports.UpdateAddonNetworksettingsEndpoint=jd,exports.UpdateAddonSecurityEndpoint=xd,exports.UpdateAddonVersionEndpoint=qd,exports.UpdateCloudClusterEndpoint=zc,exports.UpdateCloudIntegrationEndpoint=eu,exports.UpdateJobBuildargumentsEndpoint=Vd,exports.UpdateJobBuildoptionsEndpoint=Yd,exports.UpdateJobBuildsourceEndpoint=Zd,exports.UpdateJobDeploymentEndpoint=tl,exports.UpdateJobHealthchecksEndpoint=rl,exports.UpdateJobRuntimeenvironmentEndpoint=pl,exports.UpdateJobSettingsEndpoint=vl,exports.UpdateLogsinkEndpoint=ku,exports.UpdateNotificationEndpoint=Tu,exports.UpdatePreviewtemplateEndpoint=wl,exports.UpdateRegistrycredentialsEndpoint=Ju,exports.UpdateReleaseflowEndpoint=Ul,exports.UpdateSecretEndpoint=Nl,exports.UpdateSecretlinkEndpoint=Ll,exports.UpdateServiceBuildargumentsEndpoint=op,exports.UpdateServiceBuildoptionsEndpoint=sp,exports.UpdateServiceBuildsourceEndpoint=ap,exports.UpdateServiceDeploymentEndpoint=pp,exports.UpdateServiceHealthchecksEndpoint=hp,exports.UpdateServicePortsEndpoint=bp,exports.UpdateServiceRuntimeenvironmentEndpoint=jp,exports.UpdateSubdomainPathEndpoint=Iu,exports.UpdateTemplateEndpoint=Jp,exports.UpdateVolumeEndpoint=_p,exports.VerifyDomainEndpoint=Cu,exports.VerifySubdomainEndpoint=Ru;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("events"),t=require("stream"),n=require("http"),r=require("url"),o=require("punycode"),i=require("https"),s=require("zlib"),a=require("os"),c=require("net"),u=require("child_process"),d=require("fs"),l=require("path"),p=require("buffer"),f=require("crypto"),h=require("tls"),v=require("dgram");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function b(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var g=m(e),y=m(t),w=b(t),I=m(n),j=m(r),E=m(o),R=m(i),C=m(s),U=m(a),_=m(c),S=b(c),A=m(d),P=m(l),x=m(p),k=m(f),q=m(h),O=m(v),D=function(e,t){return D=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])},D(e,t)};function T(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}D(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var B=function(){return B=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},B.apply(this,arguments)};function N(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))}function L(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)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 i.label++,{value:a[1],done:!1};case 5:i.label++,r=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=t.call(e,i)}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,c])}}}function G(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 F="object"==typeof global&&global&&global.Object===Object&&global,J="object"==typeof self&&self&&self.Object===Object&&self,M=F||J||Function("return this")(),z=M.Symbol,W=Object.prototype,$=W.hasOwnProperty,V=W.toString,H=z?z.toStringTag:void 0;var Y=Object.prototype.toString;var Z=z?z.toStringTag:void 0;function K(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Z&&Z in Object(e)?function(e){var t=$.call(e,H),n=e[H];try{e[H]=void 0;var r=!0}catch(e){}var o=V.call(e);return r&&(t?e[H]=n:delete e[H]),o}(e):function(e){return Y.call(e)}(e)}function X(e){return null!=e&&"object"==typeof e}function Q(e){return"symbol"==typeof e||X(e)&&"[object Symbol]"==K(e)}function ee(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 te=Array.isArray,ne=z?z.prototype:void 0,re=ne?ne.toString:void 0;function oe(e){if("string"==typeof e)return e;if(te(e))return ee(e,oe)+"";if(Q(e))return re?re.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ie(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function se(e){return e}function ae(e){if(!ie(e))return!1;var t=K(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var ce,ue=M["__core-js_shared__"],de=(ce=/[^.]+$/.exec(ue&&ue.keys&&ue.keys.IE_PROTO||""))?"Symbol(src)_1."+ce:"";var le=Function.prototype.toString;function pe(e){if(null!=e){try{return le.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var fe=/^\[object .+?Constructor\]$/,he=Function.prototype,ve=Object.prototype,me=he.toString,be=ve.hasOwnProperty,ge=RegExp("^"+me.call(be).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ye(e){return!(!ie(e)||(t=e,de&&de in t))&&(ae(e)?ge:fe).test(pe(e));var t}function we(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ye(n)?n:void 0}var Ie=we(M,"WeakMap"),je=Object.create,Ee=function(){function e(){}return function(t){if(!ie(t))return{};if(je)return je(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var Re=Date.now;var Ce,Ue,_e,Se=function(){try{var e=we(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ae=Se,Pe=Ae?function(e,t){return Ae(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:se,xe=(Ce=Pe,Ue=0,_e=0,function(){var e=Re(),t=16-(e-_e);if(_e=e,t>0){if(++Ue>=800)return arguments[0]}else Ue=0;return Ce.apply(void 0,arguments)}),ke=/^(?:0|[1-9]\d*)$/;function qe(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ke.test(e))&&e>-1&&e%1==0&&e<t}function Oe(e,t,n){"__proto__"==t&&Ae?Ae(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function De(e,t){return e===t||e!=e&&t!=t}var Te=Object.prototype.hasOwnProperty;function Be(e,t,n){var r=e[t];Te.call(e,t)&&De(r,n)&&(void 0!==n||t in e)||Oe(e,t,n)}var Ne=Math.max;function Le(e,t){return xe(function(e,t,n){return t=Ne(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Ne(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,se),e+"")}function Ge(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Fe(e){return null!=e&&Ge(e.length)&&!ae(e)}var Je=Object.prototype;function Me(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Je)}function ze(e){return X(e)&&"[object Arguments]"==K(e)}var We=Object.prototype,$e=We.hasOwnProperty,Ve=We.propertyIsEnumerable,He=ze(function(){return arguments}())?ze:function(e){return X(e)&&$e.call(e,"callee")&&!Ve.call(e,"callee")};var Ye="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ze=Ye&&"object"==typeof module&&module&&!module.nodeType&&module,Ke=Ze&&Ze.exports===Ye?M.Buffer:void 0,Xe=(Ke?Ke.isBuffer:void 0)||function(){return!1},Qe={};Qe["[object Float32Array]"]=Qe["[object Float64Array]"]=Qe["[object Int8Array]"]=Qe["[object Int16Array]"]=Qe["[object Int32Array]"]=Qe["[object Uint8Array]"]=Qe["[object Uint8ClampedArray]"]=Qe["[object Uint16Array]"]=Qe["[object Uint32Array]"]=!0,Qe["[object Arguments]"]=Qe["[object Array]"]=Qe["[object ArrayBuffer]"]=Qe["[object Boolean]"]=Qe["[object DataView]"]=Qe["[object Date]"]=Qe["[object Error]"]=Qe["[object Function]"]=Qe["[object Map]"]=Qe["[object Number]"]=Qe["[object Object]"]=Qe["[object RegExp]"]=Qe["[object Set]"]=Qe["[object String]"]=Qe["[object WeakMap]"]=!1;var et="object"==typeof exports&&exports&&!exports.nodeType&&exports,tt=et&&"object"==typeof module&&module&&!module.nodeType&&module,nt=tt&&tt.exports===et&&F.process,rt=function(){try{var e=tt&&tt.require&&tt.require("util").types;return e||nt&&nt.binding&&nt.binding("util")}catch(e){}}(),ot=rt&&rt.isTypedArray,it=ot?function(e){return function(t){return e(t)}}(ot):function(e){return X(e)&&Ge(e.length)&&!!Qe[K(e)]},st=it,at=Object.prototype.hasOwnProperty;function ct(e,t){var n=te(e),r=!n&&He(e),o=!n&&!r&&Xe(e),i=!n&&!r&&!o&&st(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):[],c=a.length;for(var u in e)!t&&!at.call(e,u)||s&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||qe(u,c))||a.push(u);return a}function ut(e,t){return function(n){return e(t(n))}}var dt=ut(Object.keys,Object),lt=Object.prototype.hasOwnProperty;function pt(e){return Fe(e)?ct(e):function(e){if(!Me(e))return dt(e);var t=[];for(var n in Object(e))lt.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var ft=Object.prototype.hasOwnProperty;function ht(e){if(!ie(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Me(e),n=[];for(var r in e)("constructor"!=r||!t&&ft.call(e,r))&&n.push(r);return n}function vt(e){return Fe(e)?ct(e,!0):ht(e)}var mt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bt=/^\w*$/;function gt(e,t){if(te(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Q(e))||(bt.test(e)||!mt.test(e)||null!=t&&e in Object(t))}var yt=we(Object,"create");var wt=Object.prototype.hasOwnProperty;var It=Object.prototype.hasOwnProperty;function jt(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 Et(e,t){for(var n=e.length;n--;)if(De(e[n][0],t))return n;return-1}jt.prototype.clear=function(){this.__data__=yt?yt(null):{},this.size=0},jt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},jt.prototype.get=function(e){var t=this.__data__;if(yt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return wt.call(t,e)?t[e]:void 0},jt.prototype.has=function(e){var t=this.__data__;return yt?void 0!==t[e]:It.call(t,e)},jt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=yt&&void 0===t?"__lodash_hash_undefined__":t,this};var Rt=Array.prototype.splice;function Ct(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])}}Ct.prototype.clear=function(){this.__data__=[],this.size=0},Ct.prototype.delete=function(e){var t=this.__data__,n=Et(t,e);return!(n<0)&&(n==t.length-1?t.pop():Rt.call(t,n,1),--this.size,!0)},Ct.prototype.get=function(e){var t=this.__data__,n=Et(t,e);return n<0?void 0:t[n][1]},Ct.prototype.has=function(e){return Et(this.__data__,e)>-1},Ct.prototype.set=function(e,t){var n=this.__data__,r=Et(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Ut=we(M,"Map");function _t(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 St(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])}}St.prototype.clear=function(){this.size=0,this.__data__={hash:new jt,map:new(Ut||Ct),string:new jt}},St.prototype.delete=function(e){var t=_t(this,e).delete(e);return this.size-=t?1:0,t},St.prototype.get=function(e){return _t(this,e).get(e)},St.prototype.has=function(e){return _t(this,e).has(e)},St.prototype.set=function(e,t){var n=_t(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function At(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");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(At.Cache||St),n}At.Cache=St;var Pt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xt=/\\(\\)?/g,kt=function(e){var t=At(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(Pt,(function(e,n,r,o){t.push(r?o.replace(xt,"$1"):n||e)})),t})),qt=kt;function Ot(e){return null==e?"":oe(e)}function Dt(e,t){return te(e)?e:gt(e,t)?[e]:qt(Ot(e))}function Tt(e){if("string"==typeof e||Q(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Bt(e,t){for(var n=0,r=(t=Dt(t,e)).length;null!=e&&n<r;)e=e[Tt(t[n++])];return n&&n==r?e:void 0}function Nt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Lt=z?z.isConcatSpreadable:void 0;function Gt(e){return te(e)||He(e)||!!(Lt&&e&&e[Lt])}function Ft(e,t,n,r,o){var i=-1,s=e.length;for(n||(n=Gt),o||(o=[]);++i<s;){var a=e[i];t>0&&n(a)?t>1?Ft(a,t-1,n,r,o):Nt(o,a):r||(o[o.length]=a)}return o}var Jt=ut(Object.getPrototypeOf,Object),Mt=Function.prototype,zt=Object.prototype,Wt=Mt.toString,$t=zt.hasOwnProperty,Vt=Wt.call(Object);function Ht(e){var t=this.__data__=new Ct(e);this.size=t.size}Ht.prototype.clear=function(){this.__data__=new Ct,this.size=0},Ht.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ht.prototype.get=function(e){return this.__data__.get(e)},Ht.prototype.has=function(e){return this.__data__.has(e)},Ht.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Ct){var r=n.__data__;if(!Ut||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new St(r)}return n.set(e,t),this.size=n.size,this};var Yt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Zt=Yt&&"object"==typeof module&&module&&!module.nodeType&&module,Kt=Zt&&Zt.exports===Yt?M.Buffer:void 0,Xt=Kt?Kt.allocUnsafe:void 0;var Qt=Object.prototype.propertyIsEnumerable,en=Object.getOwnPropertySymbols,tn=en?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}(en(e),(function(t){return Qt.call(e,t)})))}:function(){return[]};function nn(e){return function(e,t,n){var r=t(e);return te(e)?r:Nt(r,n(e))}(e,pt,tn)}var rn=we(M,"DataView"),on=we(M,"Promise"),sn=we(M,"Set"),an="[object Map]",cn="[object Promise]",un="[object Set]",dn="[object WeakMap]",ln="[object DataView]",pn=pe(rn),fn=pe(Ut),hn=pe(on),vn=pe(sn),mn=pe(Ie),bn=K;(rn&&bn(new rn(new ArrayBuffer(1)))!=ln||Ut&&bn(new Ut)!=an||on&&bn(on.resolve())!=cn||sn&&bn(new sn)!=un||Ie&&bn(new Ie)!=dn)&&(bn=function(e){var t=K(e),n="[object Object]"==t?e.constructor:void 0,r=n?pe(n):"";if(r)switch(r){case pn:return ln;case fn:return an;case hn:return cn;case vn:return un;case mn:return dn}return t});var gn=bn,yn=M.Uint8Array;function wn(e,t){var n,r,o=t?(n=e.buffer,r=new n.constructor(n.byteLength),new yn(r).set(new yn(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 St;++t<n;)this.add(e[t])}function jn(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)};function En(e,t,n,r,o,i){var s=1&n,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var l=-1,p=!0,f=2&n?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(!jn(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 Rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Un=z?z.prototype:void 0,_n=Un?Un.valueOf:void 0;var Sn=Object.prototype.hasOwnProperty;var An="[object Arguments]",Pn="[object Array]",xn="[object Object]",kn=Object.prototype.hasOwnProperty;function qn(e,t,n,r,o,i){var s=te(e),a=te(t),c=s?Pn:gn(e),u=a?Pn:gn(t),d=(c=c==An?xn:c)==xn,l=(u=u==An?xn:u)==xn,p=c==u;if(p&&Xe(e)){if(!Xe(t))return!1;s=!0,d=!1}if(p&&!d)return i||(i=new Ht),s||st(e)?En(e,t,n,r,o,i):function(e,t,n,r,o,i,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new yn(e),new yn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return De(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=Rn;case"[object Set]":var c=1&r;if(a||(a=Cn),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;r|=2,s.set(e,t);var d=En(a(e),a(t),r,o,i,s);return s.delete(e),d;case"[object Symbol]":if(_n)return _n.call(e)==_n.call(t)}return!1}(e,t,c,n,r,o,i);if(!(1&n)){var f=d&&kn.call(e,"__wrapped__"),h=l&&kn.call(t,"__wrapped__");if(f||h){var v=f?e.value():e,m=h?t.value():t;return i||(i=new Ht),o(v,m,n,r,i)}}return!!p&&(i||(i=new Ht),function(e,t,n,r,o,i){var s=1&n,a=nn(e),c=a.length;if(c!=nn(t).length&&!s)return!1;for(var u=c;u--;){var d=a[u];if(!(s?d in t:Sn.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;++u<c;){var v=e[d=a[u]],m=t[d];if(r)var b=s?r(m,v,d,t,e,i):r(v,m,d,e,t,i);if(!(void 0===b?v===m||o(v,m,n,r,i):b)){f=!1;break}h||(h="constructor"==d)}if(f&&!h){var g=e.constructor,y=t.constructor;g==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof y&&y instanceof y||(f=!1)}return i.delete(e),i.delete(t),f}(e,t,n,r,o,i))}function On(e,t,n,r,o){return e===t||(null==e||null==t||!X(e)&&!X(t)?e!=e&&t!=t:qn(e,t,n,r,On,o))}function Dn(e){return e==e&&!ie(e)}function Tn(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function Bn(e){var t=function(e){for(var t=pt(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Dn(o)]}return t}(e);return 1==t.length&&t[0][2]?Tn(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 c=(a=n[o])[0],u=e[c],d=a[1];if(s&&a[2]){if(void 0===u&&!(c in e))return!1}else{var l=new Ht;if(r)var p=r(u,d,c,e,t,l);if(!(void 0===p?On(d,u,3,r,l):p))return!1}}return!0}(n,e,t)}}function Nn(e,t){return null!=e&&t in Object(e)}function Ln(e,t){return null!=e&&function(e,t,n){for(var r=-1,o=(t=Dt(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)&&Ge(o)&&qe(s,o)&&(te(e)||He(e))}(e,t,Nn)}function Gn(e,t){return gt(e)&&Dn(t)?Tn(Tt(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Bt(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?Ln(n,e):On(t,r,3)}}function Fn(e){return gt(e)?(t=Tt(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Bt(t,e)}}(e);var t}function Jn(e){return"function"==typeof e?e:null==e?se:"object"==typeof e?te(e)?Gn(e[0],e[1]):Bn(e):Fn(e)}var Mn,zn=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),s=i.length;s--;){var a=i[Mn?s:++r];if(!1===t(o[a],a,o))break}return e};var Wn=function(e,t){return function(n,r){if(null==n)return n;if(!Fe(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&&zn(e,t,pt)})),$n=Wn;function Vn(e,t,n){(void 0!==n&&!De(e[t],n)||void 0===n&&!(t in e))&&Oe(e,t,n)}function Hn(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Yn(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],c=r?r(n[a],e[a],a,n,e):void 0;void 0===c&&(c=e[a]),o?Oe(n,a,c):Be(n,a,c)}return n}(e,vt(e))}function Zn(e,t,n,r,o,i,s){var a=Hn(e,n),c=Hn(t,n),u=s.get(c);if(u)Vn(e,n,u);else{var d,l=i?i(a,c,n+"",e,t,s):void 0,p=void 0===l;if(p){var f=te(c),h=!f&&Xe(c),v=!f&&!h&&st(c);l=c,f||h||v?te(a)?l=a:X(d=a)&&Fe(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=Xt?Xt(n):new e.constructor(n);return e.copy(r),r}(c,!0)):v?(p=!1,l=wn(c,!0)):l=[]:function(e){if(!X(e)||"[object Object]"!=K(e))return!1;var t=Jt(e);if(null===t)return!0;var n=$t.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Wt.call(n)==Vt}(c)||He(c)?(l=a,He(a)?l=Yn(a):ie(a)&&!ae(a)||(l=function(e){return"function"!=typeof e.constructor||Me(e)?{}:Ee(Jt(e))}(c))):p=!1}p&&(s.set(c,l),o(l,c,r,i,s),s.delete(c)),Vn(e,n,l)}}function Kn(e,t,n,r,o){e!==t&&zn(t,(function(i,s){if(o||(o=new Ht),ie(i))Zn(e,t,s,n,Kn,r,o);else{var a=r?r(Hn(e,s),i,s+"",e,t,o):void 0;void 0===a&&(a=i),Vn(e,s,a)}}),vt)}var Xn=/[\\^$.*+?()[\]{}|]/g,Qn=RegExp(Xn.source);function er(e,t){var n=-1,r=Fe(e)?Array(e.length):[];return $n(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function tr(e,t){return Ft(function(e,t){return(te(e)?ee:er)(e,Jn(t))}(e,t),1)}var nr=1/0;function rr(e,t){return e>t}function or(e){return"string"==typeof e||!te(e)&&X(e)&&"[object String]"==K(e)}function ir(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&&!Q(s):n(s,a)))var a=s,c=i}return c}(e,Jn(t),rr):void 0}var sr,ar=(sr=function(e,t,n){Kn(e,t,n)},Le((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=sr.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!ie(n))return!1;var r=typeof t;return!!("number"==r?Fe(n)&&qe(t,n.length):"string"==r&&t in n)&&De(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&&sr(e,s,n,o)}return e})));function cr(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function ur(e,t){return e(t={exports:{}},t.exports),t.exports}var dr={},lr=dr;function pr(e){return e<0?-1:1}function fr(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=pr(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||1&e?Math.round(e):Math.floor(e)}(a),a<n&&(a=n),a>r&&(a=r),a;if(!Number.isFinite(a)||0===a)return 0;if(a=pr(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}}dr.void=function(){},dr.boolean=function(e){return!!e},dr.byte=fr(8,{unsigned:!1}),dr.octet=fr(8,{unsigned:!0}),dr.short=fr(16,{unsigned:!1}),dr["unsigned short"]=fr(16,{unsigned:!0}),dr.long=fr(32,{unsigned:!1}),dr["unsigned long"]=fr(32,{unsigned:!0}),dr["long long"]=fr(32,{unsigned:!1,moduloBitLength:64}),dr["unsigned long long"]=fr(32,{unsigned:!0,moduloBitLength:64}),dr.double=function(e){const t=+e;if(!Number.isFinite(t))throw new TypeError("Argument is not a finite floating-point value");return t},dr["unrestricted double"]=function(e){const t=+e;if(isNaN(t))throw new TypeError("Argument is NaN");return t},dr.float=dr.double,dr["unrestricted float"]=dr["unrestricted double"],dr.DOMString=function(e,t){return t||(t={}),t.treatNullAsEmptyString&&null===e?"":String(e)},dr.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},dr.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("")},dr.Date=function(e,t){if(!(e instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(e))return e},dr.RegExp=function(e,t){return e instanceof RegExp||(e=new RegExp(e)),e};var hr=ur((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]}}));hr.mixin,hr.wrapperSymbol,hr.implSymbol,hr.wrapperForImpl,hr.implForWrapper;var vr,mr=(vr=Object.freeze({__proto__:null}))&&vr.default||vr,br={TRANSITIONAL:0,NONTRANSITIONAL:1};function gr(e){return e.split("\0").map((function(e){return e.normalize("NFC")})).join("\0")}function yr(e){for(var t=0,n=mr.length-1;t<=n;){var r=Math.floor((t+n)/2),o=mr[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 wr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function Ir(e){return e.replace(wr,"_").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 Er(e,t){"xn--"===e.substr(0,4)&&(e=E.default.toUnicode(e));var n=!1;(gr(e)!==e||"-"===e[3]&&"-"===e[4]||"-"===e[0]||"-"===e[e.length-1]||-1!==e.indexOf(".")||0===e.search(jr))&&(n=!0);for(var r=Ir(e),o=0;o<r;++o){var i=yr(e.codePointAt(o));if(Rr===br.TRANSITIONAL&&"valid"!==i[1]||Rr===br.NONTRANSITIONAL&&"valid"!==i[1]&&"deviation"!==i[1]){n=!0;break}}return{label:e,error:n}}function Rr(e,t,n){var r=function(e,t,n){for(var r=!1,o="",i=Ir(e),s=0;s<i;++s){var a=e.codePointAt(s),c=yr(a);switch(c[1]){case"disallowed":r=!0,o+=String.fromCodePoint(a);break;case"ignored":break;case"mapped":o+=String.fromCodePoint.apply(String,c[2]);break;case"deviation":o+=n===br.TRANSITIONAL?String.fromCodePoint.apply(String,c[2]):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,c[2]);break;case"disallowed_STD3_valid":t&&(r=!0),o+=String.fromCodePoint(a)}}return{string:o,error:r}}(e,t,n);r.string=gr(r.string);for(var o=r.string.split("."),i=0;i<o.length;++i)try{var s=Er(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 Cr={toASCII:function(e,t,n,r){var o=Rr(e,t,n),i=o.string.split(".");if(i=i.map((function(e){try{return E.default.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=Rr(e,t,br.NONTRANSITIONAL);return{domain:n.string,error:n.error}},PROCESSING_OPTIONS:br},Ur=ur((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 E.default.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 u(e){return 2===e.length&&s(e.codePointAt(0))&&(":"===e[1]||"|"===e[1])}function d(e){return void 0!==t[e]}function l(e){return d(e.scheme)}function p(e){let t=e.toString(16).toUpperCase();return 1===t.length&&(t="0"+t),"%"+t}function f(e){return e<=31||e>126}const h=new Set([32,34,35,60,62,63,96,123,125]);function v(e){return f(e)||h.has(e)}const m=new Set([47,58,59,61,64,91,92,93,94,124]);function b(e){return v(e)||m.has(e)}function g(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+=p(t[e]);return n}(n):n}function y(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 w(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=E.default.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=E.default.ucs2.decode(e);for(let e=0;e<o.length;++e)r+=g(o[e],f);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=Cr.toASCII(r,!1,Cr.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=y(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 j(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 R(e){return""!==e.username||""!==e.password}function C(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=E.default.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}}}C.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},C.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(l(this.url)&&!d(this.buffer))return!1;if(!l(this.url)&&d(this.buffer))return!1;if((R(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"):l(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":l(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},C.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)},C.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},C.prototype["parse path or authority"]=function(e){return 47===e?this.state="authority":(this.state="path",--this.pointer),!0},C.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"):l(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},C.prototype["parse relative slash"]=function(e){return!l(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},C.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},C.prototype["parse special authority ignore slashes"]=function(e){return 47!==e&&92!==e?(this.state="authority",--this.pointer):this.parseError=!0,!0},C.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=g(e,b);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(e)||47===e||63===e||35===e||l(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},C.prototype["parse hostname"]=C.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||l(this.url)&&92===e){if(--this.pointer,l(this.url)&&""===this.buffer)return this.parseError=!0,n;if(this.stateOverride&&""===this.buffer&&(R(this.url)||null!==this.url.port))return this.parseError=!0,!1;const e=w(this.buffer,l(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=w(this.buffer,l(this.url));if(e===n)return n;if(this.url.host=e,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},C.prototype["parse port"]=function(e,r){if(i(e))this.buffer+=r;else{if(!(isNaN(e)||47===e||63===e||35===e||l(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 U=new Set([47,92,63,35]);C.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&&!U.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),j(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},C.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},C.prototype["parse file host"]=function(e,t){if(isNaN(e)||47===e||92===e||63===e||35===e)if(--this.pointer,!this.stateOverride&&u(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=w(this.buffer,l(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},C.prototype["parse path start"]=function(e){return l(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},C.prototype["parse path"]=function(e){if(isNaN(e)||47===e||l(this.url)&&92===e||!this.stateOverride&&(63===e||35===e)){if(l(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||l(this.url)&&92===e?c(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&u(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(""):(j(this.url),47===e||l(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+=g(e,v);return!0},C.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]+g(e,f))),!0},C.prototype["parse query"]=function(e,t){if(isNaN(e)||!this.stateOverride&&35===e){l(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+=p(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},C.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+=g(e,f))),!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 C(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=E.default.ucs2.decode(t);for(let t=0;t<n.length;++t)e.username+=g(n[t],b)},e.exports.setThePassword=function(e,t){e.password="";const n=E.default.ucs2.decode(t);for(let t=0;t<n.length;++t)e.password+=g(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})}}));Ur.serializeURL,Ur.serializeURLOrigin,Ur.basicURLParse,Ur.setTheUsername,Ur.setThePassword,Ur.serializeHost,Ur.cannotHaveAUsernamePasswordPort,Ur.serializeInteger,Ur.parseURL;var _r=class{constructor(e){const t=e[0],n=e[1];let r=null;if(void 0!==n&&(r=Ur.basicURLParse(n),"failure"===r))throw new TypeError("Invalid base URL");const o=Ur.basicURLParse(t,{baseURL:r});if("failure"===o)throw new TypeError("Invalid URL");this._url=o}get href(){return Ur.serializeURL(this._url)}set href(e){const t=Ur.basicURLParse(e);if("failure"===t)throw new TypeError("Invalid URL");this._url=t}get origin(){return Ur.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(e){Ur.basicURLParse(e+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(e){Ur.cannotHaveAUsernamePasswordPort(this._url)||Ur.setTheUsername(this._url,e)}get password(){return this._url.password}set password(e){Ur.cannotHaveAUsernamePasswordPort(this._url)||Ur.setThePassword(this._url,e)}get host(){const e=this._url;return null===e.host?"":null===e.port?Ur.serializeHost(e.host):Ur.serializeHost(e.host)+":"+Ur.serializeInteger(e.port)}set host(e){this._url.cannotBeABaseURL||Ur.basicURLParse(e,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":Ur.serializeHost(this._url.host)}set hostname(e){this._url.cannotBeABaseURL||Ur.basicURLParse(e,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":Ur.serializeInteger(this._url.port)}set port(e){Ur.cannotHaveAUsernamePasswordPort(this._url)||(""===e?this._url.port=null:Ur.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=[],Ur.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="",Ur.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="",Ur.basicURLParse(t,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}},Sr=ur((function(e){const t=hr.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]=lr.USVString(o[0]),void 0!==o[1]&&(o[1]=lr.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=lr.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=lr.USVString(e),this[t].protocol=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"username",{get(){return this[t].username},set(e){e=lr.USVString(e),this[t].username=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"password",{get(){return this[t].password},set(e){e=lr.USVString(e),this[t].password=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"host",{get(){return this[t].host},set(e){e=lr.USVString(e),this[t].host=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hostname",{get(){return this[t].hostname},set(e){e=lr.USVString(e),this[t].hostname=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"port",{get(){return this[t].port},set(e){e=lr.USVString(e),this[t].port=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pathname",{get(){return this[t].pathname},set(e){e=lr.USVString(e),this[t].pathname=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"search",{get(){return this[t].search},set(e){e=lr.USVString(e),this[t].search=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hash",{get(){return this[t].hash},set(e){e=lr.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][hr.wrapperSymbol]=e},interface:n,expose:{Window:{URL:n},Worker:{URL:n}}}}));Sr.is,Sr.create,Sr.setup,Sr.expose;var Ar={URL:Sr.interface,serializeURL:Ur.serializeURL,serializeURLOrigin:Ur.serializeURLOrigin,basicURLParse:Ur.basicURLParse,setTheUsername:Ur.setTheUsername,setThePassword:Ur.setThePassword,serializeHost:Ur.serializeHost,serializeInteger:Ur.serializeInteger,parseURL:Ur.parseURL};const Pr=y.default.Readable,xr=Symbol("buffer"),kr=Symbol("type");class qr{constructor(){this[kr]="";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[xr]:Buffer.from("string"==typeof o?o:String(o)),r+=i.length,n.push(i)}}this[xr]=Buffer.concat(n);let o=t&&void 0!==t.type&&String(t.type).toLowerCase();o&&!/[^\u0020-\u007E]/.test(o)&&(this[kr]=o)}get size(){return this[xr].length}get type(){return this[kr]}text(){return Promise.resolve(this[xr].toString())}arrayBuffer(){const e=this[xr],t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return Promise.resolve(t)}stream(){const e=new Pr;return e._read=function(){},e.push(this[xr]),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[xr].slice(r,r+i),a=new qr([],{type:arguments[2]});return a[xr]=s,a}}function Or(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 Dr;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}),Or.prototype=Object.create(Error.prototype),Or.prototype.constructor=Or,Or.prototype.name="FetchError";try{Dr=require("encoding").convert}catch(e){}const Tr=Symbol("Body internals"),Br=y.default.PassThrough;function Nr(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.size;let o=void 0===r?0:r;var i=n.timeout;let s=void 0===i?0:i;null==e?e=null:Gr(e)?e=Buffer.from(e.toString()):Fr(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 y.default||(e=Buffer.from(String(e)))),this[Tr]={body:e,disturbed:!1,error:null},this.size=o,this.timeout=s,e instanceof y.default&&e.on("error",(function(e){const n="AbortError"===e.name?e:new Or(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[Tr].error=n}))}function Lr(){var e=this;if(this[Tr].disturbed)return Nr.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[Tr].disturbed=!0,this[Tr].error)return Nr.Promise.reject(this[Tr].error);let t=this.body;if(null===t)return Nr.Promise.resolve(Buffer.alloc(0));if(Fr(t)&&(t=t.stream()),Buffer.isBuffer(t))return Nr.Promise.resolve(t);if(!(t instanceof y.default))return Nr.Promise.resolve(Buffer.alloc(0));let n=[],r=0,o=!1;return new Nr.Promise((function(i,s){let a;e.timeout&&(a=setTimeout((function(){o=!0,s(new Or(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)),t.on("error",(function(t){"AbortError"===t.name?(o=!0,s(t)):s(new Or(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))})),t.on("data",(function(t){if(!o&&null!==t){if(e.size&&r+t.length>e.size)return o=!0,void s(new Or(`content size at ${e.url} over limit: ${e.size}`,"max-size"));r+=t.length,n.push(t)}})),t.on("end",(function(){if(!o){clearTimeout(a);try{i(Buffer.concat(n,r))}catch(t){s(new Or(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}}))}))}function Gr(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 Fr(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 Jr(e){let t,n,r=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof y.default&&"function"!=typeof r.getBoundary&&(t=new Br,n=new Br,r.pipe(t),r.pipe(n),e[Tr].body=t,r=n),r}function Mr(e){return null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":Gr(e)?"application/x-www-form-urlencoded;charset=UTF-8":Fr(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 y.default?null:"text/plain;charset=UTF-8"}function zr(e){const t=e.body;return null===t?0:Fr(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}Nr.prototype={get body(){return this[Tr].body},get bodyUsed(){return this[Tr].disturbed},arrayBuffer(){return Lr.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 Lr.call(this).then((function(t){return Object.assign(new qr([],{type:e.toLowerCase()}),{[xr]:t})}))},json(){var e=this;return Lr.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return Nr.Promise.reject(new Or(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}}))},text(){return Lr.call(this).then((function(e){return e.toString()}))},buffer(){return Lr.call(this)},textConverted(){var e=this;return Lr.call(this).then((function(t){return function(e,t){if("function"!=typeof Dr)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 Dr(e,"UTF-8",i).toString()}(t,e.headers)}))}},Object.defineProperties(Nr.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),Nr.mixIn=function(e){for(const t of Object.getOwnPropertyNames(Nr.prototype))if(!(t in e)){const n=Object.getOwnPropertyDescriptor(Nr.prototype,t);Object.defineProperty(e,t,n)}},Nr.Promise=global.Promise;const Wr=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,$r=/[^\t\x20-\x7e\x80-\xff]/;function Vr(e){if(e=`${e}`,Wr.test(e)||""===e)throw new TypeError(`${e} is not a legal HTTP header name`)}function Hr(e){if(e=`${e}`,$r.test(e))throw new TypeError(`${e} is not a legal HTTP header value`)}function Yr(e,t){t=t.toLowerCase();for(const n in e)if(n.toLowerCase()===t)return n}const Zr=Symbol("map");class Kr{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[Zr]=Object.create(null),e instanceof Kr){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){Vr(e=`${e}`);const t=Yr(this[Zr],e);return void 0===t?null:this[Zr][t].join(", ")}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=Xr(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=Xr(this),r++}}set(e,t){t=`${t}`,Vr(e=`${e}`),Hr(t);const n=Yr(this[Zr],e);this[Zr][void 0!==n?n:e]=[t]}append(e,t){t=`${t}`,Vr(e=`${e}`),Hr(t);const n=Yr(this[Zr],e);void 0!==n?this[Zr][n].push(t):this[Zr][e]=[t]}has(e){return Vr(e=`${e}`),void 0!==Yr(this[Zr],e)}delete(e){Vr(e=`${e}`);const t=Yr(this[Zr],e);void 0!==t&&delete this[Zr][t]}raw(){return this[Zr]}keys(){return eo(this,"key")}values(){return eo(this,"value")}[Symbol.iterator](){return eo(this,"key+value")}}function Xr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(e[Zr]).sort().map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[Zr][t].join(", ")}:function(t){return[t.toLowerCase(),e[Zr][t].join(", ")]})}Kr.prototype.entries=Kr.prototype[Symbol.iterator],Object.defineProperty(Kr.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Kr.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 Qr=Symbol("internal");function eo(e,t){const n=Object.create(to);return n[Qr]={target:e,kind:t,index:0},n}const to=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==to)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[Qr];const t=e.target,n=e.kind,r=e.index,o=Xr(t,n);return r>=o.length?{value:void 0,done:!0}:(this[Qr].index=r+1,{value:o[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function no(e){const t=Object.assign({__proto__:null},e[Zr]),n=Yr(e[Zr],"Host");return void 0!==n&&(t[n]=t[n][0]),t}Object.defineProperty(to,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const ro=Symbol("Response internals"),oo=I.default.STATUS_CODES;class io{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Nr.call(this,e,t);const n=t.status||200,r=new Kr(t.headers);if(null!=e&&!r.has("Content-Type")){const t=Mr(e);t&&r.append("Content-Type",t)}this[ro]={url:t.url,status:n,statusText:t.statusText||oo[n],headers:r,counter:t.counter}}get url(){return this[ro].url||""}get status(){return this[ro].status}get ok(){return this[ro].status>=200&&this[ro].status<300}get redirected(){return this[ro].counter>0}get statusText(){return this[ro].statusText}get headers(){return this[ro].headers}clone(){return new io(Jr(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}Nr.mixIn(io.prototype),Object.defineProperties(io.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(io.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const so=Symbol("Request internals"),ao=j.default.URL||Ar.URL,co=j.default.parse,uo=j.default.format;function lo(e){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(e)&&(e=new ao(e).toString()),co(e)}const po="destroy"in y.default.Readable.prototype;function fo(e){return"object"==typeof e&&"object"==typeof e[so]}class ho{constructor(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};fo(e)?t=lo(e.url):(t=e&&e.href?lo(e.href):lo(`${e}`),e={});let r=n.method||e.method||"GET";if(r=r.toUpperCase(),(null!=n.body||fo(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:fo(e)&&null!==e.body?Jr(e):null;Nr.call(this,o,{timeout:n.timeout||e.timeout||0,size:n.size||e.size||0});const i=new Kr(n.headers||e.headers||{});if(null!=o&&!i.has("Content-Type")){const e=Mr(o);e&&i.append("Content-Type",e)}let s=fo(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[so]={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[so].method}get url(){return uo(this[so].parsedURL)}get headers(){return this[so].headers}get redirect(){return this[so].redirect}get signal(){return this[so].signal}clone(){return new ho(this)}}function vo(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}Nr.mixIn(ho.prototype),Object.defineProperty(ho.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(ho.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),vo.prototype=Object.create(Error.prototype),vo.prototype.constructor=vo,vo.prototype.name="AbortError";const mo=j.default.URL||Ar.URL,bo=y.default.PassThrough;function go(e,t){if(!go.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return Nr.Promise=go.Promise,new go.Promise((function(n,r){const o=new ho(e,t),i=function(e){const t=e[so].parsedURL,n=new Kr(e[so].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 y.default.Readable&&!po)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let r=null;if(null==e.body&&/^(POST|PUT)$/i.test(e.method)&&(r="0"),null!=e.body){const t=zr(e);"number"==typeof t&&(r=String(t))}r&&n.set("Content-Length",r),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 o=e.agent;return"function"==typeof o&&(o=o(t)),Object.assign({},t,{method:e.method,headers:no(n),agent:o})}(o),s=("https:"===i.protocol?R.default:I.default).request,a=o.signal;let c=null;const u=function(){let e=new vo("The user aborted a request.");r(e),o.body&&o.body instanceof y.default.Readable&&yo(o.body,e),c&&c.body&&c.body.emit("error",e)};if(a&&a.aborted)return void u();const d=function(){u(),f()},l=s(i);let p;function f(){l.abort(),a&&a.removeEventListener("abort",d),clearTimeout(p)}a&&a.addEventListener("abort",d),o.timeout&&l.once("socket",(function(e){p=setTimeout((function(){r(new Or(`network timeout at: ${o.url}`,"request-timeout")),f()}),o.timeout)})),l.on("error",(function(e){r(new Or(`request to ${o.url} failed, reason: ${e.message}`,"system",e)),c&&c.body&&yo(c.body,e),f()})),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)}}))}))}(l,(function(e){a&&a.aborted||c&&c.body&&yo(c.body,e)})),parseInt(process.version.substring(1))<14&&l.on("socket",(function(e){e.addListener("close",(function(t){const n=e.listenerCount("data")>0;if(c&&n&&!t&&(!a||!a.aborted)){const e=new Error("Premature close");e.code="ERR_STREAM_PREMATURE_CLOSE",c.body.emit("error",e)}}))})),l.on("response",(function(e){clearTimeout(p);const t=function(e){const t=new Kr;for(const n of Object.keys(e))if(!Wr.test(n))if(Array.isArray(e[n]))for(const r of e[n])$r.test(r)||(void 0===t[Zr][n]?t[Zr][n]=[r]:t[Zr][n].push(r));else $r.test(e[n])||(t[Zr][n]=[e[n]]);return t}(e.headers);if(go.isRedirect(e.statusCode)){const s=t.get("Location");let a=null;try{a=null===s?null:new mo(s,o.url).toString()}catch(e){if("manual"!==o.redirect)return r(new Or(`uri requested responds with an invalid redirect URL: ${s}`,"invalid-redirect")),void f()}switch(o.redirect){case"error":return r(new Or(`uri requested responds with a redirect, redirect mode is set to error: ${o.url}`,"no-redirect")),void f();case"manual":if(null!==a)try{t.set("Location",a)}catch(e){r(e)}break;case"follow":if(null===a)break;if(o.counter>=o.follow)return r(new Or(`maximum redirect reached at: ${o.url}`,"max-redirect")),void f();const s={headers:new Kr(o.headers),follow:o.follow,counter:o.counter+1,agent:o.agent,compress:o.compress,method:o.method,body:o.body,signal:o.signal,timeout:o.timeout,size:o.size};if(!function(e,t){const n=new mo(t).hostname,r=new mo(e).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(o.url,a)||(i=o.url,new mo(a).protocol!==new mo(i).protocol))for(const e of["authorization","www-authenticate","cookie","cookie2"])s.headers.delete(e);return 303!==e.statusCode&&o.body&&null===zr(o)?(r(new Or("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void f()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==o.method)||(s.method="GET",s.body=void 0,s.headers.delete("content-length")),n(go(new ho(a,s))),void f())}}var i;e.once("end",(function(){a&&a.removeEventListener("abort",d)}));let s=e.pipe(new bo);const u={url:o.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:o.size,timeout:o.timeout,counter:o.counter},l=t.get("Content-Encoding");if(!o.compress||"HEAD"===o.method||null===l||204===e.statusCode||304===e.statusCode)return c=new io(s,u),void n(c);const h={flush:C.default.Z_SYNC_FLUSH,finishFlush:C.default.Z_SYNC_FLUSH};if("gzip"==l||"x-gzip"==l)return s=s.pipe(C.default.createGunzip(h)),c=new io(s,u),void n(c);if("deflate"==l||"x-deflate"==l){const t=e.pipe(new bo);return t.once("data",(function(e){s=8==(15&e[0])?s.pipe(C.default.createInflate()):s.pipe(C.default.createInflateRaw()),c=new io(s,u),n(c)})),void t.on("end",(function(){c||(c=new io(s,u),n(c))}))}if("br"==l&&"function"==typeof C.default.createBrotliDecompress)return s=s.pipe(C.default.createBrotliDecompress()),c=new io(s,u),void n(c);c=new io(s,u),n(c)})),function(e,t){const n=t.body;null===n?e.end():Fr(n)?n.stream().pipe(e):Buffer.isBuffer(n)?(e.write(n),e.end()):n.pipe(e)}(l,o)}))}function yo(e,t){e.destroy?e.destroy(t):(e.emit("error",t),e.end())}go.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},go.Promise=global.Promise;var wo=function(){function e(e){this.contextProvider=e}return e.prototype.getServiceDetails=function(e,t){return N(this,void 0,void 0,(function(){return L(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 N(this,void 0,void 0,(function(){return L(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 N(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return L(this,(function(c){switch(c.label){case 0:return n="Error while trying to connect, please try again.",r=ar({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},B({},t)),[4,Va(2)((function(){return N(a,void 0,void 0,(function(){return L(this,(function(t){return[2,go(e,r)]}))}))})).catch((function(){throw new Error(n)}))];case 1:return(o=c.sent()).ok?[3,3]:[4,o.text()];case 2:i=c.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,c.sent()]}}))}))},e}(),Io=function(e,t,n){return N(void 0,void 0,void 0,(function(){var r,o,i,s,a;return L(this,(function(c){switch(c.label){case 0:if(r=Ro(t||"127.0.0.1"),(o=Ro(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===U.default.platform()&&(i=function(e){return N(void 0,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return t="lo0 alias ".concat(e," up"),[4,Eo.apply(void 0,t.split(" "))];case 1:return n.sent(),[2]}}))}))}),s=r,c.label=1;case 1:return s<=o?(a=Co(s),[4,jo(e,a)]):[3,6];case 2:return c.sent()?i?[4,i(a)]:[3,4]:[3,5];case 3:c.sent(),c.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."))}}))}))},jo=function(e,t){return new Promise((function(n){var r=new c.Socket,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)}))},Eo=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return N(void 0,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,Uo("/sbin/ifconfig",e).resultPromise];case 1:return[2,t.sent()]}}))}))},Ro=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},Co=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(".")},Uo=function(e,t,n){var r=u.spawn(e,t,B({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 c="Error during execution of command '".concat(e," ").concat(t.join(" "),"': ").concat(a);i({message:c,result:r})}else o(r)}))}));return{process:r,resultPromise:o}},_o=function(e,t,n){return N(void 0,void 0,void 0,(function(){var r,o;return L(this,(function(i){switch(i.label){case 0:return r=So(e,10),[4,A.default.promises.writeFile(r,t,n)];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,6]),[4,A.default.promises.rename(r,e)];case 3:return i.sent(),[3,6];case 4:return o=i.sent(),[4,A.default.promises.unlink(r).catch((function(){}))];case 5:throw i.sent(),o;case 6:return[2]}}))}))},So=function(e,t){for(var n,r=P.default.dirname(e),o=P.default.basename(e),i=0;null===(n=i<t)||void 0===n||n;i+=1){var s=G([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),a=".".concat(s,".").concat(o),c=P.default.join(r,a);if(!A.default.existsSync(c))return c}throw new Error("Could not write file to file '".concat(e,"'."))},Ao="win32"===process.platform?"\r\n":"\n",Po=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;Bo(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 tr(this.findEntries(e),(function(e){return e.hosts.map((function(e){return e.host}))}))},e.prototype.resolveIps=function(e){return Bo(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 Oo(this.nodes,this.config.eol)},e.prototype.removeEntry=function(e){var t,n="number"==typeof(t=e)||X(t)&&"[object Number]"==K(t)?e:this.nodes.findIndex((function(t){return t===e}));n<0||this.nodes.splice(n,1)},e.prototype.findEntries=function(e){return Bo(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?[xo(),ko(o),r]:[ko(o),r];this.insertAt.apply(this,G([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,G([e,0],n,!1))},e.prototype.makeEntry=function(e,t){var n=this.config.ipPrefixWhitespace;return B({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=Bo(t,"eol").map((function(e){return e.line}));return null!==(e=No(n))&&void 0!==e?e:Ao}(),indent:null!==(o=null==n?void 0:n.indent)&&void 0!==o?o:function(){var e,n=tr(Bo(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=No(n))&&void 0!==e?e:17}(),ipPrefixWhitespace:""})},e.parse=function(e,t){return this.fromNodes(Do(e),t)},e}(),xo=function(){return{type:"blank",line:""}},ko=function(e){return{type:"comment",line:qo(e)}},qo=function(e){return e.startsWith("#")?e:"# ".concat(e)},Oo=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:Ao)},Do=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}:To(e)}))},To=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=tr(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}},Bo=function(e,t){return e.filter((function(e){return e.type===t}))},No=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=ir(Array.from(t.entries()),(function(e){return e[1]}));if(n)return n[0]},Lo="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",Go=function(){function e(e){this.ast=Po.fromNodes([]);var t={writeMode:"atomic",hostsFile:Lo};this.config=B(B({},t),e)}return e.prototype.add=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!or(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!or(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(!or(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!or(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(!or(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(!or(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 N(this,void 0,void 0,(function(){var e;return L(this,(function(t){switch(t.label){case 0:return[4,A.default.promises.readFile(this.config.hostsFile)];case 1:return e=t.sent(),this.ast=Po.parse(e.toString(),this.config),[2,this]}}))}))},e.prototype.write=function(e){return N(this,void 0,void 0,(function(){var t,n,r,o;return L(this,(function(i){switch(i.label){case 0:switch(t=B(B({},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,A.default.promises.writeFile(n,o)];case 5:return[3,6];case 6:return[2,this]}}))}))},e.prototype.backup=function(e){return N(this,void 0,void 0,(function(){var t,n,r,o;return L(this,(function(i){switch(i.label){case 0:return A.default.existsSync(this.config.hostsFile)?(t=P.default.dirname(this.config.hostsFile),n=P.default.basename(this.config.hostsFile),r="".concat(n).concat(e.suffix),o=P.default.resolve(t,r),A.default.existsSync(o)&&!e.rewrite?[3,2]:[4,A.default.promises.copyFile(this.config.hostsFile,o)]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))},e.load=function(t){return N(this,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,new e(t).read()];case 1:return[2,n.sent()]}}))}))},e}(),Fo=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 N(this,void 0,void 0,(function(){var t,n=this;return L(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}(),Jo=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 Mo=Jo(Wo),zo=Jo($o);function Wo(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function $o(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}Wo.proto=Wo((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Wo(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return $o(this)},configurable:!0})})),Mo.strict=zo;var Vo,Ho=function(){},Yo=function(e,t,n){if("function"==typeof t)return Yo(e,null,t);t||(t={}),n=Mo(n||Ho);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,c=function(){e.writable||u()},u=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",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?s&&!r&&(e.on("end",c),e.on("close",c)):(e.on("complete",u),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",u),!1!==t.error&&e.on("error",p),e.on("close",f),function(){a=!0,e.removeListener("complete",u),e.removeListener("abort",f),e.removeListener("request",v),e.req&&e.req.removeListener("finish",u),e.removeListener("end",c),e.removeListener("close",c),e.removeListener("finish",u),e.removeListener("exit",l),e.removeListener("end",d),e.removeListener("error",p),e.removeListener("close",f)}},Zo=Yo;try{Vo=A.default}catch(e){}var Ko=function(){},Xo=/^v?\.0/.test(process.version),Qo=function(e){return"function"==typeof e},ei=function(e,t,n,r){r=Mo(r);var o=!1;e.on("close",(function(){o=!0})),Zo(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!!Xo&&!!Vo&&(e instanceof(Vo.ReadStream||Ko)||e instanceof(Vo.WriteStream||Ko))&&Qo(e.close)}(e)?e.close(Ko):function(e){return e.setHeader&&Qo(e.abort)}(e)?e.abort():Qo(e.destroy)?e.destroy():void r(t||new Error("stream was destroyed"))}},ti=function(e){e()},ni=function(e,t){return e.pipe(t)},ri=function(){var e,t=Array.prototype.slice.call(arguments),n=Qo(t[t.length-1]||Ko)&&t.pop()||Ko;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 ei(o,s,i>0,(function(t){e||(e=t),t&&r.forEach(ti),s||(r.forEach(ti),n(e))}))}));return t.reduce(ni)};const{Duplex:oi}=y.default;function ii(e){e.emit("close")}function si(){!this.destroyed&&this._writableState.finished&&this.destroy()}function ai(e){this.removeListener("error",ai),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}var ci=function(e,t){let n=!0;const r=new oi({...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(ii,r);let i=!1;e.once("error",(function(e){i=!0,o(e)})),e.once("close",(function(){i||o(t),process.nextTick(ii,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",ai),r};const ui=["nodebuffer","arraybuffer","fragments"],di="undefined"!=typeof Blob;di&&ui.push("blob");var li={BINARY_TYPES:ui,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:di,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},pi="function"==typeof __webpack_require__?__non_webpack_require__:cr,fi=process.config&&process.config.variables||{},hi=!!process.env.PREBUILDS_ONLY,vi=process.versions.modules,mi=!(!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",bi=process.env.npm_config_arch||U.default.arch(),gi=process.env.npm_config_platform||U.default.platform(),yi=process.env.LIBC||(function(e){return"linux"===e&&A.default.existsSync("/etc/alpine-release")}(gi)?"musl":"glibc"),wi=process.env.ARM_VERSION||("arm64"===bi?"8":fi.arm_version)||"",Ii=(process.versions.uv||"").split(".")[0],ji=Ei;function Ei(e){return pi(Ei.resolve(e))}function Ri(e){try{return A.default.readdirSync(e)}catch(e){return[]}}function Ci(e,t){var n=Ri(e).filter(t);return n[0]&&P.default.join(e,n[0])}function Ui(e){return/\.node$/.test(e)}function _i(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 Si(e,t){return function(n){return null!=n&&(n.platform===e&&n.architectures.includes(t))}}function Ai(e,t){return e.architectures.length-t.architectures.length}function Pi(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 xi(e,t){return function(n){return null!=n&&(!(n.runtime&&n.runtime!==e&&!function(e){return"node"===e.runtime&&e.napi}(n))&&(!(n.abi&&n.abi!==t&&!n.napi)&&((!n.uv||n.uv===Ii)&&((!n.armv||n.armv===wi)&&(!n.libc||n.libc===yi)))))}}function ki(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}}Ei.resolve=Ei.path=function(e){e=P.default.resolve(e||".");try{var t=pi(P.default.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[t+"_PREBUILD"]&&(e=process.env[t+"_PREBUILD"])}catch(e){}if(!hi){var n=Ci(P.default.join(e,"build/Release"),Ui);if(n)return n;var r=Ci(P.default.join(e,"build/Debug"),Ui);if(r)return r}var o=a(e);if(o)return o;var i=a(P.default.dirname(process.execPath));if(i)return i;var s=["platform="+gi,"arch="+bi,"runtime="+mi,"abi="+vi,"uv="+Ii,wi?"armv="+wi:"","libc="+yi,"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=Ri(P.default.join(e,"prebuilds")).map(_i).filter(Si(gi,bi)).sort(Ai)[0];if(t){var n=P.default.join(e,"prebuilds",t.name),r=Ri(n).map(Pi).filter(xi(mi,vi)).sort(ki(mi))[0];return r?P.default.join(n,r.file):void 0}}},Ei.parseTags=Pi,Ei.matchTags=xi,Ei.compareTags=ki,Ei.parseTuple=_i,Ei.matchTuple=Si,Ei.compareTuples=Ai;var qi=ur((function(e){const t="function"==typeof __webpack_require__?__non_webpack_require__:cr;"function"==typeof t.addon?e.exports=t.addon.bind(t):e.exports=ji}));var Oi={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]}},Di=ur((function(e){try{e.exports=qi(__dirname)}catch(t){e.exports=Oi}})),Ti=ur((function(e){const{EMPTY_BUFFER:t}=li,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=Di;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){}}));Ti.concat,Ti.mask,Ti.toArrayBuffer,Ti.toBuffer,Ti.unmask;const Bi=Symbol("kDone"),Ni=Symbol("kRun");var Li=class{constructor(e){this[Bi]=()=>{this.pending--,this[Ni]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Ni]()}[Ni](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[Bi])}}};const{kStatusCode:Gi}=li,Fi=Buffer[Symbol.species],Ji=Buffer.from([0,0,255,255]),Mi=Symbol("permessage-deflate"),zi=Symbol("total-length"),Wi=Symbol("callback"),$i=Symbol("buffers"),Vi=Symbol("error");let Hi;var Yi=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,!Hi){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;Hi=new Li(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[Wi];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){Hi.add((r=>{this._decompress(e,t,((e,t)=>{r(),n(e,t)}))}))}compress(e,t,n){Hi.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]?C.default.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=C.default.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[Mi]=this,this._inflate[zi]=0,this._inflate[$i]=[],this._inflate.on("error",Xi),this._inflate.on("data",Ki)}this._inflate[Wi]=n,this._inflate.write(e),t&&this._inflate.write(Ji),this._inflate.flush((()=>{const e=this._inflate[Vi];if(e)return this._inflate.close(),this._inflate=null,void n(e);const o=Ti.concat(this._inflate[$i],this._inflate[zi]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[zi]=0,this._inflate[$i]=[],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]?C.default.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=C.default.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[zi]=0,this._deflate[$i]=[],this._deflate.on("data",Zi)}this._deflate[Wi]=n,this._deflate.write(e),this._deflate.flush(C.default.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let e=Ti.concat(this._deflate[$i],this._deflate[zi]);t&&(e=new Fi(e.buffer,e.byteOffset,e.length-4)),this._deflate[Wi]=null,this._deflate[zi]=0,this._deflate[$i]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,e)}))}};function Zi(e){this[$i].push(e),this[zi]+=e.length}function Ki(e){this[zi]+=e.length,this[Mi]._maxPayload<1||this[zi]<=this[Mi]._maxPayload?this[$i].push(e):(this[Vi]=new RangeError("Max payload size exceeded"),this[Vi].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Vi][Gi]=1009,this.removeListener("data",Ki),this.reset())}function Xi(e){this[Mi]._inflate=null,e[Gi]=1007,this[Wi](e)}var Qi=function(e){const t=e.length;let n=0;for(;n<t;)if(128&e[n])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}else n++;return!0},es=ur((function(e){try{e.exports=qi(__dirname)}catch(t){e.exports=Qi}})),ts=ur((function(e){const{isUtf8:t}=x.default,{hasBlob:n}=li;function r(e){const t=e.length;let n=0;for(;n<t;)if(128&e[n])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}else n++;return!0}if(e.exports={isBlob:function(e){return n&&"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&("Blob"===e[Symbol.toStringTag]||"File"===e[Symbol.toStringTag])},isValidStatusCode:function(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},isValidUTF8:r,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?r(e):t(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{const t=es;e.exports.isValidUTF8=function(e){return e.length<32?r(e):t(e)}}catch(e){}}));ts.isBlob,ts.isValidStatusCode,ts.isValidUTF8,ts.tokenChars;const{Writable:ns}=y.default,{BINARY_TYPES:rs,EMPTY_BUFFER:os,kStatusCode:is,kWebSocket:ss}=li,{concat:as,toArrayBuffer:cs,unmask:us}=Ti,{isValidStatusCode:ds,isValidUTF8:ls}=ts,ps=Buffer[Symbol.species];var fs=class extends ns{constructor(e={}){super(),this._allowSynchronousEvents=void 0===e.allowSynchronousEvents||e.allowSynchronousEvents,this._binaryType=e.binaryType||rs[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[ss]=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._errored=!1,this._loop=!1,this._state=0}_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 ps(t.buffer,t.byteOffset+e,t.length-e),new ps(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 ps(n.buffer,n.byteOffset+e,n.length-e)),e-=n.length}while(e>0);return t}startLoop(e){this._loop=!0;do{switch(this._state){case 0:this.getInfo(e);break;case 1:this.getPayloadLength16(e);break;case 2:this.getPayloadLength64(e);break;case 3:this.getMask();break;case 4:this.getData(e);break;case 5:case 6:return void(this._loop=!1)}}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2)return void(this._loop=!1);const t=this.consume(2);if(48&t[0]){return void e(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"))}const n=!(64&~t[0]);if(!n||this._extensions[Yi.extensionName]){if(this._fin=!(128&~t[0]),this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(n){return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(!this._fragmented){return void e(this.createError(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 void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}this._compressed=n}else{if(!(this._opcode>7&&this._opcode<11)){return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}if(!this._fin){return void e(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"))}if(n){return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength){return void e(this.createError(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&~t[1]),this._isServer){if(!this._masked){return void e(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}}else if(this._masked){return void e(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"))}126===this._payloadLength?this._state=1:127===this._payloadLength?this._state=2:this.haveLength(e)}else{e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}}getPayloadLength16(e){this._bufferedBytes<2?this._loop=!1:(this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e))}getPayloadLength64(e){if(this._bufferedBytes<8)return void(this._loop=!1);const t=this.consume(8),n=t.readUInt32BE(0);if(n>Math.pow(2,21)-1){e(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"))}else this._payloadLength=n*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){e(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"))}else 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=os;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);t=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&us(t,this._mask)}if(this._opcode>7)this.controlMessage(t,e);else{if(this._compressed)return this._state=5,void this.decompress(t,e);t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}}decompress(e,t){this._extensions[Yi.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){const e=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");return void t(e)}this._fragments.push(n)}this.dataMessage(t),0===this._state&&this.startLoop(t)}))}dataMessage(e){if(!this._fin)return void(this._state=0);const t=this._messageLength,n=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let r;r="nodebuffer"===this._binaryType?as(n,t):"arraybuffer"===this._binaryType?cs(as(n,t)):"blob"===this._binaryType?new Blob(n):n,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!0),this._state=0,this.startLoop(e)})))}else{const r=as(n,t);if(!this._skipUTF8Validation&&!ls(r)){const t=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void e(t)}5===this._state||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=0):(this._state=6,setImmediate((()=>{this.emit("message",r,!1),this._state=0,this.startLoop(e)})))}}controlMessage(e,t){if(8!==this._opcode)this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",e),this._state=0):(this._state=6,setImmediate((()=>{this.emit(9===this._opcode?"ping":"pong",e),this._state=0,this.startLoop(t)})));else{if(0===e.length)this._loop=!1,this.emit("conclude",1005,os),this.end();else{const n=e.readUInt16BE(0);if(!ds(n)){const e=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");return void t(e)}const r=new ps(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!ls(r)){const e=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void t(e)}this._loop=!1,this.emit("conclude",n,r),this.end()}this._state=0}}createError(e,t,n,r,o){this._loop=!1,this._errored=!0;const i=new e(n?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(i,this.createError),i.code=o,i[is]=r,i}};const{randomFillSync:hs}=k.default,{EMPTY_BUFFER:vs,kWebSocket:ms,NOOP:bs}=li,{isBlob:gs,isValidStatusCode:ys}=ts,{mask:ws,toBuffer:Is}=Ti,js=Symbol("kByteLength"),Es=Buffer.alloc(4),Rs=8192;let Cs,Us=Rs;class _s{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._queue=[],this._state=0,this.onerror=bs,this[ms]=void 0}static frame(e,t){let n,r,o=!1,i=2,s=!1;t.mask&&(n=t.maskBuffer||Es,t.generateMask?t.generateMask(n):(Us===Rs&&(void 0===Cs&&(Cs=Buffer.alloc(Rs)),hs(Cs,0,Rs),Us=0),n[0]=Cs[Us++],n[1]=Cs[Us++],n[2]=Cs[Us++],n[3]=Cs[Us++]),s=!(n[0]|n[1]|n[2]|n[3]),i=6),"string"==typeof e?r=t.mask&&!s||void 0===t[js]?(e=Buffer.from(e)).length:t[js]:(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 c=Buffer.allocUnsafe(o?r+i:i);return c[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(c[0]|=64),c[1]=a,126===a?c.writeUInt16BE(r,2):127===a&&(c[2]=c[3]=0,c.writeUIntBE(r,4,6)),t.mask?(c[1]|=128,c[i-4]=n[0],c[i-3]=n[1],c[i-2]=n[2],c[i-1]=n[3],s?[c,e]:o?(ws(e,n,c,i,r),[c]):(ws(e,n,e,0,r),[c,e])):[c,e]}close(e,t,n,r){let o;if(void 0===e)o=vs;else{if("number"!=typeof e||!ys(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={[js]:o.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};0!==this._state?this.enqueue([this.dispatch,o,!1,i,r]):this.sendFrame(_s.frame(o,i),r)}ping(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):gs(e)?(r=e.size,o=!1):(r=(e=Is(e)).length,o=Is.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[js]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};gs(e)?0!==this._state?this.enqueue([this.getBlobData,e,!1,i,n]):this.getBlobData(e,!1,i,n):0!==this._state?this.enqueue([this.dispatch,e,!1,i,n]):this.sendFrame(_s.frame(e,i),n)}pong(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):gs(e)?(r=e.size,o=!1):(r=(e=Is(e)).length,o=Is.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[js]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};gs(e)?0!==this._state?this.enqueue([this.getBlobData,e,!1,i,n]):this.getBlobData(e,!1,i,n):0!==this._state?this.enqueue([this.dispatch,e,!1,i,n]):this.sendFrame(_s.frame(e,i),n)}send(e,t,n){const r=this._extensions[Yi.extensionName];let o,i,s=t.binary?2:1,a=t.compress;"string"==typeof e?(o=Buffer.byteLength(e),i=!1):gs(e)?(o=e.size,i=!1):(o=(e=Is(e)).length,i=Is.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);const c={[js]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:i,rsv1:a};gs(e)?0!==this._state?this.enqueue([this.getBlobData,e,this._compress,c,n]):this.getBlobData(e,this._compress,c,n):0!==this._state?this.enqueue([this.dispatch,e,this._compress,c,n]):this.dispatch(e,this._compress,c,n)}getBlobData(e,t,n,r){this._bufferedBytes+=n[js],this._state=2,e.arrayBuffer().then((e=>{if(this._socket.destroyed){const e=new Error("The socket was closed while the blob was being read");return void process.nextTick(As,this,e,r)}this._bufferedBytes-=n[js];const o=Is(e);t?this.dispatch(o,t,n,r):(this._state=0,this.sendFrame(_s.frame(o,n),r),this.dequeue())})).catch((e=>{process.nextTick(Ps,this,e,r)}))}dispatch(e,t,n,r){if(!t)return void this.sendFrame(_s.frame(e,n),r);const o=this._extensions[Yi.extensionName];this._bufferedBytes+=n[js],this._state=1,o.compress(e,n.fin,((e,t)=>{if(this._socket.destroyed){As(this,new Error("The socket was closed while data was being compressed"),r)}else this._bufferedBytes-=n[js],this._state=0,n.readOnly=!1,this.sendFrame(_s.frame(t,n),r),this.dequeue()}))}dequeue(){for(;0===this._state&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[3][js],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][js],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 Ss=_s;function As(e,t,n){"function"==typeof n&&n(t);for(let n=0;n<e._queue.length;n++){const r=e._queue[n],o=r[r.length-1];"function"==typeof o&&o(t)}}function Ps(e,t,n){As(e,t,n),e.onerror(t)}const{kForOnEventAttribute:xs,kListener:ks}=li,qs=Symbol("kCode"),Os=Symbol("kData"),Ds=Symbol("kError"),Ts=Symbol("kMessage"),Bs=Symbol("kReason"),Ns=Symbol("kTarget"),Ls=Symbol("kType"),Gs=Symbol("kWasClean");class Fs{constructor(e){this[Ns]=null,this[Ls]=e}get target(){return this[Ns]}get type(){return this[Ls]}}Object.defineProperty(Fs.prototype,"target",{enumerable:!0}),Object.defineProperty(Fs.prototype,"type",{enumerable:!0});class Js extends Fs{constructor(e,t={}){super(e),this[qs]=void 0===t.code?0:t.code,this[Bs]=void 0===t.reason?"":t.reason,this[Gs]=void 0!==t.wasClean&&t.wasClean}get code(){return this[qs]}get reason(){return this[Bs]}get wasClean(){return this[Gs]}}Object.defineProperty(Js.prototype,"code",{enumerable:!0}),Object.defineProperty(Js.prototype,"reason",{enumerable:!0}),Object.defineProperty(Js.prototype,"wasClean",{enumerable:!0});class Ms extends Fs{constructor(e,t={}){super(e),this[Ds]=void 0===t.error?null:t.error,this[Ts]=void 0===t.message?"":t.message}get error(){return this[Ds]}get message(){return this[Ts]}}Object.defineProperty(Ms.prototype,"error",{enumerable:!0}),Object.defineProperty(Ms.prototype,"message",{enumerable:!0});class zs extends Fs{constructor(e,t={}){super(e),this[Os]=void 0===t.data?null:t.data}get data(){return this[Os]}}Object.defineProperty(zs.prototype,"data",{enumerable:!0});const Ws={addEventListener(e,t,n={}){for(const r of this.listeners(e))if(!n[xs]&&r[ks]===t&&!r[xs])return;let r;if("message"===e)r=function(e,n){const r=new zs("message",{data:n?e:e.toString()});r[Ns]=this,Vs(t,this,r)};else if("close"===e)r=function(e,n){const r=new Js("close",{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[Ns]=this,Vs(t,this,r)};else if("error"===e)r=function(e){const n=new Ms("error",{error:e,message:e.message});n[Ns]=this,Vs(t,this,n)};else{if("open"!==e)return;r=function(){const e=new Fs("open");e[Ns]=this,Vs(t,this,e)}}r[xs]=!!n[xs],r[ks]=t,n.once?this.once(e,r):this.on(e,r)},removeEventListener(e,t){for(const n of this.listeners(e))if(n[ks]===t&&!n[xs]){this.removeListener(e,n);break}}};var $s={CloseEvent:Js,ErrorEvent:Ms,Event:Fs,EventTarget:Ws,MessageEvent:zs};function Vs(e,t,n){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}const{tokenChars:Hs}=ts;function Ys(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var Zs={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,c=-1,u=-1,d=-1,l=0;for(;l<e.length;l++)if(u=e.charCodeAt(l),void 0===n)if(-1===d&&1===Hs[u])-1===c&&(c=l);else if(0===l||32!==u&&9!==u){if(59!==u&&44!==u)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);const r=e.slice(c,d);44===u?(Ys(t,r,o),o=Object.create(null)):n=r,c=d=-1}}else-1===d&&-1!==c&&(d=l);else if(void 0===r)if(-1===d&&1===Hs[u])-1===c&&(c=l);else if(32===u||9===u)-1===d&&-1!==c&&(d=l);else if(59===u||44===u){if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l),Ys(o,e.slice(c,d),!0),44===u&&(Ys(t,n,o),o=Object.create(null),n=void 0),c=d=-1}else{if(61!==u||-1===c||-1!==d)throw new SyntaxError(`Unexpected character at index ${l}`);r=e.slice(c,l),c=d=-1}else if(s){if(1!==Hs[u])throw new SyntaxError(`Unexpected character at index ${l}`);-1===c?c=l:i||(i=!0),s=!1}else if(a)if(1===Hs[u])-1===c&&(c=l);else if(34===u&&-1!==c)a=!1,d=l;else{if(92!==u)throw new SyntaxError(`Unexpected character at index ${l}`);s=!0}else if(34===u&&61===e.charCodeAt(l-1))a=!0;else if(-1===d&&1===Hs[u])-1===c&&(c=l);else if(-1===c||32!==u&&9!==u){if(59!==u&&44!==u)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===c)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);let s=e.slice(c,d);i&&(s=s.replace(/\\/g,""),i=!1),Ys(o,r,s),44===u&&(Ys(t,n,o),o=Object.create(null),n=void 0),r=void 0,c=d=-1}}else-1===d&&(d=l);if(-1===c||a||32===u||9===u)throw new SyntaxError("Unexpected end of input");-1===d&&(d=l);const p=e.slice(c,d);return void 0===n?Ys(t,p,o):(void 0===r?Ys(o,p,!0):Ys(o,r,i?p.replace(/\\/g,""):p),Ys(t,n,o)),t}};const{randomBytes:Ks,createHash:Xs}=k.default,{URL:Qs}=j.default,{isBlob:ea}=ts,{BINARY_TYPES:ta,EMPTY_BUFFER:na,GUID:ra,kForOnEventAttribute:oa,kListener:ia,kStatusCode:sa,kWebSocket:aa,NOOP:ca}=li,{EventTarget:{addEventListener:ua,removeEventListener:da}}=$s,{format:la,parse:pa}=Zs,{toBuffer:fa}=Ti,ha=Symbol("kAborted"),va=[8,13],ma=["CONNECTING","OPEN","CLOSING","CLOSED"],ba=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class ga extends g.default{constructor(e,t,n){super(),this._binaryType=ta[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=na,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=ga.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]),wa(this,e,t,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){ta.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 fs({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation}),o=new Ss(e,this._extensions,n.generateMask);this._receiver=r,this._sender=o,this._socket=e,r[aa]=this,o[aa]=this,e[aa]=this,r.on("conclude",Ua),r.on("drain",_a),r.on("error",Sa),r.on("message",Pa),r.on("ping",xa),r.on("pong",ka),o.onerror=Oa,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",Ta),e.on("data",Ba),e.on("end",Na),e.on("error",La),this._readyState=ga.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=ga.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[Yi.extensionName]&&this._extensions[Yi.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=ga.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==ga.CLOSED)if(this.readyState!==ga.CONNECTING)this.readyState!==ga.CLOSING?(this._readyState=ga.CLOSING,this._sender.close(e,t,!this._isServer,(e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),Da(this)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();else{const e="WebSocket was closed before the connection was established";Ra(this,this._req,e)}}pause(){this.readyState!==ga.CONNECTING&&this.readyState!==ga.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===ga.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===ga.OPEN?(void 0===t&&(t=!this._isServer),this._sender.ping(e||na,t,n)):Ca(this,e,n)}pong(e,t,n){if(this.readyState===ga.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===ga.OPEN?(void 0===t&&(t=!this._isServer),this._sender.pong(e||na,t,n)):Ca(this,e,n)}resume(){this.readyState!==ga.CONNECTING&&this.readyState!==ga.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===ga.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!==ga.OPEN)return void Ca(this,e,n);const r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[Yi.extensionName]||(r.compress=!1),this._sender.send(e||na,r,n)}terminate(){if(this.readyState!==ga.CLOSED)if(this.readyState!==ga.CONNECTING)this._socket&&(this._readyState=ga.CLOSING,this._socket.destroy());else{const e="WebSocket was closed before the connection was established";Ra(this,this._req,e)}}}Object.defineProperty(ga,"CONNECTING",{enumerable:!0,value:ma.indexOf("CONNECTING")}),Object.defineProperty(ga.prototype,"CONNECTING",{enumerable:!0,value:ma.indexOf("CONNECTING")}),Object.defineProperty(ga,"OPEN",{enumerable:!0,value:ma.indexOf("OPEN")}),Object.defineProperty(ga.prototype,"OPEN",{enumerable:!0,value:ma.indexOf("OPEN")}),Object.defineProperty(ga,"CLOSING",{enumerable:!0,value:ma.indexOf("CLOSING")}),Object.defineProperty(ga.prototype,"CLOSING",{enumerable:!0,value:ma.indexOf("CLOSING")}),Object.defineProperty(ga,"CLOSED",{enumerable:!0,value:ma.indexOf("CLOSED")}),Object.defineProperty(ga.prototype,"CLOSED",{enumerable:!0,value:ma.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((e=>{Object.defineProperty(ga.prototype,e,{enumerable:!0})})),["open","error","close","message"].forEach((e=>{Object.defineProperty(ga.prototype,`on${e}`,{enumerable:!0,get(){for(const t of this.listeners(e))if(t[oa])return t[ia];return null},set(t){for(const t of this.listeners(e))if(t[oa]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[oa]:!0})}})})),ga.prototype.addEventListener=ua,ga.prototype.removeEventListener=da;var ya=ga;function wa(e,t,n,r){const o={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:va[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=o.autoPong,!va.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${va.join(", ")})`);let i;if(t instanceof Qs)i=t;else try{i=new Qs(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}"http:"===i.protocol?i.protocol="ws:":"https:"===i.protocol&&(i.protocol="wss:"),e._url=i.href;const s="wss:"===i.protocol,a="ws+unix:"===i.protocol;let c;if("ws:"===i.protocol||s||a?a&&!i.pathname?c="The URL's pathname is empty":i.hash&&(c="The URL contains a fragment identifier"):c='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"',c){const t=new SyntaxError(c);if(0===e._redirects)throw t;return void Ia(e,t)}const u=s?443:80,d=Ks(16).toString("base64"),l=s?R.default.request:I.default.request,p=new Set;let f,h;if(o.createConnection=o.createConnection||(s?Ea:ja),o.defaultPort=o.defaultPort||u,o.port=i.port||u,o.host=i.hostname.startsWith("[")?i.hostname.slice(1,-1):i.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":d,Connection:"Upgrade",Upgrade:"websocket"},o.path=i.pathname+i.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(f=new Yi(!0!==o.perMessageDeflate?o.perMessageDeflate:{},!1,o.maxPayload),o.headers["Sec-WebSocket-Extensions"]=la({[Yi.extensionName]:f.offer()})),n.length){for(const e of n){if("string"!=typeof e||!ba.test(e)||p.has(e))throw new SyntaxError("An invalid or duplicated subprotocol was specified");p.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),(i.username||i.password)&&(o.auth=`${i.username}:${i.password}`),a){const e=o.path.split(":");o.socketPath=e[0],o.path=e[1]}if(o.followRedirects){if(0===e._redirects){e._originalIpc=a,e._originalSecure=s,e._originalHostOrSocketPath=a?o.socketPath:i.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=a?!!e._originalIpc&&o.socketPath===e._originalHostOrSocketPath:!e._originalIpc&&i.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!s)&&(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")),h=e._req=l(o),e._redirects&&e.emit("redirect",e.url,h)}else h=e._req=l(o);o.timeout&&h.on("timeout",(()=>{Ra(e,h,"Opening handshake has timed out")})),h.on("error",(t=>{null===h||h[ha]||(h=e._req=null,Ia(e,t))})),h.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 Ra(e,h,"Maximum redirects exceeded");let i;h.abort();try{i=new Qs(s,t)}catch(t){const n=new SyntaxError(`Invalid URL: ${s}`);return void Ia(e,n)}wa(e,i,n,r)}else e.emit("unexpected-response",h,i)||Ra(e,h,`Unexpected server response: ${i.statusCode}`)})),h.on("upgrade",((t,n,r)=>{if(e.emit("upgrade",t),e.readyState!==ga.CONNECTING)return;h=e._req=null;const i=t.headers.upgrade;if(void 0===i||"websocket"!==i.toLowerCase())return void Ra(e,n,"Invalid Upgrade header");const s=Xs("sha1").update(d+ra).digest("base64");if(t.headers["sec-websocket-accept"]!==s)return void Ra(e,n,"Invalid Sec-WebSocket-Accept header");const a=t.headers["sec-websocket-protocol"];let c;if(void 0!==a?p.size?p.has(a)||(c="Server sent an invalid subprotocol"):c="Server sent a subprotocol but none was requested":p.size&&(c="Server sent no subprotocol"),c)return void Ra(e,n,c);a&&(e._protocol=a);const u=t.headers["sec-websocket-extensions"];if(void 0!==u){if(!f){return void Ra(e,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let t;try{t=pa(u)}catch(t){return void Ra(e,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(t);if(1!==r.length||r[0]!==Yi.extensionName){return void Ra(e,n,"Server indicated an extension that was not requested")}try{f.accept(t[Yi.extensionName])}catch(t){return void Ra(e,n,"Invalid Sec-WebSocket-Extensions header")}e._extensions[Yi.extensionName]=f}e.setSocket(n,r,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})})),o.finishRequest?o.finishRequest(h,e):h.end()}function Ia(e,t){e._readyState=ga.CLOSING,e._errorEmitted=!0,e.emit("error",t),e.emitClose()}function ja(e){return e.path=e.socketPath,_.default.connect(e)}function Ea(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=_.default.isIP(e.host)?"":e.host),q.default.connect(e)}function Ra(e,t,n){e._readyState=ga.CLOSING;const r=new Error(n);Error.captureStackTrace(r,Ra),t.setHeader?(t[ha]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(Ia,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function Ca(e,t,n){if(t){const n=ea(t)?t.size:fa(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){const t=new Error(`WebSocket is not open: readyState ${e.readyState} (${ma[e.readyState]})`);process.nextTick(n,t)}}function Ua(e,t){const n=this[aa];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,void 0!==n._socket[aa]&&(n._socket.removeListener("data",Ba),process.nextTick(qa,n._socket),1005===e?n.close():n.close(e,t))}function _a(){const e=this[aa];e.isPaused||e._socket.resume()}function Sa(e){const t=this[aa];void 0!==t._socket[aa]&&(t._socket.removeListener("data",Ba),process.nextTick(qa,t._socket),t.close(e[sa])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e))}function Aa(){this[aa].emitClose()}function Pa(e,t){this[aa].emit("message",e,t)}function xa(e){const t=this[aa];t._autoPong&&t.pong(e,!this._isServer,ca),t.emit("ping",e)}function ka(e){this[aa].emit("pong",e)}function qa(e){e.resume()}function Oa(e){const t=this[aa];t.readyState!==ga.CLOSED&&(t.readyState===ga.OPEN&&(t._readyState=ga.CLOSING,Da(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e)))}function Da(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),3e4)}function Ta(){const e=this[aa];let t;this.removeListener("close",Ta),this.removeListener("data",Ba),this.removeListener("end",Na),e._readyState=ga.CLOSING,this._readableState.endEmitted||e._closeFrameReceived||e._receiver._writableState.errorEmitted||null===(t=e._socket.read())||e._receiver.write(t),e._receiver.end(),this[aa]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",Aa),e._receiver.on("finish",Aa))}function Ba(e){this[aa]._receiver.write(e)||this.pause()}function Na(){const e=this[aa];e._readyState=ga.CLOSING,e._receiver.end(),this.end()}function La(){const e=this[aa];this.removeListener("error",La),this.on("error",ca),e&&(e._readyState=ga.CLOSING,this.destroy())}var Ga=function(e){function n(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=S.createServer(s.handleConnection.bind(s));var a=null==r?void 0:r.altHostnames.map((function(e){return(t=Ot(t=e))&&Qn.test(t)?t.replace(Xn,"\\$&"):t;var t})).join("|");return s.hostRegex=new RegExp("Host: (?:".concat(a,")(:.*$|$)"),"im"),s}return T(n,e),Object.defineProperty(n.prototype,"bindTo",{get:function(){var e;return null!==(e=this.boundTo)&&void 0!==e?e:this.bindToAssign},enumerable:!1,configurable:!0}),n.prototype.open=function(){return N(this,void 0,void 0,(function(){var e=this;return L(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)}))}))]}))}))},n.prototype.close=function(){return N(this,void 0,void 0,(function(){var e,t=this;return L(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]}}))}))},n.prototype.handleConnection=function(e){var t=this;this.openConnections.add(e);var n=new ya(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=ci(n),o=this.getHeaderTransform();this.rewriteHostHeader&&o?ri(e,o,r):ri(e,r),ri(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")},n.prototype.getHeaderTransform=function(){if(this.rewriteHostHeader){var e=this.rewriteHostHeader.targetHostname,n=this.hostRegex;return new t.Transform({transform:function(t,r,o){var i=t.toString();if(i.split("\n",1)[0].includes("HTTP")){var s=i.replace(n,"Host: ".concat(e));o(null,Buffer.from(s))}else o(null,t)}})}},n}(e.EventEmitter),Fa=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=O.default.createSocket("udp4"),o.handleConnection(),o}return T(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 N(this,void 0,void 0,(function(){var e=this;return L(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 N(this,void 0,void 0,(function(){var e=this;return L(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 ya(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=ci(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}(e.EventEmitter);var Ja,Ma="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,za=function(e,t){return N(void 0,void 0,void 0,(function(){var n;return L(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)]}))}))},Wa=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(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}(y.default.Writable),$a=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 Fo,o.ipAllocationMutex=new Fo,o.stopForwarding=function(e){return N(o,void 0,void 0,(function(){var t,n,r,o,i,s,a;return L(this,(function(c){switch(c.label){case 0:return[4,e.tunnel.close()];case 1:return c.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:c.sent(),c.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 u.execSync("fsutil dirty query %systemdrive%"),!0}catch(e){if("ENOENT"===e.code)try{return u.execSync("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(!Ma)throw new Error("Port forwarding only possible when started with nodejs")},o.proxyApiClient=new wo(t),o}return T(t,e),t.prototype.withProjectForwarding=function(e,t,n){return void 0===n&&(n=!0),N(this,void 0,void 0,(function(){var r;return L(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),N(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return L(this,(function(c){switch(c.label){case 0:return this.assertStartedWithNodejs(),n=e.projectId,[4,this.listServices({parameters:{projectId:n}})];case 1:return r=c.sent(),[4,this.listAddons({parameters:{projectId:n}})];case 2:return o=c.sent(),[4,Promise.all(r.data.services.map((function(e){return N(a,void 0,void 0,(function(){return L(this,(function(r){return[2,this.forwardService({projectId:n,serviceId:e.id},t)]}))}))})))];case 3:return i=c.sent(),[4,Promise.all(o.data.addons.map((function(e){return N(a,void 0,void 0,(function(){return L(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=c.sent(),[2,{services:i,addons:s}]}}))}))},t.prototype.withServiceForwarding=function(e,t,n){return void 0===n&&(n=!0),N(this,void 0,void 0,(function(){var r;return L(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),N(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,u=this;return L(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,c=o.ports,0===a.length?[2,[]]:[4,za(c,(function(e){var o,c="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=G([d],l,!0);return u.forwardPort(c,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),N(this,void 0,void 0,(function(){var r;return L(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),N(this,void 0,void 0,(function(){var n,r,o,i,s=this;return L(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,za((c=i,null!=c&&c.length?Ft(c,nr):[]),(function(e){var i=e.podName,a=e.internalHostname,c=e.port;return N(s,void 0,void 0,(function(){var e;return L(this,(function(s){return e="https://".concat(o.targetDomain,"/tunnel/projects/").concat(r,"/addons/").concat(n,"/instance/").concat(i,"/port/").concat(c.internalPort),[2,this.forwardPort(e,c,[a],"addon",n,r,t)]}))}))}))];case 2:return[2,a.sent()]}var c}))}))},t.prototype.allocateIpAddress=function(e){return N(this,void 0,void 0,(function(){var t=this;return L(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return N(t,void 0,void 0,(function(){var t,n,r,o,i;return L(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,Io(e,r,n)];case 1:return o=s.sent(),this.nextIpAddress=Co(Ro(o)+1),Ro(this.nextIpAddress)>Ro(n)&&(this.nextIpAddress=t),[2,o]}}))}))}))]}))}))},t.prototype.forwardPort=function(e,t,n,r,o,i,s,a){var c;return void 0===s&&(s=!0),N(this,void 0,void 0,(function(){var u,d,l,p,f,h,v=this;return L(this,(function(m){switch(m.label){case 0:if(u={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,t,s)];case 1:return l=m.sent(),p="UDP"===t.protocol?new Fa(e,u,l):new Ga(e,u,a,l),s?[3,3]:[4,this.registerHostnames(null===(c=p.bindTo)||void 0===c?void 0:c.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 N(v,void 0,void 0,(function(){return L(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,i){return N(this,void 0,void 0,(function(){var s,a,c;return L(this,(function(u){switch(u.label){case 0:return i&&"darwin"===U.default.platform()?[2,void 0]:(s=this.connections.filter((function(n){return n.forwardingContext.projectId===e&&n.forwardingContext.id===t&&n.forwardingContext.type===r})),(a=null==s?void 0:s.find((function(e){return n.find((function(t){return e.forwardingContext.hostnames.includes(t)}))})))?[2,{address:null==a?void 0:a.forwardingContext.address,port:o.internalPort}]:(c={},[4,this.allocateIpAddress(o.internalPort)]));case 1:return[2,(c.address=u.sent(),c.port=o.internalPort,c)]}}))}))},t.prototype.registerHostnames=function(e,t){return N(this,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.removeHosts.apply(n,t),n.add.apply(n,G([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.unregisterHostnames=function(e,t){return N(this,void 0,void 0,(function(){return L(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.remove.apply(n,G([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.modifyHostsFile=function(e){return N(this,void 0,void 0,(function(){var t=this;return L(this,(function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter((function(){return N(t,void 0,void 0,(function(){var t,n=this;return L(this,(function(r){switch(r.label){case 0:return[4,Go.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,Va(5)((function(){return N(n,void 0,void 0,(function(){return L(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,Va(5)((function(){return N(n,void 0,void 0,(function(){return L(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 N(this,void 0,void 0,(function(){var t=this;return L(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 N(this,void 0,void 0,(function(){var t=this;return L(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 N(this,void 0,void 0,(function(){var t=this;return L(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 N(this,void 0,void 0,(function(){var e=this;return L(this,(function(t){switch(t.label){case 0:return[4,Promise.all(this.connections.map((function(t){return N(e,void 0,void 0,(function(){return L(this,(function(e){return[2,this.stopForwarding(t)]}))}))})))];case 1:return t.sent(),[2]}}))}))},t}(e.EventEmitter),Va=function(e,t){return void 0===t&&(t=50),function(n){var r=e,o=function(){return N(void 0,void 0,void 0,(function(){var e;return L(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()}},Ha=function(e){function t(t,n,r,o,i,s){void 0===o&&(o=new w.PassThrough),void 0===i&&(i=new w.PassThrough),void 0===s&&(s=new w.PassThrough);var a=e.call(this)||this;return a.baseUrl=t,a.execConfig=n,a.token=r,a.stdOut=o,a.stdErr=i,a.stdIn=s,a.waitForCommandResult=function(){return N(a,void 0,void 0,(function(){return L(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()]}}))}))},a.sendInputToCurrentCommand=function(e){return N(a,void 0,void 0,(function(){var t;return L(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]}))}))},a.resizeTerminal=function(e){return N(a,void 0,void 0,(function(){var t;return L(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]}))}))},a.constructPayloadPacket=function(e){return JSON.stringify({type:"payload",data:e.toString()})},a}return T(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 N(this,void 0,void 0,(function(){var e=this;return L(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 ya(a);try{e.duplex=ci(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&&c("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":c(null===(o=i.data)||void 0===o?void 0:o.message);break;default:var u="unable to parse message: ".concat(JSON.stringify(i));c(u)}})),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 c=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,c=t.ttyRows,u={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{containerId:r,command:n,shell:o,user:i,group:s,ttyColumns:a,ttyRows:c}}};null===(e=this.duplex)||void 0===e||e.write(JSON.stringify(u))},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}(e.EventEmitter),Ya=function(){function e(e){this.contextProvider=e,this.assertStartedWithNodejs=function(){if(!Ma)throw new Error("Command exec only possible when started with nodejs")}}return e.prototype.execServiceCommand=function(e,t){return N(this,void 0,void 0,(function(){var n,r,o;return L(this,(function(i){return n=e.serviceId,r=e.projectId,o=B({projectId:r,entityId:n,entityType:"service"},t),[2,this.execCommand(o)]}))}))},e.prototype.execServiceSession=function(e,t){return N(this,void 0,void 0,(function(){var n,r,o;return L(this,(function(i){return n=e.serviceId,r=e.projectId,o=B({projectId:r,entityId:n,entityType:"service"},t),[2,this.shellSession(o)]}))}))},e.prototype.execJobCommand=function(e,t){return N(this,void 0,void 0,(function(){var n,r,o;return L(this,(function(i){return n=e.jobId,r=e.projectId,o=B({projectId:r,entityId:n,entityType:"job"},t),[2,this.execCommand(o)]}))}))},e.prototype.execJobSession=function(e,t){return N(this,void 0,void 0,(function(){var n,r,o;return L(this,(function(i){return n=e.jobId,r=e.projectId,o=B({projectId:r,entityId:n,entityType:"job"},t),[2,this.shellSession(o)]}))}))},e.prototype.execCommand=function(e){return N(this,void 0,void 0,(function(){var t,n,r;return L(this,(function(o){switch(o.label){case 0:return this.assertStartedWithNodejs(),t=this.getCommandRunner(B({shell:"none"},e)),n=new Wa,r=new Wa,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 Ha(t,e,n)},e}(),Za=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(t,e),t}(Error),Ka=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 N(o,void 0,void 0,(function(){var e;return L(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(t,e),t.getLogsEndpoint=function(e){var t=e.containerName,n=e.types,r=e.entityId,o=e.entityType,i=e.buildId,s=e.runId,a=e.backupId,c=e.restoreId,u=e.deploymentId,d=e.isBuild,l=e.lineLimit,p=e.projectId,f=e.queryType,h=e.startTime,v=e.endTime,m=e.duration,b=e.direction,g=e.textIncludes,y=e.textNotIncludes,w=e.regexIncludes,I=e.regexNotIncludes,j="/v1/projects/".concat(p,"/"),E=new URLSearchParams;return E.append("queryType",f),void 0!==h&&E.append("startTime",h.toISOString()),void 0!==v&&E.append("endTime",v.toISOString()),void 0!==l&&E.append("lineLimit",l.toString()),void 0!==t&&E.append("containerName",t),void 0!==u&&E.append("deploymentId",u),void 0!==s&&E.append("runId",s),void 0!==i&&E.append("buildId",i),void 0!==g&&E.append("textIncludes",g),void 0!==y&&E.append("textNotIncludes",y),void 0!==w&&E.append("regexIncludes",w),void 0!==I&&E.append("regexNotIncludes",I),void 0!==b&&E.append("direction",b),void 0!==m&&E.append("duration",m.toString()),void 0!==n&&n.forEach((function(e){return E.append("type",e)})),"".concat(j).concat(function(){var e=d?"/build-logs":"/logs";switch(o){case"service":return"services/".concat(r).concat(e);case"job":return"jobs/".concat(r).concat(e);case"addon":return"addons/".concat(r).concat(e);case"addonBackup":return"addons/".concat(r,"/backups/").concat(a).concat(e);case"addonRestore":return"addons/".concat(r,"/backups/").concat(a,"/restores/").concat(c).concat(e);default:throw new Error("Unexpected Northflank entity type received in logs endpoint generation: ".concat(o))}}(),"?").concat(E.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 N(this,void 0,void 0,(function(){var e=this;return L(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 ya(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&&c("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(uc));break;case"error":c(null===(r=o.data)||void 0===r?void 0:r.message);break;default:var a="unable to parse message: ".concat(JSON.stringify(o));c(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 c=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}(e.EventEmitter),Xa=Ma?go:window.fetch,Qa=function(){if(Ma)try{return JSON.parse(A.default.readFileSync(P.default.join(P.default.dirname(r.fileURLToPath("undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("api-client.js",document.baseURI).href)),"../../package.json")).toString())}catch(e){return console.log("Failed to check version of northflank CLI (".concat(e.message,")")),{}}return{}},ec=function(){function e(e,t){var n=this;this.opts=t,this.call=function(e){return N(n,void 0,void 0,(function(){var t,n,r,o,i,s,a,c,u,d,l,p,f=this;return L(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=B(B({url:o},n),{body:i}),[4,sc(o,B(B({},n),{body:i}))];case 1:return[4,(a=h.sent()).text()];case 2:return c=h.sent(),u=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 Za(n);return n}},d=function(){try{return JSON.parse(c)}catch(e){throw Error("Failed reading api request result: \n\tStatus: ".concat(a.statusText," (").concat(a.status,")\n\tMessage: ").concat(c))}}(),l=u(),[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=Qa())||void 0===t?void 0:t.version).concat(r)}},e}(),tc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="get",t.body=function(){},t}return T(t,e),t}(ec),nc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="post",t}return T(t,e),t}(ec),rc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="delete",t.body=function(){},t}return T(t,e),t}(ec),oc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="put",t}return T(t,e),t}(ec),ic=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="patch",t}return T(t,e),t}(ec),sc=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 Xa(e,t).then((function(e){o(e)})).catch((function(e){return N(void 0,void 0,void 0,(function(){return L(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)}))},ac=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 Ka.getLogsEndpoint(e)},t.body=function(){},t}return T(t,e),t}(tc);exports.LogType=void 0,(Ja=exports.LogType||(exports.LogType={})).CDN="cdn",Ja.Mesh="mesh",Ja.Ingress="ingress",Ja.Runtime="runtime";var cc,uc=function(e){return{containerId:e.containerId,log:e.log,ts:new Date(e.ts)}},dc=function(e){var t=this;this.contextProvider=e,this.getServiceLogs=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return L(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 N(t,void 0,void 0,(function(){var t,n,r,o,i;return L(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,B(B({},n),{isBuild:!0}),"service")]}))}))},this.getJobLogs=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return L(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 N(t,void 0,void 0,(function(){var t,n,r,o,i;return L(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,B(B({},n),{isBuild:!0}),"job")]}))}))},this.getAddonLogs=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return L(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 N(t,void 0,void 0,(function(){var t,n,r;return L(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logRange(r,B(B({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.getAddonRestoresLogs=function(e){return N(t,void 0,void 0,(function(){var t,n,r,o;return L(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,B(B({},n),o),"addonRestore")]}))}))},this.logRange=function(e,n,r){return N(t,void 0,void 0,(function(){var t,o,i,s,a;return L(this,(function(c){switch(c.label){case 0:return t=e.entityId,o=e.projectId,i=B(B({projectId:o,entityId:t,entityType:r},n),{queryType:"range"}),[4,new ac(this.contextProvider,{}).call(i)];case 1:return(s=c.sent()).error?[2,s]:[2,B(B({},s),{data:null===(a=null==s?void 0:s.data)||void 0===a?void 0:a.map(uc)})]}}))}))},this.tailServiceLogs=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return L(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 N(t,void 0,void 0,(function(){var t,n,r,o,i;return L(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,B(B({},n),{isBuild:!0}),"service")]}))}))},this.tailJobLogs=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return L(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 N(t,void 0,void 0,(function(){var t,n,r,o,i;return L(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,B(B({},n),{isBuild:!0}),"job")]}))}))},this.tailAddonLogs=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return L(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 N(t,void 0,void 0,(function(){var t,n,r;return L(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logTail(r,B(B({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.tailAddonRestoresLogs=function(e){return N(t,void 0,void 0,(function(){var t,n,r,o;return L(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,B(B({},n),o),"addonRestore")]}))}))},this.logTail=function(e,n,r){return N(t,void 0,void 0,(function(){var t,o,i,s,a;return L(this,(function(c){if(t=e.entityId,o=e.projectId,i=B({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 Ka(s,i,a)]}))}))},this.assertStartedWithNodejs=function(){if(!Ma)throw new Error("Command exec only possible when started with nodejs")}},lc=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.deploymentId,i=e.runId,s=e.buildId,a=e.isBuild,c=e.queryType,u=e.metricTypes,d=e.startTime,l=e.endTime,p=e.duration,f=e.containerName,h=e.timestamp,v="/v1/projects/".concat(t,"/");var m=new URLSearchParams;return m.append("queryType",c),void 0!==d&&m.append("startTime",d.toISOString()),void 0!==l&&m.append("endTime",l.toISOString()),void 0!==f&&m.append("containerName",f),void 0!==o&&m.append("deploymentId",o),void 0!==i&&m.append("runId",i),void 0!==s&&m.append("buildId",s),void 0!==h&&m.append("timestamp",h.toISOString()),void 0!==p&&m.append("duration",p.toString()),void 0!==u&&u.forEach((function(e){return m.append("metricTypes",e)})),"".concat(v).concat(function(){var e=a?"/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(m.toString())},t.body=function(){},t}return T(t,e),t}(tc),pc=function(e){return{metadata:e.metadata,data:e.data.map((function(e){return{value:e.value,ts:new Date(e.ts)}}))}};exports.MetricType=void 0,(cc=exports.MetricType||(exports.MetricType={})).Cpu="cpu",cc.Memory="memory",cc.NetworkIngress="networkIngress",cc.NetworkEgress="networkEgress",cc.TcpConnectionOpen="tcpConnectionsOpen",cc.PvcUsage="diskUsage",cc.Requests="requests",cc.Http4xxResponses="http4xxResponses",cc.Http5xxResponses="http5xxResponses",cc.Bandwidth="bandwidth",cc.BandwidthVolume="bandwidthVolume";var fc=function(e){var t=this;this.contextProvider=e,this.getServiceMetrics=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return L(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 N(t,void 0,void 0,(function(){var t,n,r,o,i;return L(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,B(B({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetrics=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return L(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 N(t,void 0,void 0,(function(){var t,n,r,o,i;return L(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,B(B({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetrics=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return L(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 N(t,void 0,void 0,(function(){var t,o,i;return L(this,(function(s){return t=e.entityId,o=e.projectId,i=B(B({projectId:o,entityId:t,entityType:r},n),{queryType:"single"}),[2,this.getMetrics(i)]}))}))},this.getServiceMetricsRange=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return L(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 N(t,void 0,void 0,(function(){var t,n,r,o,i;return L(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,B(B({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetricsRange=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return L(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 N(t,void 0,void 0,(function(){var t,n,r,o,i;return L(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,B(B({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetricsRange=function(e){return N(t,void 0,void 0,(function(){var t,n,r;return L(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 N(t,void 0,void 0,(function(){var t,o,i;return L(this,(function(s){return t=e.entityId,o=e.projectId,i=B(B({projectId:o,entityId:t,entityType:r},n),{queryType:"range"}),[2,this.getMetrics(i)]}))}))},this.getMetrics=function(e){return N(t,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return[4,new lc(this.contextProvider,{}).call(e)];case 1:return(t=n.sent()).error?[2,t]:[2,B(B({},t),{data:Object.fromEntries(Object.entries(t.data).map((function(e){var t=e[0],n=e[1];return[t,B(B({},n),{values:n.values.map(pc)})]})))})]}}))}))}},hc=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(t,e),t}(tc),vc=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(t,e),t}(tc),mc=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(t,e),t}(tc),bc=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(t,e),t}(tc),gc=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(t,e),t}(tc),yc=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(t,e),t}(nc),wc=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(encodeURIComponent(e.parameters.clusterId))},t.body=function(){},t}return T(t,e),t}(tc),Ic=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(encodeURIComponent(e.parameters.clusterId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),jc=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(encodeURIComponent(e.parameters.clusterId))},t.body=function(){},t}return T(t,e),t}(rc),Ec=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get a list of nodes for the given cluster",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Read",t.endpointUrl=function(e){var t;["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,"'"))}));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/cloud-providers/clusters/".concat(encodeURIComponent(e.parameters.clusterId),"/nodes").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Rc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Cordon a node on the cluster to prevent new pods from scheduling on it.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return["clusterId","nodeId"].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(encodeURIComponent(e.parameters.clusterId),"/nodes/").concat(encodeURIComponent(e.parameters.nodeId),"/cordon")},t.body=function(){},t}return T(t,e),t}(nc),Cc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Drain a node by evicting all running pods.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return["clusterId","nodeId"].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(encodeURIComponent(e.parameters.clusterId),"/nodes/").concat(encodeURIComponent(e.parameters.nodeId),"/drain")},t.body=function(){},t}return T(t,e),t}(nc),Uc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Uncordon a node on the cluster if it was previously cordoned.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Clusters > Update",t.endpointUrl=function(e){return["clusterId","nodeId"].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(encodeURIComponent(e.parameters.clusterId),"/nodes/").concat(encodeURIComponent(e.parameters.nodeId),"/uncordon")},t.body=function(){},t}return T(t,e),t}(nc),_c=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(t,e),t}(tc),Sc=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(t,e),t}(nc),Ac=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(encodeURIComponent(e.parameters.registryId))},t.body=function(){},t}return T(t,e),t}(tc),Pc=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(encodeURIComponent(e.parameters.registryId))},t.body=function(){},t}return T(t,e),t}(rc),xc=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(t,e),t}(tc),kc=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(t,e),t}(nc),qc=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(encodeURIComponent(e.parameters.integrationId))},t.body=function(){},t}return T(t,e),t}(tc),Oc=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(encodeURIComponent(e.parameters.integrationId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Dc=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(encodeURIComponent(e.parameters.integrationId))},t.body=function(){},t}return T(t,e),t}(rc),Tc=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(t,e),t}(tc),Bc=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(t,e),t}(tc),Nc=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(t,e),t}(tc),Lc=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(t,e),t}(tc),Gc=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(t,e),t}(nc),Fc=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(encodeURIComponent(e.parameters.domain))},t.body=function(){},t}return T(t,e),t}(tc),Jc=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(encodeURIComponent(e.parameters.domain))},t.body=function(){},t}return T(t,e),t}(rc),Mc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Retrieve certificate data for a domain to verify its contents.",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(encodeURIComponent(e.parameters.domain),"/certificate")},t.body=function(){},t}return T(t,e),t}(tc),zc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Import a certificate for 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(encodeURIComponent(e.parameters.domain),"/import")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Wc=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),$c=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain))},t.body=function(){},t}return T(t,e),t}(tc),Vc=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain))},t.body=function(){},t}return T(t,e),t}(rc),Hc=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/assign")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Yc=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 > Subdomains > General > Update",t.endpointUrl=function(e){var t;["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,"'"))}));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/domains/".concat(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/assign").concat(r)},t.body=function(){},t}return T(t,e),t}(rc),Zc=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/cdn/disable")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Kc=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/cdn/enable")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Xc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new path to the subdomain.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Create",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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Qc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="List paths for a given subdomain.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths")},t.body=function(){},t}return T(t,e),t}(tc),eu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Get subdomain path details.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Read",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath))},t.body=function(){},t}return T(t,e),t}(tc),tu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a path.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath))},t.body=function(){},t}return T(t,e),t}(rc),nu=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a subdomain path.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),ru=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Assign a subdomain path to a port.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath),"/assign")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),ou=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Unassign a subdomain path to a port.",t.withAuth=!0,t.requiredPermissions="Account > SubdomainPaths > General > Update",t.endpointUrl=function(e){return["domain","subdomain","subdomainPath"].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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/paths/").concat(encodeURIComponent(e.parameters.subdomainPath),"/assign")},t.body=function(){},t}return T(t,e),t}(rc),iu=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 > Subdomains > 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(encodeURIComponent(e.parameters.domain),"/subdomains/").concat(encodeURIComponent(e.parameters.subdomain),"/verify")},t.body=function(){},t}return T(t,e),t}(nc),su=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(encodeURIComponent(e.parameters.domain),"/verify")},t.body=function(){},t}return T(t,e),t}(nc),au=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(t,e),t}(tc),cu=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(t,e),t}(nc),uu=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(encodeURIComponent(e.parameters.logSinkId))},t.body=function(){},t}return T(t,e),t}(tc),du=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(encodeURIComponent(e.parameters.logSinkId))},t.body=function(){},t}return T(t,e),t}(rc),lu=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(encodeURIComponent(e.parameters.logSinkId),"/pause")},t.body=function(){},t}return T(t,e),t}(nc),pu=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(encodeURIComponent(e.parameters.logSinkId),"/resume")},t.body=function(){},t}return T(t,e),t}(nc),fu=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(encodeURIComponent(e.parameters.logSinkId),"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),hu=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(t,e),t}(tc),vu=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(t,e),t}(nc),mu=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(encodeURIComponent(e.parameters.notificationId))},t.body=function(){},t}return T(t,e),t}(tc),bu=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(encodeURIComponent(e.parameters.notificationId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),gu=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(encodeURIComponent(e.parameters.notificationId))},t.body=function(){},t}return T(t,e),t}(rc),yu=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(t,e),t}(tc),wu=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(t,e),t}(nc),Iu=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(encodeURIComponent(e.parameters.credentialId))},t.body=function(){},t}return T(t,e),t}(tc),ju=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(encodeURIComponent(e.parameters.credentialId))},t.body=function(){},t}return T(t,e),t}(rc),Eu=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(encodeURIComponent(e.parameters.credentialId),"/modify")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Ru=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(t,e),t}(tc),Cu=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(encodeURIComponent(e.parameters.customVCSId),"/token/").concat(encodeURIComponent(e.parameters.vcsLinkId)).concat(r)},t.body=function(){},t}return T(t,e),t}(nc),Uu=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(t,e),t}(tc),_u=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(encodeURIComponent(e.parameters.vcsService),"/").concat(encodeURIComponent(e.parameters.repositoryOwner),"/").concat(encodeURIComponent(e.parameters.repositoryName),"/branches").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Su=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(t,e),t}(tc),Au=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(t,e),t}(tc),Pu=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(t,e),t}(nc),xu=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(t,e),t}(oc),ku=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(encodeURIComponent(e.parameters.projectId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(ic),qu=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(encodeURIComponent(e.parameters.projectId))},t.body=function(){},t}return T(t,e),t}(tc),Ou=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(encodeURIComponent(e.parameters.projectId)).concat(r)},t.body=function(){},t}return T(t,e),t}(rc),Du=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(encodeURIComponent(e.parameters.projectId),"/addons").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Tu=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(encodeURIComponent(e.parameters.projectId),"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Bu=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(encodeURIComponent(e.parameters.projectId),"/addons")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(oc),Nu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return T(t,e),t}(tc),Lu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(ic),Gu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return T(t,e),t}(rc),Fu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backup-schedules").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Ju=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backup-schedules")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Mu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backup-schedules/").concat(encodeURIComponent(e.parameters.scheduleId))},t.body=function(){},t}return T(t,e),t}(rc),zu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Wu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),$u=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId))},t.body=function(){},t}return T(t,e),t}(tc),Vu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId))},t.body=function(){},t}return T(t,e),t}(rc),Hu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/abort")},t.body=function(){},t}return T(t,e),t}(nc),Yu=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){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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/abort-restore").concat(r)},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Zu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/download-link")},t.body=function(){},t}return T(t,e),t}(tc),Ku=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){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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/restore").concat(r)},t.body=function(){},t}return T(t,e),t}(nc),Xu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/restores").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Qu=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/backups/").concat(encodeURIComponent(e.parameters.backupId),"/retain")},t.body=function(){},t}return T(t,e),t}(nc),ed=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/containers").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),td=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/credentials")},t.body=function(){},t}return T(t,e),t}(tc),nd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/import")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),rd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/network-settings")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),od=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/pause")},t.body=function(){},t}return T(t,e),t}(nc),id=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/pitr")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),sd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/pitr-window")},t.body=function(){},t}return T(t,e),t}(tc),ad=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/reset")},t.body=function(){},t}return T(t,e),t}(nc),cd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/restart")},t.body=function(){},t}return T(t,e),t}(nc),ud=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Returns a list of restores 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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/restores").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),dd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/resume")},t.body=function(){},t}return T(t,e),t}(nc),ld=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),pd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/security")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),fd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/version")},t.body=function(){},t}return T(t,e),t}(tc),hd=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(encodeURIComponent(e.parameters.projectId),"/addons/").concat(encodeURIComponent(e.parameters.addonId),"/version")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),vd=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(encodeURIComponent(e.parameters.projectId),"/jobs").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),md=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(encodeURIComponent(e.parameters.projectId),"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),bd=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(encodeURIComponent(e.parameters.projectId),"/jobs/cron")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(oc),gd=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(encodeURIComponent(e.parameters.projectId),"/jobs/cron/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(ic),yd=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(encodeURIComponent(e.parameters.projectId),"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),wd=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(encodeURIComponent(e.parameters.projectId),"/jobs/manual")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(oc),Id=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(encodeURIComponent(e.parameters.projectId),"/jobs/manual/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(ic),jd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(){},t}return T(t,e),t}(tc),Ed=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId))},t.body=function(){},t}return T(t,e),t}(rc),Rd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/branches").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Cd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Ud=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),_d=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-arguments").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Sd=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Ad=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-arguments/details")},t.body=function(){},t}return T(t,e),t}(tc),Pd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),xd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),kd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return T(t,e),t}(tc),qd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return T(t,e),t}(rc),Od=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/containers").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Dd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/deployment")},t.body=function(){},t}return T(t,e),t}(tc),Td=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Bd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/health-checks")},t.body=function(){},t}return T(t,e),t}(tc),Nd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Ld=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/pause")},t.body=function(){},t}return T(t,e),t}(nc),Gd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/pull-requests").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Fd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Jd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Md=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),zd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs/").concat(encodeURIComponent(e.parameters.runId))},t.body=function(){},t}return T(t,e),t}(tc),Wd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runs/").concat(encodeURIComponent(e.parameters.runId))},t.body=function(){},t}return T(t,e),t}(rc),$d=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runtime-environment").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Vd=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Hd=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 > Secrets > Jobs > 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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/runtime-environment/details")},t.body=function(){},t}return T(t,e),t}(tc),Yd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Zd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/settings")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Kd=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(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/suspend")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Xd=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(encodeURIComponent(e.parameters.projectId),"/pipelines").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Qd=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId))},t.body=function(){},t}return T(t,e),t}(tc),el=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),tl=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),nl=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/previews").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),rl=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/previews/").concat(encodeURIComponent(e.parameters.previewId))},t.body=function(){},t}return T(t,e),t}(rc),ol=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/runs").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),il=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/preview-envs/runs/").concat(encodeURIComponent(e.parameters.templateRunId))},t.body=function(){},t}return T(t,e),t}(tc),sl=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage))},t.body=function(){},t}return T(t,e),t}(tc),al=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),cl=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),ul=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),dl=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs/").concat(encodeURIComponent(e.parameters.runId))},t.body=function(){},t}return T(t,e),t}(tc),ll=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(encodeURIComponent(e.parameters.projectId),"/pipelines/").concat(encodeURIComponent(e.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(e.parameters.stage),"/runs/").concat(encodeURIComponent(e.parameters.runId),"/abort")},t.body=function(){},t}return T(t,e),t}(nc),pl=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),fl=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),hl=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(oc),vl=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(ic),ml=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId)).concat(r)},t.body=function(){},t}return T(t,e),t}(tc),bl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a secret",t.withAuth=!0,t.requiredPermissions="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId))},t.body=function(){},t}return T(t,e),t}(rc),gl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update a secret",t.withAuth=!0,t.requiredPermissions="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),yl=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),wl=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return T(t,e),t}(tc),Il=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/addons/").concat(encodeURIComponent(e.parameters.addonId))},t.body=function(){},t}return T(t,e),t}(rc),jl=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="undefined",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(encodeURIComponent(e.parameters.projectId),"/secrets/").concat(encodeURIComponent(e.parameters.secretId),"/details")},t.body=function(){},t}return T(t,e),t}(tc),El=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(encodeURIComponent(e.parameters.projectId),"/services").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Rl=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(encodeURIComponent(e.parameters.projectId),"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Cl=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(encodeURIComponent(e.parameters.projectId),"/services/build")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(oc),Ul=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(encodeURIComponent(e.parameters.projectId),"/services/build/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(ic),_l=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(encodeURIComponent(e.parameters.projectId),"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Sl=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(encodeURIComponent(e.parameters.projectId),"/services/combined")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(oc),Al=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(encodeURIComponent(e.parameters.projectId),"/services/combined/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(ic),Pl=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(encodeURIComponent(e.parameters.projectId),"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),xl=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(encodeURIComponent(e.parameters.projectId),"/services/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(oc),kl=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(encodeURIComponent(e.parameters.projectId),"/services/deployment/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(ic),ql=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId))},t.body=function(){},t}return T(t,e),t}(tc),Ol=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId)).concat(r)},t.body=function(){},t}return T(t,e),t}(rc),Dl=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/branches").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Tl=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Bl=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Nl=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-arguments").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Ll=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-arguments")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Gl=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-arguments/details")},t.body=function(){},t}return T(t,e),t}(tc),Fl=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-options")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Jl=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build-source")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Ml=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return T(t,e),t}(tc),zl=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build/").concat(encodeURIComponent(e.parameters.buildId))},t.body=function(){},t}return T(t,e),t}(rc),Wl=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/containers").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),$l=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/deployment")},t.body=function(){},t}return T(t,e),t}(tc),Vl=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/deployment")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Hl=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/health-checks")},t.body=function(){},t}return T(t,e),t}(tc),Yl=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/health-checks")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Zl=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/pause")},t.body=function(){},t}return T(t,e),t}(nc),Kl=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/ports")},t.body=function(){},t}return T(t,e),t}(tc),Xl=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/ports")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Ql=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/pull-requests").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),ep=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/restart")},t.body=function(){},t}return T(t,e),t}(nc),tp=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/resume")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),np=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/runtime-environment").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),rp=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/runtime-environment")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),op=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 > Secrets > Services > 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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/runtime-environment/details")},t.body=function(){},t}return T(t,e),t}(tc),ip=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(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/scale")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),sp=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(encodeURIComponent(e.parameters.projectId),"/volumes")},t.body=function(){},t}return T(t,e),t}(tc),ap=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(encodeURIComponent(e.parameters.projectId),"/volumes")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),cp=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(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId))},t.body=function(){},t}return T(t,e),t}(tc),up=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(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),dp=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(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId))},t.body=function(){},t}return T(t,e),t}(rc),lp=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(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId),"/attach")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),pp=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(encodeURIComponent(e.parameters.projectId),"/volumes/").concat(encodeURIComponent(e.parameters.volumeId),"/detach")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),fp=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(t,e),t}(tc),hp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="List the resource tags for this entity.",t.withAuth=!0,t.requiredPermissions="Account > Tags > 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/tags".concat(r)},t.body=function(){},t}return T(t,e),t}(tc),vp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Add a new resource tag for this entity.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Create",t.endpointUrl=function(e){return"/v1/tags"},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),mp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Update or create a resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Update",t.endpointUrl=function(e){return["resourceTagId"].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/tags"},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(oc),bp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View details for a given resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Read",t.endpointUrl=function(e){return["resourceTagId"].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/tags/".concat(encodeURIComponent(e.parameters.resourceTagId))},t.body=function(){},t}return T(t,e),t}(tc),gp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Patch a resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Update",t.endpointUrl=function(e){return["resourceTagId"].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/tags/".concat(encodeURIComponent(e.parameters.resourceTagId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(ic),yp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a resource tag.",t.withAuth=!0,t.requiredPermissions="Account > Tags > General > Delete",t.endpointUrl=function(e){return["resourceTagId"].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/tags/".concat(encodeURIComponent(e.parameters.resourceTagId))},t.body=function(){},t}return T(t,e),t}(rc),wp=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(t,e),t}(tc),Ip=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(t,e),t}(nc),jp=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(encodeURIComponent(e.parameters.templateId)).concat(r)},t.body=function(){},t}return T(t,e),t}(tc),Ep=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(encodeURIComponent(e.parameters.templateId))},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Rp=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(encodeURIComponent(e.parameters.templateId))},t.body=function(){},t}return T(t,e),t}(rc),Cp=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(encodeURIComponent(e.parameters.templateId),"/runs")},t.body=function(e){return JSON.stringify(e.data)},t}return T(t,e),t}(nc),Up=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(encodeURIComponent(e.parameters.templateId),"/runs").concat(r)},t.body=function(){},t}return T(t,e),t}(tc),_p=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(encodeURIComponent(e.parameters.templateId),"/runs/").concat(encodeURIComponent(e.parameters.templateRunId))},t.body=function(){},t}return T(t,e),t}(tc),Sp=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(encodeURIComponent(e.parameters.templateId),"/runs/").concat(encodeURIComponent(e.parameters.templateRunId),"/abort")},t.body=function(){},t}return T(t,e),t}(nc),Ap=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 N(this,void 0,void 0,(function(){return L(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),N(this,void 0,void 0,(function(){var n,r,o;return L(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=B({host:"https://api.northflank.com"},e),r=this.contextWrapper,o={current:n.name,contexts:G(G([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(o)];case 4:return i.sent(),[2]}}))}))},e.prototype.removeContext=function(e){return N(this,void 0,void 0,(function(){var t,n,r,o;return L(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:G([],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 N(this,void 0,void 0,(function(){var t,n;return L(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=B(B({},t),{current:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.updateToken=function(e,t){return N(this,void 0,void 0,(function(){var n,r,o,i,s;return L(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?B(B({},r),{token:e}):t})),s=B(B({},o),{contexts:i}),[4,this.storeContext(s)];case 1:return a.sent(),[2]}}))}))},e.prototype.useProjectId=function(e){return N(this,void 0,void 0,(function(){var t,n;return L(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=B(B({},t),{project:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useServiceId=function(e){return N(this,void 0,void 0,(function(){var t,n;return L(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=B(B({},t),{service:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useJobId=function(e){return N(this,void 0,void 0,(function(){var t,n;return L(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=B(B({},t),{job:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.usePlanId=function(e){return N(this,void 0,void 0,(function(){var t,n;return L(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=B(B({},t),{plan:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useRegion=function(e){return N(this,void 0,void 0,(function(){var t,n;return L(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=B(B({},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 N(this,void 0,void 0,(function(){var t,n;return L(this,(function(r){switch(r.label){case 0:return t=this.contextWrapper,n=B(B({},t),{lastUpdateCheck:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e}(),Pp=function(e){function t(t){var n=e.call(this)||this;return n.assertDir=function(e){return N(n,void 0,void 0,(function(){var t;return L(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),A.default.existsSync(e)?[3,2]:[4,A.default.promises.mkdir(e,{recursive:!0})];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:throw t=n.sent(),console.log("Failed to login, local files could not be created: ".concat(e,", error: ").concat(t.message)),t;case 4:return[2]}}))}))},n.configPath=t||"".concat(U.default.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return T(t,e),t.prototype.loadContextWrapper=function(){try{return JSON.parse(A.default.readFileSync(this.configFile,"utf8"))}catch(e){return{contexts:[],lastUpdateCheck:new Date(0)}}},t.prototype.writeContext=function(e){return N(this,void 0,void 0,(function(){var t;return L(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,A.default.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 N(this,void 0,void 0,(function(){return L(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}(Ap),xp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},t}return T(t,e),t.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},t.prototype.writeContext=function(e){return N(this,void 0,void 0,(function(){return L(this,(function(t){return this.inMemoryContextWrapper=e,[2]}))}))},t}(Ap),kp=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 $a(e,new El(e,t).call,new Du(e,t).call),this.exec=new Ya(e),this.logs=new dc(e),this.metrics=new fc(e),this.endpoints={get:(o={},o.addon=((r=new Nu(e,t)).types=new hc(e,t),r.backupSchedules=new Fu(e,t),r.backups=new zu(e,t),r.backup=((n=new $u(e,t)).download=new Zu(e,t),n.restores=new Xu(e,t),n),r.containers=new ed(e,t),r.credentials=new td(e,t),r.pitrWindow=new sd(e,t),r.restores=new ud(e,t),r.version=new fd(e,t),r),o.invoice=function(){var n={};return n.details=new mc(e,t),n}(),o.cloud=function(){var n={};return n.cluster=new wc(e,t),n.dockerRegistry=new Ac(e,t),n.integration=new qc(e,t),n}(),o.dnsId=new Nc(e,t),o.domain=new Fc(e,t),o.domainCertificate=new Mc(e,t),o.subdomain=function(){var n=new $c(e,t);return n.path=new eu(e,t),n}(),o.logSink=new uu(e,t),o.notification=new mu(e,t),o.registryCredentials=new Iu(e,t),o.project=new qu(e,t),o.job=function(){var n=new jd(e,t);return n.branches=new Rd(e,t),n.builds=new Cd(e,t),n.buildArguments=new _d(e,t),n.buildArgumentDetails=new Ad(e,t),n.build=new kd(e,t),n.containers=new Od(e,t),n.deployment=new Dd(e,t),n.healthChecks=new Bd(e,t),n.pullRequests=new Gd(e,t),n.runs=new Jd(e,t),n.run=new zd(e,t),n.runtimeEnvironment=new $d(e,t),n.runtimeEnvironmentDetails=new Hd(e,t),n}(),o.pipeline=new Qd(e,t),o.previewTemplate=new el(e,t),o.previewTemplateRun=new il(e,t),o.releaseFlow=new sl(e,t),o.releaseFlowRun=new dl(e,t),o.secret=new ml(e,t),o.secretLink=new wl(e,t),o.secretDetails=new jl(e,t),o.service=function(){var n=new ql(e,t);return n.branches=new Dl(e,t),n.builds=new Tl(e,t),n.buildArguments=new Nl(e,t),n.buildArgumentDetails=new Gl(e,t),n.build=new Ml(e,t),n.containers=new Wl(e,t),n.deployment=new $l(e,t),n.healthChecks=new Hl(e,t),n.ports=new Kl(e,t),n.pullRequests=new Ql(e,t),n.runtimeEnvironment=new np(e,t),n.runtimeEnvironmentDetails=new op(e,t),n}(),o.volume=new cp(e,t),o.tag=new bp(e,t),o.template=new jp(e,t),o.templateRun=new _p(e,t),o),list:function(){var n={};return n.invoices=new vc(e,t),n.cloud=function(){var n={};return n.providers=new bc(e,t),n.clusters=new gc(e,t),n.cluster=function(){var n={};return n.nodes=new Ec(e,t),n}(),n.dockerRegistry=new _c(e,t),n.integrations=new xc(e,t),n.nodeTypes=new Tc(e,t),n.regions=new Bc(e,t),n}(),n.domains=new Lc(e,t),n.subdomain=function(){var n={};return n.path=new Qc(e,t),n}(),n.logSinks=new au(e,t),n.notifications=new hu(e,t),n.registryCredentials=new yu(e,t),n.vcs=new Ru(e,t),n.repos=new Uu(e,t),n.branches=new _u(e,t),n.plans=new Su(e,t),n.projects=new Au(e,t),n.addons=new Du(e,t),n.jobs=new vd(e,t),n.pipelines=new Xd(e,t),n.previewTemplatePreviews=new nl(e,t),n.previewTemplateRuns=new ol(e,t),n.releaseFlowRuns=new ul(e,t),n.secrets=new pl(e,t),n.services=new El(e,t),n.volumes=new sp(e,t),n.regions=new fp(e,t),n.tags=new hp(e,t),n.templates=new wp(e,t),n.templateRuns=new Up(e,t),n}(),create:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new yc(e,t),n.dockerRegistry=new Sc(e,t),n.integration=new kc(e,t),n}(),n.domain=new Gc(e,t),n.logSink=new cu(e,t),n.notification=new vu(e,t),n.customVcs=function(){var n={};return n.token=new Cu(e,t),n}(),n.project=new Pu(e,t),n.addon=function(){var n=new Tu(e,t);return n.backupSchedule=new Ju(e,t),n}(),n.job=function(){var n={};return n.cron=new md(e,t),n.manual=new yd(e,t),n}(),n.secret=new fl(e,t),n.service=function(){var n={};return n.build=new Rl(e,t),n.combined=new _l(e,t),n.deployment=new Pl(e,t),n}(),n.volume=new ap(e,t),n.template=new Ip(e,t),n}(),update:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Ic(e,t),n.integration=new Oc(e,t),n}(),n.subdomain=function(){var n={};return n.path=new nu(e,t),n}(),n.logSink=new fu(e,t),n.notification=new bu(e,t),n.registryCredentials=new Eu(e,t),n.addon=function(){var n={};return n.networkSettings=new rd(e,t),n.security=new pd(e,t),n.version=new hd(e,t),n}(),n.job=function(){var n={};return n.buildArguments=new Sd(e,t),n.buildOptions=new Pd(e,t),n.buildSource=new xd(e,t),n.deployment=new Td(e,t),n.healthChecks=new Nd(e,t),n.runtimeEnvironment=new Vd(e,t),n.settings=new Zd(e,t),n}(),n.previewTemplate=new tl(e,t),n.releaseFlow=new al(e,t),n.secret=new gl(e,t),n.secretLink=new yl(e,t),n.service=function(){var n={};return n.buildArguments=new Ll(e,t),n.buildOptions=new Fl(e,t),n.buildSource=new Jl(e,t),n.deployment=new Vl(e,t),n.healthChecks=new Yl(e,t),n.ports=new Xl(e,t),n.runtimeEnvironment=new rp(e,t),n}(),n.volume=new up(e,t),n.template=new Ep(e,t),n}(),delete:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new jc(e,t),n.dockerRegistry=new Pc(e,t),n.integration=new Dc(e,t),n}(),n.domain=new Jc(e,t),n.subdomain=function(){var n=new Vc(e,t);return n.path=new tu(e,t),n}(),n.logSink=new du(e,t),n.notification=new gu(e,t),n.registryCredentials=new ju(e,t),n.project=new Ou(e,t),n.addon=function(){var n=new Gu(e,t);return n.backupSchedule=new Mu(e,t),n}(),n.backup=new Vu(e,t),n.job=new Ed(e,t),n.previewTemplatePreview=new rl(e,t),n.secret=new bl(e,t),n.secretLink=new Il(e,t),n.service=new Ol(e,t),n.volume=new dp(e,t),n.tag=new yp(e,t),n.template=new Rp(e,t),n}(),cordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new Rc(e,t),n}(),n}(),n}(),drain:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new Cc(e,t),n}(),n}(),n}(),uncordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new Uc(e,t),n}(),n}(),n}(),import:function(){var n={};return n.domainCertificate=new zc(e,t),n.addon=function(){var n={};return n.backup=new nd(e,t),n}(),n}(),add:function(){var n={};return n.domain=function(){var n={};return n.subdomain=new Wc(e,t),n}(),n.subdomain=function(){var n={};return n.path=new Xc(e,t),n}(),n.registryCredentials=new wu(e,t),n.tag=new vp(e,t),n}(),assign:function(){var n={};return n.subdomain=function(){var n={};return n.service=new Hc(e,t),n.path=new ru(e,t),n}(),n}(),unassign:function(){var n={};return n.subdomain=function(){var n=new Yc(e,t);return n.path=new ou(e,t),n}(),n}(),disable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new Zc(e,t),n}(),n}(),enable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new Kc(e,t),n}(),n}(),verify:function(){var n={};return n.subdomain=new iu(e,t),n.domain=new su(e,t),n}(),pause:function(){var n={};return n.logSink=new lu(e,t),n.addon=new od(e,t),n.job=new Ld(e,t),n.service=new Zl(e,t),n}(),resume:function(){var n={};return n.logSink=new pu(e,t),n.addon=new dd(e,t),n.job=new Fd(e,t),n.service=new tp(e,t),n}(),put:function(){var n={};return n.project=new xu(e,t),n.addon=new Bu(e,t),n.job=function(){var n={};return n.cron=new bd(e,t),n.manual=new wd(e,t),n}(),n.secret=new hl(e,t),n.service=function(){var n={};return n.build=new Cl(e,t),n.combined=new Sl(e,t),n.deployment=new xl(e,t),n}(),n.tag=new mp(e,t),n}(),patch:function(){var n={};return n.project=new ku(e,t),n.addon=new Lu(e,t),n.job=function(){var n={};return n.cron=new gd(e,t),n.manual=new Id(e,t),n}(),n.secret=new vl(e,t),n.service=function(){var n={};return n.build=new Ul(e,t),n.combined=new Al(e,t),n.deployment=new kl(e,t),n}(),n.tag=new gp(e,t),n}(),backup:function(){var n={};return n.addon=new Wu(e,t),n}(),abort:function(){var n={};return n.addon=function(){var n={};return n.backup=new Hu(e,t),n.restore=new Yu(e,t),n}(),n.job=function(){var n={};return n.build=new qd(e,t),n.run=new Wd(e,t),n}(),n.releaseFlowRun=new ll(e,t),n.service=function(){var n={};return n.build=new zl(e,t),n}(),n.templateRun=new Sp(e,t),n}(),restore:function(){var n={};return n.addon=function(){var n={};return n.backup=new Ku(e,t),n}(),n}(),retain:function(){var n={};return n.addon=function(){var n={};return n.backup=new Qu(e,t),n}(),n}(),start:function(){var n={};return n.addon=function(){var n={};return n.pitr=new id(e,t),n}(),n.job=function(){var n={};return n.build=new Ud(e,t),n.run=new Md(e,t),n}(),n.service=function(){var n={};return n.build=new Bl(e,t),n}(),n}(),reset:function(){var n={};return n.addon=new ad(e,t),n}(),restart:function(){var n={};return n.addon=new cd(e,t),n.service=new ep(e,t),n}(),scale:function(){var n={};return n.addon=new ld(e,t),n.job=new Yd(e,t),n.service=new ip(e,t),n}(),suspend:function(){var n={};return n.job=new Kd(e,t),n}(),run:function(){var n={};return n.releaseFlow=new cl(e,t),n.template=new Cp(e,t),n}(),attach:function(){var n={};return n.volume=new lp(e,t),n}(),detach:function(){var n={};return n.volume=new pp(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.restores=i.endpoints.get.addon.backup.restores.call,e.logs=i.logs.getAddonBackupLogs,e.logTail=i.logs.tailAddonBackupLogs,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.restores=function(){var e=i.endpoints.get.addon.restores.call;return e.logs=i.logs.getAddonRestoresLogs,e.logTail=i.logs.tailAddonRestoresLogs,e}(),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.domainCertificate=i.endpoints.get.domainCertificate.call,e.subdomain=function(){var e=i.endpoints.get.subdomain.call;return e.path=i.endpoints.get.subdomain.path.call,e}(),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.tag=i.endpoints.get.tag.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.cluster=function(){var e={};return e.nodes=i.endpoints.list.cloud.cluster.nodes.call,e}(),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.subdomain=function(){var e={};return e.path=i.endpoints.list.subdomain.path.call,e}(),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.tags=i.endpoints.list.tags.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.subdomain=function(){var e={};return e.path=i.endpoints.update.subdomain.path.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=function(){var e=i.endpoints.delete.subdomain.call;return e.path=i.endpoints.delete.subdomain.path.call,e}(),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.tag=i.endpoints.delete.tag.call,e.template=i.endpoints.delete.template.call,e}(),this.cordon=function(){var e={};return e.cloud=function(){var e={};return e.cluster=function(){var e={};return e.node=i.endpoints.cordon.cloud.cluster.node.call,e}(),e}(),e}(),this.drain=function(){var e={};return e.cloud=function(){var e={};return e.cluster=function(){var e={};return e.node=i.endpoints.drain.cloud.cluster.node.call,e}(),e}(),e}(),this.uncordon=function(){var e={};return e.cloud=function(){var e={};return e.cluster=function(){var e={};return e.node=i.endpoints.uncordon.cloud.cluster.node.call,e}(),e}(),e}(),this.import=function(){var e={};return e.domainCertificate=i.endpoints.import.domainCertificate.call,e.addon=function(){var e={};return e.backup=i.endpoints.import.addon.backup.call,e}(),e}(),this.add=function(){var e={};return e.domain=function(){var e={};return e.subdomain=i.endpoints.add.domain.subdomain.call,e}(),e.subdomain=function(){var e={};return e.path=i.endpoints.add.subdomain.path.call,e}(),e.registryCredentials=i.endpoints.add.registryCredentials.call,e.tag=i.endpoints.add.tag.call,e}(),this.assign=function(){var e={};return e.subdomain=function(){var e={};return e.service=i.endpoints.assign.subdomain.service.call,e.path=i.endpoints.assign.subdomain.path.call,e}(),e}(),this.unassign=function(){var e={};return e.subdomain=function(){var e=i.endpoints.unassign.subdomain.call;return e.path=i.endpoints.unassign.subdomain.path.call,e}(),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.tag=i.endpoints.put.tag.call,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.tag=i.endpoints.patch.tag.call,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.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}()};exports.AbortAddonBackupEndpoint=Hu,exports.AbortAddonRestoreEndpoint=Yu,exports.AbortJobBuildEndpoint=qd,exports.AbortJobRunEndpoint=Wd,exports.AbortReleaseflowrunEndpoint=ll,exports.AbortServiceBuildEndpoint=zl,exports.AbortTemplaterunEndpoint=Sp,exports.AddDomainSubdomainEndpoint=Wc,exports.AddRegistrycredentialsEndpoint=wu,exports.AddSubdomainPathEndpoint=Xc,exports.AddTagEndpoint=vp,exports.ApiClient=kp,exports.ApiClientContextProvider=Ap,exports.ApiClientFileContextProvider=Pp,exports.ApiClientInMemoryContextProvider=xp,exports.ApiEndpoint=ec,exports.AssignSubdomainPathEndpoint=ru,exports.AssignSubdomainServiceEndpoint=Hc,exports.AttachVolumeEndpoint=lp,exports.BackupAddonEndpoint=Wu,exports.CordonCloudClusterNodeEndpoint=Rc,exports.CreateAddonBackupscheduleEndpoint=Ju,exports.CreateAddonEndpoint=Tu,exports.CreateCloudClusterEndpoint=yc,exports.CreateCloudDockerregistryEndpoint=Sc,exports.CreateCloudIntegrationEndpoint=kc,exports.CreateCustomvcsTokenEndpoint=Cu,exports.CreateDomainEndpoint=Gc,exports.CreateJobCronEndpoint=md,exports.CreateJobManualEndpoint=yd,exports.CreateLogsinkEndpoint=cu,exports.CreateNotificationEndpoint=vu,exports.CreateProjectEndpoint=Pu,exports.CreateSecretEndpoint=fl,exports.CreateServiceBuildEndpoint=Rl,exports.CreateServiceCombinedEndpoint=_l,exports.CreateServiceDeploymentEndpoint=Pl,exports.CreateTemplateEndpoint=Ip,exports.CreateVolumeEndpoint=ap,exports.DeleteAddonBackupscheduleEndpoint=Mu,exports.DeleteAddonEndpoint=Gu,exports.DeleteApiEndpoint=rc,exports.DeleteBackupEndpoint=Vu,exports.DeleteCloudClusterEndpoint=jc,exports.DeleteCloudDockerregistryEndpoint=Pc,exports.DeleteCloudIntegrationEndpoint=Dc,exports.DeleteDomainEndpoint=Jc,exports.DeleteJobEndpoint=Ed,exports.DeleteLogsinkEndpoint=du,exports.DeleteNotificationEndpoint=gu,exports.DeletePreviewtemplatepreviewEndpoint=rl,exports.DeleteProjectEndpoint=Ou,exports.DeleteRegistrycredentialsEndpoint=ju,exports.DeleteSecretEndpoint=bl,exports.DeleteSecretlinkEndpoint=Il,exports.DeleteServiceEndpoint=Ol,exports.DeleteSubdomainEndpoint=Vc,exports.DeleteSubdomainPathEndpoint=tu,exports.DeleteTagEndpoint=yp,exports.DeleteTemplateEndpoint=Rp,exports.DeleteVolumeEndpoint=dp,exports.DetachVolumeEndpoint=pp,exports.DisableSubdomainCdnEndpoint=Zc,exports.DrainCloudClusterNodeEndpoint=Cc,exports.EnableSubdomainCdnEndpoint=Kc,exports.ExecCommandStandard=Ha,exports.GetAddonBackupDownloadEndpoint=Zu,exports.GetAddonBackupEndpoint=$u,exports.GetAddonBackupRestoresEndpoint=Xu,exports.GetAddonBackupsEndpoint=zu,exports.GetAddonBackupschedulesEndpoint=Fu,exports.GetAddonContainersEndpoint=ed,exports.GetAddonCredentialsEndpoint=td,exports.GetAddonEndpoint=Nu,exports.GetAddonPitrwindowEndpoint=sd,exports.GetAddonRestoresEndpoint=ud,exports.GetAddonTypesEndpoint=hc,exports.GetAddonVersionEndpoint=fd,exports.GetApiEndpoint=tc,exports.GetCloudClusterEndpoint=wc,exports.GetCloudDockerregistryEndpoint=Ac,exports.GetCloudIntegrationEndpoint=qc,exports.GetDnsidEndpoint=Nc,exports.GetDomainEndpoint=Fc,exports.GetDomaincertificateEndpoint=Mc,exports.GetInvoiceDetailsEndpoint=mc,exports.GetJobBranchesEndpoint=Rd,exports.GetJobBuildEndpoint=kd,exports.GetJobBuildargumentdetailsEndpoint=Ad,exports.GetJobBuildargumentsEndpoint=_d,exports.GetJobBuildsEndpoint=Cd,exports.GetJobContainersEndpoint=Od,exports.GetJobDeploymentEndpoint=Dd,exports.GetJobEndpoint=jd,exports.GetJobHealthchecksEndpoint=Bd,exports.GetJobPullrequestsEndpoint=Gd,exports.GetJobRunEndpoint=zd,exports.GetJobRunsEndpoint=Jd,exports.GetJobRuntimeenvironmentEndpoint=$d,exports.GetJobRuntimeenvironmentdetailsEndpoint=Hd,exports.GetLogsinkEndpoint=uu,exports.GetNotificationEndpoint=mu,exports.GetPipelineEndpoint=Qd,exports.GetPreviewtemplateEndpoint=el,exports.GetPreviewtemplaterunEndpoint=il,exports.GetProjectEndpoint=qu,exports.GetRegistrycredentialsEndpoint=Iu,exports.GetReleaseflowEndpoint=sl,exports.GetReleaseflowrunEndpoint=dl,exports.GetSecretEndpoint=ml,exports.GetSecretdetailsEndpoint=jl,exports.GetSecretlinkEndpoint=wl,exports.GetServiceBranchesEndpoint=Dl,exports.GetServiceBuildEndpoint=Ml,exports.GetServiceBuildargumentdetailsEndpoint=Gl,exports.GetServiceBuildargumentsEndpoint=Nl,exports.GetServiceBuildsEndpoint=Tl,exports.GetServiceContainersEndpoint=Wl,exports.GetServiceDeploymentEndpoint=$l,exports.GetServiceEndpoint=ql,exports.GetServiceHealthchecksEndpoint=Hl,exports.GetServicePortsEndpoint=Kl,exports.GetServicePullrequestsEndpoint=Ql,exports.GetServiceRuntimeenvironmentEndpoint=np,exports.GetServiceRuntimeenvironmentdetailsEndpoint=op,exports.GetSubdomainEndpoint=$c,exports.GetSubdomainPathEndpoint=eu,exports.GetTagEndpoint=bp,exports.GetTemplateEndpoint=jp,exports.GetTemplaterunEndpoint=_p,exports.GetVolumeEndpoint=cp,exports.ImportAddonBackupEndpoint=nd,exports.ImportDomaincertificateEndpoint=zc,exports.ListAddonsEndpoint=Du,exports.ListBranchesEndpoint=_u,exports.ListCloudClusterNodesEndpoint=Ec,exports.ListCloudClustersEndpoint=gc,exports.ListCloudDockerregistryEndpoint=_c,exports.ListCloudIntegrationsEndpoint=xc,exports.ListCloudNodetypesEndpoint=Tc,exports.ListCloudProvidersEndpoint=bc,exports.ListCloudRegionsEndpoint=Bc,exports.ListDomainsEndpoint=Lc,exports.ListInvoicesEndpoint=vc,exports.ListJobsEndpoint=vd,exports.ListLogsinksEndpoint=au,exports.ListNotificationsEndpoint=hu,exports.ListPipelinesEndpoint=Xd,exports.ListPlansEndpoint=Su,exports.ListPreviewtemplatepreviewsEndpoint=nl,exports.ListPreviewtemplaterunsEndpoint=ol,exports.ListProjectsEndpoint=Au,exports.ListRegionsEndpoint=fp,exports.ListRegistrycredentialsEndpoint=yu,exports.ListReleaseflowrunsEndpoint=ul,exports.ListReposEndpoint=Uu,exports.ListSecretsEndpoint=pl,exports.ListServicesEndpoint=El,exports.ListSubdomainPathEndpoint=Qc,exports.ListTagsEndpoint=hp,exports.ListTemplaterunsEndpoint=Up,exports.ListTemplatesEndpoint=wp,exports.ListVcsEndpoint=Ru,exports.ListVolumesEndpoint=sp,exports.NorthflankApiCallError=Za,exports.NorthflankExecCommand=Ya,exports.NorthflankLogFetch=dc,exports.NorthflankMetricFetch=fc,exports.NorthflankPortForwarder=$a,exports.PatchAddonEndpoint=Lu,exports.PatchApiEndpoint=ic,exports.PatchJobCronEndpoint=gd,exports.PatchJobManualEndpoint=Id,exports.PatchProjectEndpoint=ku,exports.PatchSecretEndpoint=vl,exports.PatchServiceBuildEndpoint=Ul,exports.PatchServiceCombinedEndpoint=Al,exports.PatchServiceDeploymentEndpoint=kl,exports.PatchTagEndpoint=gp,exports.PauseAddonEndpoint=od,exports.PauseJobEndpoint=Ld,exports.PauseLogsinkEndpoint=lu,exports.PauseServiceEndpoint=Zl,exports.PostApiEndpoint=nc,exports.PutAddonEndpoint=Bu,exports.PutApiEndpoint=oc,exports.PutJobCronEndpoint=bd,exports.PutJobManualEndpoint=wd,exports.PutProjectEndpoint=xu,exports.PutSecretEndpoint=hl,exports.PutServiceBuildEndpoint=Cl,exports.PutServiceCombinedEndpoint=Sl,exports.PutServiceDeploymentEndpoint=xl,exports.PutTagEndpoint=mp,exports.ResetAddonEndpoint=ad,exports.RestartAddonEndpoint=cd,exports.RestartServiceEndpoint=ep,exports.RestoreAddonBackupEndpoint=Ku,exports.ResumeAddonEndpoint=dd,exports.ResumeJobEndpoint=Fd,exports.ResumeLogsinkEndpoint=pu,exports.ResumeServiceEndpoint=tp,exports.RetainAddonBackupEndpoint=Qu,exports.RunReleaseflowEndpoint=cl,exports.RunTemplateEndpoint=Cp,exports.ScaleAddonEndpoint=ld,exports.ScaleJobEndpoint=Yd,exports.ScaleServiceEndpoint=ip,exports.StartAddonPitrEndpoint=id,exports.StartJobBuildEndpoint=Ud,exports.StartJobRunEndpoint=Md,exports.StartServiceBuildEndpoint=Bl,exports.SuspendJobEndpoint=Kd,exports.UnassignSubdomainEndpoint=Yc,exports.UnassignSubdomainPathEndpoint=ou,exports.UncordonCloudClusterNodeEndpoint=Uc,exports.UpdateAddonNetworksettingsEndpoint=rd,exports.UpdateAddonSecurityEndpoint=pd,exports.UpdateAddonVersionEndpoint=hd,exports.UpdateCloudClusterEndpoint=Ic,exports.UpdateCloudIntegrationEndpoint=Oc,exports.UpdateJobBuildargumentsEndpoint=Sd,exports.UpdateJobBuildoptionsEndpoint=Pd,exports.UpdateJobBuildsourceEndpoint=xd,exports.UpdateJobDeploymentEndpoint=Td,exports.UpdateJobHealthchecksEndpoint=Nd,exports.UpdateJobRuntimeenvironmentEndpoint=Vd,exports.UpdateJobSettingsEndpoint=Zd,exports.UpdateLogsinkEndpoint=fu,exports.UpdateNotificationEndpoint=bu,exports.UpdatePreviewtemplateEndpoint=tl,exports.UpdateRegistrycredentialsEndpoint=Eu,exports.UpdateReleaseflowEndpoint=al,exports.UpdateSecretEndpoint=gl,exports.UpdateSecretlinkEndpoint=yl,exports.UpdateServiceBuildargumentsEndpoint=Ll,exports.UpdateServiceBuildoptionsEndpoint=Fl,exports.UpdateServiceBuildsourceEndpoint=Jl,exports.UpdateServiceDeploymentEndpoint=Vl,exports.UpdateServiceHealthchecksEndpoint=Yl,exports.UpdateServicePortsEndpoint=Xl,exports.UpdateServiceRuntimeenvironmentEndpoint=rp,exports.UpdateSubdomainPathEndpoint=nu,exports.UpdateTemplateEndpoint=Ep,exports.UpdateVolumeEndpoint=up,exports.VerifyDomainEndpoint=su,exports.VerifySubdomainEndpoint=iu;