@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.
- package/dist/cjs/api-client.d.ts +2698 -259
- package/dist/cjs/api-client.js +1 -1
- package/dist/esm/api-client.d.ts +2698 -259
- package/dist/esm/api-client.js +1 -1
- package/package.json +1 -1
package/dist/esm/api-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{EventEmitter as t}from"events";import*as n from"stream";import r,{Transform as o}from"stream";import i from"http";import s,{fileURLToPath as a}from"url";import c from"punycode";import u from"https";import d from"zlib";import l from"os";import*as p from"net";import f,{Socket as h}from"net";import{spawn as v,execSync as m}from"child_process";import g from"fs";import b from"path";import y from"buffer";import w from"crypto";import I from"tls";import j from"dgram";var R=function(e,t){return R=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])},R(e,t)};function E(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}R(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var C=function(){return C=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},C.apply(this,arguments)};function U(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 _(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 S(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 A="object"==typeof global&&global&&global.Object===Object&&global,P="object"==typeof self&&self&&self.Object===Object&&self,k=A||P||Function("return this")(),O=k.Symbol,q=Object.prototype,x=q.hasOwnProperty,T=q.toString,D=O?O.toStringTag:void 0;var N=Object.prototype.toString;var B="[object Null]",L="[object Undefined]",F=O?O.toStringTag:void 0;function G(e){return null==e?void 0===e?L:B:F&&F in Object(e)?function(e){var t=x.call(e,D),n=e[D];try{e[D]=void 0;var r=!0}catch(e){}var o=T.call(e);return r&&(t?e[D]=n:delete e[D]),o}(e):function(e){return N.call(e)}(e)}function M(e){return null!=e&&"object"==typeof e}var J="[object Symbol]";function z(e){return"symbol"==typeof e||M(e)&&G(e)==J}function W(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var $=Array.isArray,V=1/0,H=O?O.prototype:void 0,Y=H?H.toString:void 0;function Z(e){if("string"==typeof e)return e;if($(e))return W(e,Z)+"";if(z(e))return Y?Y.call(e):"";var t=e+"";return"0"==t&&1/e==-V?"-0":t}function K(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function X(e){return e}var Q="[object AsyncFunction]",ee="[object Function]",te="[object GeneratorFunction]",ne="[object Proxy]";function re(e){if(!K(e))return!1;var t=G(e);return t==ee||t==te||t==Q||t==ne}var oe,ie=k["__core-js_shared__"],se=(oe=/[^.]+$/.exec(ie&&ie.keys&&ie.keys.IE_PROTO||""))?"Symbol(src)_1."+oe:"";var ae=Function.prototype.toString;function ce(e){if(null!=e){try{return ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var ue=/^\[object .+?Constructor\]$/,de=Function.prototype,le=Object.prototype,pe=de.toString,fe=le.hasOwnProperty,he=RegExp("^"+pe.call(fe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ve(e){return!(!K(e)||(t=e,se&&se in t))&&(re(e)?he:ue).test(ce(e));var t}function me(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ve(n)?n:void 0}var ge=me(k,"WeakMap"),be=Object.create,ye=function(){function e(){}return function(t){if(!K(t))return{};if(be)return be(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var we=Date.now;var Ie,je,Re,Ee=function(){try{var e=me(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ce=Ee,Ue=Ce?function(e,t){return Ce(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:X,_e=(Ie=Ue,je=0,Re=0,function(){var e=we(),t=16-(e-Re);if(Re=e,t>0){if(++je>=800)return arguments[0]}else je=0;return Ie.apply(void 0,arguments)}),Se=9007199254740991,Ae=/^(?:0|[1-9]\d*)$/;function Pe(e,t){var n=typeof e;return!!(t=null==t?Se:t)&&("number"==n||"symbol"!=n&&Ae.test(e))&&e>-1&&e%1==0&&e<t}function ke(e,t,n){"__proto__"==t&&Ce?Ce(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Oe(e,t){return e===t||e!=e&&t!=t}var qe=Object.prototype.hasOwnProperty;function xe(e,t,n){var r=e[t];qe.call(e,t)&&Oe(r,n)&&(void 0!==n||t in e)||ke(e,t,n)}var Te=Math.max;function De(e,t){return _e(function(e,t,n){return t=Te(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Te(r.length-t,0),s=Array(i);++o<i;)s[o]=r[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=r[o];return a[t]=n(s),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,a)}}(e,t,X),e+"")}var Ne=9007199254740991;function Be(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Ne}function Le(e){return null!=e&&Be(e.length)&&!re(e)}var Fe=Object.prototype;function Ge(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Fe)}function Me(e){return M(e)&&"[object Arguments]"==G(e)}var Je=Object.prototype,ze=Je.hasOwnProperty,We=Je.propertyIsEnumerable,$e=Me(function(){return arguments}())?Me:function(e){return M(e)&&ze.call(e,"callee")&&!We.call(e,"callee")};var Ve="object"==typeof exports&&exports&&!exports.nodeType&&exports,He=Ve&&"object"==typeof module&&module&&!module.nodeType&&module,Ye=He&&He.exports===Ve?k.Buffer:void 0,Ze=(Ye?Ye.isBuffer:void 0)||function(){return!1},Ke={};Ke["[object Float32Array]"]=Ke["[object Float64Array]"]=Ke["[object Int8Array]"]=Ke["[object Int16Array]"]=Ke["[object Int32Array]"]=Ke["[object Uint8Array]"]=Ke["[object Uint8ClampedArray]"]=Ke["[object Uint16Array]"]=Ke["[object Uint32Array]"]=!0,Ke["[object Arguments]"]=Ke["[object Array]"]=Ke["[object ArrayBuffer]"]=Ke["[object Boolean]"]=Ke["[object DataView]"]=Ke["[object Date]"]=Ke["[object Error]"]=Ke["[object Function]"]=Ke["[object Map]"]=Ke["[object Number]"]=Ke["[object Object]"]=Ke["[object RegExp]"]=Ke["[object Set]"]=Ke["[object String]"]=Ke["[object WeakMap]"]=!1;var Xe="object"==typeof exports&&exports&&!exports.nodeType&&exports,Qe=Xe&&"object"==typeof module&&module&&!module.nodeType&&module,et=Qe&&Qe.exports===Xe&&A.process,tt=function(){try{var e=Qe&&Qe.require&&Qe.require("util").types;return e||et&&et.binding&&et.binding("util")}catch(e){}}(),nt=tt&&tt.isTypedArray,rt=nt?function(e){return function(t){return e(t)}}(nt):function(e){return M(e)&&Be(e.length)&&!!Ke[G(e)]},ot=rt,it=Object.prototype.hasOwnProperty;function st(e,t){var n=$(e),r=!n&&$e(e),o=!n&&!r&&Ze(e),i=!n&&!r&&!o&&ot(e),s=n||r||o||i,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=a.length;for(var u in e)!t&&!it.call(e,u)||s&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Pe(u,c))||a.push(u);return a}function at(e,t){return function(n){return e(t(n))}}var ct=at(Object.keys,Object),ut=Object.prototype.hasOwnProperty;function dt(e){return Le(e)?st(e):function(e){if(!Ge(e))return ct(e);var t=[];for(var n in Object(e))ut.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var lt=Object.prototype.hasOwnProperty;function pt(e){if(!K(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Ge(e),n=[];for(var r in e)("constructor"!=r||!t&<.call(e,r))&&n.push(r);return n}function ft(e){return Le(e)?st(e,!0):pt(e)}var ht=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vt=/^\w*$/;function mt(e,t){if($(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!z(e))||(vt.test(e)||!ht.test(e)||null!=t&&e in Object(t))}var gt=me(Object,"create");var bt=Object.prototype.hasOwnProperty;var yt=Object.prototype.hasOwnProperty;function wt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function It(e,t){for(var n=e.length;n--;)if(Oe(e[n][0],t))return n;return-1}wt.prototype.clear=function(){this.__data__=gt?gt(null):{},this.size=0},wt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},wt.prototype.get=function(e){var t=this.__data__;if(gt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return bt.call(t,e)?t[e]:void 0},wt.prototype.has=function(e){var t=this.__data__;return gt?void 0!==t[e]:yt.call(t,e)},wt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=gt&&void 0===t?"__lodash_hash_undefined__":t,this};var jt=Array.prototype.splice;function Rt(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])}}Rt.prototype.clear=function(){this.__data__=[],this.size=0},Rt.prototype.delete=function(e){var t=this.__data__,n=It(t,e);return!(n<0)&&(n==t.length-1?t.pop():jt.call(t,n,1),--this.size,!0)},Rt.prototype.get=function(e){var t=this.__data__,n=It(t,e);return n<0?void 0:t[n][1]},Rt.prototype.has=function(e){return It(this.__data__,e)>-1},Rt.prototype.set=function(e,t){var n=this.__data__,r=It(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Et=me(k,"Map");function Ct(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 Ut(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])}}Ut.prototype.clear=function(){this.size=0,this.__data__={hash:new wt,map:new(Et||Rt),string:new wt}},Ut.prototype.delete=function(e){var t=Ct(this,e).delete(e);return this.size-=t?1:0,t},Ut.prototype.get=function(e){return Ct(this,e).get(e)},Ut.prototype.has=function(e){return Ct(this,e).has(e)},Ut.prototype.set=function(e,t){var n=Ct(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var _t="Expected a function";function St(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(_t);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(St.Cache||Ut),n}St.Cache=Ut;var At=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pt=/\\(\\)?/g,kt=function(e){var t=St(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(At,(function(e,n,r,o){t.push(r?o.replace(Pt,"$1"):n||e)})),t})),Ot=kt;function qt(e){return null==e?"":Z(e)}function xt(e,t){return $(e)?e:mt(e,t)?[e]:Ot(qt(e))}var Tt=1/0;function Dt(e){if("string"==typeof e||z(e))return e;var t=e+"";return"0"==t&&1/e==-Tt?"-0":t}function Nt(e,t){for(var n=0,r=(t=xt(t,e)).length;null!=e&&n<r;)e=e[Dt(t[n++])];return n&&n==r?e:void 0}function Bt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Lt=O?O.isConcatSpreadable:void 0;function Ft(e){return $(e)||$e(e)||!!(Lt&&e&&e[Lt])}function Gt(e,t,n,r,o){var i=-1,s=e.length;for(n||(n=Ft),o||(o=[]);++i<s;){var a=e[i];t>0&&n(a)?t>1?Gt(a,t-1,n,r,o):Bt(o,a):r||(o[o.length]=a)}return o}var Mt=at(Object.getPrototypeOf,Object),Jt="[object Object]",zt=Function.prototype,Wt=Object.prototype,$t=zt.toString,Vt=Wt.hasOwnProperty,Ht=$t.call(Object);function Yt(e){var t=this.__data__=new Rt(e);this.size=t.size}Yt.prototype.clear=function(){this.__data__=new Rt,this.size=0},Yt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yt.prototype.get=function(e){return this.__data__.get(e)},Yt.prototype.has=function(e){return this.__data__.has(e)},Yt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Rt){var r=n.__data__;if(!Et||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ut(r)}return n.set(e,t),this.size=n.size,this};var Zt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Kt=Zt&&"object"==typeof module&&module&&!module.nodeType&&module,Xt=Kt&&Kt.exports===Zt?k.Buffer:void 0,Qt=Xt?Xt.allocUnsafe:void 0;var en=Object.prototype.propertyIsEnumerable,tn=Object.getOwnPropertySymbols,nn=tn?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}(tn(e),(function(t){return en.call(e,t)})))}:function(){return[]};function rn(e){return function(e,t,n){var r=t(e);return $(e)?r:Bt(r,n(e))}(e,dt,nn)}var on=me(k,"DataView"),sn=me(k,"Promise"),an=me(k,"Set"),cn="[object Map]",un="[object Promise]",dn="[object Set]",ln="[object WeakMap]",pn="[object DataView]",fn=ce(on),hn=ce(Et),vn=ce(sn),mn=ce(an),gn=ce(ge),bn=G;(on&&bn(new on(new ArrayBuffer(1)))!=pn||Et&&bn(new Et)!=cn||sn&&bn(sn.resolve())!=un||an&&bn(new an)!=dn||ge&&bn(new ge)!=ln)&&(bn=function(e){var t=G(e),n="[object Object]"==t?e.constructor:void 0,r=n?ce(n):"";if(r)switch(r){case fn:return pn;case hn:return cn;case vn:return un;case mn:return dn;case gn:return ln}return t});var yn=bn,wn=k.Uint8Array;function In(e,t){var n,r,o=t?(n=e.buffer,r=new n.constructor(n.byteLength),new wn(r).set(new wn(n)),r):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function jn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ut;++t<n;)this.add(e[t])}function Rn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}jn.prototype.add=jn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},jn.prototype.has=function(e){return this.__data__.has(e)};var En=1,Cn=2;function Un(e,t,n,r,o,i){var s=n&En,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&Cn?new jn: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(!Rn(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 _n(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Sn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var An=1,Pn=2,kn="[object Boolean]",On="[object Date]",qn="[object Error]",xn="[object Map]",Tn="[object Number]",Dn="[object RegExp]",Nn="[object Set]",Bn="[object String]",Ln="[object Symbol]",Fn="[object ArrayBuffer]",Gn="[object DataView]",Mn=O?O.prototype:void 0,Jn=Mn?Mn.valueOf:void 0;var zn=1,Wn=Object.prototype.hasOwnProperty;var $n=1,Vn="[object Arguments]",Hn="[object Array]",Yn="[object Object]",Zn=Object.prototype.hasOwnProperty;function Kn(e,t,n,r,o,i){var s=$(e),a=$(t),c=s?Hn:yn(e),u=a?Hn:yn(t),d=(c=c==Vn?Yn:c)==Yn,l=(u=u==Vn?Yn:u)==Yn,p=c==u;if(p&&Ze(e)){if(!Ze(t))return!1;s=!0,d=!1}if(p&&!d)return i||(i=new Yt),s||ot(e)?Un(e,t,n,r,o,i):function(e,t,n,r,o,i,s){switch(n){case Gn:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Fn:return!(e.byteLength!=t.byteLength||!i(new wn(e),new wn(t)));case kn:case On:case Tn:return Oe(+e,+t);case qn:return e.name==t.name&&e.message==t.message;case Dn:case Bn:return e==t+"";case xn:var a=_n;case Nn:var c=r&An;if(a||(a=Sn),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;r|=Pn,s.set(e,t);var d=Un(a(e),a(t),r,o,i,s);return s.delete(e),d;case Ln:if(Jn)return Jn.call(e)==Jn.call(t)}return!1}(e,t,c,n,r,o,i);if(!(n&$n)){var f=d&&Zn.call(e,"__wrapped__"),h=l&&Zn.call(t,"__wrapped__");if(f||h){var v=f?e.value():e,m=h?t.value():t;return i||(i=new Yt),o(v,m,n,r,i)}}return!!p&&(i||(i=new Yt),function(e,t,n,r,o,i){var s=n&zn,a=rn(e),c=a.length;if(c!=rn(t).length&&!s)return!1;for(var u=c;u--;){var d=a[u];if(!(s?d in t:Wn.call(t,d)))return!1}var l=i.get(e),p=i.get(t);if(l&&p)return l==t&&p==e;var f=!0;i.set(e,t),i.set(t,e);for(var h=s;++u<c;){var v=e[d=a[u]],m=t[d];if(r)var g=s?r(m,v,d,t,e,i):r(v,m,d,e,t,i);if(!(void 0===g?v===m||o(v,m,n,r,i):g)){f=!1;break}h||(h="constructor"==d)}if(f&&!h){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(f=!1)}return i.delete(e),i.delete(t),f}(e,t,n,r,o,i))}function Xn(e,t,n,r,o){return e===t||(null==e||null==t||!M(e)&&!M(t)?e!=e&&t!=t:Kn(e,t,n,r,Xn,o))}var Qn=1,er=2;function tr(e){return e==e&&!K(e)}function nr(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function rr(e){var t=function(e){for(var t=dt(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,tr(o)]}return t}(e);return 1==t.length&&t[0][2]?nr(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var o=n.length,i=o,s=!r;if(null==e)return!i;for(e=Object(e);o--;){var a=n[o];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){var 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 Yt;if(r)var p=r(u,d,c,e,t,l);if(!(void 0===p?Xn(d,u,Qn|er,r,l):p))return!1}}return!0}(n,e,t)}}function or(e,t){return null!=e&&t in Object(e)}function ir(e,t){return null!=e&&function(e,t,n){for(var r=-1,o=(t=xt(t,e)).length,i=!1;++r<o;){var s=Dt(t[r]);if(!(i=null!=e&&n(e,s)))break;e=e[s]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Be(o)&&Pe(s,o)&&($(e)||$e(e))}(e,t,or)}var sr=1,ar=2;function cr(e,t){return mt(e)&&tr(t)?nr(Dt(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Nt(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?ir(n,e):Xn(t,r,sr|ar)}}function ur(e){return mt(e)?(t=Dt(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Nt(t,e)}}(e);var t}function dr(e){return"function"==typeof e?e:null==e?X:"object"==typeof e?$(e)?cr(e[0],e[1]):rr(e):ur(e)}var lr,pr=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),s=i.length;s--;){var a=i[lr?s:++r];if(!1===t(o[a],a,o))break}return e};var fr=function(e,t){return function(n,r){if(null==n)return n;if(!Le(n))return e(n,r);for(var o=n.length,i=t?o:-1,s=Object(n);(t?i--:++i<o)&&!1!==r(s[i],i,s););return n}}((function(e,t){return e&&pr(e,t,dt)})),hr=fr;function vr(e,t,n){(void 0!==n&&!Oe(e[t],n)||void 0===n&&!(t in e))&&ke(e,t,n)}function mr(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function gr(e){return function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,s=t.length;++i<s;){var a=t[i],c=r?r(n[a],e[a],a,n,e):void 0;void 0===c&&(c=e[a]),o?ke(n,a,c):xe(n,a,c)}return n}(e,ft(e))}function br(e,t,n,r,o,i,s){var a=mr(e,n),c=mr(t,n),u=s.get(c);if(u)vr(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=$(c),h=!f&&Ze(c),v=!f&&!h&&ot(c);l=c,f||h||v?$(a)?l=a:M(d=a)&&Le(d)?l=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(a):h?(p=!1,l=function(e,t){if(t)return e.slice();var n=e.length,r=Qt?Qt(n):new e.constructor(n);return e.copy(r),r}(c,!0)):v?(p=!1,l=In(c,!0)):l=[]:function(e){if(!M(e)||G(e)!=Jt)return!1;var t=Mt(e);if(null===t)return!0;var n=Vt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&$t.call(n)==Ht}(c)||$e(c)?(l=a,$e(a)?l=gr(a):K(a)&&!re(a)||(l=function(e){return"function"!=typeof e.constructor||Ge(e)?{}:ye(Mt(e))}(c))):p=!1}p&&(s.set(c,l),o(l,c,r,i,s),s.delete(c)),vr(e,n,l)}}function yr(e,t,n,r,o){e!==t&&pr(t,(function(i,s){if(o||(o=new Yt),K(i))br(e,t,s,n,yr,r,o);else{var a=r?r(mr(e,s),i,s+"",e,t,o):void 0;void 0===a&&(a=i),vr(e,s,a)}}),ft)}var wr=/[\\^$.*+?()[\]{}|]/g,Ir=RegExp(wr.source);function jr(e,t){var n=-1,r=Le(e)?Array(e.length):[];return hr(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function Rr(e,t){return Gt(function(e,t){return($(e)?W:jr)(e,dr(t))}(e,t),1)}var Er=1/0;function Cr(e,t){return e>t}function Ur(e){return"string"==typeof e||!$(e)&&M(e)&&"[object String]"==G(e)}function _r(e,t){return e&&e.length?function(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],s=t(i);if(null!=s&&(void 0===a?s==s&&!z(s):n(s,a)))var a=s,c=i}return c}(e,dr(t),Cr):void 0}var Sr,Ar=(Sr=function(e,t,n){yr(e,t,n)},De((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(!K(n))return!1;var r=typeof t;return!!("number"==r?Le(n)&&Pe(t,n.length):"string"==r&&t in n)&&Oe(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var s=t[n];s&&Sr(e,s,n,o)}return e})));function Pr(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function kr(e,t){return e(t={exports:{}},t.exports),t.exports}var Or={},qr=Or;function xr(e){return e<0?-1:1}function Tr(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=xr(a)*Math.floor(Math.abs(a)),a<n||a>r)throw new TypeError("Argument is not in byte range");return a}if(!isNaN(a)&&s.clamp)return a=function(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=xr(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}}Or.void=function(){},Or.boolean=function(e){return!!e},Or.byte=Tr(8,{unsigned:!1}),Or.octet=Tr(8,{unsigned:!0}),Or.short=Tr(16,{unsigned:!1}),Or["unsigned short"]=Tr(16,{unsigned:!0}),Or.long=Tr(32,{unsigned:!1}),Or["unsigned long"]=Tr(32,{unsigned:!0}),Or["long long"]=Tr(32,{unsigned:!1,moduloBitLength:64}),Or["unsigned long long"]=Tr(32,{unsigned:!0,moduloBitLength:64}),Or.double=function(e){const t=+e;if(!Number.isFinite(t))throw new TypeError("Argument is not a finite floating-point value");return t},Or["unrestricted double"]=function(e){const t=+e;if(isNaN(t))throw new TypeError("Argument is NaN");return t},Or.float=Or.double,Or["unrestricted float"]=Or["unrestricted double"],Or.DOMString=function(e,t){return t||(t={}),t.treatNullAsEmptyString&&null===e?"":String(e)},Or.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},Or.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("")},Or.Date=function(e,t){if(!(e instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(e))return e},Or.RegExp=function(e,t){return e instanceof RegExp||(e=new RegExp(e)),e};var Dr=kr((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]}}));Dr.mixin,Dr.wrapperSymbol,Dr.implSymbol,Dr.wrapperForImpl,Dr.implForWrapper;var Nr,Br=(Nr=Object.freeze({__proto__:null}))&&Nr.default||Nr,Lr={TRANSITIONAL:0,NONTRANSITIONAL:1};function Fr(e){return e.split("\0").map((function(e){return e.normalize("NFC")})).join("\0")}function Gr(e){for(var t=0,n=Br.length-1;t<=n;){var r=Math.floor((t+n)/2),o=Br[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 Mr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function Jr(e){return e.replace(Mr,"_").length}var zr=/[\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 Wr(e,t){"xn--"===e.substr(0,4)&&(e=c.toUnicode(e));var n=!1;(Fr(e)!==e||"-"===e[3]&&"-"===e[4]||"-"===e[0]||"-"===e[e.length-1]||-1!==e.indexOf(".")||0===e.search(zr))&&(n=!0);for(var r=Jr(e),o=0;o<r;++o){var i=Gr(e.codePointAt(o));if($r===Lr.TRANSITIONAL&&"valid"!==i[1]||$r===Lr.NONTRANSITIONAL&&"valid"!==i[1]&&"deviation"!==i[1]){n=!0;break}}return{label:e,error:n}}function $r(e,t,n){var r=function(e,t,n){for(var r=!1,o="",i=Jr(e),s=0;s<i;++s){var a=e.codePointAt(s),c=Gr(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===Lr.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=Fr(r.string);for(var o=r.string.split("."),i=0;i<o.length;++i)try{var s=Wr(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 Vr={toASCII:function(e,t,n,r){var o=$r(e,t,n),i=o.string.split(".");if(i=i.map((function(e){try{return c.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=$r(e,t,Lr.NONTRANSITIONAL);return{domain:n.string,error:n.error}},PROCESSING_OPTIONS:Lr},Hr=kr((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 c.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 u(e){return"."===e||"%2e"===e.toLowerCase()}function d(e){return 2===e.length&&s(e.codePointAt(0))&&(":"===e[1]||"|"===e[1])}function l(e){return void 0!==t[e]}function p(e){return l(e.scheme)}function f(e){let t=e.toString(16).toUpperCase();return 1===t.length&&(t="0"+t),"%"+t}function h(e){return e<=31||e>126}const v=new Set([32,34,35,60,62,63,96,123,125]);function m(e){return h(e)||v.has(e)}const g=new Set([47,58,59,61,64,91,92,93,94,124]);function b(e){return m(e)||g.has(e)}function y(e,t){const n=String.fromCodePoint(e);return t(e)?function(e){const t=new Buffer(e);let n="";for(let e=0;e<t.length;++e)n+=f(t[e]);return n}(n):n}function w(e){let t=10;if(e.length>=2&&"0"===e.charAt(0)&&"x"===e.charAt(1).toLowerCase()?(e=e.substring(2),t=16):e.length>=2&&"0"===e.charAt(0)&&(e=e.substring(1),t=8),""===e)return 0;return(10===t?/[^0-9]/:16===t?/[^0-9A-Fa-f]/:/[^0-7]/).test(e)?n:parseInt(e,t)}function I(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,u=0;if(58===(e=c.ucs2.decode(e))[u]){if(58!==e[u+1])return n;u+=2,++r,s=r}for(;u<e.length;){if(8===r)return n;if(58===e[u]){if(null!==s)return n;++u,++r,s=r;continue}let c=0,d=0;for(;d<4&&a(e[u]);)c=16*c+parseInt(o(e,u),16),++u,++d;if(46===e[u]){if(0===d)return n;if(u-=d,r>6)return n;let s=0;for(;void 0!==e[u];){let a=null;if(s>0){if(!(46===e[u]&&s<4))return n;++u}if(!i(e[u]))return n;for(;i(e[u]);){const t=parseInt(o(e,u));if(null===a)a=t;else{if(0===a)return n;a=10*a+t}if(a>255)return n;++u}t[r]=256*t[r]+a,++s,2!==s&&4!==s||++r}if(4!==s)return n;break}if(58===e[u]){if(++u,void 0===e[u])return n}else if(void 0!==e[u])return n;t[r]=c,++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=c.ucs2.decode(e);for(let e=0;e<o.length;++e)r+=y(o[e],h);return r}(e);const r=function(e){const t=new Buffer(e),n=[];for(let e=0;e<t.length;++e)37!==t[e]?n.push(t[e]):37===t[e]&&a(t[e+1])&&a(t[e+2])?(n.push(parseInt(t.slice(e+1,e+3).toString(),16)),e+=2):n.push(t[e]);return new Buffer(n).toString()}(e),s=Vr.toASCII(r,!1,Vr.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===s)return n;if(-1!==s.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return n;const u=function(e){const t=e.split(".");if(""===t[t.length-1]&&t.length>1&&t.pop(),t.length>4)return e;const r=[];for(const o of t){if(""===o)return e;const t=w(o);if(t===n)return e;r.push(t)}for(let e=0;e<r.length-1;++e)if(r[e]>255)return n;if(r[r.length-1]>=Math.pow(256,5-r.length))return n;let o=r.pop(),i=0;for(const e of r)o+=e*Math.pow(256,3-i),++i;return o}(s);return"number"==typeof u||u===n?u:s}function j(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 R(e){const t=e.path;var n;0!==t.length&&("file"===e.scheme&&1===t.length&&(n=t[0],/^[A-Za-z]:$/.test(n))||t.pop())}function E(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=c.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(p(this.url)&&!l(this.buffer))return!1;if(!p(this.url)&&l(this.buffer))return!1;if((E(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&(""===this.url.host||null===this.url.host))return!1}if(this.url.scheme=this.buffer,this.buffer="",this.stateOverride)return!1;"file"===this.url.scheme?(47===this.input[this.pointer+1]&&47===this.input[this.pointer+2]||(this.parseError=!0),this.state="file"):p(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":p(this.url)?this.state="special authority slashes":47===this.input[this.pointer+1]?(this.state="path or authority",++this.pointer):(this.url.cannotBeABaseURL=!0,this.url.path.push(""),this.state="cannot-be-a-base-URL path")}else{if(this.stateOverride)return this.parseError=!0,n;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},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"):p(this.url)&&92===e?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(0,this.base.path.length-1),this.state="path",--this.pointer),!0},C.prototype["parse relative slash"]=function(e){return!p(this.url)||47!==e&&92!==e?47===e?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(92===e&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},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=y(e,b);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(e)||47===e||63===e||35===e||p(this.url)&&92===e){if(this.atFlag&&""===this.buffer)return this.parseError=!0,n;this.pointer-=r(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=t;return!0},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||p(this.url)&&92===e){if(--this.pointer,p(this.url)&&""===this.buffer)return this.parseError=!0,n;if(this.stateOverride&&""===this.buffer&&(E(this.url)||null!==this.url.port))return this.parseError=!0,!1;const e=I(this.buffer,p(this.url));if(e===n)return n;if(this.url.host=e,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===e?this.arrFlag=!0:93===e&&(this.arrFlag=!1),this.buffer+=t;else{if(""===this.buffer)return this.parseError=!0,n;const e=I(this.buffer,p(this.url));if(e===n)return n;if(this.url.host=e,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},C.prototype["parse port"]=function(e,r){if(i(e))this.buffer+=r;else{if(!(isNaN(e)||47===e||63===e||35===e||p(this.url)&&92===e||this.stateOverride))return this.parseError=!0,n;if(""!==this.buffer){const e=parseInt(this.buffer);if(e>Math.pow(2,16)-1)return this.parseError=!0,n;this.url.port=e===(o=this.url.scheme,t[o])?null:e,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var o;return!0};const 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(),R(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&&d(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let e=I(this.buffer,p(this.url));if(e===n)return n;if("localhost"===e&&(e=""),this.url.host=e,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=t;return!0},C.prototype["parse path start"]=function(e){return p(this.url)?(92===e&&(this.parseError=!0),this.state="path",47!==e&&92!==e&&--this.pointer):this.stateOverride||63!==e?this.stateOverride||35!==e?void 0!==e&&(this.state="path",47!==e&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},C.prototype["parse path"]=function(e){if(isNaN(e)||47===e||p(this.url)&&92===e||!this.stateOverride&&(63===e||35===e)){if(p(this.url)&&92===e&&(this.parseError=!0),!function(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e}(this.buffer)?!u(this.buffer)||47===e||p(this.url)&&92===e?u(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&d(this.buffer)&&(""!==this.url.host&&null!==this.url.host&&(this.parseError=!0,this.url.host=""),this.buffer=this.buffer[0]+":"),this.url.path.push(this.buffer)):this.url.path.push(""):(R(this.url),47===e||p(this.url)&&92===e||this.url.path.push("")),this.buffer="","file"===this.url.scheme&&(void 0===e||63===e||35===e))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===e&&(this.url.query="",this.state="query"),35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=y(e,m);return!0},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]+y(e,h))),!0},C.prototype["parse query"]=function(e,t){if(isNaN(e)||!this.stateOverride&&35===e){p(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const t=new Buffer(this.buffer);for(let e=0;e<t.length;++e)t[e]<33||t[e]>126||34===t[e]||35===t[e]||60===t[e]||62===t[e]?this.url.query+=f(t[e]):this.url.query+=String.fromCodePoint(t[e]);this.buffer="",35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=t;return!0},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+=y(e,h))),!0},e.exports.serializeURL=function(e,t){let n=e.scheme+":";if(null!==e.host?(n+="//",""===e.username&&""===e.password||(n+=e.username,""!==e.password&&(n+=":"+e.password),n+="@"),n+=j(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+=j(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=c.ucs2.decode(t);for(let t=0;t<n.length;++t)e.username+=y(n[t],b)},e.exports.setThePassword=function(e,t){e.password="";const n=c.ucs2.decode(t);for(let t=0;t<n.length;++t)e.password+=y(n[t],b)},e.exports.serializeHost=j,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})}}));Hr.serializeURL,Hr.serializeURLOrigin,Hr.basicURLParse,Hr.setTheUsername,Hr.setThePassword,Hr.serializeHost,Hr.cannotHaveAUsernamePasswordPort,Hr.serializeInteger,Hr.parseURL;var Yr=class{constructor(e){const t=e[0],n=e[1];let r=null;if(void 0!==n&&(r=Hr.basicURLParse(n),"failure"===r))throw new TypeError("Invalid base URL");const o=Hr.basicURLParse(t,{baseURL:r});if("failure"===o)throw new TypeError("Invalid URL");this._url=o}get href(){return Hr.serializeURL(this._url)}set href(e){const t=Hr.basicURLParse(e);if("failure"===t)throw new TypeError("Invalid URL");this._url=t}get origin(){return Hr.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(e){Hr.basicURLParse(e+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(e){Hr.cannotHaveAUsernamePasswordPort(this._url)||Hr.setTheUsername(this._url,e)}get password(){return this._url.password}set password(e){Hr.cannotHaveAUsernamePasswordPort(this._url)||Hr.setThePassword(this._url,e)}get host(){const e=this._url;return null===e.host?"":null===e.port?Hr.serializeHost(e.host):Hr.serializeHost(e.host)+":"+Hr.serializeInteger(e.port)}set host(e){this._url.cannotBeABaseURL||Hr.basicURLParse(e,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":Hr.serializeHost(this._url.host)}set hostname(e){this._url.cannotBeABaseURL||Hr.basicURLParse(e,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":Hr.serializeInteger(this._url.port)}set port(e){Hr.cannotHaveAUsernamePasswordPort(this._url)||(""===e?this._url.port=null:Hr.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=[],Hr.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="",Hr.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="",Hr.basicURLParse(t,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}},Zr=kr((function(e){const t=Dr.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]=qr.USVString(o[0]),void 0!==o[1]&&(o[1]=qr.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=qr.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=qr.USVString(e),this[t].protocol=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"username",{get(){return this[t].username},set(e){e=qr.USVString(e),this[t].username=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"password",{get(){return this[t].password},set(e){e=qr.USVString(e),this[t].password=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"host",{get(){return this[t].host},set(e){e=qr.USVString(e),this[t].host=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hostname",{get(){return this[t].hostname},set(e){e=qr.USVString(e),this[t].hostname=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"port",{get(){return this[t].port},set(e){e=qr.USVString(e),this[t].port=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pathname",{get(){return this[t].pathname},set(e){e=qr.USVString(e),this[t].pathname=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"search",{get(){return this[t].search},set(e){e=qr.USVString(e),this[t].search=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hash",{get(){return this[t].hash},set(e){e=qr.USVString(e),this[t].hash=e},enumerable:!0,configurable:!0}),e.exports={is:e=>!!e&&e[t]instanceof Yr,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 Yr(n,r),e[t][Dr.wrapperSymbol]=e},interface:n,expose:{Window:{URL:n},Worker:{URL:n}}}}));Zr.is,Zr.create,Zr.setup,Zr.expose;var Kr={URL:Zr.interface,serializeURL:Hr.serializeURL,serializeURLOrigin:Hr.serializeURLOrigin,basicURLParse:Hr.basicURLParse,setTheUsername:Hr.setTheUsername,setThePassword:Hr.setThePassword,serializeHost:Hr.serializeHost,serializeInteger:Hr.serializeInteger,parseURL:Hr.parseURL};const Xr=r.Readable,Qr=Symbol("buffer"),eo=Symbol("type");class to{constructor(){this[eo]="";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 to?o[Qr]:Buffer.from("string"==typeof o?o:String(o)),r+=i.length,n.push(i)}}this[Qr]=Buffer.concat(n);let o=t&&void 0!==t.type&&String(t.type).toLowerCase();o&&!/[^\u0020-\u007E]/.test(o)&&(this[eo]=o)}get size(){return this[Qr].length}get type(){return this[eo]}text(){return Promise.resolve(this[Qr].toString())}arrayBuffer(){const e=this[Qr],t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return Promise.resolve(t)}stream(){const e=new Xr;return e._read=function(){},e.push(this[Qr]),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[Qr].slice(r,r+i),a=new to([],{type:arguments[2]});return a[Qr]=s,a}}function no(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 ro;Object.defineProperties(to.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(to.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),no.prototype=Object.create(Error.prototype),no.prototype.constructor=no,no.prototype.name="FetchError";try{ro=require("encoding").convert}catch(e){}const oo=Symbol("Body internals"),io=r.PassThrough;function so(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.size;let i=void 0===o?0:o;var s=n.timeout;let a=void 0===s?0:s;null==e?e=null:co(e)?e=Buffer.from(e.toString()):uo(e)||Buffer.isBuffer(e)||("[object ArrayBuffer]"===Object.prototype.toString.call(e)?e=Buffer.from(e):ArrayBuffer.isView(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof r||(e=Buffer.from(String(e)))),this[oo]={body:e,disturbed:!1,error:null},this.size=i,this.timeout=a,e instanceof r&&e.on("error",(function(e){const n="AbortError"===e.name?e:new no(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[oo].error=n}))}function ao(){var e=this;if(this[oo].disturbed)return so.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[oo].disturbed=!0,this[oo].error)return so.Promise.reject(this[oo].error);let t=this.body;if(null===t)return so.Promise.resolve(Buffer.alloc(0));if(uo(t)&&(t=t.stream()),Buffer.isBuffer(t))return so.Promise.resolve(t);if(!(t instanceof r))return so.Promise.resolve(Buffer.alloc(0));let n=[],o=0,i=!1;return new so.Promise((function(r,s){let a;e.timeout&&(a=setTimeout((function(){i=!0,s(new no(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)),t.on("error",(function(t){"AbortError"===t.name?(i=!0,s(t)):s(new no(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))})),t.on("data",(function(t){if(!i&&null!==t){if(e.size&&o+t.length>e.size)return i=!0,void s(new no(`content size at ${e.url} over limit: ${e.size}`,"max-size"));o+=t.length,n.push(t)}})),t.on("end",(function(){if(!i){clearTimeout(a);try{r(Buffer.concat(n,o))}catch(t){s(new no(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}}))}))}function co(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 uo(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 lo(e){let t,n,o=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return o instanceof r&&"function"!=typeof o.getBoundary&&(t=new io,n=new io,o.pipe(t),o.pipe(n),e[oo].body=t,o=n),o}function po(e){return null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":co(e)?"application/x-www-form-urlencoded;charset=UTF-8":uo(e)?e.type||null:Buffer.isBuffer(e)||"[object ArrayBuffer]"===Object.prototype.toString.call(e)||ArrayBuffer.isView(e)?null:"function"==typeof e.getBoundary?`multipart/form-data;boundary=${e.getBoundary()}`:e instanceof r?null:"text/plain;charset=UTF-8"}function fo(e){const t=e.body;return null===t?0:uo(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}so.prototype={get body(){return this[oo].body},get bodyUsed(){return this[oo].disturbed},arrayBuffer(){return ao.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 ao.call(this).then((function(t){return Object.assign(new to([],{type:e.toLowerCase()}),{[Qr]:t})}))},json(){var e=this;return ao.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return so.Promise.reject(new no(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}}))},text(){return ao.call(this).then((function(e){return e.toString()}))},buffer(){return ao.call(this)},textConverted(){var e=this;return ao.call(this).then((function(t){return function(e,t){if("function"!=typeof ro)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 ro(e,"UTF-8",i).toString()}(t,e.headers)}))}},Object.defineProperties(so.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),so.mixIn=function(e){for(const t of Object.getOwnPropertyNames(so.prototype))if(!(t in e)){const n=Object.getOwnPropertyDescriptor(so.prototype,t);Object.defineProperty(e,t,n)}},so.Promise=global.Promise;const ho=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,vo=/[^\t\x20-\x7e\x80-\xff]/;function mo(e){if(e=`${e}`,ho.test(e)||""===e)throw new TypeError(`${e} is not a legal HTTP header name`)}function go(e){if(e=`${e}`,vo.test(e))throw new TypeError(`${e} is not a legal HTTP header value`)}function bo(e,t){t=t.toLowerCase();for(const n in e)if(n.toLowerCase()===t)return n}const yo=Symbol("map");class wo{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[yo]=Object.create(null),e instanceof wo){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){mo(e=`${e}`);const t=bo(this[yo],e);return void 0===t?null:this[yo][t].join(", ")}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=Io(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=Io(this),r++}}set(e,t){t=`${t}`,mo(e=`${e}`),go(t);const n=bo(this[yo],e);this[yo][void 0!==n?n:e]=[t]}append(e,t){t=`${t}`,mo(e=`${e}`),go(t);const n=bo(this[yo],e);void 0!==n?this[yo][n].push(t):this[yo][e]=[t]}has(e){return mo(e=`${e}`),void 0!==bo(this[yo],e)}delete(e){mo(e=`${e}`);const t=bo(this[yo],e);void 0!==t&&delete this[yo][t]}raw(){return this[yo]}keys(){return Ro(this,"key")}values(){return Ro(this,"value")}[Symbol.iterator](){return Ro(this,"key+value")}}function Io(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(e[yo]).sort().map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[yo][t].join(", ")}:function(t){return[t.toLowerCase(),e[yo][t].join(", ")]})}wo.prototype.entries=wo.prototype[Symbol.iterator],Object.defineProperty(wo.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(wo.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});const jo=Symbol("internal");function Ro(e,t){const n=Object.create(Eo);return n[jo]={target:e,kind:t,index:0},n}const Eo=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==Eo)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[jo];const t=e.target,n=e.kind,r=e.index,o=Io(t,n);return r>=o.length?{value:void 0,done:!0}:(this[jo].index=r+1,{value:o[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function Co(e){const t=Object.assign({__proto__:null},e[yo]),n=bo(e[yo],"Host");return void 0!==n&&(t[n]=t[n][0]),t}Object.defineProperty(Eo,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const Uo=Symbol("Response internals"),_o=i.STATUS_CODES;class So{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};so.call(this,e,t);const n=t.status||200,r=new wo(t.headers);if(null!=e&&!r.has("Content-Type")){const t=po(e);t&&r.append("Content-Type",t)}this[Uo]={url:t.url,status:n,statusText:t.statusText||_o[n],headers:r,counter:t.counter}}get url(){return this[Uo].url||""}get status(){return this[Uo].status}get ok(){return this[Uo].status>=200&&this[Uo].status<300}get redirected(){return this[Uo].counter>0}get statusText(){return this[Uo].statusText}get headers(){return this[Uo].headers}clone(){return new So(lo(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}so.mixIn(So.prototype),Object.defineProperties(So.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(So.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const Ao=Symbol("Request internals"),Po=s.URL||Kr.URL,ko=s.parse,Oo=s.format;function qo(e){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(e)&&(e=new Po(e).toString()),ko(e)}const xo="destroy"in r.Readable.prototype;function To(e){return"object"==typeof e&&"object"==typeof e[Ao]}class Do{constructor(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};To(e)?t=qo(e.url):(t=e&&e.href?qo(e.href):qo(`${e}`),e={});let r=n.method||e.method||"GET";if(r=r.toUpperCase(),(null!=n.body||To(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:To(e)&&null!==e.body?lo(e):null;so.call(this,o,{timeout:n.timeout||e.timeout||0,size:n.size||e.size||0});const i=new wo(n.headers||e.headers||{});if(null!=o&&!i.has("Content-Type")){const e=po(o);e&&i.append("Content-Type",e)}let s=To(e)?e.signal:null;if("signal"in n&&(s=n.signal),null!=s&&!function(e){const t=e&&"object"==typeof e&&Object.getPrototypeOf(e);return!(!t||"AbortSignal"!==t.constructor.name)}(s))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[Ao]={method:r,redirect:n.redirect||e.redirect||"follow",headers:i,parsedURL:t,signal:s},this.follow=void 0!==n.follow?n.follow:void 0!==e.follow?e.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===e.compress||e.compress,this.counter=n.counter||e.counter||0,this.agent=n.agent||e.agent}get method(){return this[Ao].method}get url(){return Oo(this[Ao].parsedURL)}get headers(){return this[Ao].headers}get redirect(){return this[Ao].redirect}get signal(){return this[Ao].signal}clone(){return new Do(this)}}function No(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}so.mixIn(Do.prototype),Object.defineProperty(Do.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Do.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),No.prototype=Object.create(Error.prototype),No.prototype.constructor=No,No.prototype.name="AbortError";const Bo=s.URL||Kr.URL,Lo=r.PassThrough;function Fo(e,t){if(!Fo.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return so.Promise=Fo.Promise,new Fo.Promise((function(n,o){const s=new Do(e,t),a=function(e){const t=e[Ao].parsedURL,n=new wo(e[Ao].headers);if(n.has("Accept")||n.set("Accept","*/*"),!t.protocol||!t.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&e.body instanceof r.Readable&&!xo)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let o=null;if(null==e.body&&/^(POST|PUT)$/i.test(e.method)&&(o="0"),null!=e.body){const t=fo(e);"number"==typeof t&&(o=String(t))}o&&n.set("Content-Length",o),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),e.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let i=e.agent;return"function"==typeof i&&(i=i(t)),Object.assign({},t,{method:e.method,headers:Co(n),agent:i})}(s),c=("https:"===a.protocol?u:i).request,l=s.signal;let p=null;const f=function(){let e=new No("The user aborted a request.");o(e),s.body&&s.body instanceof r.Readable&&Go(s.body,e),p&&p.body&&p.body.emit("error",e)};if(l&&l.aborted)return void f();const h=function(){f(),g()},v=c(a);let m;function g(){v.abort(),l&&l.removeEventListener("abort",h),clearTimeout(m)}l&&l.addEventListener("abort",h),s.timeout&&v.once("socket",(function(e){m=setTimeout((function(){o(new no(`network timeout at: ${s.url}`,"request-timeout")),g()}),s.timeout)})),v.on("error",(function(e){o(new no(`request to ${s.url} failed, reason: ${e.message}`,"system",e)),p&&p.body&&Go(p.body,e),g()})),function(e,t){let n;e.on("socket",(function(e){n=e})),e.on("response",(function(e){const r=e.headers;"chunked"!==r["transfer-encoding"]||r["content-length"]||e.once("close",(function(e){if(n&&n.listenerCount("data")>0&&!e){const e=new Error("Premature close");e.code="ERR_STREAM_PREMATURE_CLOSE",t(e)}}))}))}(v,(function(e){l&&l.aborted||p&&p.body&&Go(p.body,e)})),parseInt(process.version.substring(1))<14&&v.on("socket",(function(e){e.addListener("close",(function(t){const n=e.listenerCount("data")>0;if(p&&n&&!t&&(!l||!l.aborted)){const e=new Error("Premature close");e.code="ERR_STREAM_PREMATURE_CLOSE",p.body.emit("error",e)}}))})),v.on("response",(function(e){clearTimeout(m);const t=function(e){const t=new wo;for(const n of Object.keys(e))if(!ho.test(n))if(Array.isArray(e[n]))for(const r of e[n])vo.test(r)||(void 0===t[yo][n]?t[yo][n]=[r]:t[yo][n].push(r));else vo.test(e[n])||(t[yo][n]=[e[n]]);return t}(e.headers);if(Fo.isRedirect(e.statusCode)){const i=t.get("Location");let a=null;try{a=null===i?null:new Bo(i,s.url).toString()}catch(e){if("manual"!==s.redirect)return o(new no(`uri requested responds with an invalid redirect URL: ${i}`,"invalid-redirect")),void g()}switch(s.redirect){case"error":return o(new no(`uri requested responds with a redirect, redirect mode is set to error: ${s.url}`,"no-redirect")),void g();case"manual":if(null!==a)try{t.set("Location",a)}catch(e){o(e)}break;case"follow":if(null===a)break;if(s.counter>=s.follow)return o(new no(`maximum redirect reached at: ${s.url}`,"max-redirect")),void g();const i={headers:new wo(s.headers),follow:s.follow,counter:s.counter+1,agent:s.agent,compress:s.compress,method:s.method,body:s.body,signal:s.signal,timeout:s.timeout,size:s.size};if(!function(e,t){const n=new Bo(t).hostname,r=new Bo(e).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(s.url,a)||(r=s.url,new Bo(a).protocol!==new Bo(r).protocol))for(const e of["authorization","www-authenticate","cookie","cookie2"])i.headers.delete(e);return 303!==e.statusCode&&s.body&&null===fo(s)?(o(new no("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void g()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==s.method)||(i.method="GET",i.body=void 0,i.headers.delete("content-length")),n(Fo(new Do(a,i))),void g())}}var r;e.once("end",(function(){l&&l.removeEventListener("abort",h)}));let i=e.pipe(new Lo);const a={url:s.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:s.size,timeout:s.timeout,counter:s.counter},c=t.get("Content-Encoding");if(!s.compress||"HEAD"===s.method||null===c||204===e.statusCode||304===e.statusCode)return p=new So(i,a),void n(p);const u={flush:d.Z_SYNC_FLUSH,finishFlush:d.Z_SYNC_FLUSH};if("gzip"==c||"x-gzip"==c)return i=i.pipe(d.createGunzip(u)),p=new So(i,a),void n(p);if("deflate"==c||"x-deflate"==c){const t=e.pipe(new Lo);return t.once("data",(function(e){i=8==(15&e[0])?i.pipe(d.createInflate()):i.pipe(d.createInflateRaw()),p=new So(i,a),n(p)})),void t.on("end",(function(){p||(p=new So(i,a),n(p))}))}if("br"==c&&"function"==typeof d.createBrotliDecompress)return i=i.pipe(d.createBrotliDecompress()),p=new So(i,a),void n(p);p=new So(i,a),n(p)})),function(e,t){const n=t.body;null===n?e.end():uo(n)?n.stream().pipe(e):Buffer.isBuffer(n)?(e.write(n),e.end()):n.pipe(e)}(v,s)}))}function Go(e,t){e.destroy?e.destroy(t):(e.emit("error",t),e.end())}Fo.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},Fo.Promise=global.Promise;var Mo=function(){function e(e){this.contextProvider=e}return e.prototype.getServiceDetails=function(e,t){return U(this,void 0,void 0,(function(){return _(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 U(this,void 0,void 0,(function(){return _(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 U(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return _(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"}},C({},t)),[4,oc(2)((function(){return U(a,void 0,void 0,(function(){return _(this,(function(t){return[2,Fo(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}(),Jo=function(e,t,n){return U(void 0,void 0,void 0,(function(){var r,o,i,s,a;return _(this,(function(c){switch(c.label){case 0:if(r=$o(t||"127.0.0.1"),(o=$o(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===l.platform()&&(i=function(e){return U(void 0,void 0,void 0,(function(){var t;return _(this,(function(n){switch(n.label){case 0:return t="lo0 alias ".concat(e," up"),[4,Wo.apply(void 0,t.split(" "))];case 1:return n.sent(),[2]}}))}))}),s=r,c.label=1;case 1:return s<=o?(a=Vo(s),[4,zo(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."))}}))}))},zo=function(e,t){return new Promise((function(n){var r=new h,o=!1;r.on("connect",(function(){o=!0,r.destroy()})),r.setTimeout(400),r.on("timeout",(function(){o=!1,r.destroy()})),r.on("error",(function(){o=!1})),r.on("close",(function(){n(!o)})),t?r.connect(e,t):r.connect(e)}))},Wo=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return U(void 0,void 0,void 0,(function(){return _(this,(function(t){switch(t.label){case 0:return[4,Ho("/sbin/ifconfig",e).resultPromise];case 1:return[2,t.sent()]}}))}))},$o=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},Vo=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(".")},Ho=function(e,t,n){var r=v(e,t,C({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}},Yo=function(e,t,n){return U(void 0,void 0,void 0,(function(){var r,o;return _(this,(function(i){switch(i.label){case 0:return r=Zo(e,10),[4,g.promises.writeFile(r,t,n)];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,6]),[4,g.promises.rename(r,e)];case 3:return i.sent(),[3,6];case 4:return o=i.sent(),[4,g.promises.unlink(r).catch((function(){}))];case 5:throw i.sent(),o;case 6:return[2]}}))}))},Zo=function(e,t){for(var n,r=b.dirname(e),o=b.basename(e),i=0;null===(n=i<t)||void 0===n||n;i+=1){var s=S([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),a=".".concat(s,".").concat(o),c=b.join(r,a);if(!g.existsSync(c))return c}throw new Error("Could not write file to file '".concat(e,"'."))},Ko="win32"===process.platform?"\r\n":"\n",Xo=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;ii(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 Rr(this.findEntries(e),(function(e){return e.hosts.map((function(e){return e.host}))}))},e.prototype.resolveIps=function(e){return ii(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 ni(this.nodes,this.config.eol)},e.prototype.removeEntry=function(e){var t,n="number"==typeof(t=e)||M(t)&&"[object Number]"==G(t)?e:this.nodes.findIndex((function(t){return t===e}));n<0||this.nodes.splice(n,1)},e.prototype.findEntries=function(e){return ii(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=ti(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?[Qo(),ei(o),r]:[ei(o),r];this.insertAt.apply(this,S([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,S([e,0],n,!1))},e.prototype.makeEntry=function(e,t){var n=this.config.ipPrefixWhitespace;return C({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=ii(t,"eol").map((function(e){return e.line}));return null!==(e=si(n))&&void 0!==e?e:Ko}(),indent:null!==(o=null==n?void 0:n.indent)&&void 0!==o?o:function(){var e,n=Rr(ii(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=si(n))&&void 0!==e?e:17}(),ipPrefixWhitespace:""})},e.parse=function(e,t){return this.fromNodes(ri(e),t)},e}(),Qo=function(){return{type:"blank",line:""}},ei=function(e){return{type:"comment",line:ti(e)}},ti=function(e){return e.startsWith("#")?e:"# ".concat(e)},ni=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:Ko)},ri=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}:oi(e)}))},oi=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=Rr(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}},ii=function(e,t){return e.filter((function(e){return e.type===t}))},si=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=_r(Array.from(t.entries()),(function(e){return e[1]}));if(n)return n[0]},ai="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",ci=function(){function e(e){this.ast=Xo.fromNodes([]);var t={writeMode:"atomic",hostsFile:ai};this.config=C(C({},t),e)}return e.prototype.add=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!Ur(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!Ur(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(!Ur(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!Ur(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(!Ur(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(!Ur(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 U(this,void 0,void 0,(function(){var e;return _(this,(function(t){switch(t.label){case 0:return[4,g.promises.readFile(this.config.hostsFile)];case 1:return e=t.sent(),this.ast=Xo.parse(e.toString(),this.config),[2,this]}}))}))},e.prototype.write=function(e){return U(this,void 0,void 0,(function(){var t,n,r,o;return _(this,(function(i){switch(i.label){case 0:switch(t=C(C({},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,Yo(n,o)];case 2:case 4:return i.sent(),[3,6];case 3:return[4,g.promises.writeFile(n,o)];case 5:return[3,6];case 6:return[2,this]}}))}))},e.prototype.backup=function(e){return U(this,void 0,void 0,(function(){var t,n,r,o;return _(this,(function(i){switch(i.label){case 0:return g.existsSync(this.config.hostsFile)?(t=b.dirname(this.config.hostsFile),n=b.basename(this.config.hostsFile),r="".concat(n).concat(e.suffix),o=b.resolve(t,r),g.existsSync(o)&&!e.rewrite?[3,2]:[4,g.promises.copyFile(this.config.hostsFile,o)]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))},e.load=function(t){return U(this,void 0,void 0,(function(){return _(this,(function(n){switch(n.label){case 0:return[4,new e(t).read()];case 1:return[2,n.sent()]}}))}))},e}(),ui=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 U(this,void 0,void 0,(function(){var t,n=this;return _(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}(),di=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 li=di(fi),pi=di(hi);function fi(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function hi(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}fi.proto=fi((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return fi(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return hi(this)},configurable:!0})})),li.strict=pi;var vi=function(){},mi=function(e,t,n){if("function"==typeof t)return mi(e,null,t);t||(t={}),n=li(n||vi);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)}},gi=mi,bi=function(){},yi=/^v?\.0/.test(process.version),wi=function(e){return"function"==typeof e},Ii=function(e,t,n,r){r=li(r);var o=!1;e.on("close",(function(){o=!0})),gi(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!!yi&&!!g&&(e instanceof(g.ReadStream||bi)||e instanceof(g.WriteStream||bi))&&wi(e.close)}(e)?e.close(bi):function(e){return e.setHeader&&wi(e.abort)}(e)?e.abort():wi(e.destroy)?e.destroy():void r(t||new Error("stream was destroyed"))}},ji=function(e){e()},Ri=function(e,t){return e.pipe(t)},Ei=function(){var e,t=Array.prototype.slice.call(arguments),n=wi(t[t.length-1]||bi)&&t.pop()||bi;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 Ii(o,s,i>0,(function(t){e||(e=t),t&&r.forEach(ji),s||(r.forEach(ji),n(e))}))}));return t.reduce(Ri)};const{Duplex:Ci}=r;function Ui(e){e.emit("close")}function _i(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Si(e){this.removeListener("error",Si),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}var Ai=function(e,t){let n=!0;const r=new Ci({...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(Ui,r);let i=!1;e.once("error",(function(e){i=!0,o(e)})),e.once("close",(function(){i||o(t),process.nextTick(Ui,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",_i),r.on("error",Si),r},Pi={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},ki="function"==typeof __webpack_require__?__non_webpack_require__:Pr,Oi=process.config&&process.config.variables||{},qi=!!process.env.PREBUILDS_ONLY,xi=process.versions.modules,Ti=!(!process.versions||!process.versions.electron)||!!process.env.ELECTRON_RUN_AS_NODE||"undefined"!=typeof window&&window.process&&"renderer"===window.process.type?"electron":process.versions&&process.versions.nw?"node-webkit":"node",Di=process.env.npm_config_arch||l.arch(),Ni=process.env.npm_config_platform||l.platform(),Bi=process.env.LIBC||(function(e){return"linux"===e&&g.existsSync("/etc/alpine-release")}(Ni)?"musl":"glibc"),Li=process.env.ARM_VERSION||("arm64"===Di?"8":Oi.arm_version)||"",Fi=(process.versions.uv||"").split(".")[0],Gi=Mi;function Mi(e){return ki(Mi.resolve(e))}function Ji(e){try{return g.readdirSync(e)}catch(e){return[]}}function zi(e,t){var n=Ji(e).filter(t);return n[0]&&b.join(e,n[0])}function Wi(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 Vi(e,t){return function(n){return null!=n&&(n.platform===e&&n.architectures.includes(t))}}function Hi(e,t){return e.architectures.length-t.architectures.length}function Yi(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 Zi(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===Fi)&&((!n.armv||n.armv===Li)&&(!n.libc||n.libc===Bi)))))}}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}}Mi.resolve=Mi.path=function(e){e=b.resolve(e||".");try{var t=ki(b.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[t+"_PREBUILD"]&&(e=process.env[t+"_PREBUILD"])}catch(e){}if(!qi){var n=zi(b.join(e,"build/Release"),Wi);if(n)return n;var r=zi(b.join(e,"build/Debug"),Wi);if(r)return r}var o=a(e);if(o)return o;var i=a(b.dirname(process.execPath));if(i)return i;var s=["platform="+Ni,"arch="+Di,"runtime="+Ti,"abi="+xi,"uv="+Fi,Li?"armv="+Li:"","libc="+Bi,"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=Ji(b.join(e,"prebuilds")).map($i).filter(Vi(Ni,Di)).sort(Hi)[0];if(t){var n=b.join(e,"prebuilds",t.name),r=Ji(n).map(Yi).filter(Zi(Ti,xi)).sort(Ki(Ti))[0];return r?b.join(n,r.file):void 0}}},Mi.parseTags=Yi,Mi.matchTags=Zi,Mi.compareTags=Ki,Mi.parseTuple=$i,Mi.matchTuple=Vi,Mi.compareTuples=Hi;var Xi=kr((function(e){const t="function"==typeof __webpack_require__?__non_webpack_require__:Pr;"function"==typeof t.addon?e.exports=t.addon.bind(t):e.exports=Gi}));var Qi={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]}},es=kr((function(e){try{e.exports=Xi(__dirname)}catch(t){e.exports=Qi}})),ts=kr((function(e){const{EMPTY_BUFFER:t}=Pi,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=es;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){}}));ts.concat,ts.mask,ts.toArrayBuffer,ts.toBuffer,ts.unmask;const ns=Symbol("kDone"),rs=Symbol("kRun");var os=class{constructor(e){this[ns]=()=>{this.pending--,this[rs]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[rs]()}[rs](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[ns])}}};const{kStatusCode:is}=Pi,ss=Buffer[Symbol.species],as=Buffer.from([0,0,255,255]),cs=Symbol("permessage-deflate"),us=Symbol("total-length"),ds=Symbol("callback"),ls=Symbol("buffers"),ps=Symbol("error");let fs;var hs=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,!fs){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;fs=new os(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[ds];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){fs.add((r=>{this._decompress(e,t,((e,t)=>{r(),n(e,t)}))}))}compress(e,t,n){fs.add((r=>{this._compress(e,t,((e,t)=>{r(),n(e,t)}))}))}_decompress(e,t,n){const r=this._isServer?"client":"server";if(!this._inflate){const e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?d.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=d.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[cs]=this,this._inflate[us]=0,this._inflate[ls]=[],this._inflate.on("error",gs),this._inflate.on("data",ms)}this._inflate[ds]=n,this._inflate.write(e),t&&this._inflate.write(as),this._inflate.flush((()=>{const e=this._inflate[ps];if(e)return this._inflate.close(),this._inflate=null,void n(e);const o=ts.concat(this._inflate[ls],this._inflate[us]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[us]=0,this._inflate[ls]=[],t&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,o)}))}_compress(e,t,n){const r=this._isServer?"server":"client";if(!this._deflate){const e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?d.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=d.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[us]=0,this._deflate[ls]=[],this._deflate.on("data",vs)}this._deflate[ds]=n,this._deflate.write(e),this._deflate.flush(d.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let e=ts.concat(this._deflate[ls],this._deflate[us]);t&&(e=new ss(e.buffer,e.byteOffset,e.length-4)),this._deflate[ds]=null,this._deflate[us]=0,this._deflate[ls]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,e)}))}};function vs(e){this[ls].push(e),this[us]+=e.length}function ms(e){this[us]+=e.length,this[cs]._maxPayload<1||this[us]<=this[cs]._maxPayload?this[ls].push(e):(this[ps]=new RangeError("Max payload size exceeded"),this[ps].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[ps][is]=1009,this.removeListener("data",ms),this.reset())}function gs(e){this[cs]._inflate=null,e[is]=1007,this[ds](e)}var bs=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},ys=kr((function(e){try{e.exports=Xi(__dirname)}catch(t){e.exports=bs}})),ws=kr((function(e){const{isUtf8:t}=y;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=ys;e.exports.isValidUTF8=function(e){return e.length<32?n(e):t(e)}}catch(e){}}));ws.isValidStatusCode,ws.isValidUTF8,ws.tokenChars;const{Writable:Is}=r,{BINARY_TYPES:js,EMPTY_BUFFER:Rs,kStatusCode:Es,kWebSocket:Cs}=Pi,{concat:Us,toArrayBuffer:_s,unmask:Ss}=ts,{isValidStatusCode:As,isValidUTF8:Ps}=ws,ks=Buffer[Symbol.species];var Os=class extends Is{constructor(e={}){super(),this._allowSynchronousEvents=void 0===e.allowSynchronousEvents||e.allowSynchronousEvents,this._binaryType=e.binaryType||js[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Cs]=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 ks(t.buffer,t.byteOffset+e,t.length-e),new ks(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 ks(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[hs.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=Rs;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]&&Ss(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[hs.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?Us(n,t):"arraybuffer"===this._binaryType?_s(Us(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=Us(n,t);if(!this._skipUTF8Validation&&!Ps(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,Rs),this.end();else{const n=e.readUInt16BE(0);if(!As(n)){const e=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");return void t(e)}const r=new ks(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Ps(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[Es]=r,i}};const{randomFillSync:qs}=w,{EMPTY_BUFFER:xs}=Pi,{isValidStatusCode:Ts}=ws,{mask:Ds,toBuffer:Ns}=ts,Bs=Symbol("kByteLength"),Ls=Buffer.alloc(4),Fs=8192;let Gs,Ms=Fs;class Js{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||Ls,t.generateMask?t.generateMask(n):(Ms===Fs&&(void 0===Gs&&(Gs=Buffer.alloc(Fs)),qs(Gs,0,Fs),Ms=0),n[0]=Gs[Ms++],n[1]=Gs[Ms++],n[2]=Gs[Ms++],n[3]=Gs[Ms++]),s=!(n[0]|n[1]|n[2]|n[3]),i=6),"string"==typeof e?r=t.mask&&!s||void 0===t[Bs]?(e=Buffer.from(e)).length:t[Bs]:(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?(Ds(e,n,c,i,r),[c]):(Ds(e,n,e,0,r),[c,e])):[c,e]}close(e,t,n,r){let o;if(void 0===e)o=xs;else{if("number"!=typeof e||!Ts(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={[Bs]: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(Js.frame(o,i),r)}ping(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):(r=(e=Ns(e)).length,o=Ns.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[Bs]: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(Js.frame(e,i),n)}pong(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):(r=(e=Ns(e)).length,o=Ns.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[Bs]: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(Js.frame(e,i),n)}send(e,t,n){const r=this._extensions[hs.extensionName];let o,i,s=t.binary?2:1,a=t.compress;if("string"==typeof e?(o=Buffer.byteLength(e),i=!1):(o=(e=Ns(e)).length,i=Ns.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={[Bs]: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(Js.frame(e,{[Bs]: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(Js.frame(e,n),r);const o=this._extensions[hs.extensionName];this._bufferedBytes+=n[Bs],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[Bs],this._deflating=!1,n.readOnly=!1,this.sendFrame(Js.frame(t,n),r),this.dequeue()}))}dequeue(){for(;!this._deflating&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[3][Bs],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][Bs],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 zs=Js;const{kForOnEventAttribute:Ws,kListener:$s}=Pi,Vs=Symbol("kCode"),Hs=Symbol("kData"),Ys=Symbol("kError"),Zs=Symbol("kMessage"),Ks=Symbol("kReason"),Xs=Symbol("kTarget"),Qs=Symbol("kType"),ea=Symbol("kWasClean");class ta{constructor(e){this[Xs]=null,this[Qs]=e}get target(){return this[Xs]}get type(){return this[Qs]}}Object.defineProperty(ta.prototype,"target",{enumerable:!0}),Object.defineProperty(ta.prototype,"type",{enumerable:!0});class na extends ta{constructor(e,t={}){super(e),this[Vs]=void 0===t.code?0:t.code,this[Ks]=void 0===t.reason?"":t.reason,this[ea]=void 0!==t.wasClean&&t.wasClean}get code(){return this[Vs]}get reason(){return this[Ks]}get wasClean(){return this[ea]}}Object.defineProperty(na.prototype,"code",{enumerable:!0}),Object.defineProperty(na.prototype,"reason",{enumerable:!0}),Object.defineProperty(na.prototype,"wasClean",{enumerable:!0});class ra extends ta{constructor(e,t={}){super(e),this[Ys]=void 0===t.error?null:t.error,this[Zs]=void 0===t.message?"":t.message}get error(){return this[Ys]}get message(){return this[Zs]}}Object.defineProperty(ra.prototype,"error",{enumerable:!0}),Object.defineProperty(ra.prototype,"message",{enumerable:!0});class oa extends ta{constructor(e,t={}){super(e),this[Hs]=void 0===t.data?null:t.data}get data(){return this[Hs]}}Object.defineProperty(oa.prototype,"data",{enumerable:!0});const ia={addEventListener(e,t,n={}){for(const r of this.listeners(e))if(!n[Ws]&&r[$s]===t&&!r[Ws])return;let r;if("message"===e)r=function(e,n){const r=new oa("message",{data:n?e:e.toString()});r[Xs]=this,aa(t,this,r)};else if("close"===e)r=function(e,n){const r=new na("close",{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[Xs]=this,aa(t,this,r)};else if("error"===e)r=function(e){const n=new ra("error",{error:e,message:e.message});n[Xs]=this,aa(t,this,n)};else{if("open"!==e)return;r=function(){const e=new ta("open");e[Xs]=this,aa(t,this,e)}}r[Ws]=!!n[Ws],r[$s]=t,n.once?this.once(e,r):this.on(e,r)},removeEventListener(e,t){for(const n of this.listeners(e))if(n[$s]===t&&!n[Ws]){this.removeListener(e,n);break}}};var sa={CloseEvent:na,ErrorEvent:ra,Event:ta,EventTarget:ia,MessageEvent:oa};function aa(e,t,n){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}const{tokenChars:ca}=ws;function ua(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var da={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===ca[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?(ua(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===ca[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),ua(o,e.slice(c,d),!0),44===u&&(ua(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!==ca[u])throw new SyntaxError(`Unexpected character at index ${l}`);-1===c?c=l:i||(i=!0),s=!1}else if(a)if(1===ca[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===ca[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),ua(o,r,s),44===u&&(ua(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?ua(t,p,o):(void 0===r?ua(o,p,!0):ua(o,r,i?p.replace(/\\/g,""):p),ua(t,n,o)),t}};const{randomBytes:la,createHash:pa}=w,{URL:fa}=s,{BINARY_TYPES:ha,EMPTY_BUFFER:va,GUID:ma,kForOnEventAttribute:ga,kListener:ba,kStatusCode:ya,kWebSocket:wa,NOOP:Ia}=Pi,{EventTarget:{addEventListener:ja,removeEventListener:Ra}}=sa,{format:Ea,parse:Ca}=da,{toBuffer:Ua}=ts,_a=Symbol("kAborted"),Sa=[8,13],Aa=["CONNECTING","OPEN","CLOSING","CLOSED"],Pa=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class ka extends e{constructor(e,t,n){super(),this._binaryType=ha[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=va,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=ka.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]),qa(this,e,t,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){ha.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 Os({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation});this._sender=new zs(e,this._extensions,n.generateMask),this._receiver=r,this._socket=e,r[wa]=this,e[wa]=this,r.on("conclude",La),r.on("drain",Fa),r.on("error",Ga),r.on("message",Ja),r.on("ping",za),r.on("pong",Wa),e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",Va),e.on("data",Ha),e.on("end",Ya),e.on("error",Za),this._readyState=ka.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=ka.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[hs.extensionName]&&this._extensions[hs.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=ka.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==ka.CLOSED)if(this.readyState!==ka.CONNECTING)this.readyState!==ka.CLOSING?(this._readyState=ka.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";Na(this,this._req,e)}}pause(){this.readyState!==ka.CONNECTING&&this.readyState!==ka.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===ka.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===ka.OPEN?(void 0===t&&(t=!this._isServer),this._sender.ping(e||va,t,n)):Ba(this,e,n)}pong(e,t,n){if(this.readyState===ka.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===ka.OPEN?(void 0===t&&(t=!this._isServer),this._sender.pong(e||va,t,n)):Ba(this,e,n)}resume(){this.readyState!==ka.CONNECTING&&this.readyState!==ka.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===ka.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!==ka.OPEN)return void Ba(this,e,n);const r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[hs.extensionName]||(r.compress=!1),this._sender.send(e||va,r,n)}terminate(){if(this.readyState!==ka.CLOSED)if(this.readyState!==ka.CONNECTING)this._socket&&(this._readyState=ka.CLOSING,this._socket.destroy());else{const e="WebSocket was closed before the connection was established";Na(this,this._req,e)}}}Object.defineProperty(ka,"CONNECTING",{enumerable:!0,value:Aa.indexOf("CONNECTING")}),Object.defineProperty(ka.prototype,"CONNECTING",{enumerable:!0,value:Aa.indexOf("CONNECTING")}),Object.defineProperty(ka,"OPEN",{enumerable:!0,value:Aa.indexOf("OPEN")}),Object.defineProperty(ka.prototype,"OPEN",{enumerable:!0,value:Aa.indexOf("OPEN")}),Object.defineProperty(ka,"CLOSING",{enumerable:!0,value:Aa.indexOf("CLOSING")}),Object.defineProperty(ka.prototype,"CLOSING",{enumerable:!0,value:Aa.indexOf("CLOSING")}),Object.defineProperty(ka,"CLOSED",{enumerable:!0,value:Aa.indexOf("CLOSED")}),Object.defineProperty(ka.prototype,"CLOSED",{enumerable:!0,value:Aa.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((e=>{Object.defineProperty(ka.prototype,e,{enumerable:!0})})),["open","error","close","message"].forEach((e=>{Object.defineProperty(ka.prototype,`on${e}`,{enumerable:!0,get(){for(const t of this.listeners(e))if(t[ga])return t[ba];return null},set(t){for(const t of this.listeners(e))if(t[ga]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[ga]:!0})}})})),ka.prototype.addEventListener=ja,ka.prototype.removeEventListener=Ra;var Oa=ka;function qa(e,t,n,r){const o={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Sa[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,!Sa.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${Sa.join(", ")})`);let s;if(t instanceof fa)s=t;else try{s=new fa(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}"http:"===s.protocol?s.protocol="ws:":"https:"===s.protocol&&(s.protocol="wss:"),e._url=s.href;const a="wss:"===s.protocol,c="ws+unix:"===s.protocol;let d;if("ws:"===s.protocol||a||c?c&&!s.pathname?d="The URL's pathname is empty":s.hash&&(d="The URL contains a fragment identifier"):d='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"',d){const t=new SyntaxError(d);if(0===e._redirects)throw t;return void xa(e,t)}const l=a?443:80,p=la(16).toString("base64"),f=a?u.request:i.request,h=new Set;let v,m;if(o.createConnection=o.createConnection||(a?Da:Ta),o.defaultPort=o.defaultPort||l,o.port=s.port||l,o.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":p,Connection:"Upgrade",Upgrade:"websocket"},o.path=s.pathname+s.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(v=new hs(!0!==o.perMessageDeflate?o.perMessageDeflate:{},!1,o.maxPayload),o.headers["Sec-WebSocket-Extensions"]=Ea({[hs.extensionName]:v.offer()})),n.length){for(const e of n){if("string"!=typeof e||!Pa.test(e)||h.has(e))throw new SyntaxError("An invalid or duplicated subprotocol was specified");h.add(e)}o.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(o.origin&&(o.protocolVersion<13?o.headers["Sec-WebSocket-Origin"]=o.origin:o.headers.Origin=o.origin),(s.username||s.password)&&(o.auth=`${s.username}:${s.password}`),c){const e=o.path.split(":");o.socketPath=e[0],o.path=e[1]}if(o.followRedirects){if(0===e._redirects){e._originalIpc=c,e._originalSecure=a,e._originalHostOrSocketPath=c?o.socketPath:s.host;const t=r&&r.headers;if(r={...r,headers:{}},t)for(const[e,n]of Object.entries(t))r.headers[e.toLowerCase()]=n}else if(0===e.listenerCount("redirect")){const t=c?!!e._originalIpc&&o.socketPath===e._originalHostOrSocketPath:!e._originalIpc&&s.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!a)&&(delete o.headers.authorization,delete o.headers.cookie,t||delete o.headers.host,o.auth=void 0)}o.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(o.auth).toString("base64")),m=e._req=f(o),e._redirects&&e.emit("redirect",e.url,m)}else m=e._req=f(o);o.timeout&&m.on("timeout",(()=>{Na(e,m,"Opening handshake has timed out")})),m.on("error",(t=>{null===m||m[_a]||(m=e._req=null,xa(e,t))})),m.on("response",(i=>{const s=i.headers.location,a=i.statusCode;if(s&&o.followRedirects&&a>=300&&a<400){if(++e._redirects>o.maxRedirects)return void Na(e,m,"Maximum redirects exceeded");let i;m.abort();try{i=new fa(s,t)}catch(t){const n=new SyntaxError(`Invalid URL: ${s}`);return void xa(e,n)}qa(e,i,n,r)}else e.emit("unexpected-response",m,i)||Na(e,m,`Unexpected server response: ${i.statusCode}`)})),m.on("upgrade",((t,n,r)=>{if(e.emit("upgrade",t),e.readyState!==ka.CONNECTING)return;m=e._req=null;const i=t.headers.upgrade;if(void 0===i||"websocket"!==i.toLowerCase())return void Na(e,n,"Invalid Upgrade header");const s=pa("sha1").update(p+ma).digest("base64");if(t.headers["sec-websocket-accept"]!==s)return void Na(e,n,"Invalid Sec-WebSocket-Accept header");const a=t.headers["sec-websocket-protocol"];let c;if(void 0!==a?h.size?h.has(a)||(c="Server sent an invalid subprotocol"):c="Server sent a subprotocol but none was requested":h.size&&(c="Server sent no subprotocol"),c)return void Na(e,n,c);a&&(e._protocol=a);const u=t.headers["sec-websocket-extensions"];if(void 0!==u){if(!v){return void Na(e,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let t;try{t=Ca(u)}catch(t){return void Na(e,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(t);if(1!==r.length||r[0]!==hs.extensionName){return void Na(e,n,"Server indicated an extension that was not requested")}try{v.accept(t[hs.extensionName])}catch(t){return void Na(e,n,"Invalid Sec-WebSocket-Extensions header")}e._extensions[hs.extensionName]=v}e.setSocket(n,r,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})})),o.finishRequest?o.finishRequest(m,e):m.end()}function xa(e,t){e._readyState=ka.CLOSING,e.emit("error",t),e.emitClose()}function Ta(e){return e.path=e.socketPath,f.connect(e)}function Da(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=f.isIP(e.host)?"":e.host),I.connect(e)}function Na(e,t,n){e._readyState=ka.CLOSING;const r=new Error(n);Error.captureStackTrace(r,Na),t.setHeader?(t[_a]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(xa,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function Ba(e,t,n){if(t){const n=Ua(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){const t=new Error(`WebSocket is not open: readyState ${e.readyState} (${Aa[e.readyState]})`);process.nextTick(n,t)}}function La(e,t){const n=this[wa];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,void 0!==n._socket[wa]&&(n._socket.removeListener("data",Ha),process.nextTick($a,n._socket),1005===e?n.close():n.close(e,t))}function Fa(){const e=this[wa];e.isPaused||e._socket.resume()}function Ga(e){const t=this[wa];void 0!==t._socket[wa]&&(t._socket.removeListener("data",Ha),process.nextTick($a,t._socket),t.close(e[ya])),t.emit("error",e)}function Ma(){this[wa].emitClose()}function Ja(e,t){this[wa].emit("message",e,t)}function za(e){const t=this[wa];t._autoPong&&t.pong(e,!this._isServer,Ia),t.emit("ping",e)}function Wa(e){this[wa].emit("pong",e)}function $a(e){e.resume()}function Va(){const e=this[wa];let t;this.removeListener("close",Va),this.removeListener("data",Ha),this.removeListener("end",Ya),e._readyState=ka.CLOSING,this._readableState.endEmitted||e._closeFrameReceived||e._receiver._writableState.errorEmitted||null===(t=e._socket.read())||e._receiver.write(t),e._receiver.end(),this[wa]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",Ma),e._receiver.on("finish",Ma))}function Ha(e){this[wa]._receiver.write(e)||this.pause()}function Ya(){const e=this[wa];e._readyState=ka.CLOSING,e._receiver.end(),this.end()}function Za(){const e=this[wa];this.removeListener("error",Za),this.on("error",Ia),e&&(e._readyState=ka.CLOSING,this.destroy())}var Ka=function(e){function t(t,n,r,o,i){void 0===i&&(i=5e3);var s=e.call(this)||this;s.endpoint=t,s.headers=n,s.rewriteHostHeader=r,s.bindToAssign=o,s.closeTimeout=i,s.protocol="TCP",s.openConnections=new Set,s.tcpServer=p.createServer(s.handleConnection.bind(s));var a=null==r?void 0:r.altHostnames.map((function(e){return(t=qt(t=e))&&Ir.test(t)?t.replace(wr,"\\$&"):t;var t})).join("|");return s.hostRegex=new RegExp("Host: (?:".concat(a,")(:.*$|$)"),"im"),s}return E(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 U(this,void 0,void 0,(function(){var e=this;return _(this,(function(t){return[2,new Promise((function(t){if(e.bindToAssign){var n=e.bindToAssign,r=n.port,o=n.address;e.tcpServer.listen(r,o,(function(){e.emit("tunnel-open",{address:o,port:r}),t({address:o,port:r})}))}else e.tcpServer.listen(0,(function(){var n=e.tcpServer.address(),r=n.address,o=n.port,i="0.0.0.0"===r||"::"===r?"127.0.0.1":r;e.boundTo={address:i,port:o},e.emit("tunnel-open",e.boundTo),t(e.boundTo)}))}))]}))}))},t.prototype.close=function(){return U(this,void 0,void 0,(function(){var e,t=this;return _(this,(function(n){switch(n.label){case 0:return e=!1,[4,Promise.race([new Promise((function(n){t.tcpServer.close((function(){e=!0,t.emit("tunnel-close"),n()}))})),new Promise((function(n){new Promise((function(e){return setTimeout(e,t.closeTimeout)})).then((function(){e||(t.openConnections.forEach((function(e){e.destroy(),t.openConnections.delete(e)})),n())}))}))])];case 1:return n.sent(),[2]}}))}))},t.prototype.handleConnection=function(e){var t=this;this.openConnections.add(e);var n=new Oa(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Ai(n),o=this.getHeaderTransform();this.rewriteHostHeader&&o?Ei(e,o,r):Ei(e,r),Ei(r,e),n.on("close",(function(e,n,r){t.emit("connection-close",e,n,r)})),r.on("error",(function(e){t.emit("connection-error",e)})),e.on("error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},t.prototype.getHeaderTransform=function(){if(this.rewriteHostHeader){var e=this.rewriteHostHeader.targetHostname,t=this.hostRegex;return new o({transform:function(n,r,o){var i=n.toString();if(i.split("\n",1)[0].includes("HTTP")){var s=i.replace(t,"Host: ".concat(e));o(null,Buffer.from(s))}else o(null,n)}})}},t}(t),Xa=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=j.createSocket("udp4"),o.handleConnection(),o}return E(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 U(this,void 0,void 0,(function(){var e=this;return _(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 U(this,void 0,void 0,(function(){var e=this;return _(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 Oa(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Ai(n);this.udpSocket.on("message",(function(t,n){e=n,r.write(t)})),r.on("data",(function(n){e&&t.udpSocket.send(n,e.port,e.address,(function(e){e&&t.emit("connection-error",e)}))})),this.udpSocket.on("error",(function(e){t.emit("connection-error",e)})),r.on("error",(function(e){t.emit("connection-error",e)})),n.on("connection-close",(function(e,n,r){t.emit("connection-close",e,n,r)})),n.on("connection-error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},t}(t);var Qa,ec="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,tc=function(e,t){return U(void 0,void 0,void 0,(function(){var n;return _(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)]}))}))},nc=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 E(t,e),Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.getContentsAsString=function(e,t){void 0===e&&(e="utf8");var n=this.buffer.toString(e,0,Math.min(t||this.size,this.size)),r=Buffer.byteLength(n);return r<this.size&&this.buffer.copy(this.buffer,0,r),this._size-=r,n},t.prototype.adaptBuffer=function(e){if(this.buffer.length-this.size<e){var t=Math.ceil((e-(this.buffer.length-this.size))/this.bufferDefaultSize),n=Buffer.alloc(this.buffer.length+this.bufferDefaultSize*t);this.buffer.copy(n,0,0,this.size),this.buffer=n}},t.prototype._write=function(e,t,n){this.adaptBuffer(e.length),e.copy(this.buffer,this.size,0),this._size+=e.length,n()},t}(r.Writable),rc=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 ui,o.ipAllocationMutex=new ui,o.stopForwarding=function(e){return U(o,void 0,void 0,(function(){var t,n,r,o,i,s,a;return _(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 m("fsutil dirty query %systemdrive%"),!0}catch(e){if("ENOENT"===e.code)try{return m("fltmc"),!0}catch(e){return!1}return!1}}()?{error:!1,type:"windows-admin"}:{error:!0,message:"You are not running this command as administrator. Please start command line with admin rights."};var e},o.assertStartedWithNodejs=function(){if(!ec)throw new Error("Port forwarding only possible when started with nodejs")},o.proxyApiClient=new Mo(t),o}return E(t,e),t.prototype.withProjectForwarding=function(e,t,n){return void 0===n&&(n=!0),U(this,void 0,void 0,(function(){var r;return _(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),U(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return _(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 U(a,void 0,void 0,(function(){return _(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 U(a,void 0,void 0,(function(){return _(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),U(this,void 0,void 0,(function(){var r;return _(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),U(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,u=this;return _(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,tc(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=S([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),U(this,void 0,void 0,(function(){var r;return _(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),U(this,void 0,void 0,(function(){var n,r,o,i,s=this;return _(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,tc((c=i,null!=c&&c.length?Gt(c,Er):[]),(function(e){var i=e.podName,a=e.internalHostname,c=e.port;return U(s,void 0,void 0,(function(){var e;return _(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 U(this,void 0,void 0,(function(){var t=this;return _(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,Jo(e,r,n)];case 1:return o=s.sent(),this.nextIpAddress=Vo($o(o)+1),$o(this.nextIpAddress)>$o(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),U(this,void 0,void 0,(function(){var u,d,l,p,f,h,v=this;return _(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 Xa(e,u,l):new Ka(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 U(v,void 0,void 0,(function(){return _(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 U(this,void 0,void 0,(function(){var s,a,c;return _(this,(function(u){switch(u.label){case 0:return i&&"darwin"===l.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 U(this,void 0,void 0,(function(){return _(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.removeHosts.apply(n,t),n.add.apply(n,S([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.unregisterHostnames=function(e,t){return U(this,void 0,void 0,(function(){return _(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.remove.apply(n,S([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.modifyHostsFile=function(e){return U(this,void 0,void 0,(function(){var t=this;return _(this,(function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter((function(){return U(t,void 0,void 0,(function(){var t,n=this;return _(this,(function(r){switch(r.label){case 0:return[4,ci.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,oc(5)((function(){return U(n,void 0,void 0,(function(){return _(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,oc(5)((function(){return U(n,void 0,void 0,(function(){return _(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 U(this,void 0,void 0,(function(){var t=this;return _(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 U(this,void 0,void 0,(function(){var t=this;return _(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 U(this,void 0,void 0,(function(){var t=this;return _(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 U(this,void 0,void 0,(function(){var e=this;return _(this,(function(t){switch(t.label){case 0:return[4,Promise.all(this.connections.map((function(t){return U(e,void 0,void 0,(function(){return _(this,(function(e){return[2,this.stopForwarding(t)]}))}))})))];case 1:return t.sent(),[2]}}))}))},t}(t),oc=function(e,t){return void 0===t&&(t=50),function(n){var r=e,o=function(){return U(void 0,void 0,void 0,(function(){var e;return _(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()}},ic=function(e){function t(t,r,o,i,s,a){void 0===i&&(i=new n.PassThrough),void 0===s&&(s=new n.PassThrough),void 0===a&&(a=new n.PassThrough);var c=e.call(this)||this;return c.baseUrl=t,c.execConfig=r,c.token=o,c.stdOut=i,c.stdErr=s,c.stdIn=a,c.waitForCommandResult=function(){return U(c,void 0,void 0,(function(){return _(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()]}}))}))},c.sendInputToCurrentCommand=function(e){return U(c,void 0,void 0,(function(){var t;return _(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]}))}))},c.resizeTerminal=function(e){return U(c,void 0,void 0,(function(){var t;return _(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]}))}))},c.constructPayloadPacket=function(e){return JSON.stringify({type:"payload",data:e.toString()})},c}return E(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 U(this,void 0,void 0,(function(){var e=this;return _(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 Oa(a);try{e.duplex=Ai(e.remote)}catch(e){throw new Error("Failed to establish connection to command execution proxy: ".concat(e.message))}e.initialAuth(),e.stdIn.on("data",(function(t){var n,r;(null===(n=e.duplex)||void 0===n?void 0:n.writable)&&(null===(r=e.duplex)||void 0===r||r.write(e.constructPayloadPacket(t)))})),null===(r=e.duplex)||void 0===r||r.on("data",(function(t){var n,r,o,i=JSON.parse(t.toString());switch(null==i?void 0:i.type){case"init":var a=i.data;"successful"!==a.auth&&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}(t),sc=function(){function e(e){this.contextProvider=e,this.assertStartedWithNodejs=function(){if(!ec)throw new Error("Command exec only possible when started with nodejs")}}return e.prototype.execServiceCommand=function(e,t){return U(this,void 0,void 0,(function(){var n,r,o;return _(this,(function(i){return n=e.serviceId,r=e.projectId,o=C({projectId:r,entityId:n,entityType:"service"},t),[2,this.execCommand(o)]}))}))},e.prototype.execServiceSession=function(e,t){return U(this,void 0,void 0,(function(){var n,r,o;return _(this,(function(i){return n=e.serviceId,r=e.projectId,o=C({projectId:r,entityId:n,entityType:"service"},t),[2,this.shellSession(o)]}))}))},e.prototype.execJobCommand=function(e,t){return U(this,void 0,void 0,(function(){var n,r,o;return _(this,(function(i){return n=e.jobId,r=e.projectId,o=C({projectId:r,entityId:n,entityType:"job"},t),[2,this.execCommand(o)]}))}))},e.prototype.execJobSession=function(e,t){return U(this,void 0,void 0,(function(){var n,r,o;return _(this,(function(i){return n=e.jobId,r=e.projectId,o=C({projectId:r,entityId:n,entityType:"job"},t),[2,this.shellSession(o)]}))}))},e.prototype.execCommand=function(e){return U(this,void 0,void 0,(function(){var t,n,r;return _(this,(function(o){switch(o.label){case 0:return this.assertStartedWithNodejs(),t=this.getCommandRunner(C({shell:"none"},e)),n=new nc,r=new nc,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 ic(t,e,n)},e}(),ac=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 E(t,e),t}(Error),cc=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 U(o,void 0,void 0,(function(){var e;return _(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 E(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,g=e.direction,b=e.textIncludes,y=e.textNotIncludes,w=e.regexIncludes,I=e.regexNotIncludes,j="/v1/projects/".concat(p,"/"),R=new URLSearchParams;return R.append("queryType",f),void 0!==h&&R.append("startTime",h.toISOString()),void 0!==v&&R.append("endTime",v.toISOString()),void 0!==l&&R.append("lineLimit",l.toString()),void 0!==t&&R.append("containerName",t),void 0!==u&&R.append("deploymentId",u),void 0!==s&&R.append("runId",s),void 0!==i&&R.append("buildId",i),void 0!==b&&R.append("textIncludes",b),void 0!==y&&R.append("textNotIncludes",y),void 0!==w&&R.append("regexIncludes",w),void 0!==I&&R.append("regexNotIncludes",I),void 0!==g&&R.append("direction",g),void 0!==m&&R.append("duration",m.toString()),void 0!==n&&n.forEach((function(e){return R.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(R.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 U(this,void 0,void 0,(function(){var e=this;return _(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 Oa(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(wc));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}(t),uc=ec?Fo:window.fetch,dc=function(){if(ec)try{return JSON.parse(g.readFileSync(b.join(b.dirname(a(import.meta.url)),"../../package.json")).toString())}catch(e){return console.log("Failed to check version of northflank CLI (".concat(e.message,")")),{}}return{}},lc=function(){function e(e,t){var n=this;this.opts=t,this.call=function(e){return U(n,void 0,void 0,(function(){var t,n,r,o,i,s,a,c,u,d,l,p,f=this;return _(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=C(C({url:o},n),{body:i}),[4,gc(o,C(C({},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 ac(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=dc())||void 0===t?void 0:t.version).concat(r)}},e}(),pc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="get",t.body=function(){},t}return E(t,e),t}(lc),fc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="post",t}return E(t,e),t}(lc),hc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="delete",t.body=function(){},t}return E(t,e),t}(lc),vc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="put",t}return E(t,e),t}(lc),mc=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="patch",t}return E(t,e),t}(lc),gc=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 uc(e,t).then((function(e){o(e)})).catch((function(e){return U(void 0,void 0,void 0,(function(){return _(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)}))},bc=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 cc.getLogsEndpoint(e)},t.body=function(){},t}return E(t,e),t}(pc);!function(e){e.CDN="cdn",e.Mesh="mesh",e.Ingress="ingress",e.Runtime="runtime"}(Qa||(Qa={}));var yc,wc=function(e){return{containerId:e.containerId,log:e.log,ts:new Date(e.ts)}},Ic=function(e){var t=this;this.contextProvider=e,this.getServiceLogs=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,C(C({},n),{isBuild:!0}),"service")]}))}))},this.getJobLogs=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,C(C({},n),{isBuild:!0}),"job")]}))}))},this.getAddonLogs=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r;return _(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logRange(r,C(C({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.getAddonRestoresLogs=function(e){return U(t,void 0,void 0,(function(){var t,n,r,o;return _(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,C(C({},n),o),"addonRestore")]}))}))},this.logRange=function(e,n,r){return U(t,void 0,void 0,(function(){var t,o,i,s,a;return _(this,(function(c){switch(c.label){case 0:return t=e.entityId,o=e.projectId,i=C(C({projectId:o,entityId:t,entityType:r},n),{queryType:"range"}),[4,new bc(this.contextProvider,{}).call(i)];case 1:return(s=c.sent()).error?[2,s]:[2,C(C({},s),{data:null===(a=null==s?void 0:s.data)||void 0===a?void 0:a.map(wc)})]}}))}))},this.tailServiceLogs=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,C(C({},n),{isBuild:!0}),"service")]}))}))},this.tailJobLogs=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,C(C({},n),{isBuild:!0}),"job")]}))}))},this.tailAddonLogs=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r;return _(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logTail(r,C(C({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.tailAddonRestoresLogs=function(e){return U(t,void 0,void 0,(function(){var t,n,r,o;return _(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,C(C({},n),o),"addonRestore")]}))}))},this.logTail=function(e,n,r){return U(t,void 0,void 0,(function(){var t,o,i,s,a;return _(this,(function(c){if(t=e.entityId,o=e.projectId,i=C({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 cc(s,i,a)]}))}))},this.assertStartedWithNodejs=function(){if(!ec)throw new Error("Command exec only possible when started with nodejs")}},jc=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 E(t,e),t}(pc),Rc=function(e){return{metadata:e.metadata,data:e.data.map((function(e){return{value:e.value,ts:new Date(e.ts)}}))}};!function(e){e.Cpu="cpu",e.Memory="memory",e.NetworkIngress="networkIngress",e.NetworkEgress="networkEgress",e.TcpConnectionOpen="tcpConnectionsOpen",e.PvcUsage="diskUsage",e.Requests="requests",e.Http4xxResponses="http4xxResponses",e.Http5xxResponses="http5xxResponses",e.Bandwidth="bandwidth",e.BandwidthVolume="bandwidthVolume"}(yc||(yc={}));var Ec=function(e){var t=this;this.contextProvider=e,this.getServiceMetrics=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,C(C({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetrics=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,C(C({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetrics=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,o,i;return _(this,(function(s){return t=e.entityId,o=e.projectId,i=C(C({projectId:o,entityId:t,entityType:r},n),{queryType:"single"}),[2,this.getMetrics(i)]}))}))},this.getServiceMetricsRange=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,C(C({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetricsRange=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,C(C({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetricsRange=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,o,i;return _(this,(function(s){return t=e.entityId,o=e.projectId,i=C(C({projectId:o,entityId:t,entityType:r},n),{queryType:"range"}),[2,this.getMetrics(i)]}))}))},this.getMetrics=function(e){return U(t,void 0,void 0,(function(){var t;return _(this,(function(n){switch(n.label){case 0:return[4,new jc(this.contextProvider,{}).call(e)];case 1:return(t=n.sent()).error?[2,t]:[2,C(C({},t),{data:Object.fromEntries(Object.entries(t.data).map((function(e){var t=e[0],n=e[1];return[t,C(C({},n),{values:n.values.map(Rc)})]})))})]}}))}))}},Cc=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 E(t,e),t}(pc),Uc=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 E(t,e),t}(pc),_c=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 E(t,e),t}(pc),Sc=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 E(t,e),t}(pc),Ac=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 E(t,e),t}(pc),Pc=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 E(t,e),t}(fc),kc=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 E(t,e),t}(pc),Oc=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 E(t,e),t}(fc),qc=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 E(t,e),t}(hc),xc=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 E(t,e),t}(pc),Tc=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 E(t,e),t}(pc),Dc=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 E(t,e),t}(fc),Nc=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 E(t,e),t}(pc),Bc=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 E(t,e),t}(hc),Lc=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 E(t,e),t}(pc),Fc=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 E(t,e),t}(fc),Gc=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 E(t,e),t}(pc),Mc=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 E(t,e),t}(fc),Jc=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 E(t,e),t}(hc),zc=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 E(t,e),t}(pc),Wc=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 E(t,e),t}(pc),$c=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 E(t,e),t}(pc),Vc=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 E(t,e),t}(pc),Hc=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 E(t,e),t}(fc),Yc=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 E(t,e),t}(pc),Zc=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 E(t,e),t}(hc),Kc=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 E(t,e),t}(fc),Xc=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 E(t,e),t}(fc),Qc=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 E(t,e),t}(pc),eu=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 E(t,e),t}(hc),tu=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 E(t,e),t}(fc),nu=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 E(t,e),t}(hc),ru=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 E(t,e),t}(fc),ou=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 E(t,e),t}(fc),iu=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 E(t,e),t}(fc),su=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 E(t,e),t}(pc),au=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 E(t,e),t}(pc),cu=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 E(t,e),t}(hc),uu=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 E(t,e),t}(fc),du=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 E(t,e),t}(fc),lu=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 E(t,e),t}(hc),pu=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 E(t,e),t}(fc),fu=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 E(t,e),t}(fc),hu=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 E(t,e),t}(pc),vu=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 E(t,e),t}(fc),mu=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 E(t,e),t}(pc),gu=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 E(t,e),t}(hc),bu=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 E(t,e),t}(fc),yu=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 E(t,e),t}(fc),wu=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 E(t,e),t}(fc),Iu=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 E(t,e),t}(pc),ju=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 E(t,e),t}(fc),Ru=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 E(t,e),t}(pc),Eu=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 E(t,e),t}(fc),Cu=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 E(t,e),t}(hc),Uu=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 E(t,e),t}(pc),_u=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 E(t,e),t}(fc),Su=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 E(t,e),t}(pc),Au=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 E(t,e),t}(hc),Pu=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 E(t,e),t}(fc),ku=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 E(t,e),t}(pc),Ou=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 E(t,e),t}(fc),qu=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 E(t,e),t}(pc),xu=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 E(t,e),t}(pc),Tu=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 E(t,e),t}(pc),Du=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 E(t,e),t}(pc),Nu=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 E(t,e),t}(fc),Bu=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 E(t,e),t}(vc),Lu=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 E(t,e),t}(mc),Fu=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 E(t,e),t}(pc),Gu=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 E(t,e),t}(hc),Mu=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 E(t,e),t}(pc),Ju=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 E(t,e),t}(fc),zu=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 E(t,e),t}(vc),Wu=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 E(t,e),t}(pc),$u=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 E(t,e),t}(mc),Vu=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 E(t,e),t}(hc),Hu=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 E(t,e),t}(pc),Yu=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 E(t,e),t}(fc),Zu=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 E(t,e),t}(hc),Ku=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 E(t,e),t}(pc),Xu=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 E(t,e),t}(fc),Qu=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 E(t,e),t}(pc),ed=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 E(t,e),t}(hc),td=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 E(t,e),t}(fc),nd=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 E(t,e),t}(fc),rd=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 E(t,e),t}(pc),od=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 E(t,e),t}(fc),id=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 E(t,e),t}(pc),sd=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 E(t,e),t}(fc),ad=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 E(t,e),t}(pc),cd=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 E(t,e),t}(pc),ud=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 E(t,e),t}(fc),dd=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 E(t,e),t}(fc),ld=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 E(t,e),t}(fc),pd=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 E(t,e),t}(fc),fd=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 E(t,e),t}(pc),hd=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 E(t,e),t}(fc),vd=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 E(t,e),t}(fc),md=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 E(t,e),t}(fc),gd=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 E(t,e),t}(fc),bd=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 E(t,e),t}(fc),yd=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 E(t,e),t}(fc),wd=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 E(t,e),t}(pc),Id=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 E(t,e),t}(fc),jd=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 E(t,e),t}(pc),Rd=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 E(t,e),t}(fc),Ed=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 E(t,e),t}(vc),Cd=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 E(t,e),t}(mc),Ud=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 E(t,e),t}(fc),_d=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 E(t,e),t}(vc),Sd=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 E(t,e),t}(mc),Ad=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 E(t,e),t}(pc),Pd=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 E(t,e),t}(hc),kd=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 E(t,e),t}(pc),Od=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 E(t,e),t}(pc),qd=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 E(t,e),t}(fc),xd=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 E(t,e),t}(pc),Td=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 E(t,e),t}(fc),Dd=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 E(t,e),t}(pc),Nd=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 E(t,e),t}(fc),Bd=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 E(t,e),t}(fc),Ld=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 E(t,e),t}(pc),Fd=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 E(t,e),t}(hc),Gd=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 E(t,e),t}(pc),Md=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 E(t,e),t}(pc),Jd=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 E(t,e),t}(fc),zd=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 E(t,e),t}(pc),Wd=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 E(t,e),t}(fc),$d=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 E(t,e),t}(fc),Vd=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 E(t,e),t}(pc),Hd=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 E(t,e),t}(fc),Yd=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 E(t,e),t}(pc),Zd=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 E(t,e),t}(fc),Kd=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 E(t,e),t}(pc),Xd=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 E(t,e),t}(hc),Qd=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 E(t,e),t}(pc),el=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 E(t,e),t}(fc),tl=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 E(t,e),t}(pc),nl=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 E(t,e),t}(fc),rl=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 E(t,e),t}(fc),ol=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 E(t,e),t}(fc),il=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 E(t,e),t}(pc),sl=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 E(t,e),t}(pc),al=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 E(t,e),t}(pc),cl=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 E(t,e),t}(fc),ul=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 E(t,e),t}(pc),dl=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 E(t,e),t}(hc),ll=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 E(t,e),t}(pc),pl=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 E(t,e),t}(pc),fl=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 E(t,e),t}(pc),hl=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 E(t,e),t}(fc),vl=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 E(t,e),t}(fc),ml=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 E(t,e),t}(pc),gl=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 E(t,e),t}(pc),bl=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 E(t,e),t}(fc),yl=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 E(t,e),t}(pc),wl=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 E(t,e),t}(fc),Il=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 E(t,e),t}(vc),jl=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 E(t,e),t}(mc),Rl=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 E(t,e),t}(pc),El=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 E(t,e),t}(hc),Cl=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 E(t,e),t}(fc),Ul=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 E(t,e),t}(fc),_l=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 E(t,e),t}(pc),Sl=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 E(t,e),t}(hc),Al=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 E(t,e),t}(pc),Pl=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 E(t,e),t}(pc),kl=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 E(t,e),t}(fc),Ol=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 E(t,e),t}(vc),ql=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 E(t,e),t}(mc),xl=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 E(t,e),t}(fc),Tl=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 E(t,e),t}(vc),Dl=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 E(t,e),t}(mc),Nl=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 E(t,e),t}(fc),Bl=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 E(t,e),t}(vc),Ll=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 E(t,e),t}(mc),Fl=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 E(t,e),t}(pc),Gl=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 E(t,e),t}(hc),Ml=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 E(t,e),t}(pc),Jl=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 E(t,e),t}(pc),zl=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 E(t,e),t}(fc),Wl=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 E(t,e),t}(pc),$l=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 E(t,e),t}(fc),Vl=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 E(t,e),t}(pc),Hl=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 E(t,e),t}(fc),Yl=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 E(t,e),t}(fc),Zl=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 E(t,e),t}(pc),Kl=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 E(t,e),t}(hc),Xl=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 E(t,e),t}(pc),Ql=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 E(t,e),t}(pc),ep=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 E(t,e),t}(fc),tp=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 E(t,e),t}(pc),np=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 E(t,e),t}(fc),rp=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 E(t,e),t}(fc),op=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 E(t,e),t}(pc),ip=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 E(t,e),t}(fc),sp=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 E(t,e),t}(pc),ap=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 E(t,e),t}(fc),cp=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 E(t,e),t}(fc),up=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 E(t,e),t}(pc),dp=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 E(t,e),t}(fc),lp=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 E(t,e),t}(pc),pp=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 E(t,e),t}(fc),fp=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 E(t,e),t}(pc),hp=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 E(t,e),t}(fc),vp=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 E(t,e),t}(pc),mp=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 E(t,e),t}(fc),gp=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 E(t,e),t}(hc),bp=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 E(t,e),t}(fc),yp=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 E(t,e),t}(fc),wp=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 E(t,e),t}(pc),Ip=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 E(t,e),t}(pc),jp=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 E(t,e),t}(fc),Rp=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 E(t,e),t}(vc),Ep=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 E(t,e),t}(pc),Cp=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 E(t,e),t}(mc),Up=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 E(t,e),t}(hc),_p=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 E(t,e),t}(pc),Sp=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 E(t,e),t}(fc),Ap=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 E(t,e),t}(pc),Pp=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 E(t,e),t}(fc),kp=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 E(t,e),t}(hc),Op=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 E(t,e),t}(fc),qp=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 E(t,e),t}(pc),xp=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 E(t,e),t}(pc),Tp=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 E(t,e),t}(fc),Dp=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 U(this,void 0,void 0,(function(){return _(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),U(this,void 0,void 0,(function(){var n,r,o;return _(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=C({host:"https://api.northflank.com"},e),r=this.contextWrapper,o={current:n.name,contexts:S(S([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(o)];case 4:return i.sent(),[2]}}))}))},e.prototype.removeContext=function(e){return U(this,void 0,void 0,(function(){var t,n,r,o;return _(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:S([],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 U(this,void 0,void 0,(function(){var t,n;return _(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=C(C({},t),{current:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.updateToken=function(e,t){return U(this,void 0,void 0,(function(){var n,r,o,i,s;return _(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?C(C({},r),{token:e}):t})),s=C(C({},o),{contexts:i}),[4,this.storeContext(s)];case 1:return a.sent(),[2]}}))}))},e.prototype.useProjectId=function(e){return U(this,void 0,void 0,(function(){var t,n;return _(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=C(C({},t),{project:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useServiceId=function(e){return U(this,void 0,void 0,(function(){var t,n;return _(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=C(C({},t),{service:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useJobId=function(e){return U(this,void 0,void 0,(function(){var t,n;return _(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=C(C({},t),{job:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.usePlanId=function(e){return U(this,void 0,void 0,(function(){var t,n;return _(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=C(C({},t),{plan:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useRegion=function(e){return U(this,void 0,void 0,(function(){var t,n;return _(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=C(C({},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 U(this,void 0,void 0,(function(){var t,n;return _(this,(function(r){switch(r.label){case 0:return t=this.contextWrapper,n=C(C({},t),{lastUpdateCheck:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e}(),Np=function(e){function t(t){var n=e.call(this)||this;return n.assertDir=function(e){return U(n,void 0,void 0,(function(){var t;return _(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),g.existsSync(e)?[3,2]:[4,g.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(l.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return E(t,e),t.prototype.loadContextWrapper=function(){try{return JSON.parse(g.readFileSync(this.configFile,"utf8"))}catch(e){return{contexts:[],lastUpdateCheck:new Date(0)}}},t.prototype.writeContext=function(e){return U(this,void 0,void 0,(function(){var t;return _(this,(function(n){switch(n.label){case 0:return[4,this.assertConfigDir()];case 1:n.sent(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,g.promises.writeFile(this.configFile,JSON.stringify(e,null,"\t"),{mode:416})];case 3:return n.sent(),[3,5];case 4:throw t=n.sent(),console.log("Failed to persist api context, local files could not be created, error: ".concat(t.message)),t;case 5:return[2]}}))}))},t.prototype.assertConfigDir=function(){return U(this,void 0,void 0,(function(){return _(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}(Dp),Bp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},t}return E(t,e),t.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},t.prototype.writeContext=function(e){return U(this,void 0,void 0,(function(){return _(this,(function(t){return this.inMemoryContextWrapper=e,[2]}))}))},t}(Dp),Lp=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 rc(e,new Pl(e,t).call,new Mu(e,t).call),this.exec=new sc(e),this.logs=new Ic(e),this.metrics=new Ec(e),this.endpoints={get:(o={},o.addon=((r=new Wu(e,t)).types=new Cc(e,t),r.backupSchedules=new Hu(e,t),r.backups=new Ku(e,t),r.backup=((n=new Qu(e,t)).download=new rd(e,t),n),r.restores=new id(e,t),r.containers=new ad(e,t),r.credentials=new cd(e,t),r.pitrWindow=new fd(e,t),r.version=new wd(e,t),r),o.invoice=function(){var n={};return n.details=new _c(e,t),n}(),o.cloud=function(){var n={};return n.cluster=new kc(e,t),n.dockerRegistry=new Nc(e,t),n.integration=new Gc(e,t),n}(),o.dnsId=new $c(e,t),o.domain=new Yc(e,t),o.subdomain=function(){var n=new Qc(e,t);return n.path=new au(e,t),n}(),o.logSink=new mu(e,t),o.notification=new Ru(e,t),o.registryCredentials=new Su(e,t),o.project=new Fu(e,t),o.job=function(){var n=new Ad(e,t);return n.branches=new kd(e,t),n.builds=new Od(e,t),n.buildArguments=new xd(e,t),n.buildArgumentDetails=new Dd(e,t),n.build=new Ld(e,t),n.containers=new Gd(e,t),n.deployment=new Md(e,t),n.healthChecks=new zd(e,t),n.pullRequests=new Vd(e,t),n.runs=new Yd(e,t),n.run=new Kd(e,t),n.runtimeEnvironment=new Qd(e,t),n.runtimeEnvironmentDetails=new tl(e,t),n}(),o.pipeline=new sl(e,t),o.previewTemplate=new al(e,t),o.previewTemplateRun=new pl(e,t),o.releaseFlow=new fl(e,t),o.releaseFlowRun=new gl(e,t),o.secret=new Rl(e,t),o.secretLink=new _l(e,t),o.secretDetails=new Al(e,t),o.service=function(){var n=new Fl(e,t);return n.branches=new Ml(e,t),n.builds=new Jl(e,t),n.buildArguments=new Wl(e,t),n.buildArgumentDetails=new Vl(e,t),n.build=new Zl(e,t),n.containers=new Xl(e,t),n.deployment=new Ql(e,t),n.healthChecks=new tp(e,t),n.ports=new op(e,t),n.pullRequests=new sp(e,t),n.runtimeEnvironment=new up(e,t),n.runtimeEnvironmentDetails=new lp(e,t),n}(),o.volume=new vp(e,t),o.tag=new Ep(e,t),o.template=new Ap(e,t),o.templateRun=new xp(e,t),o),list:function(){var n={};return n.invoices=new Uc(e,t),n.cloud=function(){var n={};return n.providers=new Sc(e,t),n.clusters=new Ac(e,t),n.cluster=function(){var n={};return n.nodes=new xc(e,t),n}(),n.dockerRegistry=new Tc(e,t),n.integrations=new Lc(e,t),n.nodeTypes=new zc(e,t),n.regions=new Wc(e,t),n}(),n.domains=new Vc(e,t),n.subdomain=function(){var n={};return n.path=new su(e,t),n}(),n.logSinks=new hu(e,t),n.notifications=new Iu(e,t),n.registryCredentials=new Uu(e,t),n.vcs=new ku(e,t),n.repos=new qu(e,t),n.branches=new xu(e,t),n.plans=new Tu(e,t),n.projects=new Du(e,t),n.addons=new Mu(e,t),n.jobs=new jd(e,t),n.pipelines=new il(e,t),n.previewTemplatePreviews=new ul(e,t),n.previewTemplateRuns=new ll(e,t),n.releaseFlowRuns=new ml(e,t),n.secrets=new yl(e,t),n.services=new Pl(e,t),n.volumes=new fp(e,t),n.regions=new wp(e,t),n.tags=new Ip(e,t),n.templates=new _p(e,t),n.templateRuns=new qp(e,t),n}(),create:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Pc(e,t),n.dockerRegistry=new Dc(e,t),n.integration=new Fc(e,t),n}(),n.domain=new Hc(e,t),n.logSink=new vu(e,t),n.notification=new ju(e,t),n.customVcs=function(){var n={};return n.token=new Ou(e,t),n}(),n.project=new Nu(e,t),n.addon=function(){var n=new Ju(e,t);return n.backupSchedule=new Yu(e,t),n}(),n.job=function(){var n={};return n.cron=new Rd(e,t),n.manual=new Ud(e,t),n}(),n.secret=new wl(e,t),n.service=function(){var n={};return n.build=new kl(e,t),n.combined=new xl(e,t),n.deployment=new Nl(e,t),n}(),n.volume=new hp(e,t),n.template=new Sp(e,t),n}(),update:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Oc(e,t),n.integration=new Mc(e,t),n}(),n.subdomain=function(){var n={};return n.path=new uu(e,t),n}(),n.logSink=new wu(e,t),n.notification=new Eu(e,t),n.registryCredentials=new Pu(e,t),n.addon=function(){var n={};return n.networkSettings=new dd(e,t),n.security=new yd(e,t),n.version=new Id(e,t),n}(),n.job=function(){var n={};return n.buildArguments=new Td(e,t),n.buildOptions=new Nd(e,t),n.buildSource=new Bd(e,t),n.deployment=new Jd(e,t),n.healthChecks=new Wd(e,t),n.runtimeEnvironment=new el(e,t),n.settings=new rl(e,t),n}(),n.previewTemplate=new cl(e,t),n.releaseFlow=new hl(e,t),n.secret=new Cl(e,t),n.secretLink=new Ul(e,t),n.service=function(){var n={};return n.buildArguments=new $l(e,t),n.buildOptions=new Hl(e,t),n.buildSource=new Yl(e,t),n.deployment=new ep(e,t),n.healthChecks=new np(e,t),n.ports=new ip(e,t),n.runtimeEnvironment=new dp(e,t),n}(),n.volume=new mp(e,t),n.template=new Pp(e,t),n}(),delete:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new qc(e,t),n.dockerRegistry=new Bc(e,t),n.integration=new Jc(e,t),n}(),n.domain=new Zc(e,t),n.subdomain=function(){var n=new eu(e,t);return n.path=new cu(e,t),n}(),n.logSink=new gu(e,t),n.notification=new Cu(e,t),n.registryCredentials=new Au(e,t),n.project=new Gu(e,t),n.addon=function(){var n=new Vu(e,t);return n.backupSchedule=new Zu(e,t),n}(),n.backup=new ed(e,t),n.job=new Pd(e,t),n.previewTemplatePreview=new dl(e,t),n.secret=new El(e,t),n.secretLink=new Sl(e,t),n.service=new Gl(e,t),n.volume=new gp(e,t),n.tag=new Up(e,t),n.template=new kp(e,t),n}(),import:function(){var n={};return n.domainCertificate=new Kc(e,t),n.addon=function(){var n={};return n.backup=new ud(e,t),n}(),n}(),add:function(){var n={};return n.domain=function(){var n={};return n.subdomain=new Xc(e,t),n}(),n.subdomain=function(){var n={};return n.path=new iu(e,t),n}(),n.registryCredentials=new _u(e,t),n.tag=new jp(e,t),n}(),assign:function(){var n={};return n.subdomain=function(){var n={};return n.service=new tu(e,t),n.path=new du(e,t),n}(),n}(),unassign:function(){var n={};return n.subdomain=function(){var n=new nu(e,t);return n.path=new lu(e,t),n}(),n}(),disable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new ru(e,t),n}(),n}(),enable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new ou(e,t),n}(),n}(),verify:function(){var n={};return n.subdomain=new pu(e,t),n.domain=new fu(e,t),n}(),pause:function(){var n={};return n.logSink=new bu(e,t),n.addon=new ld(e,t),n.job=new $d(e,t),n.service=new rp(e,t),n}(),resume:function(){var n={};return n.logSink=new yu(e,t),n.addon=new gd(e,t),n.job=new Hd(e,t),n.service=new cp(e,t),n}(),put:function(){var n={};return n.project=new Bu(e,t),n.addon=new zu(e,t),n.job=function(){var n={};return n.cron=new Ed(e,t),n.manual=new _d(e,t),n}(),n.secret=new Il(e,t),n.service=function(){var n={};return n.build=new Ol(e,t),n.combined=new Tl(e,t),n.deployment=new Bl(e,t),n}(),n.tag=new Rp(e,t),n}(),patch:function(){var n={};return n.project=new Lu(e,t),n.addon=new $u(e,t),n.job=function(){var n={};return n.cron=new Cd(e,t),n.manual=new Sd(e,t),n}(),n.secret=new jl(e,t),n.service=function(){var n={};return n.build=new ql(e,t),n.combined=new Dl(e,t),n.deployment=new Ll(e,t),n}(),n.tag=new Cp(e,t),n}(),backup:function(){var n={};return n.addon=new Xu(e,t),n}(),abort:function(){var n={};return n.addon=function(){var n={};return n.backup=new td(e,t),n.restore=new nd(e,t),n}(),n.job=function(){var n={};return n.build=new Fd(e,t),n.run=new Xd(e,t),n}(),n.releaseFlowRun=new bl(e,t),n.service=function(){var n={};return n.build=new Kl(e,t),n}(),n.templateRun=new Tp(e,t),n}(),restore:function(){var n={};return n.addon=function(){var n={};return n.backup=function(){var n=new od(e,t);return n.global=new md(e,t),n}(),n}(),n}(),retain:function(){var n={};return n.addon=function(){var n={};return n.backup=new sd(e,t),n}(),n}(),start:function(){var n={};return n.addon=function(){var n={};return n.pitr=new pd(e,t),n}(),n.job=function(){var n={};return n.build=new qd(e,t),n.run=new Zd(e,t),n}(),n.service=function(){var n={};return n.build=new zl(e,t),n}(),n}(),reset:function(){var n={};return n.addon=new hd(e,t),n}(),restart:function(){var n={};return n.addon=new vd(e,t),n.service=new ap(e,t),n}(),scale:function(){var n={};return n.addon=new bd(e,t),n.job=new nl(e,t),n.service=new pp(e,t),n}(),suspend:function(){var n={};return n.job=new ol(e,t),n}(),run:function(){var n={};return n.releaseFlow=new vl(e,t),n.template=new Op(e,t),n}(),attach:function(){var n={};return n.volume=new bp(e,t),n}(),detach:function(){var n={};return n.volume=new yp(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}()};export{td as AbortAddonBackupEndpoint,nd as AbortAddonRestoreEndpoint,Fd as AbortJobBuildEndpoint,Xd as AbortJobRunEndpoint,bl as AbortReleaseflowrunEndpoint,Kl as AbortServiceBuildEndpoint,Tp as AbortTemplaterunEndpoint,Xc as AddDomainSubdomainEndpoint,_u as AddRegistrycredentialsEndpoint,iu as AddSubdomainPathEndpoint,jp as AddTagEndpoint,Lp as ApiClient,Dp as ApiClientContextProvider,Np as ApiClientFileContextProvider,Bp as ApiClientInMemoryContextProvider,lc as ApiEndpoint,du as AssignSubdomainPathEndpoint,tu as AssignSubdomainServiceEndpoint,bp as AttachVolumeEndpoint,Xu as BackupAddonEndpoint,Yu as CreateAddonBackupscheduleEndpoint,Ju as CreateAddonEndpoint,Pc as CreateCloudClusterEndpoint,Dc as CreateCloudDockerregistryEndpoint,Fc as CreateCloudIntegrationEndpoint,Ou as CreateCustomvcsTokenEndpoint,Hc as CreateDomainEndpoint,Rd as CreateJobCronEndpoint,Ud as CreateJobManualEndpoint,vu as CreateLogsinkEndpoint,ju as CreateNotificationEndpoint,Nu as CreateProjectEndpoint,wl as CreateSecretEndpoint,kl as CreateServiceBuildEndpoint,xl as CreateServiceCombinedEndpoint,Nl as CreateServiceDeploymentEndpoint,Sp as CreateTemplateEndpoint,hp as CreateVolumeEndpoint,Zu as DeleteAddonBackupscheduleEndpoint,Vu as DeleteAddonEndpoint,hc as DeleteApiEndpoint,ed as DeleteBackupEndpoint,qc as DeleteCloudClusterEndpoint,Bc as DeleteCloudDockerregistryEndpoint,Jc as DeleteCloudIntegrationEndpoint,Zc as DeleteDomainEndpoint,Pd as DeleteJobEndpoint,gu as DeleteLogsinkEndpoint,Cu as DeleteNotificationEndpoint,dl as DeletePreviewtemplatepreviewEndpoint,Gu as DeleteProjectEndpoint,Au as DeleteRegistrycredentialsEndpoint,El as DeleteSecretEndpoint,Sl as DeleteSecretlinkEndpoint,Gl as DeleteServiceEndpoint,eu as DeleteSubdomainEndpoint,cu as DeleteSubdomainPathEndpoint,Up as DeleteTagEndpoint,kp as DeleteTemplateEndpoint,gp as DeleteVolumeEndpoint,yp as DetachVolumeEndpoint,ru as DisableSubdomainCdnEndpoint,ou as EnableSubdomainCdnEndpoint,ic as ExecCommandStandard,rd as GetAddonBackupDownloadEndpoint,Qu as GetAddonBackupEndpoint,Ku as GetAddonBackupsEndpoint,Hu as GetAddonBackupschedulesEndpoint,ad as GetAddonContainersEndpoint,cd as GetAddonCredentialsEndpoint,Wu as GetAddonEndpoint,fd as GetAddonPitrwindowEndpoint,id as GetAddonRestoresEndpoint,Cc as GetAddonTypesEndpoint,wd as GetAddonVersionEndpoint,pc as GetApiEndpoint,kc as GetCloudClusterEndpoint,Nc as GetCloudDockerregistryEndpoint,Gc as GetCloudIntegrationEndpoint,$c as GetDnsidEndpoint,Yc as GetDomainEndpoint,_c as GetInvoiceDetailsEndpoint,kd as GetJobBranchesEndpoint,Ld as GetJobBuildEndpoint,Dd as GetJobBuildargumentdetailsEndpoint,xd as GetJobBuildargumentsEndpoint,Od as GetJobBuildsEndpoint,Gd as GetJobContainersEndpoint,Md as GetJobDeploymentEndpoint,Ad as GetJobEndpoint,zd as GetJobHealthchecksEndpoint,Vd as GetJobPullrequestsEndpoint,Kd as GetJobRunEndpoint,Yd as GetJobRunsEndpoint,Qd as GetJobRuntimeenvironmentEndpoint,tl as GetJobRuntimeenvironmentdetailsEndpoint,mu as GetLogsinkEndpoint,Ru as GetNotificationEndpoint,sl as GetPipelineEndpoint,al as GetPreviewtemplateEndpoint,pl as GetPreviewtemplaterunEndpoint,Fu as GetProjectEndpoint,Su as GetRegistrycredentialsEndpoint,fl as GetReleaseflowEndpoint,gl as GetReleaseflowrunEndpoint,Rl as GetSecretEndpoint,Al as GetSecretdetailsEndpoint,_l as GetSecretlinkEndpoint,Ml as GetServiceBranchesEndpoint,Zl as GetServiceBuildEndpoint,Vl as GetServiceBuildargumentdetailsEndpoint,Wl as GetServiceBuildargumentsEndpoint,Jl as GetServiceBuildsEndpoint,Xl as GetServiceContainersEndpoint,Ql as GetServiceDeploymentEndpoint,Fl as GetServiceEndpoint,tp as GetServiceHealthchecksEndpoint,op as GetServicePortsEndpoint,sp as GetServicePullrequestsEndpoint,up as GetServiceRuntimeenvironmentEndpoint,lp as GetServiceRuntimeenvironmentdetailsEndpoint,Qc as GetSubdomainEndpoint,au as GetSubdomainPathEndpoint,Ep as GetTagEndpoint,Ap as GetTemplateEndpoint,xp as GetTemplaterunEndpoint,vp as GetVolumeEndpoint,ud as ImportAddonBackupEndpoint,Kc as ImportDomaincertificateEndpoint,Mu as ListAddonsEndpoint,xu as ListBranchesEndpoint,xc as ListCloudClusterNodesEndpoint,Ac as ListCloudClustersEndpoint,Tc as ListCloudDockerregistryEndpoint,Lc as ListCloudIntegrationsEndpoint,zc as ListCloudNodetypesEndpoint,Sc as ListCloudProvidersEndpoint,Wc as ListCloudRegionsEndpoint,Vc as ListDomainsEndpoint,Uc as ListInvoicesEndpoint,jd as ListJobsEndpoint,hu as ListLogsinksEndpoint,Iu as ListNotificationsEndpoint,il as ListPipelinesEndpoint,Tu as ListPlansEndpoint,ul as ListPreviewtemplatepreviewsEndpoint,ll as ListPreviewtemplaterunsEndpoint,Du as ListProjectsEndpoint,wp as ListRegionsEndpoint,Uu as ListRegistrycredentialsEndpoint,ml as ListReleaseflowrunsEndpoint,qu as ListReposEndpoint,yl as ListSecretsEndpoint,Pl as ListServicesEndpoint,su as ListSubdomainPathEndpoint,Ip as ListTagsEndpoint,qp as ListTemplaterunsEndpoint,_p as ListTemplatesEndpoint,ku as ListVcsEndpoint,fp as ListVolumesEndpoint,Qa as LogType,yc as MetricType,ac as NorthflankApiCallError,sc as NorthflankExecCommand,Ic as NorthflankLogFetch,Ec as NorthflankMetricFetch,rc as NorthflankPortForwarder,$u as PatchAddonEndpoint,mc as PatchApiEndpoint,Cd as PatchJobCronEndpoint,Sd as PatchJobManualEndpoint,Lu as PatchProjectEndpoint,jl as PatchSecretEndpoint,ql as PatchServiceBuildEndpoint,Dl as PatchServiceCombinedEndpoint,Ll as PatchServiceDeploymentEndpoint,Cp as PatchTagEndpoint,ld as PauseAddonEndpoint,$d as PauseJobEndpoint,bu as PauseLogsinkEndpoint,rp as PauseServiceEndpoint,fc as PostApiEndpoint,zu as PutAddonEndpoint,vc as PutApiEndpoint,Ed as PutJobCronEndpoint,_d as PutJobManualEndpoint,Bu as PutProjectEndpoint,Il as PutSecretEndpoint,Ol as PutServiceBuildEndpoint,Tl as PutServiceCombinedEndpoint,Bl as PutServiceDeploymentEndpoint,Rp as PutTagEndpoint,hd as ResetAddonEndpoint,vd as RestartAddonEndpoint,ap as RestartServiceEndpoint,od as RestoreAddonBackupEndpoint,md as RestoreAddonBackupGlobalEndpoint,gd as ResumeAddonEndpoint,Hd as ResumeJobEndpoint,yu as ResumeLogsinkEndpoint,cp as ResumeServiceEndpoint,sd as RetainAddonBackupEndpoint,vl as RunReleaseflowEndpoint,Op as RunTemplateEndpoint,bd as ScaleAddonEndpoint,nl as ScaleJobEndpoint,pp as ScaleServiceEndpoint,pd as StartAddonPitrEndpoint,qd as StartJobBuildEndpoint,Zd as StartJobRunEndpoint,zl as StartServiceBuildEndpoint,ol as SuspendJobEndpoint,nu as UnassignSubdomainEndpoint,lu as UnassignSubdomainPathEndpoint,dd as UpdateAddonNetworksettingsEndpoint,yd as UpdateAddonSecurityEndpoint,Id as UpdateAddonVersionEndpoint,Oc as UpdateCloudClusterEndpoint,Mc as UpdateCloudIntegrationEndpoint,Td as UpdateJobBuildargumentsEndpoint,Nd as UpdateJobBuildoptionsEndpoint,Bd as UpdateJobBuildsourceEndpoint,Jd as UpdateJobDeploymentEndpoint,Wd as UpdateJobHealthchecksEndpoint,el as UpdateJobRuntimeenvironmentEndpoint,rl as UpdateJobSettingsEndpoint,wu as UpdateLogsinkEndpoint,Eu as UpdateNotificationEndpoint,cl as UpdatePreviewtemplateEndpoint,Pu as UpdateRegistrycredentialsEndpoint,hl as UpdateReleaseflowEndpoint,Cl as UpdateSecretEndpoint,Ul as UpdateSecretlinkEndpoint,$l as UpdateServiceBuildargumentsEndpoint,Hl as UpdateServiceBuildoptionsEndpoint,Yl as UpdateServiceBuildsourceEndpoint,ep as UpdateServiceDeploymentEndpoint,np as UpdateServiceHealthchecksEndpoint,ip as UpdateServicePortsEndpoint,dp as UpdateServiceRuntimeenvironmentEndpoint,uu as UpdateSubdomainPathEndpoint,Pp as UpdateTemplateEndpoint,mp as UpdateVolumeEndpoint,fu as VerifyDomainEndpoint,pu as VerifySubdomainEndpoint};
|
|
1
|
+
import e,{EventEmitter as t}from"events";import*as n from"stream";import r,{Transform as o}from"stream";import i from"http";import s,{fileURLToPath as a}from"url";import c from"punycode";import u from"https";import d from"zlib";import l from"os";import*as p from"net";import f,{Socket as h}from"net";import{spawn as v,execSync as m}from"child_process";import b from"fs";import g from"path";import y from"buffer";import w from"crypto";import I from"tls";import j from"dgram";var R=function(e,t){return R=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])},R(e,t)};function E(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}R(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var C=function(){return C=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},C.apply(this,arguments)};function U(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 _(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 S(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 A="object"==typeof global&&global&&global.Object===Object&&global,P="object"==typeof self&&self&&self.Object===Object&&self,k=A||P||Function("return this")(),O=k.Symbol,q=Object.prototype,x=q.hasOwnProperty,D=q.toString,T=O?O.toStringTag:void 0;var N=Object.prototype.toString;var B=O?O.toStringTag:void 0;function L(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":B&&B in Object(e)?function(e){var t=x.call(e,T),n=e[T];try{e[T]=void 0;var r=!0}catch(e){}var o=D.call(e);return r&&(t?e[T]=n:delete e[T]),o}(e):function(e){return N.call(e)}(e)}function F(e){return null!=e&&"object"==typeof e}function G(e){return"symbol"==typeof e||F(e)&&"[object Symbol]"==L(e)}function M(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 J=Array.isArray,z=O?O.prototype:void 0,W=z?z.toString:void 0;function $(e){if("string"==typeof e)return e;if(J(e))return M(e,$)+"";if(G(e))return W?W.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function V(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function H(e){return e}function Y(e){if(!V(e))return!1;var t=L(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var Z,K=k["__core-js_shared__"],X=(Z=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||""))?"Symbol(src)_1."+Z:"";var Q=Function.prototype.toString;function ee(e){if(null!=e){try{return Q.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var te=/^\[object .+?Constructor\]$/,ne=Function.prototype,re=Object.prototype,oe=ne.toString,ie=re.hasOwnProperty,se=RegExp("^"+oe.call(ie).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ae(e){return!(!V(e)||(t=e,X&&X in t))&&(Y(e)?se:te).test(ee(e));var t}function ce(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ae(n)?n:void 0}var ue=ce(k,"WeakMap"),de=Object.create,le=function(){function e(){}return function(t){if(!V(t))return{};if(de)return de(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var pe=Date.now;var fe,he,ve,me=function(){try{var e=ce(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),be=me,ge=be?function(e,t){return be(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:H,ye=(fe=ge,he=0,ve=0,function(){var e=pe(),t=16-(e-ve);if(ve=e,t>0){if(++he>=800)return arguments[0]}else he=0;return fe.apply(void 0,arguments)}),we=/^(?:0|[1-9]\d*)$/;function Ie(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function je(e,t,n){"__proto__"==t&&be?be(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Re(e,t){return e===t||e!=e&&t!=t}var Ee=Object.prototype.hasOwnProperty;function Ce(e,t,n){var r=e[t];Ee.call(e,t)&&Re(r,n)&&(void 0!==n||t in e)||je(e,t,n)}var Ue=Math.max;function _e(e,t){return ye(function(e,t,n){return t=Ue(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Ue(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,H),e+"")}function Se(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ae(e){return null!=e&&Se(e.length)&&!Y(e)}var Pe=Object.prototype;function ke(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Pe)}function Oe(e){return F(e)&&"[object Arguments]"==L(e)}var qe=Object.prototype,xe=qe.hasOwnProperty,De=qe.propertyIsEnumerable,Te=Oe(function(){return arguments}())?Oe:function(e){return F(e)&&xe.call(e,"callee")&&!De.call(e,"callee")};var Ne="object"==typeof exports&&exports&&!exports.nodeType&&exports,Be=Ne&&"object"==typeof module&&module&&!module.nodeType&&module,Le=Be&&Be.exports===Ne?k.Buffer:void 0,Fe=(Le?Le.isBuffer:void 0)||function(){return!1},Ge={};Ge["[object Float32Array]"]=Ge["[object Float64Array]"]=Ge["[object Int8Array]"]=Ge["[object Int16Array]"]=Ge["[object Int32Array]"]=Ge["[object Uint8Array]"]=Ge["[object Uint8ClampedArray]"]=Ge["[object Uint16Array]"]=Ge["[object Uint32Array]"]=!0,Ge["[object Arguments]"]=Ge["[object Array]"]=Ge["[object ArrayBuffer]"]=Ge["[object Boolean]"]=Ge["[object DataView]"]=Ge["[object Date]"]=Ge["[object Error]"]=Ge["[object Function]"]=Ge["[object Map]"]=Ge["[object Number]"]=Ge["[object Object]"]=Ge["[object RegExp]"]=Ge["[object Set]"]=Ge["[object String]"]=Ge["[object WeakMap]"]=!1;var Me="object"==typeof exports&&exports&&!exports.nodeType&&exports,Je=Me&&"object"==typeof module&&module&&!module.nodeType&&module,ze=Je&&Je.exports===Me&&A.process,We=function(){try{var e=Je&&Je.require&&Je.require("util").types;return e||ze&&ze.binding&&ze.binding("util")}catch(e){}}(),$e=We&&We.isTypedArray,Ve=$e?function(e){return function(t){return e(t)}}($e):function(e){return F(e)&&Se(e.length)&&!!Ge[L(e)]},He=Ve,Ye=Object.prototype.hasOwnProperty;function Ze(e,t){var n=J(e),r=!n&&Te(e),o=!n&&!r&&Fe(e),i=!n&&!r&&!o&&He(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&&!Ye.call(e,u)||s&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ie(u,c))||a.push(u);return a}function Ke(e,t){return function(n){return e(t(n))}}var Xe=Ke(Object.keys,Object),Qe=Object.prototype.hasOwnProperty;function et(e){return Ae(e)?Ze(e):function(e){if(!ke(e))return Xe(e);var t=[];for(var n in Object(e))Qe.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var tt=Object.prototype.hasOwnProperty;function nt(e){if(!V(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ke(e),n=[];for(var r in e)("constructor"!=r||!t&&tt.call(e,r))&&n.push(r);return n}function rt(e){return Ae(e)?Ze(e,!0):nt(e)}var ot=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,it=/^\w*$/;function st(e,t){if(J(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!G(e))||(it.test(e)||!ot.test(e)||null!=t&&e in Object(t))}var at=ce(Object,"create");var ct=Object.prototype.hasOwnProperty;var ut=Object.prototype.hasOwnProperty;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])}}function lt(e,t){for(var n=e.length;n--;)if(Re(e[n][0],t))return n;return-1}dt.prototype.clear=function(){this.__data__=at?at(null):{},this.size=0},dt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},dt.prototype.get=function(e){var t=this.__data__;if(at){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ct.call(t,e)?t[e]:void 0},dt.prototype.has=function(e){var t=this.__data__;return at?void 0!==t[e]:ut.call(t,e)},dt.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 pt=Array.prototype.splice;function ft(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])}}ft.prototype.clear=function(){this.__data__=[],this.size=0},ft.prototype.delete=function(e){var t=this.__data__,n=lt(t,e);return!(n<0)&&(n==t.length-1?t.pop():pt.call(t,n,1),--this.size,!0)},ft.prototype.get=function(e){var t=this.__data__,n=lt(t,e);return n<0?void 0:t[n][1]},ft.prototype.has=function(e){return lt(this.__data__,e)>-1},ft.prototype.set=function(e,t){var n=this.__data__,r=lt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var ht=ce(k,"Map");function vt(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 mt(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])}}mt.prototype.clear=function(){this.size=0,this.__data__={hash:new dt,map:new(ht||ft),string:new dt}},mt.prototype.delete=function(e){var t=vt(this,e).delete(e);return this.size-=t?1:0,t},mt.prototype.get=function(e){return vt(this,e).get(e)},mt.prototype.has=function(e){return vt(this,e).has(e)},mt.prototype.set=function(e,t){var n=vt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function bt(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(bt.Cache||mt),n}bt.Cache=mt;var gt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yt=/\\(\\)?/g,wt=function(e){var t=bt(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(gt,(function(e,n,r,o){t.push(r?o.replace(yt,"$1"):n||e)})),t})),It=wt;function jt(e){return null==e?"":$(e)}function Rt(e,t){return J(e)?e:st(e,t)?[e]:It(jt(e))}function Et(e){if("string"==typeof e||G(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ct(e,t){for(var n=0,r=(t=Rt(t,e)).length;null!=e&&n<r;)e=e[Et(t[n++])];return n&&n==r?e:void 0}function Ut(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var _t=O?O.isConcatSpreadable:void 0;function St(e){return J(e)||Te(e)||!!(_t&&e&&e[_t])}function At(e,t,n,r,o){var i=-1,s=e.length;for(n||(n=St),o||(o=[]);++i<s;){var a=e[i];t>0&&n(a)?t>1?At(a,t-1,n,r,o):Ut(o,a):r||(o[o.length]=a)}return o}var Pt=Ke(Object.getPrototypeOf,Object),kt=Function.prototype,Ot=Object.prototype,qt=kt.toString,xt=Ot.hasOwnProperty,Dt=qt.call(Object);function Tt(e){var t=this.__data__=new ft(e);this.size=t.size}Tt.prototype.clear=function(){this.__data__=new ft,this.size=0},Tt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Tt.prototype.get=function(e){return this.__data__.get(e)},Tt.prototype.has=function(e){return this.__data__.has(e)},Tt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ft){var r=n.__data__;if(!ht||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new mt(r)}return n.set(e,t),this.size=n.size,this};var Nt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Bt=Nt&&"object"==typeof module&&module&&!module.nodeType&&module,Lt=Bt&&Bt.exports===Nt?k.Buffer:void 0,Ft=Lt?Lt.allocUnsafe:void 0;var Gt=Object.prototype.propertyIsEnumerable,Mt=Object.getOwnPropertySymbols,Jt=Mt?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}(Mt(e),(function(t){return Gt.call(e,t)})))}:function(){return[]};function zt(e){return function(e,t,n){var r=t(e);return J(e)?r:Ut(r,n(e))}(e,et,Jt)}var Wt=ce(k,"DataView"),$t=ce(k,"Promise"),Vt=ce(k,"Set"),Ht="[object Map]",Yt="[object Promise]",Zt="[object Set]",Kt="[object WeakMap]",Xt="[object DataView]",Qt=ee(Wt),en=ee(ht),tn=ee($t),nn=ee(Vt),rn=ee(ue),on=L;(Wt&&on(new Wt(new ArrayBuffer(1)))!=Xt||ht&&on(new ht)!=Ht||$t&&on($t.resolve())!=Yt||Vt&&on(new Vt)!=Zt||ue&&on(new ue)!=Kt)&&(on=function(e){var t=L(e),n="[object Object]"==t?e.constructor:void 0,r=n?ee(n):"";if(r)switch(r){case Qt:return Xt;case en:return Ht;case tn:return Yt;case nn:return Zt;case rn:return Kt}return t});var sn=on,an=k.Uint8Array;function cn(e,t){var n,r,o=t?(n=e.buffer,r=new n.constructor(n.byteLength),new an(r).set(new an(n)),r):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function un(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new mt;++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}un.prototype.add=un.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},un.prototype.has=function(e){return this.__data__.has(e)};function ln(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 un: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 pn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var hn=O?O.prototype:void 0,vn=hn?hn.valueOf:void 0;var mn=Object.prototype.hasOwnProperty;var bn="[object Arguments]",gn="[object Array]",yn="[object Object]",wn=Object.prototype.hasOwnProperty;function In(e,t,n,r,o,i){var s=J(e),a=J(t),c=s?gn:sn(e),u=a?gn:sn(t),d=(c=c==bn?yn:c)==yn,l=(u=u==bn?yn:u)==yn,p=c==u;if(p&&Fe(e)){if(!Fe(t))return!1;s=!0,d=!1}if(p&&!d)return i||(i=new Tt),s||He(e)?ln(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 an(e),new an(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Re(+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=pn;case"[object Set]":var c=1&r;if(a||(a=fn),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=ln(a(e),a(t),r,o,i,s);return s.delete(e),d;case"[object Symbol]":if(vn)return vn.call(e)==vn.call(t)}return!1}(e,t,c,n,r,o,i);if(!(1&n)){var f=d&&wn.call(e,"__wrapped__"),h=l&&wn.call(t,"__wrapped__");if(f||h){var v=f?e.value():e,m=h?t.value():t;return i||(i=new Tt),o(v,m,n,r,i)}}return!!p&&(i||(i=new Tt),function(e,t,n,r,o,i){var s=1&n,a=zt(e),c=a.length;if(c!=zt(t).length&&!s)return!1;for(var u=c;u--;){var d=a[u];if(!(s?d in t:mn.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 jn(e,t,n,r,o){return e===t||(null==e||null==t||!F(e)&&!F(t)?e!=e&&t!=t:In(e,t,n,r,jn,o))}function Rn(e){return e==e&&!V(e)}function En(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function Cn(e){var t=function(e){for(var t=et(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Rn(o)]}return t}(e);return 1==t.length&&t[0][2]?En(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 Tt;if(r)var p=r(u,d,c,e,t,l);if(!(void 0===p?jn(d,u,3,r,l):p))return!1}}return!0}(n,e,t)}}function Un(e,t){return null!=e&&t in Object(e)}function _n(e,t){return null!=e&&function(e,t,n){for(var r=-1,o=(t=Rt(t,e)).length,i=!1;++r<o;){var s=Et(t[r]);if(!(i=null!=e&&n(e,s)))break;e=e[s]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Se(o)&&Ie(s,o)&&(J(e)||Te(e))}(e,t,Un)}function Sn(e,t){return st(e)&&Rn(t)?En(Et(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Ct(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?_n(n,e):jn(t,r,3)}}function An(e){return st(e)?(t=Et(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Ct(t,e)}}(e);var t}function Pn(e){return"function"==typeof e?e:null==e?H:"object"==typeof e?J(e)?Sn(e[0],e[1]):Cn(e):An(e)}var kn,On=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),s=i.length;s--;){var a=i[kn?s:++r];if(!1===t(o[a],a,o))break}return e};var qn=function(e,t){return function(n,r){if(null==n)return n;if(!Ae(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&&On(e,t,et)})),xn=qn;function Dn(e,t,n){(void 0!==n&&!Re(e[t],n)||void 0===n&&!(t in e))&&je(e,t,n)}function Tn(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function Nn(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?je(n,a,c):Ce(n,a,c)}return n}(e,rt(e))}function Bn(e,t,n,r,o,i,s){var a=Tn(e,n),c=Tn(t,n),u=s.get(c);if(u)Dn(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=J(c),h=!f&&Fe(c),v=!f&&!h&&He(c);l=c,f||h||v?J(a)?l=a:F(d=a)&&Ae(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=Ft?Ft(n):new e.constructor(n);return e.copy(r),r}(c,!0)):v?(p=!1,l=cn(c,!0)):l=[]:function(e){if(!F(e)||"[object Object]"!=L(e))return!1;var t=Pt(e);if(null===t)return!0;var n=xt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&qt.call(n)==Dt}(c)||Te(c)?(l=a,Te(a)?l=Nn(a):V(a)&&!Y(a)||(l=function(e){return"function"!=typeof e.constructor||ke(e)?{}:le(Pt(e))}(c))):p=!1}p&&(s.set(c,l),o(l,c,r,i,s),s.delete(c)),Dn(e,n,l)}}function Ln(e,t,n,r,o){e!==t&&On(t,(function(i,s){if(o||(o=new Tt),V(i))Bn(e,t,s,n,Ln,r,o);else{var a=r?r(Tn(e,s),i,s+"",e,t,o):void 0;void 0===a&&(a=i),Dn(e,s,a)}}),rt)}var Fn=/[\\^$.*+?()[\]{}|]/g,Gn=RegExp(Fn.source);function Mn(e,t){var n=-1,r=Ae(e)?Array(e.length):[];return xn(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function Jn(e,t){return At(function(e,t){return(J(e)?M:Mn)(e,Pn(t))}(e,t),1)}var zn=1/0;function Wn(e,t){return e>t}function $n(e){return"string"==typeof e||!J(e)&&F(e)&&"[object String]"==L(e)}function Vn(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&&!G(s):n(s,a)))var a=s,c=i}return c}(e,Pn(t),Wn):void 0}var Hn,Yn=(Hn=function(e,t,n){Ln(e,t,n)},_e((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=Hn.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!V(n))return!1;var r=typeof t;return!!("number"==r?Ae(n)&&Ie(t,n.length):"string"==r&&t in n)&&Re(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&&Hn(e,s,n,o)}return e})));function Zn(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function Kn(e,t){return e(t={exports:{}},t.exports),t.exports}var Xn={},Qn=Xn;function er(e){return e<0?-1:1}function tr(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=er(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=er(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}}Xn.void=function(){},Xn.boolean=function(e){return!!e},Xn.byte=tr(8,{unsigned:!1}),Xn.octet=tr(8,{unsigned:!0}),Xn.short=tr(16,{unsigned:!1}),Xn["unsigned short"]=tr(16,{unsigned:!0}),Xn.long=tr(32,{unsigned:!1}),Xn["unsigned long"]=tr(32,{unsigned:!0}),Xn["long long"]=tr(32,{unsigned:!1,moduloBitLength:64}),Xn["unsigned long long"]=tr(32,{unsigned:!0,moduloBitLength:64}),Xn.double=function(e){const t=+e;if(!Number.isFinite(t))throw new TypeError("Argument is not a finite floating-point value");return t},Xn["unrestricted double"]=function(e){const t=+e;if(isNaN(t))throw new TypeError("Argument is NaN");return t},Xn.float=Xn.double,Xn["unrestricted float"]=Xn["unrestricted double"],Xn.DOMString=function(e,t){return t||(t={}),t.treatNullAsEmptyString&&null===e?"":String(e)},Xn.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},Xn.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("")},Xn.Date=function(e,t){if(!(e instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(e))return e},Xn.RegExp=function(e,t){return e instanceof RegExp||(e=new RegExp(e)),e};var nr=Kn((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]}}));nr.mixin,nr.wrapperSymbol,nr.implSymbol,nr.wrapperForImpl,nr.implForWrapper;var rr,or=(rr=Object.freeze({__proto__:null}))&&rr.default||rr,ir={TRANSITIONAL:0,NONTRANSITIONAL:1};function sr(e){return e.split("\0").map((function(e){return e.normalize("NFC")})).join("\0")}function ar(e){for(var t=0,n=or.length-1;t<=n;){var r=Math.floor((t+n)/2),o=or[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 cr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function ur(e){return e.replace(cr,"_").length}var dr=/[\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 lr(e,t){"xn--"===e.substr(0,4)&&(e=c.toUnicode(e));var n=!1;(sr(e)!==e||"-"===e[3]&&"-"===e[4]||"-"===e[0]||"-"===e[e.length-1]||-1!==e.indexOf(".")||0===e.search(dr))&&(n=!0);for(var r=ur(e),o=0;o<r;++o){var i=ar(e.codePointAt(o));if(pr===ir.TRANSITIONAL&&"valid"!==i[1]||pr===ir.NONTRANSITIONAL&&"valid"!==i[1]&&"deviation"!==i[1]){n=!0;break}}return{label:e,error:n}}function pr(e,t,n){var r=function(e,t,n){for(var r=!1,o="",i=ur(e),s=0;s<i;++s){var a=e.codePointAt(s),c=ar(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===ir.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=sr(r.string);for(var o=r.string.split("."),i=0;i<o.length;++i)try{var s=lr(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 fr={toASCII:function(e,t,n,r){var o=pr(e,t,n),i=o.string.split(".");if(i=i.map((function(e){try{return c.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=pr(e,t,ir.NONTRANSITIONAL);return{domain:n.string,error:n.error}},PROCESSING_OPTIONS:ir},hr=Kn((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 c.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 u(e){return"."===e||"%2e"===e.toLowerCase()}function d(e){return 2===e.length&&s(e.codePointAt(0))&&(":"===e[1]||"|"===e[1])}function l(e){return void 0!==t[e]}function p(e){return l(e.scheme)}function f(e){let t=e.toString(16).toUpperCase();return 1===t.length&&(t="0"+t),"%"+t}function h(e){return e<=31||e>126}const v=new Set([32,34,35,60,62,63,96,123,125]);function m(e){return h(e)||v.has(e)}const b=new Set([47,58,59,61,64,91,92,93,94,124]);function g(e){return m(e)||b.has(e)}function y(e,t){const n=String.fromCodePoint(e);return t(e)?function(e){const t=new Buffer(e);let n="";for(let e=0;e<t.length;++e)n+=f(t[e]);return n}(n):n}function w(e){let t=10;if(e.length>=2&&"0"===e.charAt(0)&&"x"===e.charAt(1).toLowerCase()?(e=e.substring(2),t=16):e.length>=2&&"0"===e.charAt(0)&&(e=e.substring(1),t=8),""===e)return 0;return(10===t?/[^0-9]/:16===t?/[^0-9A-Fa-f]/:/[^0-7]/).test(e)?n:parseInt(e,t)}function I(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,u=0;if(58===(e=c.ucs2.decode(e))[u]){if(58!==e[u+1])return n;u+=2,++r,s=r}for(;u<e.length;){if(8===r)return n;if(58===e[u]){if(null!==s)return n;++u,++r,s=r;continue}let c=0,d=0;for(;d<4&&a(e[u]);)c=16*c+parseInt(o(e,u),16),++u,++d;if(46===e[u]){if(0===d)return n;if(u-=d,r>6)return n;let s=0;for(;void 0!==e[u];){let a=null;if(s>0){if(!(46===e[u]&&s<4))return n;++u}if(!i(e[u]))return n;for(;i(e[u]);){const t=parseInt(o(e,u));if(null===a)a=t;else{if(0===a)return n;a=10*a+t}if(a>255)return n;++u}t[r]=256*t[r]+a,++s,2!==s&&4!==s||++r}if(4!==s)return n;break}if(58===e[u]){if(++u,void 0===e[u])return n}else if(void 0!==e[u])return n;t[r]=c,++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=c.ucs2.decode(e);for(let e=0;e<o.length;++e)r+=y(o[e],h);return r}(e);const r=function(e){const t=new Buffer(e),n=[];for(let e=0;e<t.length;++e)37!==t[e]?n.push(t[e]):37===t[e]&&a(t[e+1])&&a(t[e+2])?(n.push(parseInt(t.slice(e+1,e+3).toString(),16)),e+=2):n.push(t[e]);return new Buffer(n).toString()}(e),s=fr.toASCII(r,!1,fr.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===s)return n;if(-1!==s.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return n;const u=function(e){const t=e.split(".");if(""===t[t.length-1]&&t.length>1&&t.pop(),t.length>4)return e;const r=[];for(const o of t){if(""===o)return e;const t=w(o);if(t===n)return e;r.push(t)}for(let e=0;e<r.length-1;++e)if(r[e]>255)return n;if(r[r.length-1]>=Math.pow(256,5-r.length))return n;let o=r.pop(),i=0;for(const e of r)o+=e*Math.pow(256,3-i),++i;return o}(s);return"number"==typeof u||u===n?u:s}function j(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 R(e){const t=e.path;var n;0!==t.length&&("file"===e.scheme&&1===t.length&&(n=t[0],/^[A-Za-z]:$/.test(n))||t.pop())}function E(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=c.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(p(this.url)&&!l(this.buffer))return!1;if(!p(this.url)&&l(this.buffer))return!1;if((E(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&(""===this.url.host||null===this.url.host))return!1}if(this.url.scheme=this.buffer,this.buffer="",this.stateOverride)return!1;"file"===this.url.scheme?(47===this.input[this.pointer+1]&&47===this.input[this.pointer+2]||(this.parseError=!0),this.state="file"):p(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":p(this.url)?this.state="special authority slashes":47===this.input[this.pointer+1]?(this.state="path or authority",++this.pointer):(this.url.cannotBeABaseURL=!0,this.url.path.push(""),this.state="cannot-be-a-base-URL path")}else{if(this.stateOverride)return this.parseError=!0,n;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},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"):p(this.url)&&92===e?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(0,this.base.path.length-1),this.state="path",--this.pointer),!0},C.prototype["parse relative slash"]=function(e){return!p(this.url)||47!==e&&92!==e?47===e?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(92===e&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},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=y(e,g);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(e)||47===e||63===e||35===e||p(this.url)&&92===e){if(this.atFlag&&""===this.buffer)return this.parseError=!0,n;this.pointer-=r(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=t;return!0},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||p(this.url)&&92===e){if(--this.pointer,p(this.url)&&""===this.buffer)return this.parseError=!0,n;if(this.stateOverride&&""===this.buffer&&(E(this.url)||null!==this.url.port))return this.parseError=!0,!1;const e=I(this.buffer,p(this.url));if(e===n)return n;if(this.url.host=e,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===e?this.arrFlag=!0:93===e&&(this.arrFlag=!1),this.buffer+=t;else{if(""===this.buffer)return this.parseError=!0,n;const e=I(this.buffer,p(this.url));if(e===n)return n;if(this.url.host=e,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},C.prototype["parse port"]=function(e,r){if(i(e))this.buffer+=r;else{if(!(isNaN(e)||47===e||63===e||35===e||p(this.url)&&92===e||this.stateOverride))return this.parseError=!0,n;if(""!==this.buffer){const e=parseInt(this.buffer);if(e>Math.pow(2,16)-1)return this.parseError=!0,n;this.url.port=e===(o=this.url.scheme,t[o])?null:e,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var o;return!0};const 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(),R(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&&d(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let e=I(this.buffer,p(this.url));if(e===n)return n;if("localhost"===e&&(e=""),this.url.host=e,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=t;return!0},C.prototype["parse path start"]=function(e){return p(this.url)?(92===e&&(this.parseError=!0),this.state="path",47!==e&&92!==e&&--this.pointer):this.stateOverride||63!==e?this.stateOverride||35!==e?void 0!==e&&(this.state="path",47!==e&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},C.prototype["parse path"]=function(e){if(isNaN(e)||47===e||p(this.url)&&92===e||!this.stateOverride&&(63===e||35===e)){if(p(this.url)&&92===e&&(this.parseError=!0),!function(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e}(this.buffer)?!u(this.buffer)||47===e||p(this.url)&&92===e?u(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&d(this.buffer)&&(""!==this.url.host&&null!==this.url.host&&(this.parseError=!0,this.url.host=""),this.buffer=this.buffer[0]+":"),this.url.path.push(this.buffer)):this.url.path.push(""):(R(this.url),47===e||p(this.url)&&92===e||this.url.path.push("")),this.buffer="","file"===this.url.scheme&&(void 0===e||63===e||35===e))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===e&&(this.url.query="",this.state="query"),35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=y(e,m);return!0},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]+y(e,h))),!0},C.prototype["parse query"]=function(e,t){if(isNaN(e)||!this.stateOverride&&35===e){p(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const t=new Buffer(this.buffer);for(let e=0;e<t.length;++e)t[e]<33||t[e]>126||34===t[e]||35===t[e]||60===t[e]||62===t[e]?this.url.query+=f(t[e]):this.url.query+=String.fromCodePoint(t[e]);this.buffer="",35===e&&(this.url.fragment="",this.state="fragment")}else 37!==e||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=t;return!0},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+=y(e,h))),!0},e.exports.serializeURL=function(e,t){let n=e.scheme+":";if(null!==e.host?(n+="//",""===e.username&&""===e.password||(n+=e.username,""!==e.password&&(n+=":"+e.password),n+="@"),n+=j(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+=j(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=c.ucs2.decode(t);for(let t=0;t<n.length;++t)e.username+=y(n[t],g)},e.exports.setThePassword=function(e,t){e.password="";const n=c.ucs2.decode(t);for(let t=0;t<n.length;++t)e.password+=y(n[t],g)},e.exports.serializeHost=j,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})}}));hr.serializeURL,hr.serializeURLOrigin,hr.basicURLParse,hr.setTheUsername,hr.setThePassword,hr.serializeHost,hr.cannotHaveAUsernamePasswordPort,hr.serializeInteger,hr.parseURL;var vr=class{constructor(e){const t=e[0],n=e[1];let r=null;if(void 0!==n&&(r=hr.basicURLParse(n),"failure"===r))throw new TypeError("Invalid base URL");const o=hr.basicURLParse(t,{baseURL:r});if("failure"===o)throw new TypeError("Invalid URL");this._url=o}get href(){return hr.serializeURL(this._url)}set href(e){const t=hr.basicURLParse(e);if("failure"===t)throw new TypeError("Invalid URL");this._url=t}get origin(){return hr.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(e){hr.basicURLParse(e+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(e){hr.cannotHaveAUsernamePasswordPort(this._url)||hr.setTheUsername(this._url,e)}get password(){return this._url.password}set password(e){hr.cannotHaveAUsernamePasswordPort(this._url)||hr.setThePassword(this._url,e)}get host(){const e=this._url;return null===e.host?"":null===e.port?hr.serializeHost(e.host):hr.serializeHost(e.host)+":"+hr.serializeInteger(e.port)}set host(e){this._url.cannotBeABaseURL||hr.basicURLParse(e,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":hr.serializeHost(this._url.host)}set hostname(e){this._url.cannotBeABaseURL||hr.basicURLParse(e,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":hr.serializeInteger(this._url.port)}set port(e){hr.cannotHaveAUsernamePasswordPort(this._url)||(""===e?this._url.port=null:hr.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=[],hr.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="",hr.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="",hr.basicURLParse(t,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}},mr=Kn((function(e){const t=nr.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]=Qn.USVString(o[0]),void 0!==o[1]&&(o[1]=Qn.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=Qn.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=Qn.USVString(e),this[t].protocol=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"username",{get(){return this[t].username},set(e){e=Qn.USVString(e),this[t].username=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"password",{get(){return this[t].password},set(e){e=Qn.USVString(e),this[t].password=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"host",{get(){return this[t].host},set(e){e=Qn.USVString(e),this[t].host=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hostname",{get(){return this[t].hostname},set(e){e=Qn.USVString(e),this[t].hostname=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"port",{get(){return this[t].port},set(e){e=Qn.USVString(e),this[t].port=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pathname",{get(){return this[t].pathname},set(e){e=Qn.USVString(e),this[t].pathname=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"search",{get(){return this[t].search},set(e){e=Qn.USVString(e),this[t].search=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hash",{get(){return this[t].hash},set(e){e=Qn.USVString(e),this[t].hash=e},enumerable:!0,configurable:!0}),e.exports={is:e=>!!e&&e[t]instanceof vr,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 vr(n,r),e[t][nr.wrapperSymbol]=e},interface:n,expose:{Window:{URL:n},Worker:{URL:n}}}}));mr.is,mr.create,mr.setup,mr.expose;var br={URL:mr.interface,serializeURL:hr.serializeURL,serializeURLOrigin:hr.serializeURLOrigin,basicURLParse:hr.basicURLParse,setTheUsername:hr.setTheUsername,setThePassword:hr.setThePassword,serializeHost:hr.serializeHost,serializeInteger:hr.serializeInteger,parseURL:hr.parseURL};const gr=r.Readable,yr=Symbol("buffer"),wr=Symbol("type");class Ir{constructor(){this[wr]="";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 Ir?o[yr]:Buffer.from("string"==typeof o?o:String(o)),r+=i.length,n.push(i)}}this[yr]=Buffer.concat(n);let o=t&&void 0!==t.type&&String(t.type).toLowerCase();o&&!/[^\u0020-\u007E]/.test(o)&&(this[wr]=o)}get size(){return this[yr].length}get type(){return this[wr]}text(){return Promise.resolve(this[yr].toString())}arrayBuffer(){const e=this[yr],t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return Promise.resolve(t)}stream(){const e=new gr;return e._read=function(){},e.push(this[yr]),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[yr].slice(r,r+i),a=new Ir([],{type:arguments[2]});return a[yr]=s,a}}function jr(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 Rr;Object.defineProperties(Ir.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(Ir.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),jr.prototype=Object.create(Error.prototype),jr.prototype.constructor=jr,jr.prototype.name="FetchError";try{Rr=require("encoding").convert}catch(e){}const Er=Symbol("Body internals"),Cr=r.PassThrough;function Ur(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=n.size;let i=void 0===o?0:o;var s=n.timeout;let a=void 0===s?0:s;null==e?e=null:Sr(e)?e=Buffer.from(e.toString()):Ar(e)||Buffer.isBuffer(e)||("[object ArrayBuffer]"===Object.prototype.toString.call(e)?e=Buffer.from(e):ArrayBuffer.isView(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof r||(e=Buffer.from(String(e)))),this[Er]={body:e,disturbed:!1,error:null},this.size=i,this.timeout=a,e instanceof r&&e.on("error",(function(e){const n="AbortError"===e.name?e:new jr(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[Er].error=n}))}function _r(){var e=this;if(this[Er].disturbed)return Ur.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[Er].disturbed=!0,this[Er].error)return Ur.Promise.reject(this[Er].error);let t=this.body;if(null===t)return Ur.Promise.resolve(Buffer.alloc(0));if(Ar(t)&&(t=t.stream()),Buffer.isBuffer(t))return Ur.Promise.resolve(t);if(!(t instanceof r))return Ur.Promise.resolve(Buffer.alloc(0));let n=[],o=0,i=!1;return new Ur.Promise((function(r,s){let a;e.timeout&&(a=setTimeout((function(){i=!0,s(new jr(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)),t.on("error",(function(t){"AbortError"===t.name?(i=!0,s(t)):s(new jr(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))})),t.on("data",(function(t){if(!i&&null!==t){if(e.size&&o+t.length>e.size)return i=!0,void s(new jr(`content size at ${e.url} over limit: ${e.size}`,"max-size"));o+=t.length,n.push(t)}})),t.on("end",(function(){if(!i){clearTimeout(a);try{r(Buffer.concat(n,o))}catch(t){s(new jr(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}}))}))}function Sr(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 Ar(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 Pr(e){let t,n,o=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return o instanceof r&&"function"!=typeof o.getBoundary&&(t=new Cr,n=new Cr,o.pipe(t),o.pipe(n),e[Er].body=t,o=n),o}function kr(e){return null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":Sr(e)?"application/x-www-form-urlencoded;charset=UTF-8":Ar(e)?e.type||null:Buffer.isBuffer(e)||"[object ArrayBuffer]"===Object.prototype.toString.call(e)||ArrayBuffer.isView(e)?null:"function"==typeof e.getBoundary?`multipart/form-data;boundary=${e.getBoundary()}`:e instanceof r?null:"text/plain;charset=UTF-8"}function Or(e){const t=e.body;return null===t?0:Ar(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}Ur.prototype={get body(){return this[Er].body},get bodyUsed(){return this[Er].disturbed},arrayBuffer(){return _r.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 _r.call(this).then((function(t){return Object.assign(new Ir([],{type:e.toLowerCase()}),{[yr]:t})}))},json(){var e=this;return _r.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return Ur.Promise.reject(new jr(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}}))},text(){return _r.call(this).then((function(e){return e.toString()}))},buffer(){return _r.call(this)},textConverted(){var e=this;return _r.call(this).then((function(t){return function(e,t){if("function"!=typeof Rr)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 Rr(e,"UTF-8",i).toString()}(t,e.headers)}))}},Object.defineProperties(Ur.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),Ur.mixIn=function(e){for(const t of Object.getOwnPropertyNames(Ur.prototype))if(!(t in e)){const n=Object.getOwnPropertyDescriptor(Ur.prototype,t);Object.defineProperty(e,t,n)}},Ur.Promise=global.Promise;const qr=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,xr=/[^\t\x20-\x7e\x80-\xff]/;function Dr(e){if(e=`${e}`,qr.test(e)||""===e)throw new TypeError(`${e} is not a legal HTTP header name`)}function Tr(e){if(e=`${e}`,xr.test(e))throw new TypeError(`${e} is not a legal HTTP header value`)}function Nr(e,t){t=t.toLowerCase();for(const n in e)if(n.toLowerCase()===t)return n}const Br=Symbol("map");class Lr{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[Br]=Object.create(null),e instanceof Lr){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){Dr(e=`${e}`);const t=Nr(this[Br],e);return void 0===t?null:this[Br][t].join(", ")}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=Fr(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=Fr(this),r++}}set(e,t){t=`${t}`,Dr(e=`${e}`),Tr(t);const n=Nr(this[Br],e);this[Br][void 0!==n?n:e]=[t]}append(e,t){t=`${t}`,Dr(e=`${e}`),Tr(t);const n=Nr(this[Br],e);void 0!==n?this[Br][n].push(t):this[Br][e]=[t]}has(e){return Dr(e=`${e}`),void 0!==Nr(this[Br],e)}delete(e){Dr(e=`${e}`);const t=Nr(this[Br],e);void 0!==t&&delete this[Br][t]}raw(){return this[Br]}keys(){return Mr(this,"key")}values(){return Mr(this,"value")}[Symbol.iterator](){return Mr(this,"key+value")}}function Fr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(e[Br]).sort().map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[Br][t].join(", ")}:function(t){return[t.toLowerCase(),e[Br][t].join(", ")]})}Lr.prototype.entries=Lr.prototype[Symbol.iterator],Object.defineProperty(Lr.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Lr.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 Gr=Symbol("internal");function Mr(e,t){const n=Object.create(Jr);return n[Gr]={target:e,kind:t,index:0},n}const Jr=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==Jr)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[Gr];const t=e.target,n=e.kind,r=e.index,o=Fr(t,n);return r>=o.length?{value:void 0,done:!0}:(this[Gr].index=r+1,{value:o[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function zr(e){const t=Object.assign({__proto__:null},e[Br]),n=Nr(e[Br],"Host");return void 0!==n&&(t[n]=t[n][0]),t}Object.defineProperty(Jr,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const Wr=Symbol("Response internals"),$r=i.STATUS_CODES;class Vr{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ur.call(this,e,t);const n=t.status||200,r=new Lr(t.headers);if(null!=e&&!r.has("Content-Type")){const t=kr(e);t&&r.append("Content-Type",t)}this[Wr]={url:t.url,status:n,statusText:t.statusText||$r[n],headers:r,counter:t.counter}}get url(){return this[Wr].url||""}get status(){return this[Wr].status}get ok(){return this[Wr].status>=200&&this[Wr].status<300}get redirected(){return this[Wr].counter>0}get statusText(){return this[Wr].statusText}get headers(){return this[Wr].headers}clone(){return new Vr(Pr(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}Ur.mixIn(Vr.prototype),Object.defineProperties(Vr.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(Vr.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const Hr=Symbol("Request internals"),Yr=s.URL||br.URL,Zr=s.parse,Kr=s.format;function Xr(e){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(e)&&(e=new Yr(e).toString()),Zr(e)}const Qr="destroy"in r.Readable.prototype;function eo(e){return"object"==typeof e&&"object"==typeof e[Hr]}class to{constructor(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};eo(e)?t=Xr(e.url):(t=e&&e.href?Xr(e.href):Xr(`${e}`),e={});let r=n.method||e.method||"GET";if(r=r.toUpperCase(),(null!=n.body||eo(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:eo(e)&&null!==e.body?Pr(e):null;Ur.call(this,o,{timeout:n.timeout||e.timeout||0,size:n.size||e.size||0});const i=new Lr(n.headers||e.headers||{});if(null!=o&&!i.has("Content-Type")){const e=kr(o);e&&i.append("Content-Type",e)}let s=eo(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[Hr]={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[Hr].method}get url(){return Kr(this[Hr].parsedURL)}get headers(){return this[Hr].headers}get redirect(){return this[Hr].redirect}get signal(){return this[Hr].signal}clone(){return new to(this)}}function no(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}Ur.mixIn(to.prototype),Object.defineProperty(to.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(to.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),no.prototype=Object.create(Error.prototype),no.prototype.constructor=no,no.prototype.name="AbortError";const ro=s.URL||br.URL,oo=r.PassThrough;function io(e,t){if(!io.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return Ur.Promise=io.Promise,new io.Promise((function(n,o){const s=new to(e,t),a=function(e){const t=e[Hr].parsedURL,n=new Lr(e[Hr].headers);if(n.has("Accept")||n.set("Accept","*/*"),!t.protocol||!t.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&e.body instanceof r.Readable&&!Qr)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let o=null;if(null==e.body&&/^(POST|PUT)$/i.test(e.method)&&(o="0"),null!=e.body){const t=Or(e);"number"==typeof t&&(o=String(t))}o&&n.set("Content-Length",o),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),e.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let i=e.agent;return"function"==typeof i&&(i=i(t)),Object.assign({},t,{method:e.method,headers:zr(n),agent:i})}(s),c=("https:"===a.protocol?u:i).request,l=s.signal;let p=null;const f=function(){let e=new no("The user aborted a request.");o(e),s.body&&s.body instanceof r.Readable&&so(s.body,e),p&&p.body&&p.body.emit("error",e)};if(l&&l.aborted)return void f();const h=function(){f(),b()},v=c(a);let m;function b(){v.abort(),l&&l.removeEventListener("abort",h),clearTimeout(m)}l&&l.addEventListener("abort",h),s.timeout&&v.once("socket",(function(e){m=setTimeout((function(){o(new jr(`network timeout at: ${s.url}`,"request-timeout")),b()}),s.timeout)})),v.on("error",(function(e){o(new jr(`request to ${s.url} failed, reason: ${e.message}`,"system",e)),p&&p.body&&so(p.body,e),b()})),function(e,t){let n;e.on("socket",(function(e){n=e})),e.on("response",(function(e){const r=e.headers;"chunked"!==r["transfer-encoding"]||r["content-length"]||e.once("close",(function(e){if(n&&n.listenerCount("data")>0&&!e){const e=new Error("Premature close");e.code="ERR_STREAM_PREMATURE_CLOSE",t(e)}}))}))}(v,(function(e){l&&l.aborted||p&&p.body&&so(p.body,e)})),parseInt(process.version.substring(1))<14&&v.on("socket",(function(e){e.addListener("close",(function(t){const n=e.listenerCount("data")>0;if(p&&n&&!t&&(!l||!l.aborted)){const e=new Error("Premature close");e.code="ERR_STREAM_PREMATURE_CLOSE",p.body.emit("error",e)}}))})),v.on("response",(function(e){clearTimeout(m);const t=function(e){const t=new Lr;for(const n of Object.keys(e))if(!qr.test(n))if(Array.isArray(e[n]))for(const r of e[n])xr.test(r)||(void 0===t[Br][n]?t[Br][n]=[r]:t[Br][n].push(r));else xr.test(e[n])||(t[Br][n]=[e[n]]);return t}(e.headers);if(io.isRedirect(e.statusCode)){const i=t.get("Location");let a=null;try{a=null===i?null:new ro(i,s.url).toString()}catch(e){if("manual"!==s.redirect)return o(new jr(`uri requested responds with an invalid redirect URL: ${i}`,"invalid-redirect")),void b()}switch(s.redirect){case"error":return o(new jr(`uri requested responds with a redirect, redirect mode is set to error: ${s.url}`,"no-redirect")),void b();case"manual":if(null!==a)try{t.set("Location",a)}catch(e){o(e)}break;case"follow":if(null===a)break;if(s.counter>=s.follow)return o(new jr(`maximum redirect reached at: ${s.url}`,"max-redirect")),void b();const i={headers:new Lr(s.headers),follow:s.follow,counter:s.counter+1,agent:s.agent,compress:s.compress,method:s.method,body:s.body,signal:s.signal,timeout:s.timeout,size:s.size};if(!function(e,t){const n=new ro(t).hostname,r=new ro(e).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(s.url,a)||(r=s.url,new ro(a).protocol!==new ro(r).protocol))for(const e of["authorization","www-authenticate","cookie","cookie2"])i.headers.delete(e);return 303!==e.statusCode&&s.body&&null===Or(s)?(o(new jr("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void b()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==s.method)||(i.method="GET",i.body=void 0,i.headers.delete("content-length")),n(io(new to(a,i))),void b())}}var r;e.once("end",(function(){l&&l.removeEventListener("abort",h)}));let i=e.pipe(new oo);const a={url:s.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:s.size,timeout:s.timeout,counter:s.counter},c=t.get("Content-Encoding");if(!s.compress||"HEAD"===s.method||null===c||204===e.statusCode||304===e.statusCode)return p=new Vr(i,a),void n(p);const u={flush:d.Z_SYNC_FLUSH,finishFlush:d.Z_SYNC_FLUSH};if("gzip"==c||"x-gzip"==c)return i=i.pipe(d.createGunzip(u)),p=new Vr(i,a),void n(p);if("deflate"==c||"x-deflate"==c){const t=e.pipe(new oo);return t.once("data",(function(e){i=8==(15&e[0])?i.pipe(d.createInflate()):i.pipe(d.createInflateRaw()),p=new Vr(i,a),n(p)})),void t.on("end",(function(){p||(p=new Vr(i,a),n(p))}))}if("br"==c&&"function"==typeof d.createBrotliDecompress)return i=i.pipe(d.createBrotliDecompress()),p=new Vr(i,a),void n(p);p=new Vr(i,a),n(p)})),function(e,t){const n=t.body;null===n?e.end():Ar(n)?n.stream().pipe(e):Buffer.isBuffer(n)?(e.write(n),e.end()):n.pipe(e)}(v,s)}))}function so(e,t){e.destroy?e.destroy(t):(e.emit("error",t),e.end())}io.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},io.Promise=global.Promise;var ao=function(){function e(e){this.contextProvider=e}return e.prototype.getServiceDetails=function(e,t){return U(this,void 0,void 0,(function(){return _(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 U(this,void 0,void 0,(function(){return _(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 U(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return _(this,(function(c){switch(c.label){case 0:return n="Error while trying to connect, please try again.",r=Yn({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},C({},t)),[4,Da(2)((function(){return U(a,void 0,void 0,(function(){return _(this,(function(t){return[2,io(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}(),co=function(e,t,n){return U(void 0,void 0,void 0,(function(){var r,o,i,s,a;return _(this,(function(c){switch(c.label){case 0:if(r=po(t||"127.0.0.1"),(o=po(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===l.platform()&&(i=function(e){return U(void 0,void 0,void 0,(function(){var t;return _(this,(function(n){switch(n.label){case 0:return t="lo0 alias ".concat(e," up"),[4,lo.apply(void 0,t.split(" "))];case 1:return n.sent(),[2]}}))}))}),s=r,c.label=1;case 1:return s<=o?(a=fo(s),[4,uo(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."))}}))}))},uo=function(e,t){return new Promise((function(n){var r=new h,o=!1;r.on("connect",(function(){o=!0,r.destroy()})),r.setTimeout(400),r.on("timeout",(function(){o=!1,r.destroy()})),r.on("error",(function(){o=!1})),r.on("close",(function(){n(!o)})),t?r.connect(e,t):r.connect(e)}))},lo=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return U(void 0,void 0,void 0,(function(){return _(this,(function(t){switch(t.label){case 0:return[4,ho("/sbin/ifconfig",e).resultPromise];case 1:return[2,t.sent()]}}))}))},po=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},fo=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(".")},ho=function(e,t,n){var r=v(e,t,C({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}},vo=function(e,t,n){return U(void 0,void 0,void 0,(function(){var r,o;return _(this,(function(i){switch(i.label){case 0:return r=mo(e,10),[4,b.promises.writeFile(r,t,n)];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,6]),[4,b.promises.rename(r,e)];case 3:return i.sent(),[3,6];case 4:return o=i.sent(),[4,b.promises.unlink(r).catch((function(){}))];case 5:throw i.sent(),o;case 6:return[2]}}))}))},mo=function(e,t){for(var n,r=g.dirname(e),o=g.basename(e),i=0;null===(n=i<t)||void 0===n||n;i+=1){var s=S([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),a=".".concat(s,".").concat(o),c=g.join(r,a);if(!b.existsSync(c))return c}throw new Error("Could not write file to file '".concat(e,"'."))},bo="win32"===process.platform?"\r\n":"\n",go=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;Co(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 Jn(this.findEntries(e),(function(e){return e.hosts.map((function(e){return e.host}))}))},e.prototype.resolveIps=function(e){return Co(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 jo(this.nodes,this.config.eol)},e.prototype.removeEntry=function(e){var t,n="number"==typeof(t=e)||F(t)&&"[object Number]"==L(t)?e:this.nodes.findIndex((function(t){return t===e}));n<0||this.nodes.splice(n,1)},e.prototype.findEntries=function(e){return Co(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=Io(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?[yo(),wo(o),r]:[wo(o),r];this.insertAt.apply(this,S([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,S([e,0],n,!1))},e.prototype.makeEntry=function(e,t){var n=this.config.ipPrefixWhitespace;return C({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=Co(t,"eol").map((function(e){return e.line}));return null!==(e=Uo(n))&&void 0!==e?e:bo}(),indent:null!==(o=null==n?void 0:n.indent)&&void 0!==o?o:function(){var e,n=Jn(Co(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=Uo(n))&&void 0!==e?e:17}(),ipPrefixWhitespace:""})},e.parse=function(e,t){return this.fromNodes(Ro(e),t)},e}(),yo=function(){return{type:"blank",line:""}},wo=function(e){return{type:"comment",line:Io(e)}},Io=function(e){return e.startsWith("#")?e:"# ".concat(e)},jo=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:bo)},Ro=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}:Eo(e)}))},Eo=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=Jn(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}},Co=function(e,t){return e.filter((function(e){return e.type===t}))},Uo=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=Vn(Array.from(t.entries()),(function(e){return e[1]}));if(n)return n[0]},_o="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",So=function(){function e(e){this.ast=go.fromNodes([]);var t={writeMode:"atomic",hostsFile:_o};this.config=C(C({},t),e)}return e.prototype.add=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!$n(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!$n(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(!$n(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach((function(e){if(!$n(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(!$n(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(!$n(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 U(this,void 0,void 0,(function(){var e;return _(this,(function(t){switch(t.label){case 0:return[4,b.promises.readFile(this.config.hostsFile)];case 1:return e=t.sent(),this.ast=go.parse(e.toString(),this.config),[2,this]}}))}))},e.prototype.write=function(e){return U(this,void 0,void 0,(function(){var t,n,r,o;return _(this,(function(i){switch(i.label){case 0:switch(t=C(C({},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,vo(n,o)];case 2:case 4:return i.sent(),[3,6];case 3:return[4,b.promises.writeFile(n,o)];case 5:return[3,6];case 6:return[2,this]}}))}))},e.prototype.backup=function(e){return U(this,void 0,void 0,(function(){var t,n,r,o;return _(this,(function(i){switch(i.label){case 0:return b.existsSync(this.config.hostsFile)?(t=g.dirname(this.config.hostsFile),n=g.basename(this.config.hostsFile),r="".concat(n).concat(e.suffix),o=g.resolve(t,r),b.existsSync(o)&&!e.rewrite?[3,2]:[4,b.promises.copyFile(this.config.hostsFile,o)]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))},e.load=function(t){return U(this,void 0,void 0,(function(){return _(this,(function(n){switch(n.label){case 0:return[4,new e(t).read()];case 1:return[2,n.sent()]}}))}))},e}(),Ao=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 U(this,void 0,void 0,(function(){var t,n=this;return _(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}(),Po=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 ko=Po(qo),Oo=Po(xo);function qo(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function xo(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}qo.proto=qo((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return qo(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return xo(this)},configurable:!0})})),ko.strict=Oo;var Do,To=function(){},No=function(e,t,n){if("function"==typeof t)return No(e,null,t);t||(t={}),n=ko(n||To);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)}},Bo=No;try{Do=b}catch(e){}var Lo=function(){},Fo=/^v?\.0/.test(process.version),Go=function(e){return"function"==typeof e},Mo=function(e,t,n,r){r=ko(r);var o=!1;e.on("close",(function(){o=!0})),Bo(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!!Fo&&!!Do&&(e instanceof(Do.ReadStream||Lo)||e instanceof(Do.WriteStream||Lo))&&Go(e.close)}(e)?e.close(Lo):function(e){return e.setHeader&&Go(e.abort)}(e)?e.abort():Go(e.destroy)?e.destroy():void r(t||new Error("stream was destroyed"))}},Jo=function(e){e()},zo=function(e,t){return e.pipe(t)},Wo=function(){var e,t=Array.prototype.slice.call(arguments),n=Go(t[t.length-1]||Lo)&&t.pop()||Lo;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 Mo(o,s,i>0,(function(t){e||(e=t),t&&r.forEach(Jo),s||(r.forEach(Jo),n(e))}))}));return t.reduce(zo)};const{Duplex:$o}=r;function Vo(e){e.emit("close")}function Ho(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Yo(e){this.removeListener("error",Yo),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}var Zo=function(e,t){let n=!0;const r=new $o({...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(Vo,r);let i=!1;e.once("error",(function(e){i=!0,o(e)})),e.once("close",(function(){i||o(t),process.nextTick(Vo,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",Ho),r.on("error",Yo),r};const Ko=["nodebuffer","arraybuffer","fragments"],Xo="undefined"!=typeof Blob;Xo&&Ko.push("blob");var Qo={BINARY_TYPES:Ko,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Xo,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},ei="function"==typeof __webpack_require__?__non_webpack_require__:Zn,ti=process.config&&process.config.variables||{},ni=!!process.env.PREBUILDS_ONLY,ri=process.versions.modules,oi=!(!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",ii=process.env.npm_config_arch||l.arch(),si=process.env.npm_config_platform||l.platform(),ai=process.env.LIBC||(function(e){return"linux"===e&&b.existsSync("/etc/alpine-release")}(si)?"musl":"glibc"),ci=process.env.ARM_VERSION||("arm64"===ii?"8":ti.arm_version)||"",ui=(process.versions.uv||"").split(".")[0],di=li;function li(e){return ei(li.resolve(e))}function pi(e){try{return b.readdirSync(e)}catch(e){return[]}}function fi(e,t){var n=pi(e).filter(t);return n[0]&&g.join(e,n[0])}function hi(e){return/\.node$/.test(e)}function vi(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 mi(e,t){return function(n){return null!=n&&(n.platform===e&&n.architectures.includes(t))}}function bi(e,t){return e.architectures.length-t.architectures.length}function gi(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 yi(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===ui)&&((!n.armv||n.armv===ci)&&(!n.libc||n.libc===ai)))))}}function wi(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}}li.resolve=li.path=function(e){e=g.resolve(e||".");try{var t=ei(g.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[t+"_PREBUILD"]&&(e=process.env[t+"_PREBUILD"])}catch(e){}if(!ni){var n=fi(g.join(e,"build/Release"),hi);if(n)return n;var r=fi(g.join(e,"build/Debug"),hi);if(r)return r}var o=a(e);if(o)return o;var i=a(g.dirname(process.execPath));if(i)return i;var s=["platform="+si,"arch="+ii,"runtime="+oi,"abi="+ri,"uv="+ui,ci?"armv="+ci:"","libc="+ai,"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=pi(g.join(e,"prebuilds")).map(vi).filter(mi(si,ii)).sort(bi)[0];if(t){var n=g.join(e,"prebuilds",t.name),r=pi(n).map(gi).filter(yi(oi,ri)).sort(wi(oi))[0];return r?g.join(n,r.file):void 0}}},li.parseTags=gi,li.matchTags=yi,li.compareTags=wi,li.parseTuple=vi,li.matchTuple=mi,li.compareTuples=bi;var Ii=Kn((function(e){const t="function"==typeof __webpack_require__?__non_webpack_require__:Zn;"function"==typeof t.addon?e.exports=t.addon.bind(t):e.exports=di}));var ji={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]}},Ri=Kn((function(e){try{e.exports=Ii(__dirname)}catch(t){e.exports=ji}})),Ei=Kn((function(e){const{EMPTY_BUFFER:t}=Qo,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=Ri;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){}}));Ei.concat,Ei.mask,Ei.toArrayBuffer,Ei.toBuffer,Ei.unmask;const Ci=Symbol("kDone"),Ui=Symbol("kRun");var _i=class{constructor(e){this[Ci]=()=>{this.pending--,this[Ui]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Ui]()}[Ui](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[Ci])}}};const{kStatusCode:Si}=Qo,Ai=Buffer[Symbol.species],Pi=Buffer.from([0,0,255,255]),ki=Symbol("permessage-deflate"),Oi=Symbol("total-length"),qi=Symbol("callback"),xi=Symbol("buffers"),Di=Symbol("error");let Ti;var Ni=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,!Ti){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;Ti=new _i(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[qi];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){Ti.add((r=>{this._decompress(e,t,((e,t)=>{r(),n(e,t)}))}))}compress(e,t,n){Ti.add((r=>{this._compress(e,t,((e,t)=>{r(),n(e,t)}))}))}_decompress(e,t,n){const r=this._isServer?"client":"server";if(!this._inflate){const e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?d.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=d.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[ki]=this,this._inflate[Oi]=0,this._inflate[xi]=[],this._inflate.on("error",Fi),this._inflate.on("data",Li)}this._inflate[qi]=n,this._inflate.write(e),t&&this._inflate.write(Pi),this._inflate.flush((()=>{const e=this._inflate[Di];if(e)return this._inflate.close(),this._inflate=null,void n(e);const o=Ei.concat(this._inflate[xi],this._inflate[Oi]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Oi]=0,this._inflate[xi]=[],t&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,o)}))}_compress(e,t,n){const r=this._isServer?"server":"client";if(!this._deflate){const e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?d.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=d.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[Oi]=0,this._deflate[xi]=[],this._deflate.on("data",Bi)}this._deflate[qi]=n,this._deflate.write(e),this._deflate.flush(d.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let e=Ei.concat(this._deflate[xi],this._deflate[Oi]);t&&(e=new Ai(e.buffer,e.byteOffset,e.length-4)),this._deflate[qi]=null,this._deflate[Oi]=0,this._deflate[xi]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,e)}))}};function Bi(e){this[xi].push(e),this[Oi]+=e.length}function Li(e){this[Oi]+=e.length,this[ki]._maxPayload<1||this[Oi]<=this[ki]._maxPayload?this[xi].push(e):(this[Di]=new RangeError("Max payload size exceeded"),this[Di].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[Di][Si]=1009,this.removeListener("data",Li),this.reset())}function Fi(e){this[ki]._inflate=null,e[Si]=1007,this[qi](e)}var Gi=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},Mi=Kn((function(e){try{e.exports=Ii(__dirname)}catch(t){e.exports=Gi}})),Ji=Kn((function(e){const{isUtf8:t}=y,{hasBlob:n}=Qo;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=Mi;e.exports.isValidUTF8=function(e){return e.length<32?r(e):t(e)}}catch(e){}}));Ji.isBlob,Ji.isValidStatusCode,Ji.isValidUTF8,Ji.tokenChars;const{Writable:zi}=r,{BINARY_TYPES:Wi,EMPTY_BUFFER:$i,kStatusCode:Vi,kWebSocket:Hi}=Qo,{concat:Yi,toArrayBuffer:Zi,unmask:Ki}=Ei,{isValidStatusCode:Xi,isValidUTF8:Qi}=Ji,es=Buffer[Symbol.species];var ts=class extends zi{constructor(e={}){super(),this._allowSynchronousEvents=void 0===e.allowSynchronousEvents||e.allowSynchronousEvents,this._binaryType=e.binaryType||Wi[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[Hi]=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 es(t.buffer,t.byteOffset+e,t.length-e),new es(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 es(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[Ni.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=$i;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]&&Ki(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[Ni.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?Yi(n,t):"arraybuffer"===this._binaryType?Zi(Yi(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=Yi(n,t);if(!this._skipUTF8Validation&&!Qi(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,$i),this.end();else{const n=e.readUInt16BE(0);if(!Xi(n)){const e=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");return void t(e)}const r=new es(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!Qi(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[Vi]=r,i}};const{randomFillSync:ns}=w,{EMPTY_BUFFER:rs,kWebSocket:os,NOOP:is}=Qo,{isBlob:ss,isValidStatusCode:as}=Ji,{mask:cs,toBuffer:us}=Ei,ds=Symbol("kByteLength"),ls=Buffer.alloc(4),ps=8192;let fs,hs=ps;class vs{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=is,this[os]=void 0}static frame(e,t){let n,r,o=!1,i=2,s=!1;t.mask&&(n=t.maskBuffer||ls,t.generateMask?t.generateMask(n):(hs===ps&&(void 0===fs&&(fs=Buffer.alloc(ps)),ns(fs,0,ps),hs=0),n[0]=fs[hs++],n[1]=fs[hs++],n[2]=fs[hs++],n[3]=fs[hs++]),s=!(n[0]|n[1]|n[2]|n[3]),i=6),"string"==typeof e?r=t.mask&&!s||void 0===t[ds]?(e=Buffer.from(e)).length:t[ds]:(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?(cs(e,n,c,i,r),[c]):(cs(e,n,e,0,r),[c,e])):[c,e]}close(e,t,n,r){let o;if(void 0===e)o=rs;else{if("number"!=typeof e||!as(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={[ds]: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(vs.frame(o,i),r)}ping(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):ss(e)?(r=e.size,o=!1):(r=(e=us(e)).length,o=us.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[ds]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};ss(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(vs.frame(e,i),n)}pong(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):ss(e)?(r=e.size,o=!1):(r=(e=us(e)).length,o=us.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[ds]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};ss(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(vs.frame(e,i),n)}send(e,t,n){const r=this._extensions[Ni.extensionName];let o,i,s=t.binary?2:1,a=t.compress;"string"==typeof e?(o=Buffer.byteLength(e),i=!1):ss(e)?(o=e.size,i=!1):(o=(e=us(e)).length,i=us.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={[ds]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:i,rsv1:a};ss(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[ds],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(bs,this,e,r)}this._bufferedBytes-=n[ds];const o=us(e);t?this.dispatch(o,t,n,r):(this._state=0,this.sendFrame(vs.frame(o,n),r),this.dequeue())})).catch((e=>{process.nextTick(gs,this,e,r)}))}dispatch(e,t,n,r){if(!t)return void this.sendFrame(vs.frame(e,n),r);const o=this._extensions[Ni.extensionName];this._bufferedBytes+=n[ds],this._state=1,o.compress(e,n.fin,((e,t)=>{if(this._socket.destroyed){bs(this,new Error("The socket was closed while data was being compressed"),r)}else this._bufferedBytes-=n[ds],this._state=0,n.readOnly=!1,this.sendFrame(vs.frame(t,n),r),this.dequeue()}))}dequeue(){for(;0===this._state&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[3][ds],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][ds],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 ms=vs;function bs(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 gs(e,t,n){bs(e,t,n),e.onerror(t)}const{kForOnEventAttribute:ys,kListener:ws}=Qo,Is=Symbol("kCode"),js=Symbol("kData"),Rs=Symbol("kError"),Es=Symbol("kMessage"),Cs=Symbol("kReason"),Us=Symbol("kTarget"),_s=Symbol("kType"),Ss=Symbol("kWasClean");class As{constructor(e){this[Us]=null,this[_s]=e}get target(){return this[Us]}get type(){return this[_s]}}Object.defineProperty(As.prototype,"target",{enumerable:!0}),Object.defineProperty(As.prototype,"type",{enumerable:!0});class Ps extends As{constructor(e,t={}){super(e),this[Is]=void 0===t.code?0:t.code,this[Cs]=void 0===t.reason?"":t.reason,this[Ss]=void 0!==t.wasClean&&t.wasClean}get code(){return this[Is]}get reason(){return this[Cs]}get wasClean(){return this[Ss]}}Object.defineProperty(Ps.prototype,"code",{enumerable:!0}),Object.defineProperty(Ps.prototype,"reason",{enumerable:!0}),Object.defineProperty(Ps.prototype,"wasClean",{enumerable:!0});class ks extends As{constructor(e,t={}){super(e),this[Rs]=void 0===t.error?null:t.error,this[Es]=void 0===t.message?"":t.message}get error(){return this[Rs]}get message(){return this[Es]}}Object.defineProperty(ks.prototype,"error",{enumerable:!0}),Object.defineProperty(ks.prototype,"message",{enumerable:!0});class Os extends As{constructor(e,t={}){super(e),this[js]=void 0===t.data?null:t.data}get data(){return this[js]}}Object.defineProperty(Os.prototype,"data",{enumerable:!0});const qs={addEventListener(e,t,n={}){for(const r of this.listeners(e))if(!n[ys]&&r[ws]===t&&!r[ys])return;let r;if("message"===e)r=function(e,n){const r=new Os("message",{data:n?e:e.toString()});r[Us]=this,Ds(t,this,r)};else if("close"===e)r=function(e,n){const r=new Ps("close",{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[Us]=this,Ds(t,this,r)};else if("error"===e)r=function(e){const n=new ks("error",{error:e,message:e.message});n[Us]=this,Ds(t,this,n)};else{if("open"!==e)return;r=function(){const e=new As("open");e[Us]=this,Ds(t,this,e)}}r[ys]=!!n[ys],r[ws]=t,n.once?this.once(e,r):this.on(e,r)},removeEventListener(e,t){for(const n of this.listeners(e))if(n[ws]===t&&!n[ys]){this.removeListener(e,n);break}}};var xs={CloseEvent:Ps,ErrorEvent:ks,Event:As,EventTarget:qs,MessageEvent:Os};function Ds(e,t,n){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}const{tokenChars:Ts}=Ji;function Ns(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var Bs={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===Ts[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?(Ns(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===Ts[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),Ns(o,e.slice(c,d),!0),44===u&&(Ns(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!==Ts[u])throw new SyntaxError(`Unexpected character at index ${l}`);-1===c?c=l:i||(i=!0),s=!1}else if(a)if(1===Ts[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===Ts[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),Ns(o,r,s),44===u&&(Ns(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?Ns(t,p,o):(void 0===r?Ns(o,p,!0):Ns(o,r,i?p.replace(/\\/g,""):p),Ns(t,n,o)),t}};const{randomBytes:Ls,createHash:Fs}=w,{URL:Gs}=s,{isBlob:Ms}=Ji,{BINARY_TYPES:Js,EMPTY_BUFFER:zs,GUID:Ws,kForOnEventAttribute:$s,kListener:Vs,kStatusCode:Hs,kWebSocket:Ys,NOOP:Zs}=Qo,{EventTarget:{addEventListener:Ks,removeEventListener:Xs}}=xs,{format:Qs,parse:ea}=Bs,{toBuffer:ta}=Ei,na=Symbol("kAborted"),ra=[8,13],oa=["CONNECTING","OPEN","CLOSING","CLOSED"],ia=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class sa extends e{constructor(e,t,n){super(),this._binaryType=Js[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=zs,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=sa.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==e?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===t?t=[]:Array.isArray(t)||("object"==typeof t&&null!==t?(n=t,t=[]):t=[t]),ca(this,e,t,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){Js.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 ts({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation}),o=new ms(e,this._extensions,n.generateMask);this._receiver=r,this._sender=o,this._socket=e,r[Ys]=this,o[Ys]=this,e[Ys]=this,r.on("conclude",ha),r.on("drain",va),r.on("error",ma),r.on("message",ga),r.on("ping",ya),r.on("pong",wa),o.onerror=ja,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",Ea),e.on("data",Ca),e.on("end",Ua),e.on("error",_a),this._readyState=sa.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=sa.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[Ni.extensionName]&&this._extensions[Ni.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=sa.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==sa.CLOSED)if(this.readyState!==sa.CONNECTING)this.readyState!==sa.CLOSING?(this._readyState=sa.CLOSING,this._sender.close(e,t,!this._isServer,(e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),Ra(this)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();else{const e="WebSocket was closed before the connection was established";pa(this,this._req,e)}}pause(){this.readyState!==sa.CONNECTING&&this.readyState!==sa.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===sa.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===sa.OPEN?(void 0===t&&(t=!this._isServer),this._sender.ping(e||zs,t,n)):fa(this,e,n)}pong(e,t,n){if(this.readyState===sa.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===sa.OPEN?(void 0===t&&(t=!this._isServer),this._sender.pong(e||zs,t,n)):fa(this,e,n)}resume(){this.readyState!==sa.CONNECTING&&this.readyState!==sa.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===sa.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!==sa.OPEN)return void fa(this,e,n);const r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[Ni.extensionName]||(r.compress=!1),this._sender.send(e||zs,r,n)}terminate(){if(this.readyState!==sa.CLOSED)if(this.readyState!==sa.CONNECTING)this._socket&&(this._readyState=sa.CLOSING,this._socket.destroy());else{const e="WebSocket was closed before the connection was established";pa(this,this._req,e)}}}Object.defineProperty(sa,"CONNECTING",{enumerable:!0,value:oa.indexOf("CONNECTING")}),Object.defineProperty(sa.prototype,"CONNECTING",{enumerable:!0,value:oa.indexOf("CONNECTING")}),Object.defineProperty(sa,"OPEN",{enumerable:!0,value:oa.indexOf("OPEN")}),Object.defineProperty(sa.prototype,"OPEN",{enumerable:!0,value:oa.indexOf("OPEN")}),Object.defineProperty(sa,"CLOSING",{enumerable:!0,value:oa.indexOf("CLOSING")}),Object.defineProperty(sa.prototype,"CLOSING",{enumerable:!0,value:oa.indexOf("CLOSING")}),Object.defineProperty(sa,"CLOSED",{enumerable:!0,value:oa.indexOf("CLOSED")}),Object.defineProperty(sa.prototype,"CLOSED",{enumerable:!0,value:oa.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((e=>{Object.defineProperty(sa.prototype,e,{enumerable:!0})})),["open","error","close","message"].forEach((e=>{Object.defineProperty(sa.prototype,`on${e}`,{enumerable:!0,get(){for(const t of this.listeners(e))if(t[$s])return t[Vs];return null},set(t){for(const t of this.listeners(e))if(t[$s]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[$s]:!0})}})})),sa.prototype.addEventListener=Ks,sa.prototype.removeEventListener=Xs;var aa=sa;function ca(e,t,n,r){const o={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:ra[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,!ra.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${ra.join(", ")})`);let s;if(t instanceof Gs)s=t;else try{s=new Gs(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}"http:"===s.protocol?s.protocol="ws:":"https:"===s.protocol&&(s.protocol="wss:"),e._url=s.href;const a="wss:"===s.protocol,c="ws+unix:"===s.protocol;let d;if("ws:"===s.protocol||a||c?c&&!s.pathname?d="The URL's pathname is empty":s.hash&&(d="The URL contains a fragment identifier"):d='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"',d){const t=new SyntaxError(d);if(0===e._redirects)throw t;return void ua(e,t)}const l=a?443:80,p=Ls(16).toString("base64"),f=a?u.request:i.request,h=new Set;let v,m;if(o.createConnection=o.createConnection||(a?la:da),o.defaultPort=o.defaultPort||l,o.port=s.port||l,o.host=s.hostname.startsWith("[")?s.hostname.slice(1,-1):s.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":p,Connection:"Upgrade",Upgrade:"websocket"},o.path=s.pathname+s.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(v=new Ni(!0!==o.perMessageDeflate?o.perMessageDeflate:{},!1,o.maxPayload),o.headers["Sec-WebSocket-Extensions"]=Qs({[Ni.extensionName]:v.offer()})),n.length){for(const e of n){if("string"!=typeof e||!ia.test(e)||h.has(e))throw new SyntaxError("An invalid or duplicated subprotocol was specified");h.add(e)}o.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(o.origin&&(o.protocolVersion<13?o.headers["Sec-WebSocket-Origin"]=o.origin:o.headers.Origin=o.origin),(s.username||s.password)&&(o.auth=`${s.username}:${s.password}`),c){const e=o.path.split(":");o.socketPath=e[0],o.path=e[1]}if(o.followRedirects){if(0===e._redirects){e._originalIpc=c,e._originalSecure=a,e._originalHostOrSocketPath=c?o.socketPath:s.host;const t=r&&r.headers;if(r={...r,headers:{}},t)for(const[e,n]of Object.entries(t))r.headers[e.toLowerCase()]=n}else if(0===e.listenerCount("redirect")){const t=c?!!e._originalIpc&&o.socketPath===e._originalHostOrSocketPath:!e._originalIpc&&s.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!a)&&(delete o.headers.authorization,delete o.headers.cookie,t||delete o.headers.host,o.auth=void 0)}o.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(o.auth).toString("base64")),m=e._req=f(o),e._redirects&&e.emit("redirect",e.url,m)}else m=e._req=f(o);o.timeout&&m.on("timeout",(()=>{pa(e,m,"Opening handshake has timed out")})),m.on("error",(t=>{null===m||m[na]||(m=e._req=null,ua(e,t))})),m.on("response",(i=>{const s=i.headers.location,a=i.statusCode;if(s&&o.followRedirects&&a>=300&&a<400){if(++e._redirects>o.maxRedirects)return void pa(e,m,"Maximum redirects exceeded");let i;m.abort();try{i=new Gs(s,t)}catch(t){const n=new SyntaxError(`Invalid URL: ${s}`);return void ua(e,n)}ca(e,i,n,r)}else e.emit("unexpected-response",m,i)||pa(e,m,`Unexpected server response: ${i.statusCode}`)})),m.on("upgrade",((t,n,r)=>{if(e.emit("upgrade",t),e.readyState!==sa.CONNECTING)return;m=e._req=null;const i=t.headers.upgrade;if(void 0===i||"websocket"!==i.toLowerCase())return void pa(e,n,"Invalid Upgrade header");const s=Fs("sha1").update(p+Ws).digest("base64");if(t.headers["sec-websocket-accept"]!==s)return void pa(e,n,"Invalid Sec-WebSocket-Accept header");const a=t.headers["sec-websocket-protocol"];let c;if(void 0!==a?h.size?h.has(a)||(c="Server sent an invalid subprotocol"):c="Server sent a subprotocol but none was requested":h.size&&(c="Server sent no subprotocol"),c)return void pa(e,n,c);a&&(e._protocol=a);const u=t.headers["sec-websocket-extensions"];if(void 0!==u){if(!v){return void pa(e,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let t;try{t=ea(u)}catch(t){return void pa(e,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(t);if(1!==r.length||r[0]!==Ni.extensionName){return void pa(e,n,"Server indicated an extension that was not requested")}try{v.accept(t[Ni.extensionName])}catch(t){return void pa(e,n,"Invalid Sec-WebSocket-Extensions header")}e._extensions[Ni.extensionName]=v}e.setSocket(n,r,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})})),o.finishRequest?o.finishRequest(m,e):m.end()}function ua(e,t){e._readyState=sa.CLOSING,e._errorEmitted=!0,e.emit("error",t),e.emitClose()}function da(e){return e.path=e.socketPath,f.connect(e)}function la(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=f.isIP(e.host)?"":e.host),I.connect(e)}function pa(e,t,n){e._readyState=sa.CLOSING;const r=new Error(n);Error.captureStackTrace(r,pa),t.setHeader?(t[na]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(ua,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function fa(e,t,n){if(t){const n=Ms(t)?t.size:ta(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){const t=new Error(`WebSocket is not open: readyState ${e.readyState} (${oa[e.readyState]})`);process.nextTick(n,t)}}function ha(e,t){const n=this[Ys];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,void 0!==n._socket[Ys]&&(n._socket.removeListener("data",Ca),process.nextTick(Ia,n._socket),1005===e?n.close():n.close(e,t))}function va(){const e=this[Ys];e.isPaused||e._socket.resume()}function ma(e){const t=this[Ys];void 0!==t._socket[Ys]&&(t._socket.removeListener("data",Ca),process.nextTick(Ia,t._socket),t.close(e[Hs])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e))}function ba(){this[Ys].emitClose()}function ga(e,t){this[Ys].emit("message",e,t)}function ya(e){const t=this[Ys];t._autoPong&&t.pong(e,!this._isServer,Zs),t.emit("ping",e)}function wa(e){this[Ys].emit("pong",e)}function Ia(e){e.resume()}function ja(e){const t=this[Ys];t.readyState!==sa.CLOSED&&(t.readyState===sa.OPEN&&(t._readyState=sa.CLOSING,Ra(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e)))}function Ra(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),3e4)}function Ea(){const e=this[Ys];let t;this.removeListener("close",Ea),this.removeListener("data",Ca),this.removeListener("end",Ua),e._readyState=sa.CLOSING,this._readableState.endEmitted||e._closeFrameReceived||e._receiver._writableState.errorEmitted||null===(t=e._socket.read())||e._receiver.write(t),e._receiver.end(),this[Ys]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",ba),e._receiver.on("finish",ba))}function Ca(e){this[Ys]._receiver.write(e)||this.pause()}function Ua(){const e=this[Ys];e._readyState=sa.CLOSING,e._receiver.end(),this.end()}function _a(){const e=this[Ys];this.removeListener("error",_a),this.on("error",Zs),e&&(e._readyState=sa.CLOSING,this.destroy())}var Sa=function(e){function t(t,n,r,o,i){void 0===i&&(i=5e3);var s=e.call(this)||this;s.endpoint=t,s.headers=n,s.rewriteHostHeader=r,s.bindToAssign=o,s.closeTimeout=i,s.protocol="TCP",s.openConnections=new Set,s.tcpServer=p.createServer(s.handleConnection.bind(s));var a=null==r?void 0:r.altHostnames.map((function(e){return(t=jt(t=e))&&Gn.test(t)?t.replace(Fn,"\\$&"):t;var t})).join("|");return s.hostRegex=new RegExp("Host: (?:".concat(a,")(:.*$|$)"),"im"),s}return E(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 U(this,void 0,void 0,(function(){var e=this;return _(this,(function(t){return[2,new Promise((function(t){if(e.bindToAssign){var n=e.bindToAssign,r=n.port,o=n.address;e.tcpServer.listen(r,o,(function(){e.emit("tunnel-open",{address:o,port:r}),t({address:o,port:r})}))}else e.tcpServer.listen(0,(function(){var n=e.tcpServer.address(),r=n.address,o=n.port,i="0.0.0.0"===r||"::"===r?"127.0.0.1":r;e.boundTo={address:i,port:o},e.emit("tunnel-open",e.boundTo),t(e.boundTo)}))}))]}))}))},t.prototype.close=function(){return U(this,void 0,void 0,(function(){var e,t=this;return _(this,(function(n){switch(n.label){case 0:return e=!1,[4,Promise.race([new Promise((function(n){t.tcpServer.close((function(){e=!0,t.emit("tunnel-close"),n()}))})),new Promise((function(n){new Promise((function(e){return setTimeout(e,t.closeTimeout)})).then((function(){e||(t.openConnections.forEach((function(e){e.destroy(),t.openConnections.delete(e)})),n())}))}))])];case 1:return n.sent(),[2]}}))}))},t.prototype.handleConnection=function(e){var t=this;this.openConnections.add(e);var n=new aa(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Zo(n),o=this.getHeaderTransform();this.rewriteHostHeader&&o?Wo(e,o,r):Wo(e,r),Wo(r,e),n.on("close",(function(e,n,r){t.emit("connection-close",e,n,r)})),r.on("error",(function(e){t.emit("connection-error",e)})),e.on("error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},t.prototype.getHeaderTransform=function(){if(this.rewriteHostHeader){var e=this.rewriteHostHeader.targetHostname,t=this.hostRegex;return new o({transform:function(n,r,o){var i=n.toString();if(i.split("\n",1)[0].includes("HTTP")){var s=i.replace(t,"Host: ".concat(e));o(null,Buffer.from(s))}else o(null,n)}})}},t}(t),Aa=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=j.createSocket("udp4"),o.handleConnection(),o}return E(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 U(this,void 0,void 0,(function(){var e=this;return _(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 U(this,void 0,void 0,(function(){var e=this;return _(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 aa(this.endpoint.replace("https:","wss:"),{headers:this.headers}),r=Zo(n);this.udpSocket.on("message",(function(t,n){e=n,r.write(t)})),r.on("data",(function(n){e&&t.udpSocket.send(n,e.port,e.address,(function(e){e&&t.emit("connection-error",e)}))})),this.udpSocket.on("error",(function(e){t.emit("connection-error",e)})),r.on("error",(function(e){t.emit("connection-error",e)})),n.on("connection-close",(function(e,n,r){t.emit("connection-close",e,n,r)})),n.on("connection-error",(function(e){t.emit("connection-error",e)})),this.emit("connection-accept")},t}(t);var Pa,ka="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,Oa=function(e,t){return U(void 0,void 0,void 0,(function(){var n;return _(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)]}))}))},qa=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 E(t,e),Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.getContentsAsString=function(e,t){void 0===e&&(e="utf8");var n=this.buffer.toString(e,0,Math.min(t||this.size,this.size)),r=Buffer.byteLength(n);return r<this.size&&this.buffer.copy(this.buffer,0,r),this._size-=r,n},t.prototype.adaptBuffer=function(e){if(this.buffer.length-this.size<e){var t=Math.ceil((e-(this.buffer.length-this.size))/this.bufferDefaultSize),n=Buffer.alloc(this.buffer.length+this.bufferDefaultSize*t);this.buffer.copy(n,0,0,this.size),this.buffer=n}},t.prototype._write=function(e,t,n){this.adaptBuffer(e.length),e.copy(this.buffer,this.size,0),this._size+=e.length,n()},t}(r.Writable),xa=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 Ao,o.ipAllocationMutex=new Ao,o.stopForwarding=function(e){return U(o,void 0,void 0,(function(){var t,n,r,o,i,s,a;return _(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 m("fsutil dirty query %systemdrive%"),!0}catch(e){if("ENOENT"===e.code)try{return m("fltmc"),!0}catch(e){return!1}return!1}}()?{error:!1,type:"windows-admin"}:{error:!0,message:"You are not running this command as administrator. Please start command line with admin rights."};var e},o.assertStartedWithNodejs=function(){if(!ka)throw new Error("Port forwarding only possible when started with nodejs")},o.proxyApiClient=new ao(t),o}return E(t,e),t.prototype.withProjectForwarding=function(e,t,n){return void 0===n&&(n=!0),U(this,void 0,void 0,(function(){var r;return _(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),U(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return _(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 U(a,void 0,void 0,(function(){return _(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 U(a,void 0,void 0,(function(){return _(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),U(this,void 0,void 0,(function(){var r;return _(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),U(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,u=this;return _(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,Oa(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=S([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),U(this,void 0,void 0,(function(){var r;return _(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),U(this,void 0,void 0,(function(){var n,r,o,i,s=this;return _(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,Oa((c=i,null!=c&&c.length?At(c,zn):[]),(function(e){var i=e.podName,a=e.internalHostname,c=e.port;return U(s,void 0,void 0,(function(){var e;return _(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 U(this,void 0,void 0,(function(){var t=this;return _(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,co(e,r,n)];case 1:return o=s.sent(),this.nextIpAddress=fo(po(o)+1),po(this.nextIpAddress)>po(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),U(this,void 0,void 0,(function(){var u,d,l,p,f,h,v=this;return _(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 Aa(e,u,l):new Sa(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 U(v,void 0,void 0,(function(){return _(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 U(this,void 0,void 0,(function(){var s,a,c;return _(this,(function(u){switch(u.label){case 0:return i&&"darwin"===l.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 U(this,void 0,void 0,(function(){return _(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.removeHosts.apply(n,t),n.add.apply(n,S([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.unregisterHostnames=function(e,t){return U(this,void 0,void 0,(function(){return _(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.remove.apply(n,S([e],t,!1))}))];case 1:return n.sent(),[2]}}))}))},t.prototype.modifyHostsFile=function(e){return U(this,void 0,void 0,(function(){var t=this;return _(this,(function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter((function(){return U(t,void 0,void 0,(function(){var t,n=this;return _(this,(function(r){switch(r.label){case 0:return[4,So.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,Da(5)((function(){return U(n,void 0,void 0,(function(){return _(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,Da(5)((function(){return U(n,void 0,void 0,(function(){return _(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 U(this,void 0,void 0,(function(){var t=this;return _(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 U(this,void 0,void 0,(function(){var t=this;return _(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 U(this,void 0,void 0,(function(){var t=this;return _(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 U(this,void 0,void 0,(function(){var e=this;return _(this,(function(t){switch(t.label){case 0:return[4,Promise.all(this.connections.map((function(t){return U(e,void 0,void 0,(function(){return _(this,(function(e){return[2,this.stopForwarding(t)]}))}))})))];case 1:return t.sent(),[2]}}))}))},t}(t),Da=function(e,t){return void 0===t&&(t=50),function(n){var r=e,o=function(){return U(void 0,void 0,void 0,(function(){var e;return _(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()}},Ta=function(e){function t(t,r,o,i,s,a){void 0===i&&(i=new n.PassThrough),void 0===s&&(s=new n.PassThrough),void 0===a&&(a=new n.PassThrough);var c=e.call(this)||this;return c.baseUrl=t,c.execConfig=r,c.token=o,c.stdOut=i,c.stdErr=s,c.stdIn=a,c.waitForCommandResult=function(){return U(c,void 0,void 0,(function(){return _(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()]}}))}))},c.sendInputToCurrentCommand=function(e){return U(c,void 0,void 0,(function(){var t;return _(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]}))}))},c.resizeTerminal=function(e){return U(c,void 0,void 0,(function(){var t;return _(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]}))}))},c.constructPayloadPacket=function(e){return JSON.stringify({type:"payload",data:e.toString()})},c}return E(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 U(this,void 0,void 0,(function(){var e=this;return _(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 aa(a);try{e.duplex=Zo(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}(t),Na=function(){function e(e){this.contextProvider=e,this.assertStartedWithNodejs=function(){if(!ka)throw new Error("Command exec only possible when started with nodejs")}}return e.prototype.execServiceCommand=function(e,t){return U(this,void 0,void 0,(function(){var n,r,o;return _(this,(function(i){return n=e.serviceId,r=e.projectId,o=C({projectId:r,entityId:n,entityType:"service"},t),[2,this.execCommand(o)]}))}))},e.prototype.execServiceSession=function(e,t){return U(this,void 0,void 0,(function(){var n,r,o;return _(this,(function(i){return n=e.serviceId,r=e.projectId,o=C({projectId:r,entityId:n,entityType:"service"},t),[2,this.shellSession(o)]}))}))},e.prototype.execJobCommand=function(e,t){return U(this,void 0,void 0,(function(){var n,r,o;return _(this,(function(i){return n=e.jobId,r=e.projectId,o=C({projectId:r,entityId:n,entityType:"job"},t),[2,this.execCommand(o)]}))}))},e.prototype.execJobSession=function(e,t){return U(this,void 0,void 0,(function(){var n,r,o;return _(this,(function(i){return n=e.jobId,r=e.projectId,o=C({projectId:r,entityId:n,entityType:"job"},t),[2,this.shellSession(o)]}))}))},e.prototype.execCommand=function(e){return U(this,void 0,void 0,(function(){var t,n,r;return _(this,(function(o){switch(o.label){case 0:return this.assertStartedWithNodejs(),t=this.getCommandRunner(C({shell:"none"},e)),n=new qa,r=new qa,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 Ta(t,e,n)},e}(),Ba=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 E(t,e),t}(Error),La=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 U(o,void 0,void 0,(function(){var e;return _(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 E(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,"/"),R=new URLSearchParams;return R.append("queryType",f),void 0!==h&&R.append("startTime",h.toISOString()),void 0!==v&&R.append("endTime",v.toISOString()),void 0!==l&&R.append("lineLimit",l.toString()),void 0!==t&&R.append("containerName",t),void 0!==u&&R.append("deploymentId",u),void 0!==s&&R.append("runId",s),void 0!==i&&R.append("buildId",i),void 0!==g&&R.append("textIncludes",g),void 0!==y&&R.append("textNotIncludes",y),void 0!==w&&R.append("regexIncludes",w),void 0!==I&&R.append("regexNotIncludes",I),void 0!==b&&R.append("direction",b),void 0!==m&&R.append("duration",m.toString()),void 0!==n&&n.forEach((function(e){return R.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(R.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 U(this,void 0,void 0,(function(){var e=this;return _(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 aa(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(Ka));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}(t),Fa=ka?io:window.fetch,Ga=function(){if(ka)try{return JSON.parse(b.readFileSync(g.join(g.dirname(a(import.meta.url)),"../../package.json")).toString())}catch(e){return console.log("Failed to check version of northflank CLI (".concat(e.message,")")),{}}return{}},Ma=function(){function e(e,t){var n=this;this.opts=t,this.call=function(e){return U(n,void 0,void 0,(function(){var t,n,r,o,i,s,a,c,u,d,l,p,f=this;return _(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=C(C({url:o},n),{body:i}),[4,Ha(o,C(C({},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 Ba(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=Ga())||void 0===t?void 0:t.version).concat(r)}},e}(),Ja=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="get",t.body=function(){},t}return E(t,e),t}(Ma),za=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="post",t}return E(t,e),t}(Ma),Wa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="delete",t.body=function(){},t}return E(t,e),t}(Ma),$a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="put",t}return E(t,e),t}(Ma),Va=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="patch",t}return E(t,e),t}(Ma),Ha=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 Fa(e,t).then((function(e){o(e)})).catch((function(e){return U(void 0,void 0,void 0,(function(){return _(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)}))},Ya=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 La.getLogsEndpoint(e)},t.body=function(){},t}return E(t,e),t}(Ja);!function(e){e.CDN="cdn",e.Mesh="mesh",e.Ingress="ingress",e.Runtime="runtime"}(Pa||(Pa={}));var Za,Ka=function(e){return{containerId:e.containerId,log:e.log,ts:new Date(e.ts)}},Xa=function(e){var t=this;this.contextProvider=e,this.getServiceLogs=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,C(C({},n),{isBuild:!0}),"service")]}))}))},this.getJobLogs=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,C(C({},n),{isBuild:!0}),"job")]}))}))},this.getAddonLogs=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r;return _(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logRange(r,C(C({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.getAddonRestoresLogs=function(e){return U(t,void 0,void 0,(function(){var t,n,r,o;return _(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,C(C({},n),o),"addonRestore")]}))}))},this.logRange=function(e,n,r){return U(t,void 0,void 0,(function(){var t,o,i,s,a;return _(this,(function(c){switch(c.label){case 0:return t=e.entityId,o=e.projectId,i=C(C({projectId:o,entityId:t,entityType:r},n),{queryType:"range"}),[4,new Ya(this.contextProvider,{}).call(i)];case 1:return(s=c.sent()).error?[2,s]:[2,C(C({},s),{data:null===(a=null==s?void 0:s.data)||void 0===a?void 0:a.map(Ka)})]}}))}))},this.tailServiceLogs=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,C(C({},n),{isBuild:!0}),"service")]}))}))},this.tailJobLogs=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,C(C({},n),{isBuild:!0}),"job")]}))}))},this.tailAddonLogs=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r;return _(this,(function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logTail(r,C(C({},n),{backupId:t.backupId}),"addonBackup")]}))}))},this.tailAddonRestoresLogs=function(e){return U(t,void 0,void 0,(function(){var t,n,r,o;return _(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,C(C({},n),o),"addonRestore")]}))}))},this.logTail=function(e,n,r){return U(t,void 0,void 0,(function(){var t,o,i,s,a;return _(this,(function(c){if(t=e.entityId,o=e.projectId,i=C({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 La(s,i,a)]}))}))},this.assertStartedWithNodejs=function(){if(!ka)throw new Error("Command exec only possible when started with nodejs")}},Qa=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 E(t,e),t}(Ja),ec=function(e){return{metadata:e.metadata,data:e.data.map((function(e){return{value:e.value,ts:new Date(e.ts)}}))}};!function(e){e.Cpu="cpu",e.Memory="memory",e.NetworkIngress="networkIngress",e.NetworkEgress="networkEgress",e.TcpConnectionOpen="tcpConnectionsOpen",e.PvcUsage="diskUsage",e.Requests="requests",e.Http4xxResponses="http4xxResponses",e.Http5xxResponses="http5xxResponses",e.Bandwidth="bandwidth",e.BandwidthVolume="bandwidthVolume"}(Za||(Za={}));var tc=function(e){var t=this;this.contextProvider=e,this.getServiceMetrics=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,C(C({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetrics=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,C(C({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetrics=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,o,i;return _(this,(function(s){return t=e.entityId,o=e.projectId,i=C(C({projectId:o,entityId:t,entityType:r},n),{queryType:"single"}),[2,this.getMetrics(i)]}))}))},this.getServiceMetricsRange=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,C(C({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetricsRange=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,n,r,o,i;return _(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,C(C({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetricsRange=function(e){return U(t,void 0,void 0,(function(){var t,n,r;return _(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 U(t,void 0,void 0,(function(){var t,o,i;return _(this,(function(s){return t=e.entityId,o=e.projectId,i=C(C({projectId:o,entityId:t,entityType:r},n),{queryType:"range"}),[2,this.getMetrics(i)]}))}))},this.getMetrics=function(e){return U(t,void 0,void 0,(function(){var t;return _(this,(function(n){switch(n.label){case 0:return[4,new Qa(this.contextProvider,{}).call(e)];case 1:return(t=n.sent()).error?[2,t]:[2,C(C({},t),{data:Object.fromEntries(Object.entries(t.data).map((function(e){var t=e[0],n=e[1];return[t,C(C({},n),{values:n.values.map(ec)})]})))})]}}))}))}},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 E(t,e),t}(Ja),rc=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 E(t,e),t}(Ja),oc=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 E(t,e),t}(Ja),ic=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 E(t,e),t}(Ja),sc=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 E(t,e),t}(Ja),ac=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 E(t,e),t}(za),cc=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 E(t,e),t}(Ja),uc=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 E(t,e),t}(za),dc=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 E(t,e),t}(Wa),lc=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 E(t,e),t}(Ja),pc=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 E(t,e),t}(za),fc=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 E(t,e),t}(za),hc=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 E(t,e),t}(za),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 E(t,e),t}(Ja),mc=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 E(t,e),t}(za),bc=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 E(t,e),t}(Ja),gc=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 E(t,e),t}(Wa),yc=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 E(t,e),t}(Ja),wc=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 E(t,e),t}(za),Ic=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 E(t,e),t}(Ja),jc=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 E(t,e),t}(za),Rc=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 E(t,e),t}(Wa),Ec=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 E(t,e),t}(Ja),Cc=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 E(t,e),t}(Ja),Uc=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 E(t,e),t}(Ja),_c=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 E(t,e),t}(Ja),Sc=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 E(t,e),t}(za),Ac=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 E(t,e),t}(Ja),Pc=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 E(t,e),t}(Wa),kc=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 E(t,e),t}(Ja),Oc=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 E(t,e),t}(za),qc=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 E(t,e),t}(za),xc=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 E(t,e),t}(Ja),Dc=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 E(t,e),t}(Wa),Tc=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 E(t,e),t}(za),Nc=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 E(t,e),t}(Wa),Bc=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 E(t,e),t}(za),Lc=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 E(t,e),t}(za),Fc=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 E(t,e),t}(za),Gc=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 E(t,e),t}(Ja),Mc=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 E(t,e),t}(Ja),Jc=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 E(t,e),t}(Wa),zc=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 E(t,e),t}(za),Wc=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 E(t,e),t}(za),$c=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 E(t,e),t}(Wa),Vc=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 E(t,e),t}(za),Hc=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 E(t,e),t}(za),Yc=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 E(t,e),t}(Ja),Zc=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 E(t,e),t}(za),Kc=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 E(t,e),t}(Ja),Xc=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 E(t,e),t}(Wa),Qc=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 E(t,e),t}(za),eu=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 E(t,e),t}(za),tu=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 E(t,e),t}(za),nu=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 E(t,e),t}(Ja),ru=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 E(t,e),t}(za),ou=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 E(t,e),t}(Ja),iu=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 E(t,e),t}(za),su=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 E(t,e),t}(Wa),au=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 E(t,e),t}(Ja),cu=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 E(t,e),t}(za),uu=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 E(t,e),t}(Ja),du=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 E(t,e),t}(Wa),lu=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 E(t,e),t}(za),pu=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 E(t,e),t}(Ja),fu=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 E(t,e),t}(za),hu=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 E(t,e),t}(Ja),vu=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 E(t,e),t}(Ja),mu=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 E(t,e),t}(Ja),bu=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 E(t,e),t}(Ja),gu=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 E(t,e),t}(za),yu=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 E(t,e),t}($a),wu=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 E(t,e),t}(Va),Iu=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 E(t,e),t}(Ja),ju=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 E(t,e),t}(Wa),Ru=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 E(t,e),t}(Ja),Eu=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 E(t,e),t}(za),Cu=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 E(t,e),t}($a),Uu=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 E(t,e),t}(Ja),_u=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 E(t,e),t}(Va),Su=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 E(t,e),t}(Wa),Au=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 E(t,e),t}(Ja),Pu=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 E(t,e),t}(za),ku=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 E(t,e),t}(Wa),Ou=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 E(t,e),t}(Ja),qu=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 E(t,e),t}(za),xu=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 E(t,e),t}(Ja),Du=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 E(t,e),t}(Wa),Tu=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 E(t,e),t}(za),Nu=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 E(t,e),t}(za),Bu=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 E(t,e),t}(Ja),Lu=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 E(t,e),t}(za),Fu=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 E(t,e),t}(Ja),Gu=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 E(t,e),t}(za),Mu=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 E(t,e),t}(Ja),Ju=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 E(t,e),t}(Ja),zu=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 E(t,e),t}(za),Wu=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 E(t,e),t}(za),$u=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 E(t,e),t}(za),Vu=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 E(t,e),t}(za),Hu=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 E(t,e),t}(Ja),Yu=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 E(t,e),t}(za),Zu=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 E(t,e),t}(za),Ku=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 E(t,e),t}(Ja),Xu=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 E(t,e),t}(za),Qu=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 E(t,e),t}(za),ed=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 E(t,e),t}(za),td=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 E(t,e),t}(Ja),nd=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 E(t,e),t}(za),rd=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 E(t,e),t}(Ja),od=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 E(t,e),t}(za),id=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 E(t,e),t}($a),sd=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 E(t,e),t}(Va),ad=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 E(t,e),t}(za),cd=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 E(t,e),t}($a),ud=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 E(t,e),t}(Va),dd=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 E(t,e),t}(Ja),ld=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 E(t,e),t}(Wa),pd=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 E(t,e),t}(Ja),fd=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 E(t,e),t}(Ja),hd=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 E(t,e),t}(za),vd=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 E(t,e),t}(Ja),md=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 E(t,e),t}(za),bd=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 E(t,e),t}(Ja),gd=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 E(t,e),t}(za),yd=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 E(t,e),t}(za),wd=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 E(t,e),t}(Ja),Id=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 E(t,e),t}(Wa),jd=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 E(t,e),t}(Ja),Rd=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 E(t,e),t}(Ja),Ed=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 E(t,e),t}(za),Cd=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the health checks for the given job.",t.withAuth=!0,t.requiredPermissions="Project > Jobs > General > Read",t.endpointUrl=function(e){return["projectId","jobId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/jobs/").concat(encodeURIComponent(e.parameters.jobId),"/health-checks")},t.body=function(){},t}return E(t,e),t}(Ja),Ud=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 E(t,e),t}(za),_d=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 E(t,e),t}(za),Sd=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 E(t,e),t}(Ja),Ad=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 E(t,e),t}(za),Pd=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 E(t,e),t}(Ja),kd=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 E(t,e),t}(za),Od=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 E(t,e),t}(Ja),qd=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 E(t,e),t}(Wa),xd=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 E(t,e),t}(Ja),Dd=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 E(t,e),t}(za),Td=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 E(t,e),t}(Ja),Nd=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 E(t,e),t}(za),Bd=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 E(t,e),t}(za),Ld=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 E(t,e),t}(za),Fd=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 E(t,e),t}(Ja),Gd=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 E(t,e),t}(Ja),Md=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 E(t,e),t}(Ja),Jd=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 E(t,e),t}(za),zd=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 E(t,e),t}(Ja),Wd=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 E(t,e),t}(Wa),$d=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 E(t,e),t}(Ja),Vd=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 E(t,e),t}(Ja),Hd=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 E(t,e),t}(Ja),Yd=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 E(t,e),t}(za),Zd=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 E(t,e),t}(za),Kd=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 E(t,e),t}(Ja),Xd=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 E(t,e),t}(Ja),Qd=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 E(t,e),t}(za),el=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 E(t,e),t}(Ja),tl=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 E(t,e),t}(za),nl=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 E(t,e),t}($a),rl=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 E(t,e),t}(Va),ol=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 E(t,e),t}(Ja),il=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 E(t,e),t}(Wa),sl=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 E(t,e),t}(za),al=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 E(t,e),t}(za),cl=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 E(t,e),t}(Ja),ul=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 E(t,e),t}(Wa),dl=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 E(t,e),t}(Ja),ll=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 E(t,e),t}(Ja),pl=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 E(t,e),t}(za),fl=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 E(t,e),t}($a),hl=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 E(t,e),t}(Va),vl=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 E(t,e),t}(za),ml=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 E(t,e),t}($a),bl=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 E(t,e),t}(Va),gl=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 E(t,e),t}(za),yl=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 E(t,e),t}($a),wl=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 E(t,e),t}(Va),Il=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 E(t,e),t}(Ja),jl=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 E(t,e),t}(Wa),Rl=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 E(t,e),t}(Ja),El=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 E(t,e),t}(Ja),Cl=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Start a new build for the given combined or build service. If given a commit sha, it will build that commit. Otherwise, the most recent relevant commit will be built. If the service provided is a build service, a branch name or pull request to build from is required.",t.withAuth=!0,t.requiredPermissions="Project > Services > Deployment > Deploy Build",t.endpointUrl=function(e){return["projectId","serviceId"].forEach((function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))})),"/v1/projects/".concat(encodeURIComponent(e.parameters.projectId),"/services/").concat(encodeURIComponent(e.parameters.serviceId),"/build")},t.body=function(e){return JSON.stringify(e.data)},t}return E(t,e),t}(za),Ul=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 E(t,e),t}(Ja),_l=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 E(t,e),t}(za),Sl=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 E(t,e),t}(Ja),Al=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 E(t,e),t}(za),Pl=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 E(t,e),t}(za),kl=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 E(t,e),t}(Ja),Ol=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 E(t,e),t}(Wa),ql=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 E(t,e),t}(Ja),xl=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 E(t,e),t}(Ja),Dl=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 E(t,e),t}(za),Tl=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 E(t,e),t}(Ja),Nl=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 E(t,e),t}(za),Bl=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 E(t,e),t}(za),Ll=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 E(t,e),t}(Ja),Fl=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 E(t,e),t}(za),Gl=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 E(t,e),t}(Ja),Ml=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 E(t,e),t}(za),Jl=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 E(t,e),t}(za),zl=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 E(t,e),t}(Ja),Wl=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 E(t,e),t}(za),$l=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 E(t,e),t}(Ja),Vl=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 E(t,e),t}(za),Hl=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 E(t,e),t}(Ja),Yl=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 E(t,e),t}(za),Zl=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 E(t,e),t}(Ja),Kl=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 E(t,e),t}(za),Xl=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 E(t,e),t}(Wa),Ql=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 E(t,e),t}(za),ep=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 E(t,e),t}(za),tp=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 E(t,e),t}(Ja),np=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 E(t,e),t}(Ja),rp=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 E(t,e),t}(za),op=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 E(t,e),t}($a),ip=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 E(t,e),t}(Ja),sp=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 E(t,e),t}(Va),ap=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 E(t,e),t}(Wa),cp=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 E(t,e),t}(Ja),up=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 E(t,e),t}(za),dp=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 E(t,e),t}(Ja),lp=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 E(t,e),t}(za),pp=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 E(t,e),t}(Wa),fp=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 E(t,e),t}(za),hp=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 E(t,e),t}(Ja),vp=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 E(t,e),t}(Ja),mp=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 E(t,e),t}(za),bp=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 U(this,void 0,void 0,(function(){return _(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),U(this,void 0,void 0,(function(){var n,r,o;return _(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=C({host:"https://api.northflank.com"},e),r=this.contextWrapper,o={current:n.name,contexts:S(S([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(o)];case 4:return i.sent(),[2]}}))}))},e.prototype.removeContext=function(e){return U(this,void 0,void 0,(function(){var t,n,r,o;return _(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:S([],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 U(this,void 0,void 0,(function(){var t,n;return _(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=C(C({},t),{current:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.updateToken=function(e,t){return U(this,void 0,void 0,(function(){var n,r,o,i,s;return _(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?C(C({},r),{token:e}):t})),s=C(C({},o),{contexts:i}),[4,this.storeContext(s)];case 1:return a.sent(),[2]}}))}))},e.prototype.useProjectId=function(e){return U(this,void 0,void 0,(function(){var t,n;return _(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=C(C({},t),{project:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useServiceId=function(e){return U(this,void 0,void 0,(function(){var t,n;return _(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=C(C({},t),{service:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useJobId=function(e){return U(this,void 0,void 0,(function(){var t,n;return _(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=C(C({},t),{job:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.usePlanId=function(e){return U(this,void 0,void 0,(function(){var t,n;return _(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=C(C({},t),{plan:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},e.prototype.useRegion=function(e){return U(this,void 0,void 0,(function(){var t,n;return _(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=C(C({},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 U(this,void 0,void 0,(function(){var t,n;return _(this,(function(r){switch(r.label){case 0:return t=this.contextWrapper,n=C(C({},t),{lastUpdateCheck:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},e}(),gp=function(e){function t(t){var n=e.call(this)||this;return n.assertDir=function(e){return U(n,void 0,void 0,(function(){var t;return _(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),b.existsSync(e)?[3,2]:[4,b.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(l.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return E(t,e),t.prototype.loadContextWrapper=function(){try{return JSON.parse(b.readFileSync(this.configFile,"utf8"))}catch(e){return{contexts:[],lastUpdateCheck:new Date(0)}}},t.prototype.writeContext=function(e){return U(this,void 0,void 0,(function(){var t;return _(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,b.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 U(this,void 0,void 0,(function(){return _(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}(bp),yp=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},t}return E(t,e),t.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},t.prototype.writeContext=function(e){return U(this,void 0,void 0,(function(){return _(this,(function(t){return this.inMemoryContextWrapper=e,[2]}))}))},t}(bp),wp=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 xa(e,new ll(e,t).call,new Ru(e,t).call),this.exec=new Na(e),this.logs=new Xa(e),this.metrics=new tc(e),this.endpoints={get:(o={},o.addon=((r=new Uu(e,t)).types=new nc(e,t),r.backupSchedules=new Au(e,t),r.backups=new Ou(e,t),r.backup=((n=new xu(e,t)).download=new Bu(e,t),n.restores=new Fu(e,t),n),r.containers=new Mu(e,t),r.credentials=new Ju(e,t),r.pitrWindow=new Hu(e,t),r.restores=new Ku(e,t),r.version=new td(e,t),r),o.invoice=function(){var n={};return n.details=new oc(e,t),n}(),o.cloud=function(){var n={};return n.cluster=new cc(e,t),n.dockerRegistry=new bc(e,t),n.integration=new Ic(e,t),n}(),o.dnsId=new Uc(e,t),o.domain=new Ac(e,t),o.domainCertificate=new kc(e,t),o.subdomain=function(){var n=new xc(e,t);return n.path=new Mc(e,t),n}(),o.logSink=new Kc(e,t),o.notification=new ou(e,t),o.registryCredentials=new uu(e,t),o.project=new Iu(e,t),o.job=function(){var n=new dd(e,t);return n.branches=new pd(e,t),n.builds=new fd(e,t),n.buildArguments=new vd(e,t),n.buildArgumentDetails=new bd(e,t),n.build=new wd(e,t),n.containers=new jd(e,t),n.deployment=new Rd(e,t),n.healthChecks=new Cd(e,t),n.pullRequests=new Sd(e,t),n.runs=new Pd(e,t),n.run=new Od(e,t),n.runtimeEnvironment=new xd(e,t),n.runtimeEnvironmentDetails=new Td(e,t),n}(),o.pipeline=new Gd(e,t),o.previewTemplate=new Md(e,t),o.previewTemplateRun=new Vd(e,t),o.releaseFlow=new Hd(e,t),o.releaseFlowRun=new Xd(e,t),o.secret=new ol(e,t),o.secretLink=new cl(e,t),o.secretDetails=new dl(e,t),o.service=function(){var n=new Il(e,t);return n.branches=new Rl(e,t),n.builds=new El(e,t),n.buildArguments=new Ul(e,t),n.buildArgumentDetails=new Sl(e,t),n.build=new kl(e,t),n.containers=new ql(e,t),n.deployment=new xl(e,t),n.healthChecks=new Tl(e,t),n.ports=new Ll(e,t),n.pullRequests=new Gl(e,t),n.runtimeEnvironment=new zl(e,t),n.runtimeEnvironmentDetails=new $l(e,t),n}(),o.volume=new Zl(e,t),o.tag=new ip(e,t),o.template=new dp(e,t),o.templateRun=new vp(e,t),o),list:function(){var n={};return n.invoices=new rc(e,t),n.cloud=function(){var n={};return n.providers=new ic(e,t),n.clusters=new sc(e,t),n.cluster=function(){var n={};return n.nodes=new lc(e,t),n}(),n.dockerRegistry=new vc(e,t),n.integrations=new yc(e,t),n.nodeTypes=new Ec(e,t),n.regions=new Cc(e,t),n}(),n.domains=new _c(e,t),n.subdomain=function(){var n={};return n.path=new Gc(e,t),n}(),n.logSinks=new Yc(e,t),n.notifications=new nu(e,t),n.registryCredentials=new au(e,t),n.vcs=new pu(e,t),n.repos=new hu(e,t),n.branches=new vu(e,t),n.plans=new mu(e,t),n.projects=new bu(e,t),n.addons=new Ru(e,t),n.jobs=new rd(e,t),n.pipelines=new Fd(e,t),n.previewTemplatePreviews=new zd(e,t),n.previewTemplateRuns=new $d(e,t),n.releaseFlowRuns=new Kd(e,t),n.secrets=new el(e,t),n.services=new ll(e,t),n.volumes=new Hl(e,t),n.regions=new tp(e,t),n.tags=new np(e,t),n.templates=new cp(e,t),n.templateRuns=new hp(e,t),n}(),create:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new ac(e,t),n.dockerRegistry=new mc(e,t),n.integration=new wc(e,t),n}(),n.domain=new Sc(e,t),n.logSink=new Zc(e,t),n.notification=new ru(e,t),n.customVcs=function(){var n={};return n.token=new fu(e,t),n}(),n.project=new gu(e,t),n.addon=function(){var n=new Eu(e,t);return n.backupSchedule=new Pu(e,t),n}(),n.job=function(){var n={};return n.cron=new od(e,t),n.manual=new ad(e,t),n}(),n.secret=new tl(e,t),n.service=function(){var n={};return n.build=new pl(e,t),n.combined=new vl(e,t),n.deployment=new gl(e,t),n}(),n.volume=new Yl(e,t),n.template=new up(e,t),n}(),update:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new uc(e,t),n.integration=new jc(e,t),n}(),n.subdomain=function(){var n={};return n.path=new zc(e,t),n}(),n.logSink=new tu(e,t),n.notification=new iu(e,t),n.registryCredentials=new lu(e,t),n.addon=function(){var n={};return n.networkSettings=new Wu(e,t),n.security=new ed(e,t),n.version=new nd(e,t),n}(),n.job=function(){var n={};return n.buildArguments=new md(e,t),n.buildOptions=new gd(e,t),n.buildSource=new yd(e,t),n.deployment=new Ed(e,t),n.healthChecks=new Ud(e,t),n.runtimeEnvironment=new Dd(e,t),n.settings=new Bd(e,t),n}(),n.previewTemplate=new Jd(e,t),n.releaseFlow=new Yd(e,t),n.secret=new sl(e,t),n.secretLink=new al(e,t),n.service=function(){var n={};return n.buildArguments=new _l(e,t),n.buildOptions=new Al(e,t),n.buildSource=new Pl(e,t),n.deployment=new Dl(e,t),n.healthChecks=new Nl(e,t),n.ports=new Fl(e,t),n.runtimeEnvironment=new Wl(e,t),n}(),n.volume=new Kl(e,t),n.template=new lp(e,t),n}(),delete:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new dc(e,t),n.dockerRegistry=new gc(e,t),n.integration=new Rc(e,t),n}(),n.domain=new Pc(e,t),n.subdomain=function(){var n=new Dc(e,t);return n.path=new Jc(e,t),n}(),n.logSink=new Xc(e,t),n.notification=new su(e,t),n.registryCredentials=new du(e,t),n.project=new ju(e,t),n.addon=function(){var n=new Su(e,t);return n.backupSchedule=new ku(e,t),n}(),n.backup=new Du(e,t),n.job=new ld(e,t),n.previewTemplatePreview=new Wd(e,t),n.secret=new il(e,t),n.secretLink=new ul(e,t),n.service=new jl(e,t),n.volume=new Xl(e,t),n.tag=new ap(e,t),n.template=new pp(e,t),n}(),cordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new pc(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 fc(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 hc(e,t),n}(),n}(),n}(),import:function(){var n={};return n.domainCertificate=new Oc(e,t),n.addon=function(){var n={};return n.backup=new zu(e,t),n}(),n}(),add:function(){var n={};return n.domain=function(){var n={};return n.subdomain=new qc(e,t),n}(),n.subdomain=function(){var n={};return n.path=new Fc(e,t),n}(),n.registryCredentials=new cu(e,t),n.tag=new rp(e,t),n}(),assign:function(){var n={};return n.subdomain=function(){var n={};return n.service=new Tc(e,t),n.path=new Wc(e,t),n}(),n}(),unassign:function(){var n={};return n.subdomain=function(){var n=new Nc(e,t);return n.path=new $c(e,t),n}(),n}(),disable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new Bc(e,t),n}(),n}(),enable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new Lc(e,t),n}(),n}(),verify:function(){var n={};return n.subdomain=new Vc(e,t),n.domain=new Hc(e,t),n}(),pause:function(){var n={};return n.logSink=new Qc(e,t),n.addon=new $u(e,t),n.job=new _d(e,t),n.service=new Bl(e,t),n}(),resume:function(){var n={};return n.logSink=new eu(e,t),n.addon=new Xu(e,t),n.job=new Ad(e,t),n.service=new Jl(e,t),n}(),put:function(){var n={};return n.project=new yu(e,t),n.addon=new Cu(e,t),n.job=function(){var n={};return n.cron=new id(e,t),n.manual=new cd(e,t),n}(),n.secret=new nl(e,t),n.service=function(){var n={};return n.build=new fl(e,t),n.combined=new ml(e,t),n.deployment=new yl(e,t),n}(),n.tag=new op(e,t),n}(),patch:function(){var n={};return n.project=new wu(e,t),n.addon=new _u(e,t),n.job=function(){var n={};return n.cron=new sd(e,t),n.manual=new ud(e,t),n}(),n.secret=new rl(e,t),n.service=function(){var n={};return n.build=new hl(e,t),n.combined=new bl(e,t),n.deployment=new wl(e,t),n}(),n.tag=new sp(e,t),n}(),backup:function(){var n={};return n.addon=new qu(e,t),n}(),abort:function(){var n={};return n.addon=function(){var n={};return n.backup=new Tu(e,t),n.restore=new Nu(e,t),n}(),n.job=function(){var n={};return n.build=new Id(e,t),n.run=new qd(e,t),n}(),n.releaseFlowRun=new Qd(e,t),n.service=function(){var n={};return n.build=new Ol(e,t),n}(),n.templateRun=new mp(e,t),n}(),restore:function(){var n={};return n.addon=function(){var n={};return n.backup=new Lu(e,t),n}(),n}(),retain:function(){var n={};return n.addon=function(){var n={};return n.backup=new Gu(e,t),n}(),n}(),start:function(){var n={};return n.addon=function(){var n={};return n.pitr=new Vu(e,t),n}(),n.job=function(){var n={};return n.build=new hd(e,t),n.run=new kd(e,t),n}(),n.service=function(){var n={};return n.build=new Cl(e,t),n}(),n}(),reset:function(){var n={};return n.addon=new Yu(e,t),n}(),restart:function(){var n={};return n.addon=new Zu(e,t),n.service=new Ml(e,t),n}(),scale:function(){var n={};return n.addon=new Qu(e,t),n.job=new Nd(e,t),n.service=new Vl(e,t),n}(),suspend:function(){var n={};return n.job=new Ld(e,t),n}(),run:function(){var n={};return n.releaseFlow=new Zd(e,t),n.template=new fp(e,t),n}(),attach:function(){var n={};return n.volume=new Ql(e,t),n}(),detach:function(){var n={};return n.volume=new ep(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}()};export{Tu as AbortAddonBackupEndpoint,Nu as AbortAddonRestoreEndpoint,Id as AbortJobBuildEndpoint,qd as AbortJobRunEndpoint,Qd as AbortReleaseflowrunEndpoint,Ol as AbortServiceBuildEndpoint,mp as AbortTemplaterunEndpoint,qc as AddDomainSubdomainEndpoint,cu as AddRegistrycredentialsEndpoint,Fc as AddSubdomainPathEndpoint,rp as AddTagEndpoint,wp as ApiClient,bp as ApiClientContextProvider,gp as ApiClientFileContextProvider,yp as ApiClientInMemoryContextProvider,Ma as ApiEndpoint,Wc as AssignSubdomainPathEndpoint,Tc as AssignSubdomainServiceEndpoint,Ql as AttachVolumeEndpoint,qu as BackupAddonEndpoint,pc as CordonCloudClusterNodeEndpoint,Pu as CreateAddonBackupscheduleEndpoint,Eu as CreateAddonEndpoint,ac as CreateCloudClusterEndpoint,mc as CreateCloudDockerregistryEndpoint,wc as CreateCloudIntegrationEndpoint,fu as CreateCustomvcsTokenEndpoint,Sc as CreateDomainEndpoint,od as CreateJobCronEndpoint,ad as CreateJobManualEndpoint,Zc as CreateLogsinkEndpoint,ru as CreateNotificationEndpoint,gu as CreateProjectEndpoint,tl as CreateSecretEndpoint,pl as CreateServiceBuildEndpoint,vl as CreateServiceCombinedEndpoint,gl as CreateServiceDeploymentEndpoint,up as CreateTemplateEndpoint,Yl as CreateVolumeEndpoint,ku as DeleteAddonBackupscheduleEndpoint,Su as DeleteAddonEndpoint,Wa as DeleteApiEndpoint,Du as DeleteBackupEndpoint,dc as DeleteCloudClusterEndpoint,gc as DeleteCloudDockerregistryEndpoint,Rc as DeleteCloudIntegrationEndpoint,Pc as DeleteDomainEndpoint,ld as DeleteJobEndpoint,Xc as DeleteLogsinkEndpoint,su as DeleteNotificationEndpoint,Wd as DeletePreviewtemplatepreviewEndpoint,ju as DeleteProjectEndpoint,du as DeleteRegistrycredentialsEndpoint,il as DeleteSecretEndpoint,ul as DeleteSecretlinkEndpoint,jl as DeleteServiceEndpoint,Dc as DeleteSubdomainEndpoint,Jc as DeleteSubdomainPathEndpoint,ap as DeleteTagEndpoint,pp as DeleteTemplateEndpoint,Xl as DeleteVolumeEndpoint,ep as DetachVolumeEndpoint,Bc as DisableSubdomainCdnEndpoint,fc as DrainCloudClusterNodeEndpoint,Lc as EnableSubdomainCdnEndpoint,Ta as ExecCommandStandard,Bu as GetAddonBackupDownloadEndpoint,xu as GetAddonBackupEndpoint,Fu as GetAddonBackupRestoresEndpoint,Ou as GetAddonBackupsEndpoint,Au as GetAddonBackupschedulesEndpoint,Mu as GetAddonContainersEndpoint,Ju as GetAddonCredentialsEndpoint,Uu as GetAddonEndpoint,Hu as GetAddonPitrwindowEndpoint,Ku as GetAddonRestoresEndpoint,nc as GetAddonTypesEndpoint,td as GetAddonVersionEndpoint,Ja as GetApiEndpoint,cc as GetCloudClusterEndpoint,bc as GetCloudDockerregistryEndpoint,Ic as GetCloudIntegrationEndpoint,Uc as GetDnsidEndpoint,Ac as GetDomainEndpoint,kc as GetDomaincertificateEndpoint,oc as GetInvoiceDetailsEndpoint,pd as GetJobBranchesEndpoint,wd as GetJobBuildEndpoint,bd as GetJobBuildargumentdetailsEndpoint,vd as GetJobBuildargumentsEndpoint,fd as GetJobBuildsEndpoint,jd as GetJobContainersEndpoint,Rd as GetJobDeploymentEndpoint,dd as GetJobEndpoint,Cd as GetJobHealthchecksEndpoint,Sd as GetJobPullrequestsEndpoint,Od as GetJobRunEndpoint,Pd as GetJobRunsEndpoint,xd as GetJobRuntimeenvironmentEndpoint,Td as GetJobRuntimeenvironmentdetailsEndpoint,Kc as GetLogsinkEndpoint,ou as GetNotificationEndpoint,Gd as GetPipelineEndpoint,Md as GetPreviewtemplateEndpoint,Vd as GetPreviewtemplaterunEndpoint,Iu as GetProjectEndpoint,uu as GetRegistrycredentialsEndpoint,Hd as GetReleaseflowEndpoint,Xd as GetReleaseflowrunEndpoint,ol as GetSecretEndpoint,dl as GetSecretdetailsEndpoint,cl as GetSecretlinkEndpoint,Rl as GetServiceBranchesEndpoint,kl as GetServiceBuildEndpoint,Sl as GetServiceBuildargumentdetailsEndpoint,Ul as GetServiceBuildargumentsEndpoint,El as GetServiceBuildsEndpoint,ql as GetServiceContainersEndpoint,xl as GetServiceDeploymentEndpoint,Il as GetServiceEndpoint,Tl as GetServiceHealthchecksEndpoint,Ll as GetServicePortsEndpoint,Gl as GetServicePullrequestsEndpoint,zl as GetServiceRuntimeenvironmentEndpoint,$l as GetServiceRuntimeenvironmentdetailsEndpoint,xc as GetSubdomainEndpoint,Mc as GetSubdomainPathEndpoint,ip as GetTagEndpoint,dp as GetTemplateEndpoint,vp as GetTemplaterunEndpoint,Zl as GetVolumeEndpoint,zu as ImportAddonBackupEndpoint,Oc as ImportDomaincertificateEndpoint,Ru as ListAddonsEndpoint,vu as ListBranchesEndpoint,lc as ListCloudClusterNodesEndpoint,sc as ListCloudClustersEndpoint,vc as ListCloudDockerregistryEndpoint,yc as ListCloudIntegrationsEndpoint,Ec as ListCloudNodetypesEndpoint,ic as ListCloudProvidersEndpoint,Cc as ListCloudRegionsEndpoint,_c as ListDomainsEndpoint,rc as ListInvoicesEndpoint,rd as ListJobsEndpoint,Yc as ListLogsinksEndpoint,nu as ListNotificationsEndpoint,Fd as ListPipelinesEndpoint,mu as ListPlansEndpoint,zd as ListPreviewtemplatepreviewsEndpoint,$d as ListPreviewtemplaterunsEndpoint,bu as ListProjectsEndpoint,tp as ListRegionsEndpoint,au as ListRegistrycredentialsEndpoint,Kd as ListReleaseflowrunsEndpoint,hu as ListReposEndpoint,el as ListSecretsEndpoint,ll as ListServicesEndpoint,Gc as ListSubdomainPathEndpoint,np as ListTagsEndpoint,hp as ListTemplaterunsEndpoint,cp as ListTemplatesEndpoint,pu as ListVcsEndpoint,Hl as ListVolumesEndpoint,Pa as LogType,Za as MetricType,Ba as NorthflankApiCallError,Na as NorthflankExecCommand,Xa as NorthflankLogFetch,tc as NorthflankMetricFetch,xa as NorthflankPortForwarder,_u as PatchAddonEndpoint,Va as PatchApiEndpoint,sd as PatchJobCronEndpoint,ud as PatchJobManualEndpoint,wu as PatchProjectEndpoint,rl as PatchSecretEndpoint,hl as PatchServiceBuildEndpoint,bl as PatchServiceCombinedEndpoint,wl as PatchServiceDeploymentEndpoint,sp as PatchTagEndpoint,$u as PauseAddonEndpoint,_d as PauseJobEndpoint,Qc as PauseLogsinkEndpoint,Bl as PauseServiceEndpoint,za as PostApiEndpoint,Cu as PutAddonEndpoint,$a as PutApiEndpoint,id as PutJobCronEndpoint,cd as PutJobManualEndpoint,yu as PutProjectEndpoint,nl as PutSecretEndpoint,fl as PutServiceBuildEndpoint,ml as PutServiceCombinedEndpoint,yl as PutServiceDeploymentEndpoint,op as PutTagEndpoint,Yu as ResetAddonEndpoint,Zu as RestartAddonEndpoint,Ml as RestartServiceEndpoint,Lu as RestoreAddonBackupEndpoint,Xu as ResumeAddonEndpoint,Ad as ResumeJobEndpoint,eu as ResumeLogsinkEndpoint,Jl as ResumeServiceEndpoint,Gu as RetainAddonBackupEndpoint,Zd as RunReleaseflowEndpoint,fp as RunTemplateEndpoint,Qu as ScaleAddonEndpoint,Nd as ScaleJobEndpoint,Vl as ScaleServiceEndpoint,Vu as StartAddonPitrEndpoint,hd as StartJobBuildEndpoint,kd as StartJobRunEndpoint,Cl as StartServiceBuildEndpoint,Ld as SuspendJobEndpoint,Nc as UnassignSubdomainEndpoint,$c as UnassignSubdomainPathEndpoint,hc as UncordonCloudClusterNodeEndpoint,Wu as UpdateAddonNetworksettingsEndpoint,ed as UpdateAddonSecurityEndpoint,nd as UpdateAddonVersionEndpoint,uc as UpdateCloudClusterEndpoint,jc as UpdateCloudIntegrationEndpoint,md as UpdateJobBuildargumentsEndpoint,gd as UpdateJobBuildoptionsEndpoint,yd as UpdateJobBuildsourceEndpoint,Ed as UpdateJobDeploymentEndpoint,Ud as UpdateJobHealthchecksEndpoint,Dd as UpdateJobRuntimeenvironmentEndpoint,Bd as UpdateJobSettingsEndpoint,tu as UpdateLogsinkEndpoint,iu as UpdateNotificationEndpoint,Jd as UpdatePreviewtemplateEndpoint,lu as UpdateRegistrycredentialsEndpoint,Yd as UpdateReleaseflowEndpoint,sl as UpdateSecretEndpoint,al as UpdateSecretlinkEndpoint,_l as UpdateServiceBuildargumentsEndpoint,Al as UpdateServiceBuildoptionsEndpoint,Pl as UpdateServiceBuildsourceEndpoint,Dl as UpdateServiceDeploymentEndpoint,Nl as UpdateServiceHealthchecksEndpoint,Fl as UpdateServicePortsEndpoint,Wl as UpdateServiceRuntimeenvironmentEndpoint,zc as UpdateSubdomainPathEndpoint,lp as UpdateTemplateEndpoint,Kl as UpdateVolumeEndpoint,Hc as VerifyDomainEndpoint,Vc as VerifySubdomainEndpoint};
|