@northflank/js-client 0.8.1 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("events"),e=require("child_process"),n=require("stream"),r=require("http"),o=require("url"),i=require("punycode"),s=require("https"),a=require("zlib"),c=require("os"),u=require("net"),d=require("fs"),l=require("path"),h=require("tls"),p=require("crypto"),f=require("buffer"),m=require("dgram"),v=require("node:events"),b=require("node:stream"),g=require("node:string_decoder"),y=require("node:path"),w=require("node:fs"),E=require("assert"),I=require("node:assert"),R=require("node:crypto");function j(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function S(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var _=j(t),C=j(n),A=S(n),U=j(r),x=j(o),P=j(i),k=j(s),O=j(a),T=S(a),D=j(c),L=j(u),N=S(u),q=j(d),B=j(l),F=j(h),G=j(p),M=j(f),z=j(m),J=j(b),W=j(y),$=j(w),H=j(E),V=j(I),Z=function(t,e){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Z(t,e)};function Y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Z(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var K=function(){return K=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},K.apply(this,arguments)};function X(t,e,n,r){return new(n||(n=Promise))((function(o,i){function s(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}c((r=r.apply(t,e||[])).next())}))}function Q(t,e){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=e.call(t,i)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function tt(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var et="object"==typeof global&&global&&global.Object===Object&&global,nt="object"==typeof self&&self&&self.Object===Object&&self,rt=et||nt||Function("return this")(),ot=rt.Symbol,it=Object.prototype,st=it.hasOwnProperty,at=it.toString,ct=ot?ot.toStringTag:void 0;var ut=Object.prototype.toString;var dt=ot?ot.toStringTag:void 0;function lt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":dt&&dt in Object(t)?function(t){var e=st.call(t,ct),n=t[ct];try{t[ct]=void 0;var r=!0}catch(t){}var o=at.call(t);return r&&(e?t[ct]=n:delete t[ct]),o}(t):function(t){return ut.call(t)}(t)}function ht(t){return null!=t&&"object"==typeof t}function pt(t){return"symbol"==typeof t||ht(t)&&"[object Symbol]"==lt(t)}function ft(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}var mt=Array.isArray,vt=ot?ot.prototype:void 0,bt=vt?vt.toString:void 0;function gt(t){if("string"==typeof t)return t;if(mt(t))return ft(t,gt)+"";if(pt(t))return bt?bt.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function yt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function wt(t){return t}function Et(t){if(!yt(t))return!1;var e=lt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var It,Rt=rt["__core-js_shared__"],jt=(It=/[^.]+$/.exec(Rt&&Rt.keys&&Rt.keys.IE_PROTO||""))?"Symbol(src)_1."+It:"";var St=Function.prototype.toString;function _t(t){if(null!=t){try{return St.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Ct=/^\[object .+?Constructor\]$/,At=Function.prototype,Ut=Object.prototype,xt=At.toString,Pt=Ut.hasOwnProperty,kt=RegExp("^"+xt.call(Pt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ot(t){return!(!yt(t)||(e=t,jt&&jt in e))&&(Et(t)?kt:Ct).test(_t(t));var e}function Tt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Ot(n)?n:void 0}var Dt=Tt(rt,"WeakMap"),Lt=Object.create,Nt=function(){function t(){}return function(e){if(!yt(e))return{};if(Lt)return Lt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var qt=Date.now;var Bt,Ft,Gt,Mt=function(){try{var t=Tt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),zt=Mt,Jt=zt?function(t,e){return zt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:wt,Wt=(Bt=Jt,Ft=0,Gt=0,function(){var t=qt(),e=16-(t-Gt);if(Gt=t,e>0){if(++Ft>=800)return arguments[0]}else Ft=0;return Bt.apply(void 0,arguments)}),$t=/^(?:0|[1-9]\d*)$/;function Ht(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&$t.test(t))&&t>-1&&t%1==0&&t<e}function Vt(t,e,n){"__proto__"==e&&zt?zt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Zt(t,e){return t===e||t!=t&&e!=e}var Yt=Object.prototype.hasOwnProperty;function Kt(t,e,n){var r=t[e];Yt.call(t,e)&&Zt(r,n)&&(void 0!==n||e in t)||Vt(t,e,n)}var Xt=Math.max;function Qt(t,e){return Wt(function(t,e,n){return e=Xt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=Xt(r.length-e,0),s=Array(i);++o<i;)s[o]=r[e+o];o=-1;for(var a=Array(e+1);++o<e;)a[o]=r[o];return a[e]=n(s),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,a)}}(t,e,wt),t+"")}function te(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function ee(t){return null!=t&&te(t.length)&&!Et(t)}var ne=Object.prototype;function re(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ne)}function oe(t){return ht(t)&&"[object Arguments]"==lt(t)}var ie=Object.prototype,se=ie.hasOwnProperty,ae=ie.propertyIsEnumerable,ce=oe(function(){return arguments}())?oe:function(t){return ht(t)&&se.call(t,"callee")&&!ae.call(t,"callee")};var ue="object"==typeof exports&&exports&&!exports.nodeType&&exports,de=ue&&"object"==typeof module&&module&&!module.nodeType&&module,le=de&&de.exports===ue?rt.Buffer:void 0,he=(le?le.isBuffer:void 0)||function(){return!1},pe={};pe["[object Float32Array]"]=pe["[object Float64Array]"]=pe["[object Int8Array]"]=pe["[object Int16Array]"]=pe["[object Int32Array]"]=pe["[object Uint8Array]"]=pe["[object Uint8ClampedArray]"]=pe["[object Uint16Array]"]=pe["[object Uint32Array]"]=!0,pe["[object Arguments]"]=pe["[object Array]"]=pe["[object ArrayBuffer]"]=pe["[object Boolean]"]=pe["[object DataView]"]=pe["[object Date]"]=pe["[object Error]"]=pe["[object Function]"]=pe["[object Map]"]=pe["[object Number]"]=pe["[object Object]"]=pe["[object RegExp]"]=pe["[object Set]"]=pe["[object String]"]=pe["[object WeakMap]"]=!1;var fe="object"==typeof exports&&exports&&!exports.nodeType&&exports,me=fe&&"object"==typeof module&&module&&!module.nodeType&&module,ve=me&&me.exports===fe&&et.process,be=function(){try{var t=me&&me.require&&me.require("util").types;return t||ve&&ve.binding&&ve.binding("util")}catch(t){}}(),ge=be&&be.isTypedArray,ye=ge?function(t){return function(e){return t(e)}}(ge):function(t){return ht(t)&&te(t.length)&&!!pe[lt(t)]},we=ye,Ee=Object.prototype.hasOwnProperty;function Ie(t,e){var n=mt(t),r=!n&&ce(t),o=!n&&!r&&he(t),i=!n&&!r&&!o&&we(t),s=n||r||o||i,a=s?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],c=a.length;for(var u in t)!e&&!Ee.call(t,u)||s&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ht(u,c))||a.push(u);return a}function Re(t,e){return function(n){return t(e(n))}}var je=Re(Object.keys,Object),Se=Object.prototype.hasOwnProperty;function _e(t){return ee(t)?Ie(t):function(t){if(!re(t))return je(t);var e=[];for(var n in Object(t))Se.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var Ce=Object.prototype.hasOwnProperty;function Ae(t){if(!yt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=re(t),n=[];for(var r in t)("constructor"!=r||!e&&Ce.call(t,r))&&n.push(r);return n}function Ue(t){return ee(t)?Ie(t,!0):Ae(t)}var xe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pe=/^\w*$/;function ke(t,e){if(mt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!pt(t))||(Pe.test(t)||!xe.test(t)||null!=e&&t in Object(e))}var Oe=Tt(Object,"create");var Te=Object.prototype.hasOwnProperty;var De=Object.prototype.hasOwnProperty;function Le(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ne(t,e){for(var n=t.length;n--;)if(Zt(t[n][0],e))return n;return-1}Le.prototype.clear=function(){this.__data__=Oe?Oe(null):{},this.size=0},Le.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Le.prototype.get=function(t){var e=this.__data__;if(Oe){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Te.call(e,t)?e[t]:void 0},Le.prototype.has=function(t){var e=this.__data__;return Oe?void 0!==e[t]:De.call(e,t)},Le.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Oe&&void 0===e?"__lodash_hash_undefined__":e,this};var qe=Array.prototype.splice;function Be(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Be.prototype.clear=function(){this.__data__=[],this.size=0},Be.prototype.delete=function(t){var e=this.__data__,n=Ne(e,t);return!(n<0)&&(n==e.length-1?e.pop():qe.call(e,n,1),--this.size,!0)},Be.prototype.get=function(t){var e=this.__data__,n=Ne(e,t);return n<0?void 0:e[n][1]},Be.prototype.has=function(t){return Ne(this.__data__,t)>-1},Be.prototype.set=function(t,e){var n=this.__data__,r=Ne(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Fe=Tt(rt,"Map");function Ge(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function Me(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Me.prototype.clear=function(){this.size=0,this.__data__={hash:new Le,map:new(Fe||Be),string:new Le}},Me.prototype.delete=function(t){var e=Ge(this,t).delete(t);return this.size-=e?1:0,e},Me.prototype.get=function(t){return Ge(this,t).get(t)},Me.prototype.has=function(t){return Ge(this,t).has(t)},Me.prototype.set=function(t,e){var n=Ge(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function ze(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=t.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(ze.Cache||Me),n}ze.Cache=Me;var Je=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,We=/\\(\\)?/g,$e=function(t){var e=ze(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Je,(function(t,n,r,o){e.push(r?o.replace(We,"$1"):n||t)})),e})),He=$e;function Ve(t){return null==t?"":gt(t)}function Ze(t,e){return mt(t)?t:ke(t,e)?[t]:He(Ve(t))}function Ye(t){if("string"==typeof t||pt(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Ke(t,e){for(var n=0,r=(e=Ze(e,t)).length;null!=t&&n<r;)t=t[Ye(e[n++])];return n&&n==r?t:void 0}function Xe(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}var Qe=ot?ot.isConcatSpreadable:void 0;function tn(t){return mt(t)||ce(t)||!!(Qe&&t&&t[Qe])}function en(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=tn),o||(o=[]);++i<s;){var a=t[i];e>0&&n(a)?e>1?en(a,e-1,n,r,o):Xe(o,a):r||(o[o.length]=a)}return o}var nn=Re(Object.getPrototypeOf,Object),rn=Function.prototype,on=Object.prototype,sn=rn.toString,an=on.hasOwnProperty,cn=sn.call(Object);function un(t){var e=this.__data__=new Be(t);this.size=e.size}un.prototype.clear=function(){this.__data__=new Be,this.size=0},un.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},un.prototype.get=function(t){return this.__data__.get(t)},un.prototype.has=function(t){return this.__data__.has(t)},un.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Be){var r=n.__data__;if(!Fe||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Me(r)}return n.set(t,e),this.size=n.size,this};var dn="object"==typeof exports&&exports&&!exports.nodeType&&exports,ln=dn&&"object"==typeof module&&module&&!module.nodeType&&module,hn=ln&&ln.exports===dn?rt.Buffer:void 0,pn=hn?hn.allocUnsafe:void 0;var fn=Object.prototype.propertyIsEnumerable,mn=Object.getOwnPropertySymbols,vn=mn?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}(mn(t),(function(e){return fn.call(t,e)})))}:function(){return[]};function bn(t){return function(t,e,n){var r=e(t);return mt(t)?r:Xe(r,n(t))}(t,_e,vn)}var gn=Tt(rt,"DataView"),yn=Tt(rt,"Promise"),wn=Tt(rt,"Set"),En="[object Map]",In="[object Promise]",Rn="[object Set]",jn="[object WeakMap]",Sn="[object DataView]",_n=_t(gn),Cn=_t(Fe),An=_t(yn),Un=_t(wn),xn=_t(Dt),Pn=lt;(gn&&Pn(new gn(new ArrayBuffer(1)))!=Sn||Fe&&Pn(new Fe)!=En||yn&&Pn(yn.resolve())!=In||wn&&Pn(new wn)!=Rn||Dt&&Pn(new Dt)!=jn)&&(Pn=function(t){var e=lt(t),n="[object Object]"==e?t.constructor:void 0,r=n?_t(n):"";if(r)switch(r){case _n:return Sn;case Cn:return En;case An:return In;case Un:return Rn;case xn:return jn}return e});var kn=Pn,On=rt.Uint8Array;function Tn(t,e){var n,r,o=e?(n=t.buffer,r=new n.constructor(n.byteLength),new On(r).set(new On(n)),r):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}function Dn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Me;++e<n;)this.add(t[e])}function Ln(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}Dn.prototype.add=Dn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Dn.prototype.has=function(t){return this.__data__.has(t)};function Nn(t,e,n,r,o,i){var s=1&n,a=t.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var u=i.get(t),d=i.get(e);if(u&&d)return u==e&&d==t;var l=-1,h=!0,p=2&n?new Dn:void 0;for(i.set(t,e),i.set(e,t);++l<a;){var f=t[l],m=e[l];if(r)var v=s?r(m,f,l,e,t,i):r(f,m,l,t,e,i);if(void 0!==v){if(v)continue;h=!1;break}if(p){if(!Ln(e,(function(t,e){if(s=e,!p.has(s)&&(f===t||o(f,t,n,r,i)))return p.push(e);var s}))){h=!1;break}}else if(f!==m&&!o(f,m,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h}function qn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Bn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var Fn=ot?ot.prototype:void 0,Gn=Fn?Fn.valueOf:void 0;var Mn=Object.prototype.hasOwnProperty;var zn="[object Arguments]",Jn="[object Array]",Wn="[object Object]",$n=Object.prototype.hasOwnProperty;function Hn(t,e,n,r,o,i){var s=mt(t),a=mt(e),c=s?Jn:kn(t),u=a?Jn:kn(e),d=(c=c==zn?Wn:c)==Wn,l=(u=u==zn?Wn:u)==Wn,h=c==u;if(h&&he(t)){if(!he(e))return!1;s=!0,d=!1}if(h&&!d)return i||(i=new un),s||we(t)?Nn(t,e,n,r,o,i):function(t,e,n,r,o,i,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new On(t),new On(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Zt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=qn;case"[object Set]":var c=1&r;if(a||(a=Bn),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;r|=2,s.set(t,e);var d=Nn(a(t),a(e),r,o,i,s);return s.delete(t),d;case"[object Symbol]":if(Gn)return Gn.call(t)==Gn.call(e)}return!1}(t,e,c,n,r,o,i);if(!(1&n)){var p=d&&$n.call(t,"__wrapped__"),f=l&&$n.call(e,"__wrapped__");if(p||f){var m=p?t.value():t,v=f?e.value():e;return i||(i=new un),o(m,v,n,r,i)}}return!!h&&(i||(i=new un),function(t,e,n,r,o,i){var s=1&n,a=bn(t),c=a.length;if(c!=bn(e).length&&!s)return!1;for(var u=c;u--;){var d=a[u];if(!(s?d in e:Mn.call(e,d)))return!1}var l=i.get(t),h=i.get(e);if(l&&h)return l==e&&h==t;var p=!0;i.set(t,e),i.set(e,t);for(var f=s;++u<c;){var m=t[d=a[u]],v=e[d];if(r)var b=s?r(v,m,d,e,t,i):r(m,v,d,t,e,i);if(!(void 0===b?m===v||o(m,v,n,r,i):b)){p=!1;break}f||(f="constructor"==d)}if(p&&!f){var g=t.constructor,y=e.constructor;g==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof y&&y instanceof y||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,n,r,o,i))}function Vn(t,e,n,r,o){return t===e||(null==t||null==e||!ht(t)&&!ht(e)?t!=t&&e!=e:Hn(t,e,n,r,Vn,o))}function Zn(t){return t==t&&!yt(t)}function Yn(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Kn(t){var e=function(t){for(var e=_e(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Zn(o)]}return e}(t);return 1==e.length&&e[0][2]?Yn(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var o=n.length,i=o,s=!r;if(null==t)return!i;for(t=Object(t);o--;){var a=n[o];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++o<i;){var c=(a=n[o])[0],u=t[c],d=a[1];if(s&&a[2]){if(void 0===u&&!(c in t))return!1}else{var l=new un;if(r)var h=r(u,d,c,t,e,l);if(!(void 0===h?Vn(d,u,3,r,l):h))return!1}}return!0}(n,t,e)}}function Xn(t,e){return null!=t&&e in Object(t)}function Qn(t,e){return null!=t&&function(t,e,n){for(var r=-1,o=(e=Ze(e,t)).length,i=!1;++r<o;){var s=Ye(e[r]);if(!(i=null!=t&&n(t,s)))break;t=t[s]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&te(o)&&Ht(s,o)&&(mt(t)||ce(t))}(t,e,Xn)}function tr(t,e){return ke(t)&&Zn(e)?Yn(Ye(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:Ke(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Qn(n,t):Vn(e,r,3)}}function er(t){return ke(t)?(e=Ye(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Ke(e,t)}}(t);var e}function nr(t){return"function"==typeof t?t:null==t?wt:"object"==typeof t?mt(t)?tr(t[0],t[1]):Kn(t):er(t)}var rr,or=function(t,e,n){for(var r=-1,o=Object(t),i=n(t),s=i.length;s--;){var a=i[rr?s:++r];if(!1===e(o[a],a,o))break}return t};var ir=function(t,e){return function(n,r){if(null==n)return n;if(!ee(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=Object(n);(e?i--:++i<o)&&!1!==r(s[i],i,s););return n}}((function(t,e){return t&&or(t,e,_e)})),sr=ir;function ar(t,e,n){(void 0!==n&&!Zt(t[e],n)||void 0===n&&!(e in t))&&Vt(t,e,n)}function cr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function ur(t){return function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,s=e.length;++i<s;){var a=e[i],c=r?r(n[a],t[a],a,n,t):void 0;void 0===c&&(c=t[a]),o?Vt(n,a,c):Kt(n,a,c)}return n}(t,Ue(t))}function dr(t,e,n,r,o,i,s){var a=cr(t,n),c=cr(e,n),u=s.get(c);if(u)ar(t,n,u);else{var d,l=i?i(a,c,n+"",t,e,s):void 0,h=void 0===l;if(h){var p=mt(c),f=!p&&he(c),m=!p&&!f&&we(c);l=c,p||f||m?mt(a)?l=a:ht(d=a)&&ee(d)?l=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}(a):f?(h=!1,l=function(t,e){if(e)return t.slice();var n=t.length,r=pn?pn(n):new t.constructor(n);return t.copy(r),r}(c,!0)):m?(h=!1,l=Tn(c,!0)):l=[]:function(t){if(!ht(t)||"[object Object]"!=lt(t))return!1;var e=nn(t);if(null===e)return!0;var n=an.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&sn.call(n)==cn}(c)||ce(c)?(l=a,ce(a)?l=ur(a):yt(a)&&!Et(a)||(l=function(t){return"function"!=typeof t.constructor||re(t)?{}:Nt(nn(t))}(c))):h=!1}h&&(s.set(c,l),o(l,c,r,i,s),s.delete(c)),ar(t,n,l)}}function lr(t,e,n,r,o){t!==e&&or(e,(function(i,s){if(o||(o=new un),yt(i))dr(t,e,s,n,lr,r,o);else{var a=r?r(cr(t,s),i,s+"",t,e,o):void 0;void 0===a&&(a=i),ar(t,s,a)}}),Ue)}var hr=/[\\^$.*+?()[\]{}|]/g,pr=RegExp(hr.source);function fr(t,e){var n=-1,r=ee(t)?Array(t.length):[];return sr(t,(function(t,o,i){r[++n]=e(t,o,i)})),r}function mr(t,e){return en(function(t,e){return(mt(t)?ft:fr)(t,nr(e))}(t,e),1)}var vr=1/0;function br(t,e){return t>e}function gr(t){return"string"==typeof t||!mt(t)&&ht(t)&&"[object String]"==lt(t)}function yr(t,e){return t&&t.length?function(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],s=e(i);if(null!=s&&(void 0===a?s==s&&!pt(s):n(s,a)))var a=s,c=i}return c}(t,nr(e),br):void 0}var wr,Er=(wr=function(t,e,n){lr(t,e,n)},Qt((function(t,e){var n=-1,r=e.length,o=r>1?e[r-1]:void 0,i=r>2?e[2]:void 0;for(o=wr.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(t,e,n){if(!yt(n))return!1;var r=typeof e;return!!("number"==r?ee(n)&&Ht(e,n.length):"string"==r&&e in n)&&Zt(n[e],t)}(e[0],e[1],i)&&(o=r<3?void 0:o,r=1),t=Object(t);++n<r;){var s=e[n];s&&wr(t,s,n,o)}return t})));function Ir(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function Rr(t,e){return t(e={exports:{}},e.exports),e.exports}var jr={},Sr=jr;function _r(t){return t<0?-1:1}function Cr(t,e){e.unsigned||--t;const n=e.unsigned?0:-Math.pow(2,t),r=Math.pow(2,t)-1,o=e.moduloBitLength?Math.pow(2,e.moduloBitLength):Math.pow(2,t),i=e.moduloBitLength?Math.pow(2,e.moduloBitLength-1):Math.pow(2,t-1);return function(t,s){s||(s={});let a=+t;if(s.enforceRange){if(!Number.isFinite(a))throw new TypeError("Argument is not a finite number");if(a=_r(a)*Math.floor(Math.abs(a)),a<n||a>r)throw new TypeError("Argument is not in byte range");return a}if(!isNaN(a)&&s.clamp)return a=function(t){return t%1!=.5||1&t?Math.round(t):Math.floor(t)}(a),a<n&&(a=n),a>r&&(a=r),a;if(!Number.isFinite(a)||0===a)return 0;if(a=_r(a)*Math.floor(Math.abs(a)),a%=o,!e.unsigned&&a>=i)return a-o;if(e.unsigned)if(a<0)a+=o;else if(-0===a)return 0;return a}}jr.void=function(){},jr.boolean=function(t){return!!t},jr.byte=Cr(8,{unsigned:!1}),jr.octet=Cr(8,{unsigned:!0}),jr.short=Cr(16,{unsigned:!1}),jr["unsigned short"]=Cr(16,{unsigned:!0}),jr.long=Cr(32,{unsigned:!1}),jr["unsigned long"]=Cr(32,{unsigned:!0}),jr["long long"]=Cr(32,{unsigned:!1,moduloBitLength:64}),jr["unsigned long long"]=Cr(32,{unsigned:!0,moduloBitLength:64}),jr.double=function(t){const e=+t;if(!Number.isFinite(e))throw new TypeError("Argument is not a finite floating-point value");return e},jr["unrestricted double"]=function(t){const e=+t;if(isNaN(e))throw new TypeError("Argument is NaN");return e},jr.float=jr.double,jr["unrestricted float"]=jr["unrestricted double"],jr.DOMString=function(t,e){return e||(e={}),e.treatNullAsEmptyString&&null===t?"":String(t)},jr.ByteString=function(t,e){const n=String(t);let r;for(let t=0;void 0!==(r=n.codePointAt(t));++t)if(r>255)throw new TypeError("Argument is not a valid bytestring");return n},jr.USVString=function(t){const e=String(t),n=e.length,r=[];for(let t=0;t<n;++t){const o=e.charCodeAt(t);if(o<55296||o>57343)r.push(String.fromCodePoint(o));else if(56320<=o&&o<=57343)r.push(String.fromCodePoint(65533));else if(t===n-1)r.push(String.fromCodePoint(65533));else{const n=e.charCodeAt(t+1);if(56320<=n&&n<=57343){const e=1023&o,i=1023&n;r.push(String.fromCodePoint(65536+1024*e+i)),++t}else r.push(String.fromCodePoint(65533))}}return r.join("")},jr.Date=function(t,e){if(!(t instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(t))return t},jr.RegExp=function(t,e){return t instanceof RegExp||(t=new RegExp(t)),t};var Ar=Rr((function(t){t.exports.mixin=function(t,e){const n=Object.getOwnPropertyNames(e);for(let r=0;r<n.length;++r)Object.defineProperty(t,n[r],Object.getOwnPropertyDescriptor(e,n[r]))},t.exports.wrapperSymbol=Symbol("wrapper"),t.exports.implSymbol=Symbol("impl"),t.exports.wrapperForImpl=function(e){return e[t.exports.wrapperSymbol]},t.exports.implForWrapper=function(e){return e[t.exports.implSymbol]}}));Ar.mixin,Ar.wrapperSymbol,Ar.implSymbol,Ar.wrapperForImpl,Ar.implForWrapper;var Ur,xr=(Ur=Object.freeze({__proto__:null}))&&Ur.default||Ur,Pr={TRANSITIONAL:0,NONTRANSITIONAL:1};function kr(t){return t.split("\0").map((function(t){return t.normalize("NFC")})).join("\0")}function Or(t){for(var e=0,n=xr.length-1;e<=n;){var r=Math.floor((e+n)/2),o=xr[r];if(o[0][0]<=t&&o[0][1]>=t)return o;o[0][0]>t?n=r-1:e=r+1}return null}var Tr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function Dr(t){return t.replace(Tr,"_").length}var Lr=/[\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 Nr(t,e){"xn--"===t.substr(0,4)&&(t=P.default.toUnicode(t));var n=!1;(kr(t)!==t||"-"===t[3]&&"-"===t[4]||"-"===t[0]||"-"===t[t.length-1]||-1!==t.indexOf(".")||0===t.search(Lr))&&(n=!0);for(var r=Dr(t),o=0;o<r;++o){var i=Or(t.codePointAt(o));if(qr===Pr.TRANSITIONAL&&"valid"!==i[1]||qr===Pr.NONTRANSITIONAL&&"valid"!==i[1]&&"deviation"!==i[1]){n=!0;break}}return{label:t,error:n}}function qr(t,e,n){var r=function(t,e,n){for(var r=!1,o="",i=Dr(t),s=0;s<i;++s){var a=t.codePointAt(s),c=Or(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===Pr.TRANSITIONAL?String.fromCodePoint.apply(String,c[2]):String.fromCodePoint(a);break;case"valid":o+=String.fromCodePoint(a);break;case"disallowed_STD3_mapped":e?(r=!0,o+=String.fromCodePoint(a)):o+=String.fromCodePoint.apply(String,c[2]);break;case"disallowed_STD3_valid":e&&(r=!0),o+=String.fromCodePoint(a)}}return{string:o,error:r}}(t,e,n);r.string=kr(r.string);for(var o=r.string.split("."),i=0;i<o.length;++i)try{var s=Nr(o[i]);o[i]=s.label,r.error=r.error||s.error}catch(t){r.error=!0}return{string:o.join("."),error:r.error}}var Br={toASCII:function(t,e,n,r){var o=qr(t,e,n),i=o.string.split(".");if(i=i.map((function(t){try{return P.default.toASCII(t)}catch(e){return o.error=!0,t}})),r){var s=i.slice(0,i.length-1).join(".").length;(s.length>253||0===s.length)&&(o.error=!0);for(var a=0;a<i.length;++a)if(i.length>63||0===i.length){o.error=!0;break}}return o.error?null:i.join(".")},toUnicode:function(t,e){var n=qr(t,e,Pr.NONTRANSITIONAL);return{domain:n.string,error:n.error}},PROCESSING_OPTIONS:Pr},Fr=Rr((function(t){const e={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},n=Symbol("failure");function r(t){return P.default.ucs2.decode(t).length}function o(t,e){const n=t[e];return isNaN(n)?void 0:String.fromCodePoint(n)}function i(t){return t>=48&&t<=57}function s(t){return t>=65&&t<=90||t>=97&&t<=122}function a(t){return i(t)||t>=65&&t<=70||t>=97&&t<=102}function c(t){return"."===t||"%2e"===t.toLowerCase()}function u(t){return 2===t.length&&s(t.codePointAt(0))&&(":"===t[1]||"|"===t[1])}function d(t){return void 0!==e[t]}function l(t){return d(t.scheme)}function h(t){let e=t.toString(16).toUpperCase();return 1===e.length&&(e="0"+e),"%"+e}function p(t){return t<=31||t>126}const f=new Set([32,34,35,60,62,63,96,123,125]);function m(t){return p(t)||f.has(t)}const v=new Set([47,58,59,61,64,91,92,93,94,124]);function b(t){return m(t)||v.has(t)}function g(t,e){const n=String.fromCodePoint(t);return e(t)?function(t){const e=new Buffer(t);let n="";for(let t=0;t<e.length;++t)n+=h(e[t]);return n}(n):n}function y(t){let e=10;if(t.length>=2&&"0"===t.charAt(0)&&"x"===t.charAt(1).toLowerCase()?(t=t.substring(2),e=16):t.length>=2&&"0"===t.charAt(0)&&(t=t.substring(1),e=8),""===t)return 0;return(10===e?/[^0-9]/:16===e?/[^0-9A-Fa-f]/:/[^0-7]/).test(t)?n:parseInt(t,e)}function w(t,e){if("["===t[0])return"]"!==t[t.length-1]?n:function(t){const e=[0,0,0,0,0,0,0,0];let r=0,s=null,c=0;if(58===(t=P.default.ucs2.decode(t))[c]){if(58!==t[c+1])return n;c+=2,++r,s=r}for(;c<t.length;){if(8===r)return n;if(58===t[c]){if(null!==s)return n;++c,++r,s=r;continue}let u=0,d=0;for(;d<4&&a(t[c]);)u=16*u+parseInt(o(t,c),16),++c,++d;if(46===t[c]){if(0===d)return n;if(c-=d,r>6)return n;let s=0;for(;void 0!==t[c];){let a=null;if(s>0){if(!(46===t[c]&&s<4))return n;++c}if(!i(t[c]))return n;for(;i(t[c]);){const e=parseInt(o(t,c));if(null===a)a=e;else{if(0===a)return n;a=10*a+e}if(a>255)return n;++c}e[r]=256*e[r]+a,++s,2!==s&&4!==s||++r}if(4!==s)return n;break}if(58===t[c]){if(++c,void 0===t[c])return n}else if(void 0!==t[c])return n;e[r]=u,++r}if(null!==s){let t=r-s;for(r=7;0!==r&&t>0;){const n=e[s+t-1];e[s+t-1]=e[r],e[r]=n,--r,--t}}else if(null===s&&8!==r)return n;return e}(t.substring(1,t.length-1));if(!e)return function(t){if(e=t,-1!==e.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/))return n;var e;let r="";const o=P.default.ucs2.decode(t);for(let t=0;t<o.length;++t)r+=g(o[t],p);return r}(t);const r=function(t){const e=new Buffer(t),n=[];for(let t=0;t<e.length;++t)37!==e[t]?n.push(e[t]):37===e[t]&&a(e[t+1])&&a(e[t+2])?(n.push(parseInt(e.slice(t+1,t+3).toString(),16)),t+=2):n.push(e[t]);return new Buffer(n).toString()}(t),s=Br.toASCII(r,!1,Br.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===s)return n;if(-1!==s.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return n;const c=function(t){const e=t.split(".");if(""===e[e.length-1]&&e.length>1&&e.pop(),e.length>4)return t;const r=[];for(const o of e){if(""===o)return t;const e=y(o);if(e===n)return t;r.push(e)}for(let t=0;t<r.length-1;++t)if(r[t]>255)return n;if(r[r.length-1]>=Math.pow(256,5-r.length))return n;let o=r.pop(),i=0;for(const t of r)o+=t*Math.pow(256,3-i),++i;return o}(s);return"number"==typeof c||c===n?c:s}function E(t){return"number"==typeof t?function(t){let e="",n=t;for(let t=1;t<=4;++t)e=String(n%256)+e,4!==t&&(e="."+e),n=Math.floor(n/256);return e}(t):t instanceof Array?"["+function(t){let e="";const n=function(t){let e=null,n=1,r=null,o=0;for(let i=0;i<t.length;++i)0!==t[i]?(o>n&&(e=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(e=r,n=o),{idx:e,len:n}}(t).idx;let r=!1;for(let o=0;o<=7;++o)r&&0===t[o]||(r&&(r=!1),n!==o?(e+=t[o].toString(16),7!==o&&(e+=":")):(e+=0===o?"::":":",r=!0));return e}(t)+"]":t}function I(t){const e=t.path;var n;0!==e.length&&("file"===t.scheme&&1===e.length&&(n=e[0],/^[A-Za-z]:$/.test(n))||e.pop())}function R(t){return""!==t.username||""!==t.password}function j(t,e,r,o,i){if(this.pointer=0,this.input=t,this.base=e||null,this.encodingOverride=r||"utf-8",this.stateOverride=i,this.url=o,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,cannotBeABaseURL:!1};const t=function(t){return t.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}(this.input);t!==this.input&&(this.parseError=!0),this.input=t}const s=function(t){return t.replace(/\u0009|\u000A|\u000D/g,"")}(this.input);for(s!==this.input&&(this.parseError=!0),this.input=s,this.state=i||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=P.default.ucs2.decode(this.input);this.pointer<=this.input.length;++this.pointer){const t=this.input[this.pointer],e=isNaN(t)?void 0:String.fromCodePoint(t),r=this["parse "+this.state](t,e);if(!r)break;if(r===n){this.failure=!0;break}}}j.prototype["parse scheme start"]=function(t,e){if(s(t))this.buffer+=e.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,n;this.state="no scheme",--this.pointer}return!0},j.prototype["parse scheme"]=function(t,e){if(function(t){return s(t)||i(t)}(t)||43===t||45===t||46===t)this.buffer+=e.toLowerCase();else if(58===t){if(this.stateOverride){if(l(this.url)&&!d(this.buffer))return!1;if(!l(this.url)&&d(this.buffer))return!1;if((R(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&(""===this.url.host||null===this.url.host))return!1}if(this.url.scheme=this.buffer,this.buffer="",this.stateOverride)return!1;"file"===this.url.scheme?(47===this.input[this.pointer+1]&&47===this.input[this.pointer+2]||(this.parseError=!0),this.state="file"):l(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":l(this.url)?this.state="special authority slashes":47===this.input[this.pointer+1]?(this.state="path or authority",++this.pointer):(this.url.cannotBeABaseURL=!0,this.url.path.push(""),this.state="cannot-be-a-base-URL path")}else{if(this.stateOverride)return this.parseError=!0,n;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},j.prototype["parse no scheme"]=function(t){return null===this.base||this.base.cannotBeABaseURL&&35!==t?n:(this.base.cannotBeABaseURL&&35===t?(this.url.scheme=this.base.scheme,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.url.cannotBeABaseURL=!0,this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},j.prototype["parse special relative or authority"]=function(t){return 47===t&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},j.prototype["parse path or authority"]=function(t){return 47===t?this.state="authority":(this.state="path",--this.pointer),!0},j.prototype["parse relative"]=function(t){return this.url.scheme=this.base.scheme,isNaN(t)?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query):47===t?this.state="relative slash":63===t?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===t?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):l(this.url)&&92===t?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(0,this.base.path.length-1),this.state="path",--this.pointer),!0},j.prototype["parse relative slash"]=function(t){return!l(this.url)||47!==t&&92!==t?47===t?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(92===t&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},j.prototype["parse special authority slashes"]=function(t){return 47===t&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},j.prototype["parse special authority ignore slashes"]=function(t){return 47!==t&&92!==t?(this.state="authority",--this.pointer):this.parseError=!0,!0},j.prototype["parse authority"]=function(t,e){if(64===t){this.parseError=!0,this.atFlag&&(this.buffer="%40"+this.buffer),this.atFlag=!0;const t=r(this.buffer);for(let e=0;e<t;++e){const t=this.buffer.codePointAt(e);if(58===t&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const n=g(t,b);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(t)||47===t||63===t||35===t||l(this.url)&&92===t){if(this.atFlag&&""===this.buffer)return this.parseError=!0,n;this.pointer-=r(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=e;return!0},j.prototype["parse hostname"]=j.prototype["parse host"]=function(t,e){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(58!==t||this.arrFlag)if(isNaN(t)||47===t||63===t||35===t||l(this.url)&&92===t){if(--this.pointer,l(this.url)&&""===this.buffer)return this.parseError=!0,n;if(this.stateOverride&&""===this.buffer&&(R(this.url)||null!==this.url.port))return this.parseError=!0,!1;const t=w(this.buffer,l(this.url));if(t===n)return n;if(this.url.host=t,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===t?this.arrFlag=!0:93===t&&(this.arrFlag=!1),this.buffer+=e;else{if(""===this.buffer)return this.parseError=!0,n;const t=w(this.buffer,l(this.url));if(t===n)return n;if(this.url.host=t,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},j.prototype["parse port"]=function(t,r){if(i(t))this.buffer+=r;else{if(!(isNaN(t)||47===t||63===t||35===t||l(this.url)&&92===t||this.stateOverride))return this.parseError=!0,n;if(""!==this.buffer){const t=parseInt(this.buffer);if(t>Math.pow(2,16)-1)return this.parseError=!0,n;this.url.port=t===(o=this.url.scheme,e[o])?null:t,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var o;return!0};const S=new Set([47,92,63,35]);j.prototype["parse file"]=function(t){var e,n;return this.url.scheme="file",47===t||92===t?(92===t&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?isNaN(t)?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query):63===t?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===t?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):(this.input.length-this.pointer-1==0||(e=t,n=this.input[this.pointer+1],!s(e)||58!==n&&124!==n)||this.input.length-this.pointer-1>=2&&!S.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),I(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},j.prototype["parse file slash"]=function(t){var e;return 47===t||92===t?(92===t&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(2===(e=this.base.path[0]).length&&s(e.codePointAt(0))&&":"===e[1]?this.url.path.push(this.base.path[0]):this.url.host=this.base.host),this.state="path",--this.pointer),!0},j.prototype["parse file host"]=function(t,e){if(isNaN(t)||47===t||92===t||63===t||35===t)if(--this.pointer,!this.stateOverride&&u(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let t=w(this.buffer,l(this.url));if(t===n)return n;if("localhost"===t&&(t=""),this.url.host=t,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=e;return!0},j.prototype["parse path start"]=function(t){return l(this.url)?(92===t&&(this.parseError=!0),this.state="path",47!==t&&92!==t&&--this.pointer):this.stateOverride||63!==t?this.stateOverride||35!==t?void 0!==t&&(this.state="path",47!==t&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},j.prototype["parse path"]=function(t){if(isNaN(t)||47===t||l(this.url)&&92===t||!this.stateOverride&&(63===t||35===t)){if(l(this.url)&&92===t&&(this.parseError=!0),!function(t){return".."===(t=t.toLowerCase())||"%2e."===t||".%2e"===t||"%2e%2e"===t}(this.buffer)?!c(this.buffer)||47===t||l(this.url)&&92===t?c(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&u(this.buffer)&&(""!==this.url.host&&null!==this.url.host&&(this.parseError=!0,this.url.host=""),this.buffer=this.buffer[0]+":"),this.url.path.push(this.buffer)):this.url.path.push(""):(I(this.url),47===t||l(this.url)&&92===t||this.url.path.push("")),this.buffer="","file"===this.url.scheme&&(void 0===t||63===t||35===t))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===t&&(this.url.query="",this.state="query"),35===t&&(this.url.fragment="",this.state="fragment")}else 37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=g(t,m);return!0},j.prototype["parse cannot-be-a-base-URL path"]=function(t){return 63===t?(this.url.query="",this.state="query"):35===t?(this.url.fragment="",this.state="fragment"):(isNaN(t)||37===t||(this.parseError=!0),37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),isNaN(t)||(this.url.path[0]=this.url.path[0]+g(t,p))),!0},j.prototype["parse query"]=function(t,e){if(isNaN(t)||!this.stateOverride&&35===t){l(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const e=new Buffer(this.buffer);for(let t=0;t<e.length;++t)e[t]<33||e[t]>126||34===e[t]||35===e[t]||60===e[t]||62===e[t]?this.url.query+=h(e[t]):this.url.query+=String.fromCodePoint(e[t]);this.buffer="",35===t&&(this.url.fragment="",this.state="fragment")}else 37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=e;return!0},j.prototype["parse fragment"]=function(t){return isNaN(t)||(0===t?this.parseError=!0:(37!==t||a(this.input[this.pointer+1])&&a(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=g(t,p))),!0},t.exports.serializeURL=function(t,e){let n=t.scheme+":";if(null!==t.host?(n+="//",""===t.username&&""===t.password||(n+=t.username,""!==t.password&&(n+=":"+t.password),n+="@"),n+=E(t.host),null!==t.port&&(n+=":"+t.port)):null===t.host&&"file"===t.scheme&&(n+="//"),t.cannotBeABaseURL)n+=t.path[0];else for(const e of t.path)n+="/"+e;return null!==t.query&&(n+="?"+t.query),e||null===t.fragment||(n+="#"+t.fragment),n},t.exports.serializeURLOrigin=function(e){switch(e.scheme){case"blob":try{return t.exports.serializeURLOrigin(t.exports.parseURL(e.path[0]))}catch(t){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(t){let e=t.scheme+"://";return e+=E(t.host),null!==t.port&&(e+=":"+t.port),e}({scheme:e.scheme,host:e.host,port:e.port});case"file":return"file://";default:return"null"}},t.exports.basicURLParse=function(t,e){void 0===e&&(e={});const n=new j(t,e.baseURL,e.encodingOverride,e.url,e.stateOverride);return n.failure?"failure":n.url},t.exports.setTheUsername=function(t,e){t.username="";const n=P.default.ucs2.decode(e);for(let e=0;e<n.length;++e)t.username+=g(n[e],b)},t.exports.setThePassword=function(t,e){t.password="";const n=P.default.ucs2.decode(e);for(let e=0;e<n.length;++e)t.password+=g(n[e],b)},t.exports.serializeHost=E,t.exports.cannotHaveAUsernamePasswordPort=function(t){return null===t.host||""===t.host||t.cannotBeABaseURL||"file"===t.scheme},t.exports.serializeInteger=function(t){return String(t)},t.exports.parseURL=function(e,n){return void 0===n&&(n={}),t.exports.basicURLParse(e,{baseURL:n.baseURL,encodingOverride:n.encodingOverride})}}));Fr.serializeURL,Fr.serializeURLOrigin,Fr.basicURLParse,Fr.setTheUsername,Fr.setThePassword,Fr.serializeHost,Fr.cannotHaveAUsernamePasswordPort,Fr.serializeInteger,Fr.parseURL;var Gr=class{constructor(t){const e=t[0],n=t[1];let r=null;if(void 0!==n&&(r=Fr.basicURLParse(n),"failure"===r))throw new TypeError("Invalid base URL");const o=Fr.basicURLParse(e,{baseURL:r});if("failure"===o)throw new TypeError("Invalid URL");this._url=o}get href(){return Fr.serializeURL(this._url)}set href(t){const e=Fr.basicURLParse(t);if("failure"===e)throw new TypeError("Invalid URL");this._url=e}get origin(){return Fr.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(t){Fr.basicURLParse(t+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(t){Fr.cannotHaveAUsernamePasswordPort(this._url)||Fr.setTheUsername(this._url,t)}get password(){return this._url.password}set password(t){Fr.cannotHaveAUsernamePasswordPort(this._url)||Fr.setThePassword(this._url,t)}get host(){const t=this._url;return null===t.host?"":null===t.port?Fr.serializeHost(t.host):Fr.serializeHost(t.host)+":"+Fr.serializeInteger(t.port)}set host(t){this._url.cannotBeABaseURL||Fr.basicURLParse(t,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":Fr.serializeHost(this._url.host)}set hostname(t){this._url.cannotBeABaseURL||Fr.basicURLParse(t,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":Fr.serializeInteger(this._url.port)}set port(t){Fr.cannotHaveAUsernamePasswordPort(this._url)||(""===t?this._url.port=null:Fr.basicURLParse(t,{url:this._url,stateOverride:"port"}))}get pathname(){return this._url.cannotBeABaseURL?this._url.path[0]:0===this._url.path.length?"":"/"+this._url.path.join("/")}set pathname(t){this._url.cannotBeABaseURL||(this._url.path=[],Fr.basicURLParse(t,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":"?"+this._url.query}set search(t){const e=this._url;if(""===t)return void(e.query=null);const n="?"===t[0]?t.substring(1):t;e.query="",Fr.basicURLParse(n,{url:e,stateOverride:"query"})}get hash(){return null===this._url.fragment||""===this._url.fragment?"":"#"+this._url.fragment}set hash(t){if(""===t)return void(this._url.fragment=null);const e="#"===t[0]?t.substring(1):t;this._url.fragment="",Fr.basicURLParse(e,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}},Mr=Rr((function(t){const e=Ar.implSymbol;function n(r){if(!this||this[e]||!(this instanceof n))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");if(arguments.length<1)throw new TypeError("Failed to construct 'URL': 1 argument required, but only "+arguments.length+" present.");const o=[];for(let t=0;t<arguments.length&&t<2;++t)o[t]=arguments[t];o[0]=Sr.USVString(o[0]),void 0!==o[1]&&(o[1]=Sr.USVString(o[1])),t.exports.setup(this,o)}n.prototype.toJSON=function(){if(!this||!t.exports.is(this))throw new TypeError("Illegal invocation");const n=[];for(let t=0;t<arguments.length&&t<0;++t)n[t]=arguments[t];return this[e].toJSON.apply(this[e],n)},Object.defineProperty(n.prototype,"href",{get(){return this[e].href},set(t){t=Sr.USVString(t),this[e].href=t},enumerable:!0,configurable:!0}),n.prototype.toString=function(){if(!this||!t.exports.is(this))throw new TypeError("Illegal invocation");return this.href},Object.defineProperty(n.prototype,"origin",{get(){return this[e].origin},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"protocol",{get(){return this[e].protocol},set(t){t=Sr.USVString(t),this[e].protocol=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"username",{get(){return this[e].username},set(t){t=Sr.USVString(t),this[e].username=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"password",{get(){return this[e].password},set(t){t=Sr.USVString(t),this[e].password=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"host",{get(){return this[e].host},set(t){t=Sr.USVString(t),this[e].host=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hostname",{get(){return this[e].hostname},set(t){t=Sr.USVString(t),this[e].hostname=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"port",{get(){return this[e].port},set(t){t=Sr.USVString(t),this[e].port=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"pathname",{get(){return this[e].pathname},set(t){t=Sr.USVString(t),this[e].pathname=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"search",{get(){return this[e].search},set(t){t=Sr.USVString(t),this[e].search=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"hash",{get(){return this[e].hash},set(t){t=Sr.USVString(t),this[e].hash=t},enumerable:!0,configurable:!0}),t.exports={is:t=>!!t&&t[e]instanceof Gr,create(t,e){let r=Object.create(n.prototype);return this.setup(r,t,e),r},setup(t,n,r){r||(r={}),r.wrapper=t,t[e]=new Gr(n,r),t[e][Ar.wrapperSymbol]=t},interface:n,expose:{Window:{URL:n},Worker:{URL:n}}}}));Mr.is,Mr.create,Mr.setup,Mr.expose;var zr={URL:Mr.interface,serializeURL:Fr.serializeURL,serializeURLOrigin:Fr.serializeURLOrigin,basicURLParse:Fr.basicURLParse,setTheUsername:Fr.setTheUsername,setThePassword:Fr.setThePassword,serializeHost:Fr.serializeHost,serializeInteger:Fr.serializeInteger,parseURL:Fr.parseURL};const Jr=C.default.Readable,Wr=Symbol("buffer"),$r=Symbol("type");class Hr{constructor(){this[$r]="";const t=arguments[0],e=arguments[1],n=[];let r=0;if(t){const e=t,o=Number(e.length);for(let t=0;t<o;t++){const o=e[t];let i;i=o instanceof Buffer?o:ArrayBuffer.isView(o)?Buffer.from(o.buffer,o.byteOffset,o.byteLength):o instanceof ArrayBuffer?Buffer.from(o):o instanceof Hr?o[Wr]:Buffer.from("string"==typeof o?o:String(o)),r+=i.length,n.push(i)}}this[Wr]=Buffer.concat(n);let o=e&&void 0!==e.type&&String(e.type).toLowerCase();o&&!/[^\u0020-\u007E]/.test(o)&&(this[$r]=o)}get size(){return this[Wr].length}get type(){return this[$r]}text(){return Promise.resolve(this[Wr].toString())}arrayBuffer(){const t=this[Wr],e=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);return Promise.resolve(e)}stream(){const t=new Jr;return t._read=function(){},t.push(this[Wr]),t.push(null),t}toString(){return"[object Blob]"}slice(){const t=this.size,e=arguments[0],n=arguments[1];let r,o;r=void 0===e?0:e<0?Math.max(t+e,0):Math.min(e,t),o=void 0===n?t:n<0?Math.max(t+n,0):Math.min(n,t);const i=Math.max(o-r,0),s=this[Wr].slice(r,r+i),a=new Hr([],{type:arguments[2]});return a[Wr]=s,a}}function Vr(t,e,n){Error.call(this,t),this.message=t,this.type=e,n&&(this.code=this.errno=n.code),Error.captureStackTrace(this,this.constructor)}let Zr;Object.defineProperties(Hr.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(Hr.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),Vr.prototype=Object.create(Error.prototype),Vr.prototype.constructor=Vr,Vr.prototype.name="FetchError";try{Zr=require("encoding").convert}catch(t){}const Yr=Symbol("Body internals"),Kr=C.default.PassThrough;function Xr(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.size;let o=void 0===r?0:r;var i=n.timeout;let s=void 0===i?0:i;null==t?t=null:to(t)?t=Buffer.from(t.toString()):eo(t)||Buffer.isBuffer(t)||("[object ArrayBuffer]"===Object.prototype.toString.call(t)?t=Buffer.from(t):ArrayBuffer.isView(t)?t=Buffer.from(t.buffer,t.byteOffset,t.byteLength):t instanceof C.default||(t=Buffer.from(String(t)))),this[Yr]={body:t,disturbed:!1,error:null},this.size=o,this.timeout=s,t instanceof C.default&&t.on("error",(function(t){const n="AbortError"===t.name?t:new Vr(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t);e[Yr].error=n}))}function Qr(){var t=this;if(this[Yr].disturbed)return Xr.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[Yr].disturbed=!0,this[Yr].error)return Xr.Promise.reject(this[Yr].error);let e=this.body;if(null===e)return Xr.Promise.resolve(Buffer.alloc(0));if(eo(e)&&(e=e.stream()),Buffer.isBuffer(e))return Xr.Promise.resolve(e);if(!(e instanceof C.default))return Xr.Promise.resolve(Buffer.alloc(0));let n=[],r=0,o=!1;return new Xr.Promise((function(i,s){let a;t.timeout&&(a=setTimeout((function(){o=!0,s(new Vr(`Response timeout while trying to fetch ${t.url} (over ${t.timeout}ms)`,"body-timeout"))}),t.timeout)),e.on("error",(function(e){"AbortError"===e.name?(o=!0,s(e)):s(new Vr(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e))})),e.on("data",(function(e){if(!o&&null!==e){if(t.size&&r+e.length>t.size)return o=!0,void s(new Vr(`content size at ${t.url} over limit: ${t.size}`,"max-size"));r+=e.length,n.push(e)}})),e.on("end",(function(){if(!o){clearTimeout(a);try{i(Buffer.concat(n,r))}catch(e){s(new Vr(`Could not create Buffer from response body for ${t.url}: ${e.message}`,"system",e))}}}))}))}function to(t){return"object"==typeof t&&"function"==typeof t.append&&"function"==typeof t.delete&&"function"==typeof t.get&&"function"==typeof t.getAll&&"function"==typeof t.has&&"function"==typeof t.set&&("URLSearchParams"===t.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(t)||"function"==typeof t.sort)}function eo(t){return"object"==typeof t&&"function"==typeof t.arrayBuffer&&"string"==typeof t.type&&"function"==typeof t.stream&&"function"==typeof t.constructor&&"string"==typeof t.constructor.name&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}function no(t){let e,n,r=t.body;if(t.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof C.default&&"function"!=typeof r.getBoundary&&(e=new Kr,n=new Kr,r.pipe(e),r.pipe(n),t[Yr].body=e,r=n),r}function ro(t){return null===t?null:"string"==typeof t?"text/plain;charset=UTF-8":to(t)?"application/x-www-form-urlencoded;charset=UTF-8":eo(t)?t.type||null:Buffer.isBuffer(t)||"[object ArrayBuffer]"===Object.prototype.toString.call(t)||ArrayBuffer.isView(t)?null:"function"==typeof t.getBoundary?`multipart/form-data;boundary=${t.getBoundary()}`:t instanceof C.default?null:"text/plain;charset=UTF-8"}function oo(t){const e=t.body;return null===e?0:eo(e)?e.size:Buffer.isBuffer(e)?e.length:e&&"function"==typeof e.getLengthSync&&(e._lengthRetrievers&&0==e._lengthRetrievers.length||e.hasKnownLength&&e.hasKnownLength())?e.getLengthSync():null}Xr.prototype={get body(){return this[Yr].body},get bodyUsed(){return this[Yr].disturbed},arrayBuffer(){return Qr.call(this).then((function(t){return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}))},blob(){let t=this.headers&&this.headers.get("content-type")||"";return Qr.call(this).then((function(e){return Object.assign(new Hr([],{type:t.toLowerCase()}),{[Wr]:e})}))},json(){var t=this;return Qr.call(this).then((function(e){try{return JSON.parse(e.toString())}catch(e){return Xr.Promise.reject(new Vr(`invalid json response body at ${t.url} reason: ${e.message}`,"invalid-json"))}}))},text(){return Qr.call(this).then((function(t){return t.toString()}))},buffer(){return Qr.call(this)},textConverted(){var t=this;return Qr.call(this).then((function(e){return function(t,e){if("function"!=typeof Zr)throw new Error("The package `encoding` must be installed to use the textConverted() function");const n=e.get("content-type");let r,o,i="utf-8";n&&(r=/charset=([^;]*)/i.exec(n));o=t.slice(0,1024).toString(),!r&&o&&(r=/<meta.+?charset=(['"])(.+?)\1/i.exec(o));!r&&o&&(r=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(o),r||(r=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(o),r&&r.pop()),r&&(r=/charset=(.*)/i.exec(r.pop())));!r&&o&&(r=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(o));r&&(i=r.pop(),"gb2312"!==i&&"gbk"!==i||(i="gb18030"));return Zr(t,"UTF-8",i).toString()}(e,t.headers)}))}},Object.defineProperties(Xr.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),Xr.mixIn=function(t){for(const e of Object.getOwnPropertyNames(Xr.prototype))if(!(e in t)){const n=Object.getOwnPropertyDescriptor(Xr.prototype,e);Object.defineProperty(t,e,n)}},Xr.Promise=global.Promise;const io=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,so=/[^\t\x20-\x7e\x80-\xff]/;function ao(t){if(t=`${t}`,io.test(t)||""===t)throw new TypeError(`${t} is not a legal HTTP header name`)}function co(t){if(t=`${t}`,so.test(t))throw new TypeError(`${t} is not a legal HTTP header value`)}function uo(t,e){e=e.toLowerCase();for(const n in t)if(n.toLowerCase()===e)return n}const lo=Symbol("map");class ho{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[lo]=Object.create(null),t instanceof ho){const e=t.raw(),n=Object.keys(e);for(const t of n)for(const n of e[t])this.append(t,n)}else if(null==t);else{if("object"!=typeof t)throw new TypeError("Provided initializer must be an object");{const e=t[Symbol.iterator];if(null!=e){if("function"!=typeof e)throw new TypeError("Header pairs must be iterable");const n=[];for(const e of t){if("object"!=typeof e||"function"!=typeof e[Symbol.iterator])throw new TypeError("Each header pair must be iterable");n.push(Array.from(e))}for(const t of n){if(2!==t.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(t[0],t[1])}}else for(const e of Object.keys(t)){const n=t[e];this.append(e,n)}}}}get(t){ao(t=`${t}`);const e=uo(this[lo],t);return void 0===e?null:this[lo][e].join(", ")}forEach(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=po(this),r=0;for(;r<n.length;){var o=n[r];const i=o[0],s=o[1];t.call(e,s,i,this),n=po(this),r++}}set(t,e){e=`${e}`,ao(t=`${t}`),co(e);const n=uo(this[lo],t);this[lo][void 0!==n?n:t]=[e]}append(t,e){e=`${e}`,ao(t=`${t}`),co(e);const n=uo(this[lo],t);void 0!==n?this[lo][n].push(e):this[lo][t]=[e]}has(t){return ao(t=`${t}`),void 0!==uo(this[lo],t)}delete(t){ao(t=`${t}`);const e=uo(this[lo],t);void 0!==e&&delete this[lo][e]}raw(){return this[lo]}keys(){return mo(this,"key")}values(){return mo(this,"value")}[Symbol.iterator](){return mo(this,"key+value")}}function po(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(t[lo]).sort().map("key"===e?function(t){return t.toLowerCase()}:"value"===e?function(e){return t[lo][e].join(", ")}:function(e){return[e.toLowerCase(),t[lo][e].join(", ")]})}ho.prototype.entries=ho.prototype[Symbol.iterator],Object.defineProperty(ho.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(ho.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 fo=Symbol("internal");function mo(t,e){const n=Object.create(vo);return n[fo]={target:t,kind:e,index:0},n}const vo=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==vo)throw new TypeError("Value of `this` is not a HeadersIterator");var t=this[fo];const e=t.target,n=t.kind,r=t.index,o=po(e,n);return r>=o.length?{value:void 0,done:!0}:(this[fo].index=r+1,{value:o[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function bo(t){const e=Object.assign({__proto__:null},t[lo]),n=uo(t[lo],"Host");return void 0!==n&&(e[n]=e[n][0]),e}Object.defineProperty(vo,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const go=Symbol("Response internals"),yo=U.default.STATUS_CODES;class wo{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Xr.call(this,t,e);const n=e.status||200,r=new ho(e.headers);if(null!=t&&!r.has("Content-Type")){const e=ro(t);e&&r.append("Content-Type",e)}this[go]={url:e.url,status:n,statusText:e.statusText||yo[n],headers:r,counter:e.counter}}get url(){return this[go].url||""}get status(){return this[go].status}get ok(){return this[go].status>=200&&this[go].status<300}get redirected(){return this[go].counter>0}get statusText(){return this[go].statusText}get headers(){return this[go].headers}clone(){return new wo(no(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}Xr.mixIn(wo.prototype),Object.defineProperties(wo.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(wo.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const Eo=Symbol("Request internals"),Io=x.default.URL||zr.URL,Ro=x.default.parse,jo=x.default.format;function So(t){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(t)&&(t=new Io(t).toString()),Ro(t)}const _o="destroy"in C.default.Readable.prototype;function Co(t){return"object"==typeof t&&"object"==typeof t[Eo]}class Ao{constructor(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Co(t)?e=So(t.url):(e=t&&t.href?So(t.href):So(`${t}`),t={});let r=n.method||t.method||"GET";if(r=r.toUpperCase(),(null!=n.body||Co(t)&&null!==t.body)&&("GET"===r||"HEAD"===r))throw new TypeError("Request with GET/HEAD method cannot have body");let o=null!=n.body?n.body:Co(t)&&null!==t.body?no(t):null;Xr.call(this,o,{timeout:n.timeout||t.timeout||0,size:n.size||t.size||0});const i=new ho(n.headers||t.headers||{});if(null!=o&&!i.has("Content-Type")){const t=ro(o);t&&i.append("Content-Type",t)}let s=Co(t)?t.signal:null;if("signal"in n&&(s=n.signal),null!=s&&!function(t){const e=t&&"object"==typeof t&&Object.getPrototypeOf(t);return!(!e||"AbortSignal"!==e.constructor.name)}(s))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[Eo]={method:r,redirect:n.redirect||t.redirect||"follow",headers:i,parsedURL:e,signal:s},this.follow=void 0!==n.follow?n.follow:void 0!==t.follow?t.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===t.compress||t.compress,this.counter=n.counter||t.counter||0,this.agent=n.agent||t.agent}get method(){return this[Eo].method}get url(){return jo(this[Eo].parsedURL)}get headers(){return this[Eo].headers}get redirect(){return this[Eo].redirect}get signal(){return this[Eo].signal}clone(){return new Ao(this)}}function Uo(t){Error.call(this,t),this.type="aborted",this.message=t,Error.captureStackTrace(this,this.constructor)}Xr.mixIn(Ao.prototype),Object.defineProperty(Ao.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Ao.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),Uo.prototype=Object.create(Error.prototype),Uo.prototype.constructor=Uo,Uo.prototype.name="AbortError";const xo=x.default.URL||zr.URL,Po=C.default.PassThrough;function ko(t,e){if(!ko.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return Xr.Promise=ko.Promise,new ko.Promise((function(n,r){const o=new Ao(t,e),i=function(t){const e=t[Eo].parsedURL,n=new ho(t[Eo].headers);if(n.has("Accept")||n.set("Accept","*/*"),!e.protocol||!e.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(e.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(t.signal&&t.body instanceof C.default.Readable&&!_o)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let r=null;if(null==t.body&&/^(POST|PUT)$/i.test(t.method)&&(r="0"),null!=t.body){const e=oo(t);"number"==typeof e&&(r=String(e))}r&&n.set("Content-Length",r),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),t.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let o=t.agent;return"function"==typeof o&&(o=o(e)),n.has("Connection")||o||n.set("Connection","close"),Object.assign({},e,{method:t.method,headers:bo(n),agent:o})}(o),s=("https:"===i.protocol?k.default:U.default).request,a=o.signal;let c=null;const u=function(){let t=new Uo("The user aborted a request.");r(t),o.body&&o.body instanceof C.default.Readable&&o.body.destroy(t),c&&c.body&&c.body.emit("error",t)};if(a&&a.aborted)return void u();const d=function(){u(),p()},l=s(i);let h;function p(){l.abort(),a&&a.removeEventListener("abort",d),clearTimeout(h)}a&&a.addEventListener("abort",d),o.timeout&&l.once("socket",(function(t){h=setTimeout((function(){r(new Vr(`network timeout at: ${o.url}`,"request-timeout")),p()}),o.timeout)})),l.on("error",(function(t){r(new Vr(`request to ${o.url} failed, reason: ${t.message}`,"system",t)),p()})),l.on("response",(function(t){clearTimeout(h);const e=function(t){const e=new ho;for(const n of Object.keys(t))if(!io.test(n))if(Array.isArray(t[n]))for(const r of t[n])so.test(r)||(void 0===e[lo][n]?e[lo][n]=[r]:e[lo][n].push(r));else so.test(t[n])||(e[lo][n]=[t[n]]);return e}(t.headers);if(ko.isRedirect(t.statusCode)){const i=e.get("Location");let s=null;try{s=null===i?null:new xo(i,o.url).toString()}catch(t){if("manual"!==o.redirect)return r(new Vr(`uri requested responds with an invalid redirect URL: ${i}`,"invalid-redirect")),void p()}switch(o.redirect){case"error":return r(new Vr(`uri requested responds with a redirect, redirect mode is set to error: ${o.url}`,"no-redirect")),void p();case"manual":if(null!==s)try{e.set("Location",s)}catch(t){r(t)}break;case"follow":if(null===s)break;if(o.counter>=o.follow)return r(new Vr(`maximum redirect reached at: ${o.url}`,"max-redirect")),void p();const i={headers:new ho(o.headers),follow:o.follow,counter:o.counter+1,agent:o.agent,compress:o.compress,method:o.method,body:o.body,signal:o.signal,timeout:o.timeout,size:o.size};if(!function(t,e){const n=new xo(e).hostname,r=new xo(t).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(o.url,s))for(const t of["authorization","www-authenticate","cookie","cookie2"])i.headers.delete(t);return 303!==t.statusCode&&o.body&&null===oo(o)?(r(new Vr("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void p()):(303!==t.statusCode&&(301!==t.statusCode&&302!==t.statusCode||"POST"!==o.method)||(i.method="GET",i.body=void 0,i.headers.delete("content-length")),n(ko(new Ao(s,i))),void p())}}t.once("end",(function(){a&&a.removeEventListener("abort",d)}));let i=t.pipe(new Po);const s={url:o.url,status:t.statusCode,statusText:t.statusMessage,headers:e,size:o.size,timeout:o.timeout,counter:o.counter},u=e.get("Content-Encoding");if(!o.compress||"HEAD"===o.method||null===u||204===t.statusCode||304===t.statusCode)return c=new wo(i,s),void n(c);const l={flush:O.default.Z_SYNC_FLUSH,finishFlush:O.default.Z_SYNC_FLUSH};if("gzip"==u||"x-gzip"==u)return i=i.pipe(O.default.createGunzip(l)),c=new wo(i,s),void n(c);if("deflate"!=u&&"x-deflate"!=u){if("br"==u&&"function"==typeof O.default.createBrotliDecompress)return i=i.pipe(O.default.createBrotliDecompress()),c=new wo(i,s),void n(c);c=new wo(i,s),n(c)}else{t.pipe(new Po).once("data",(function(t){i=8==(15&t[0])?i.pipe(O.default.createInflate()):i.pipe(O.default.createInflateRaw()),c=new wo(i,s),n(c)}))}})),function(t,e){const n=e.body;null===n?t.end():eo(n)?n.stream().pipe(t):Buffer.isBuffer(n)?(t.write(n),t.end()):n.pipe(t)}(l,o)}))}ko.isRedirect=function(t){return 301===t||302===t||303===t||307===t||308===t},ko.Promise=global.Promise;var Oo="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,To=Oo?ko:window.fetch;var Do=function(t){return Array.isArray(t)?t:[t]},Lo=function(t,e){return X(void 0,void 0,void 0,(function(){var n;return Q(this,(function(r){return n=Promise.resolve([]),[2,t.reduce((function(t,n){return t.then((function(t){return e(n).then((function(e){return t.push(e),t}))}))}),n)]}))}))},No=function(t){function e(e){void 0===e&&(e=8192);var n=t.call(this)||this;return n.bufferDefaultSize=e,n._size=0,n.buffer=Buffer.alloc(n.bufferDefaultSize),n}return Y(e,t),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.getContentsAsString=function(t,e){void 0===t&&(t="utf8");var n=this.buffer.toString(t,0,Math.min(e||this.size,this.size)),r=Buffer.byteLength(n);return r<this.size&&this.buffer.copy(this.buffer,0,r),this._size-=r,n},e.prototype.adaptBuffer=function(t){if(this.buffer.length-this.size<t){var e=Math.ceil((t-(this.buffer.length-this.size))/this.bufferDefaultSize),n=Buffer.alloc(this.buffer.length+this.bufferDefaultSize*e);this.buffer.copy(n,0,0,this.size),this.buffer=n}},e.prototype._write=function(t,e,n){this.adaptBuffer(t.length),t.copy(this.buffer,this.size,0),this._size+=t.length,n()},e}(C.default.Writable),qo=function(){function t(t,e){this.contextProvider=t,this.agent=e}return t.prototype.getServiceDetails=function(t,e){return X(this,void 0,void 0,(function(){return Q(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(t,"/services/").concat(e))]}))}))},t.prototype.getAddonDetails=function(t,e){return X(this,void 0,void 0,(function(){return Q(this,(function(n){return[2,this.fetch("".concat(this.contextProvider.getCurrentBaseUrl(),"/v1/port-forwarding/info/projects/").concat(t,"/addons/").concat(e))]}))}))},t.prototype.fetch=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return Q(this,(function(c){switch(c.label){case 0:return n="Error while trying to connect, please try again.",r=Er({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},K(K({},e),{agent:this.agent})),[4,ac(2)((function(){return X(a,void 0,void 0,(function(){return Q(this,(function(e){return[2,To(t,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(t){s=null!=i?i:n}finally{throw new Error(JSON.stringify(s))}case 3:return[4,o.json()];case 4:return[2,c.sent()]}}))}))},t}(),Bo=function(t,e,n){return X(void 0,void 0,void 0,(function(){var r,o,i,s,a;return Q(this,(function(c){switch(c.label){case 0:if(r=Mo(e||"127.0.0.1"),(o=Mo(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===D.default.platform()&&(i=function(t){return X(void 0,void 0,void 0,(function(){var e;return Q(this,(function(n){switch(n.label){case 0:return e="lo0 alias ".concat(t," up"),[4,Go.apply(void 0,e.split(" "))];case 1:return n.sent(),[2]}}))}))}),s=r,c.label=1;case 1:return s<=o?(a=zo(s),[4,Fo(t,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(t,"' to an IP address on this machine. Please check if there is already a service running with this port which binds to the wildcard host address (0.0.0.0) and stop this service."))}}))}))},Fo=function(t,e){return new Promise((function(n){var r=new u.Socket,o=!1;r.on("connect",(function(){o=!0,r.destroy()})),r.setTimeout(400),r.on("timeout",(function(){o=!1,r.destroy()})),r.on("error",(function(){o=!1})),r.on("close",(function(){n(!o)})),e?r.connect(t,e):r.connect(t)}))},Go=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return X(void 0,void 0,void 0,(function(){return Q(this,(function(e){switch(e.label){case 0:return[4,Jo("/sbin/ifconfig",t).resultPromise];case 1:return[2,e.sent()]}}))}))},Mo=function(t){var e=t.split(".").reverse();if(4!==e.length)throw new Error("Invalid ip address: ".concat(t));for(var n=0,r=0;r<4;r+=1){var o=Number.parseInt(e[r],10);if(o<0||o>255)throw new Error("Invalid ip address: ".concat(t));n+=o<<8*r}return n},zo=function(t){if(!Number.isSafeInteger(t))throw new Error("Number is not an integer");if(t<0||t>4294967295)throw new Error("Number is out of range 0x0-0xffffffff");for(var e=[],n=0;n<4;n+=1)e.push(t>>8*n&255);return e.reverse().join(".")},Jo=function(t,n,r){var o=e.spawn(t,n,K({windowsHide:!0},r)),i=new Promise((function(e,i){var s="",a="";(null===(null==r?void 0:r.stdio)||void 0===(null==r?void 0:r.stdio))&&(o.stdout&&o.stdout.on("data",(function(t){s+=t})),o.stderr&&o.stderr.on("data",(function(t){a+=t}))),o.on("close",(function(r){var o={code:r,stdout:s,stderr:a};if(0!==r){var c="Error during execution of command '".concat(t," ").concat(n.join(" "),"': ").concat(a);i({message:c,result:o})}else e(o)}))}));return{process:o,resultPromise:i}},Wo=function(t,e,n){return X(void 0,void 0,void 0,(function(){var r,o;return Q(this,(function(i){switch(i.label){case 0:return r=$o(t,10),[4,q.default.promises.writeFile(r,e,n)];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,6]),[4,q.default.promises.rename(r,t)];case 3:return i.sent(),[3,6];case 4:return o=i.sent(),[4,q.default.promises.unlink(r).catch((function(){}))];case 5:throw i.sent(),o;case 6:return[2]}}))}))},$o=function(t,e){for(var n,r=B.default.dirname(t),o=B.default.basename(t),i=0;null===(n=i<e)||void 0===n||n;i+=1){var s=tt([],Array(16),!0).map((function(){return Math.floor(16*Math.random()).toString(16)})).join(""),a=".".concat(s,".").concat(o),c=B.default.join(r,a);if(!q.default.existsSync(c))return c}throw new Error("Could not write file to file '".concat(t,"'."))},Ho="win32"===process.platform?"\r\n":"\n",Vo=function(){function t(t,e){this.nodes=t,this.config=e}return t.prototype.add=function(t,e,n){var r=this;if(0===e.length)return this;var o=this.findOrCreateEntry(t,n);return e.forEach((function(t){if(!o.hosts.find((function(e){return e.host===t}))){var e=1;0===o.hosts.length&&(e=r.config.indent-"".concat(o.ipPrefixWhitespace).concat(o.ip).length),o.hosts.push({whitespace:" ".repeat(e<1?1:e),host:t})}})),this},t.prototype.remove=function(t,e){var n=this;return this.findEntries(t).forEach((function(t){e.forEach((function(e){var r=t.hosts.findIndex((function(t){return t.host===e}));r<0||(0===r&&void 0!==t.hosts[1]&&(t.hosts[1].whitespace=t.hosts[0].whitespace),t.hosts.splice(r,1),0===t.hosts.length&&n.removeEntry(t))}))})),this},t.prototype.removeHosts=function(t){var e=this;ei(this.nodes,"entry").forEach((function(n){e.remove(n.ip,t)}))},t.prototype.removeIps=function(t){var e=this;return t.forEach((function(t){e.findEntries(t).forEach((function(t){return e.removeEntry(t)}))})),this},t.prototype.resolveHosts=function(t){return mr(this.findEntries(t),(function(t){return t.hosts.map((function(t){return t.host}))}))},t.prototype.resolveIps=function(t){return ei(this.nodes,"entry").filter((function(e){return e.hosts.some((function(e){return e.host===t}))})).map((function(t){return t.ip}))},t.prototype.toString=function(){return Xo(this.nodes,this.config.eol)},t.prototype.removeEntry=function(t){var e,n="number"==typeof(e=t)||ht(e)&&"[object Number]"==lt(e)?t:this.nodes.findIndex((function(e){return e===t}));n<0||this.nodes.splice(n,1)},t.prototype.findEntries=function(t){return ei(this.nodes,"entry").filter((function(e){return e.ip===t}))},t.prototype.findOrCreateEntry=function(t,e){var n=this.findEntries(t)[0];if(n)return n;var r=this.makeEntry(t);if(e){var o=Ko(e),i=this.nodes.findIndex((function(t){return"comment"===t.type&&t.line===o}));if(i>=0)this.insertAt(i+1,r);else{var s="blank"!==this.nodes[this.nodes.length-1].type?[Zo(),Yo(o),r]:[Yo(o),r];this.insertAt.apply(this,tt([this.nodes.length],s,!1))}}else this.insertAt(this.nodes.length,r);return r},t.prototype.insertAt=function(t){for(var e,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(e=this.nodes).splice.apply(e,tt([t,0],n,!1))},t.prototype.makeEntry=function(t,e){var n=this.config.ipPrefixWhitespace;return K({type:"entry",ip:t,ipPrefixWhitespace:n,hosts:[]},e)},t.fromNodes=function(e,n){var r,o;return new t(e.filter((function(t){return"eol"!==t.type})),{eol:null!==(r=null==n?void 0:n.eol)&&void 0!==r?r:function(){var t,n=ei(e,"eol").map((function(t){return t.line}));return null!==(t=ni(n))&&void 0!==t?t:Ho}(),indent:null!==(o=null==n?void 0:n.indent)&&void 0!==o?o:function(){var t,n=mr(ei(e,"entry"),(function(t){var e=t.ipPrefixWhitespace,n=t.ip,r=t.hosts[0];return r?["".concat(e).concat(n).concat(r.whitespace).length]:[]}));return null!==(t=ni(n))&&void 0!==t?t:17}(),ipPrefixWhitespace:""})},t.parse=function(t,e){return this.fromNodes(Qo(t),e)},t}(),Zo=function(){return{type:"blank",line:""}},Yo=function(t){return{type:"comment",line:Ko(t)}},Ko=function(t){return t.startsWith("#")?t:"# ".concat(t)},Xo=function(t,e){var n=t.map((function(t){switch(t.type){case"entry":var e=t.hosts.map((function(t){var e=t.whitespace,n=t.host;return"".concat(e).concat(n)})).join("");return"".concat(t.ipPrefixWhitespace).concat(t.ip).concat(e);case"blank":case"comment":case"invalid":return t.line;default:return""}}));return n.join(null!=e?e:Ho)},Qo=function(t){return t.split(/(\r?\n)/).map((function(t){return function(t){return t.match(/^\s*#.*$/)}(t)?{type:"comment",line:t}:function(t){return t.match(/^(\r?\n)$/)}(t)?{type:"eol",line:t}:function(t){return t.match(/^\s*$/)}(t)?{type:"blank",line:t}:ti(t)}))},ti=function(t){var e=t.match(/^(\s*)(\S+)(.+)?$/);if(!e)return{type:"invalid",line:t};var n=e[1],r=e[2],o=e.slice(3),i=!1,s=mr(o.filter((function(t){return void 0!==t})),(function(t){var e=t.match(/(\s+)(\S+)/g);return e?e.map((function(t){var e=t.match(/^(\s+)(\S+)$/);e||(i=!0);var n=null!=e?e:[];return{whitespace:n[1],host:n[2]}})):(i=!0,[])}));return i?{type:"invalid",line:t}:{type:"entry",ipPrefixWhitespace:n,ip:r,hosts:s}},ei=function(t,e){return t.filter((function(t){return t.type===e}))},ni=function(t){var e=new Map;t.forEach((function(t){var n;e.set(t,(null!==(n=e.get(t))&&void 0!==n?n:0)+1)}));var n=yr(Array.from(e.entries()),(function(t){return t[1]}));if(n)return n[0]},ri="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",oi=function(){function t(t){this.ast=Vo.fromNodes([]);var e={writeMode:"atomic",hostsFile:ri};this.config=K(K({},e),t)}return t.prototype.add=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!gr(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."));return e.forEach((function(t){if(!gr(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.add(t,e,this.config.header),this},t.prototype.remove=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!gr(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."));return e.forEach((function(t){if(!gr(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.remove(t,e),this},t.prototype.removeHosts=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach((function(t){if(!gr(t))throw new Error("Expected 'host' to be a string, but got ".concat(typeof t,"."))})),this.ast.removeHosts(t),this},t.prototype.removeIps=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.forEach((function(t){if(!gr(t))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof t,"."))})),this.ast.removeIps(t),this},t.prototype.read=function(){return X(this,void 0,void 0,(function(){var t;return Q(this,(function(e){switch(e.label){case 0:return[4,q.default.promises.readFile(this.config.hostsFile)];case 1:return t=e.sent(),this.ast=Vo.parse(t.toString(),this.config),[2,this]}}))}))},t.prototype.write=function(t){return X(this,void 0,void 0,(function(){var e,n,r,o;return Q(this,(function(i){switch(i.label){case 0:switch(e=K(K({},this.config),t),n=e.hostsFile,r=e.writeMode,o=this.ast.toString(),r){case void 0:case"atomic":return[3,1];case"standard":return[3,3];case"disabled":return[3,5]}return[3,5];case 1:return[4,Wo(n,o)];case 2:case 4:return i.sent(),[3,6];case 3:return[4,q.default.promises.writeFile(n,o)];case 5:return[3,6];case 6:return[2,this]}}))}))},t.prototype.backup=function(t){return X(this,void 0,void 0,(function(){var e,n,r,o;return Q(this,(function(i){switch(i.label){case 0:return q.default.existsSync(this.config.hostsFile)?(e=B.default.dirname(this.config.hostsFile),n=B.default.basename(this.config.hostsFile),r="".concat(n).concat(t.suffix),o=B.default.resolve(e,r),q.default.existsSync(o)&&!t.rewrite?[3,2]:[4,q.default.promises.copyFile(this.config.hostsFile,o)]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))},t.load=function(e){return X(this,void 0,void 0,(function(){return Q(this,(function(n){switch(n.label){case 0:return[4,new t(e).read()];case 1:return[2,n.sent()]}}))}))},t}(),ii=function(){function t(){this.previousPromise=Promise.resolve(),this._queueLength=0}return Object.defineProperty(t.prototype,"queueLength",{get:function(){return this._queueLength},enumerable:!1,configurable:!0}),t.prototype.enter=function(t){return X(this,void 0,void 0,(function(){var e,n=this;return Q(this,(function(r){return this._queueLength+=1,e=this.previousPromise.then((function(){return n._queueLength-=1,t()}),(function(){return n._queueLength-=1,t()})),this.previousPromise=e,[2,e]}))}))},t}(),si=function t(e,n){if(e&&n)return t(e)(n);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){r[t]=e[t]})),r;function r(){for(var t=new Array(arguments.length),n=0;n<t.length;n++)t[n]=arguments[n];var r=e.apply(this,t),o=t[t.length-1];return"function"==typeof r&&r!==o&&Object.keys(o).forEach((function(t){r[t]=o[t]})),r}};var ai=si(ui),ci=si(di);function ui(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function di(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},n=t.name||"Function wrapped with `once`";return e.onceError=n+" shouldn't be called more than once",e.called=!1,e}ui.proto=ui((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return ui(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return di(this)},configurable:!0})})),ai.strict=ci;var li,hi=function(){},pi=function(t,e,n){if("function"==typeof e)return pi(t,null,e);e||(e={}),n=ai(n||hi);var r=t._writableState,o=t._readableState,i=e.readable||!1!==e.readable&&t.readable,s=e.writable||!1!==e.writable&&t.writable,a=!1,c=function(){t.writable||u()},u=function(){s=!1,i||n.call(t)},d=function(){i=!1,s||n.call(t)},l=function(e){n.call(t,e?new Error("exited with error code: "+e):null)},h=function(e){n.call(t,e)},p=function(){process.nextTick(f)},f=function(){if(!a)return(!i||o&&o.ended&&!o.destroyed)&&(!s||r&&r.ended&&!r.destroyed)?void 0:n.call(t,new Error("premature close"))},m=function(){t.req.on("finish",u)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(t)?s&&!r&&(t.on("end",c),t.on("close",c)):(t.on("complete",u),t.on("abort",p),t.req?m():t.on("request",m)),function(t){return t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length}(t)&&t.on("exit",l),t.on("end",d),t.on("finish",u),!1!==e.error&&t.on("error",h),t.on("close",p),function(){a=!0,t.removeListener("complete",u),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",u),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",u),t.removeListener("exit",l),t.removeListener("end",d),t.removeListener("error",h),t.removeListener("close",p)}},fi=pi;try{li=q.default}catch(t){}var mi=function(){},vi=/^v?\.0/.test(process.version),bi=function(t){return"function"==typeof t},gi=function(t,e,n,r){r=ai(r);var o=!1;t.on("close",(function(){o=!0})),fi(t,{readable:e,writable:n},(function(t){if(t)return r(t);o=!0,r()}));var i=!1;return function(e){if(!o&&!i)return i=!0,function(t){return!!vi&&!!li&&(t instanceof(li.ReadStream||mi)||t instanceof(li.WriteStream||mi))&&bi(t.close)}(t)?t.close(mi):function(t){return t.setHeader&&bi(t.abort)}(t)?t.abort():bi(t.destroy)?t.destroy():void r(e||new Error("stream was destroyed"))}},yi=function(t){t()},wi=function(t,e){return t.pipe(e)},Ei=function(){var t,e=Array.prototype.slice.call(arguments),n=bi(e[e.length-1]||mi)&&e.pop()||mi;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r=e.map((function(o,i){var s=i<e.length-1;return gi(o,s,i>0,(function(e){t||(t=e),e&&r.forEach(yi),s||(r.forEach(yi),n(t))}))}));return e.reduce(wi)};const Ii=["nodebuffer","arraybuffer","fragments"],Ri="undefined"!=typeof Blob;Ri&&Ii.push("blob");var ji={BINARY_TYPES:Ii,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Ri,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},Si="function"==typeof __webpack_require__?__non_webpack_require__:Ir,_i=process.config&&process.config.variables||{},Ci=!!process.env.PREBUILDS_ONLY,Ai=process.versions.modules,Ui=!(!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",xi=process.env.npm_config_arch||D.default.arch(),Pi=process.env.npm_config_platform||D.default.platform(),ki=process.env.LIBC||(function(t){return"linux"===t&&q.default.existsSync("/etc/alpine-release")}(Pi)?"musl":"glibc"),Oi=process.env.ARM_VERSION||("arm64"===xi?"8":_i.arm_version)||"",Ti=(process.versions.uv||"").split(".")[0],Di=Li;function Li(t){return Si(Li.resolve(t))}function Ni(t){try{return q.default.readdirSync(t)}catch(t){return[]}}function qi(t,e){var n=Ni(t).filter(e);return n[0]&&B.default.join(t,n[0])}function Bi(t){return/\.node$/.test(t)}function Fi(t){var e=t.split("-");if(2===e.length){var n=e[0],r=e[1].split("+");if(n&&r.length&&r.every(Boolean))return{name:t,platform:n,architectures:r}}}function Gi(t,e){return function(n){return null!=n&&(n.platform===t&&n.architectures.includes(e))}}function Mi(t,e){return t.architectures.length-e.architectures.length}function zi(t){var e=t.split("."),n={file:t,specificity:0};if("node"===e.pop()){for(var r=0;r<e.length;r++){var o=e[r];if("node"===o||"electron"===o||"node-webkit"===o)n.runtime=o;else if("napi"===o)n.napi=!0;else if("abi"===o.slice(0,3))n.abi=o.slice(3);else if("uv"===o.slice(0,2))n.uv=o.slice(2);else if("armv"===o.slice(0,4))n.armv=o.slice(4);else{if("glibc"!==o&&"musl"!==o)continue;n.libc=o}n.specificity++}return n}}function Ji(t,e){return function(n){return null!=n&&(!(n.runtime&&n.runtime!==t&&!function(t){return"node"===t.runtime&&t.napi}(n))&&(!(n.abi&&n.abi!==e&&!n.napi)&&((!n.uv||n.uv===Ti)&&((!n.armv||n.armv===Oi)&&(!n.libc||n.libc===ki)))))}}function Wi(t){return function(e,n){return e.runtime!==n.runtime?e.runtime===t?-1:1:e.abi!==n.abi?e.abi?-1:1:e.specificity!==n.specificity?e.specificity>n.specificity?-1:1:0}}Li.resolve=Li.path=function(t){t=B.default.resolve(t||".");try{var e=Si(B.default.join(t,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[e+"_PREBUILD"]&&(t=process.env[e+"_PREBUILD"])}catch(t){}if(!Ci){var n=qi(B.default.join(t,"build/Release"),Bi);if(n)return n;var r=qi(B.default.join(t,"build/Debug"),Bi);if(r)return r}var o=a(t);if(o)return o;var i=a(B.default.dirname(process.execPath));if(i)return i;var s=["platform="+Pi,"arch="+xi,"runtime="+Ui,"abi="+Ai,"uv="+Ti,Oi?"armv="+Oi:"","libc="+ki,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"","function"==typeof __webpack_require__?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+s+"\n loaded from: "+t+"\n");function a(t){var e=Ni(B.default.join(t,"prebuilds")).map(Fi).filter(Gi(Pi,xi)).sort(Mi)[0];if(e){var n=B.default.join(t,"prebuilds",e.name),r=Ni(n).map(zi).filter(Ji(Ui,Ai)).sort(Wi(Ui))[0];return r?B.default.join(n,r.file):void 0}}},Li.parseTags=zi,Li.matchTags=Ji,Li.compareTags=Wi,Li.parseTuple=Fi,Li.matchTuple=Gi,Li.compareTuples=Mi;var $i=Rr((function(t){const e="function"==typeof __webpack_require__?__non_webpack_require__:Ir;"function"==typeof e.addon?t.exports=e.addon.bind(e):t.exports=Di}));var Hi={mask:(t,e,n,r,o)=>{for(var i=0;i<o;i++)n[r+i]=t[i]^e[3&i]},unmask:(t,e)=>{const n=t.length;for(var r=0;r<n;r++)t[r]^=e[3&r]}},Vi=Rr((function(t){try{t.exports=$i(__dirname)}catch(e){t.exports=Hi}})),Zi=Rr((function(t){const{EMPTY_BUFFER:e}=ji,n=Buffer[Symbol.species];function r(t,e,n,r,o){for(let i=0;i<o;i++)n[r+i]=t[i]^e[3&i]}function o(t,e){for(let n=0;n<t.length;n++)t[n]^=e[3&n]}if(t.exports={concat:function(t,r){if(0===t.length)return e;if(1===t.length)return t[0];const o=Buffer.allocUnsafe(r);let i=0;for(let e=0;e<t.length;e++){const n=t[e];o.set(n,i),i+=n.length}return i<r?new n(o.buffer,o.byteOffset,i):o},mask:r,toArrayBuffer:function(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)},toBuffer:function t(e){if(t.readOnly=!0,Buffer.isBuffer(e))return e;let r;return e instanceof ArrayBuffer?r=new n(e):ArrayBuffer.isView(e)?r=new n(e.buffer,e.byteOffset,e.byteLength):(r=Buffer.from(e),t.readOnly=!1),r},unmask:o},!process.env.WS_NO_BUFFER_UTIL)try{const e=Vi;t.exports.mask=function(t,n,o,i,s){s<48?r(t,n,o,i,s):e.mask(t,n,o,i,s)},t.exports.unmask=function(t,n){t.length<32?o(t,n):e.unmask(t,n)}}catch(t){}}));Zi.concat,Zi.mask,Zi.toArrayBuffer,Zi.toBuffer,Zi.unmask;const Yi=Symbol("kDone"),Ki=Symbol("kRun");var Xi=class{constructor(t){this[Yi]=()=>{this.pending--,this[Ki]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[Ki]()}[Ki](){if(this.pending!==this.concurrency&&this.jobs.length){const t=this.jobs.shift();this.pending++,t(this[Yi])}}};const{kStatusCode:Qi}=ji,ts=Buffer[Symbol.species],es=Buffer.from([0,0,255,255]),ns=Symbol("permessage-deflate"),rs=Symbol("total-length"),os=Symbol("callback"),is=Symbol("buffers"),ss=Symbol("error");let as;var cs=class{constructor(t,e,n){if(this._maxPayload=0|n,this._options=t||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!e,this._deflate=null,this._inflate=null,this.params=null,!as){const t=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;as=new Xi(t)}}static get extensionName(){return"permessage-deflate"}offer(){const t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const t=this._deflate[os];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){const e=this._options,n=t.find((t=>!(!1===e.serverNoContextTakeover&&t.server_no_context_takeover||t.server_max_window_bits&&(!1===e.serverMaxWindowBits||"number"==typeof e.serverMaxWindowBits&&e.serverMaxWindowBits>t.server_max_window_bits)||"number"==typeof e.clientMaxWindowBits&&!t.client_max_window_bits)));if(!n)throw new Error("None of the extension offers can be accepted");return e.serverNoContextTakeover&&(n.server_no_context_takeover=!0),e.clientNoContextTakeover&&(n.client_no_context_takeover=!0),"number"==typeof e.serverMaxWindowBits&&(n.server_max_window_bits=e.serverMaxWindowBits),"number"==typeof e.clientMaxWindowBits?n.client_max_window_bits=e.clientMaxWindowBits:!0!==n.client_max_window_bits&&!1!==e.clientMaxWindowBits||delete n.client_max_window_bits,n}acceptAsClient(t){const e=t[0];if(!1===this._options.clientNoContextTakeover&&e.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(e.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&e.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(e.client_max_window_bits=this._options.clientMaxWindowBits);return e}normalizeParams(t){return t.forEach((t=>{Object.keys(t).forEach((e=>{let n=t[e];if(n.length>1)throw new Error(`Parameter "${e}" must have only a single value`);if(n=n[0],"client_max_window_bits"===e){if(!0!==n){const t=+n;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${e}": ${n}`);n=t}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${e}": ${n}`)}else if("server_max_window_bits"===e){const t=+n;if(!Number.isInteger(t)||t<8||t>15)throw new TypeError(`Invalid value for parameter "${e}": ${n}`);n=t}else{if("client_no_context_takeover"!==e&&"server_no_context_takeover"!==e)throw new Error(`Unknown parameter "${e}"`);if(!0!==n)throw new TypeError(`Invalid value for parameter "${e}": ${n}`)}t[e]=n}))})),t}decompress(t,e,n){as.add((r=>{this._decompress(t,e,((t,e)=>{r(),n(t,e)}))}))}compress(t,e,n){as.add((r=>{this._compress(t,e,((t,e)=>{r(),n(t,e)}))}))}_decompress(t,e,n){const r=this._isServer?"client":"server";if(!this._inflate){const t=`${r}_max_window_bits`,e="number"!=typeof this.params[t]?O.default.Z_DEFAULT_WINDOWBITS:this.params[t];this._inflate=O.default.createInflateRaw({...this._options.zlibInflateOptions,windowBits:e}),this._inflate[ns]=this,this._inflate[rs]=0,this._inflate[is]=[],this._inflate.on("error",ls),this._inflate.on("data",ds)}this._inflate[os]=n,this._inflate.write(t),e&&this._inflate.write(es),this._inflate.flush((()=>{const t=this._inflate[ss];if(t)return this._inflate.close(),this._inflate=null,void n(t);const o=Zi.concat(this._inflate[is],this._inflate[rs]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[rs]=0,this._inflate[is]=[],e&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,o)}))}_compress(t,e,n){const r=this._isServer?"server":"client";if(!this._deflate){const t=`${r}_max_window_bits`,e="number"!=typeof this.params[t]?O.default.Z_DEFAULT_WINDOWBITS:this.params[t];this._deflate=O.default.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:e}),this._deflate[rs]=0,this._deflate[is]=[],this._deflate.on("data",us)}this._deflate[os]=n,this._deflate.write(t),this._deflate.flush(O.default.Z_SYNC_FLUSH,(()=>{if(!this._deflate)return;let t=Zi.concat(this._deflate[is],this._deflate[rs]);e&&(t=new ts(t.buffer,t.byteOffset,t.length-4)),this._deflate[os]=null,this._deflate[rs]=0,this._deflate[is]=[],e&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,t)}))}};function us(t){this[is].push(t),this[rs]+=t.length}function ds(t){this[rs]+=t.length,this[ns]._maxPayload<1||this[rs]<=this[ns]._maxPayload?this[is].push(t):(this[ss]=new RangeError("Max payload size exceeded"),this[ss].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[ss][Qi]=1009,this.removeListener("data",ds),this.reset())}function ls(t){this[ns]._inflate=null,this[ss]?this[os](this[ss]):(t[Qi]=1007,this[os](t))}var hs=function(t){const e=t.length;let n=0;for(;n<e;)if(128&t[n])if(192==(224&t[n])){if(n+1===e||128!=(192&t[n+1])||192==(254&t[n]))return!1;n+=2}else if(224==(240&t[n])){if(n+2>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||224===t[n]&&128==(224&t[n+1])||237===t[n]&&160==(224&t[n+1]))return!1;n+=3}else{if(240!=(248&t[n]))return!1;if(n+3>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||128!=(192&t[n+3])||240===t[n]&&128==(240&t[n+1])||244===t[n]&&t[n+1]>143||t[n]>244)return!1;n+=4}else n++;return!0},ps=Rr((function(t){try{t.exports=$i(__dirname)}catch(e){t.exports=hs}})),fs=Rr((function(t){const{isUtf8:e}=M.default,{hasBlob:n}=ji;function r(t){const e=t.length;let n=0;for(;n<e;)if(128&t[n])if(192==(224&t[n])){if(n+1===e||128!=(192&t[n+1])||192==(254&t[n]))return!1;n+=2}else if(224==(240&t[n])){if(n+2>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||224===t[n]&&128==(224&t[n+1])||237===t[n]&&160==(224&t[n+1]))return!1;n+=3}else{if(240!=(248&t[n]))return!1;if(n+3>=e||128!=(192&t[n+1])||128!=(192&t[n+2])||128!=(192&t[n+3])||240===t[n]&&128==(240&t[n+1])||244===t[n]&&t[n+1]>143||t[n]>244)return!1;n+=4}else n++;return!0}if(t.exports={isBlob:function(t){return n&&"object"==typeof t&&"function"==typeof t.arrayBuffer&&"string"==typeof t.type&&"function"==typeof t.stream&&("Blob"===t[Symbol.toStringTag]||"File"===t[Symbol.toStringTag])},isValidStatusCode:function(t){return t>=1e3&&t<=1014&&1004!==t&&1005!==t&&1006!==t||t>=3e3&&t<=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]},e)t.exports.isValidUTF8=function(t){return t.length<24?r(t):e(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{const e=ps;t.exports.isValidUTF8=function(t){return t.length<32?r(t):e(t)}}catch(t){}}));fs.isBlob,fs.isValidStatusCode,fs.isValidUTF8,fs.tokenChars;const{Writable:ms}=C.default,{BINARY_TYPES:vs,EMPTY_BUFFER:bs,kStatusCode:gs,kWebSocket:ys}=ji,{concat:ws,toArrayBuffer:Es,unmask:Is}=Zi,{isValidStatusCode:Rs,isValidUTF8:js}=fs,Ss=Buffer[Symbol.species];var _s=class extends ms{constructor(t={}){super(),this._allowSynchronousEvents=void 0===t.allowSynchronousEvents||t.allowSynchronousEvents,this._binaryType=t.binaryType||vs[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxPayload=0|t.maxPayload,this._skipUTF8Validation=!!t.skipUTF8Validation,this[ys]=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(t,e,n){if(8===this._opcode&&0==this._state)return n();this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(n)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t<this._buffers[0].length){const e=this._buffers[0];return this._buffers[0]=new Ss(e.buffer,e.byteOffset+t,e.length-t),new Ss(e.buffer,e.byteOffset,t)}const e=Buffer.allocUnsafe(t);do{const n=this._buffers[0],r=e.length-t;t>=n.length?e.set(this._buffers.shift(),r):(e.set(new Uint8Array(n.buffer,n.byteOffset,t),r),this._buffers[0]=new Ss(n.buffer,n.byteOffset+t,n.length-t)),t-=n.length}while(t>0);return e}startLoop(t){this._loop=!0;do{switch(this._state){case 0:this.getInfo(t);break;case 1:this.getPayloadLength16(t);break;case 2:this.getPayloadLength64(t);break;case 3:this.getMask();break;case 4:this.getData(t);break;case 5:case 6:return void(this._loop=!1)}}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2)return void(this._loop=!1);const e=this.consume(2);if(48&e[0]){return void t(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"))}const n=!(64&~e[0]);if(!n||this._extensions[cs.extensionName]){if(this._fin=!(128&~e[0]),this._opcode=15&e[0],this._payloadLength=127&e[1],0===this._opcode){if(n){return void t(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}if(!this._fragmented){return void t(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 t(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 t(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"))}if(!this._fin){return void t(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"))}if(n){return void t(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 t(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&~e[1]),this._isServer){if(!this._masked){return void t(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}}else if(this._masked){return void t(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(t)}else{t(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}}getPayloadLength16(t){this._bufferedBytes<2?this._loop=!1:(this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t))}getPayloadLength64(t){if(this._bufferedBytes<8)return void(this._loop=!1);const e=this.consume(8),n=e.readUInt32BE(0);if(n>Math.pow(2,21)-1){t(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)+e.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){t(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(t){let e=bs;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);e=this.consume(this._payloadLength),this._masked&&0!==(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])&&Is(e,this._mask)}if(this._opcode>7)this.controlMessage(e,t);else{if(this._compressed)return this._state=5,void this.decompress(e,t);e.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(e)),this.dataMessage(t)}}decompress(t,e){this._extensions[cs.extensionName].decompress(t,this._fin,((t,n)=>{if(t)return e(t);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){const t=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");return void e(t)}this._fragments.push(n)}this.dataMessage(e),0===this._state&&this.startLoop(e)}))}dataMessage(t){if(!this._fin)return void(this._state=0);const e=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?ws(n,e):"arraybuffer"===this._binaryType?Es(ws(n,e)):"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(t)})))}else{const r=ws(n,e);if(!this._skipUTF8Validation&&!js(r)){const e=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void t(e)}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(t)})))}}controlMessage(t,e){if(8!==this._opcode)this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",t),this._state=0):(this._state=6,setImmediate((()=>{this.emit(9===this._opcode?"ping":"pong",t),this._state=0,this.startLoop(e)})));else{if(0===t.length)this._loop=!1,this.emit("conclude",1005,bs),this.end();else{const n=t.readUInt16BE(0);if(!Rs(n)){const t=this.createError(RangeError,`invalid status code ${n}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");return void e(t)}const r=new Ss(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!js(r)){const t=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");return void e(t)}this._loop=!1,this.emit("conclude",n,r),this.end()}this._state=0}}createError(t,e,n,r,o){this._loop=!1,this._errored=!0;const i=new t(n?`Invalid WebSocket frame: ${e}`:e);return Error.captureStackTrace(i,this.createError),i.code=o,i[gs]=r,i}};const{randomFillSync:Cs}=G.default,{EMPTY_BUFFER:As,kWebSocket:Us,NOOP:xs}=ji,{isBlob:Ps,isValidStatusCode:ks}=fs,{mask:Os,toBuffer:Ts}=Zi,Ds=Symbol("kByteLength"),Ls=Buffer.alloc(4),Ns=8192;let qs,Bs=Ns;class Fs{constructor(t,e,n){this._extensions=e||{},n&&(this._generateMask=n,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=0,this.onerror=xs,this[Us]=void 0}static frame(t,e){let n,r,o=!1,i=2,s=!1;e.mask&&(n=e.maskBuffer||Ls,e.generateMask?e.generateMask(n):(Bs===Ns&&(void 0===qs&&(qs=Buffer.alloc(Ns)),Cs(qs,0,Ns),Bs=0),n[0]=qs[Bs++],n[1]=qs[Bs++],n[2]=qs[Bs++],n[3]=qs[Bs++]),s=0===(n[0]|n[1]|n[2]|n[3]),i=6),"string"==typeof t?r=e.mask&&!s||void 0===e[Ds]?(t=Buffer.from(t)).length:e[Ds]:(r=t.length,o=e.mask&&e.readOnly&&!s);let a=r;r>=65536?(i+=8,a=127):r>125&&(i+=2,a=126);const c=Buffer.allocUnsafe(o?r+i:i);return c[0]=e.fin?128|e.opcode:e.opcode,e.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)),e.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,t]:o?(Os(t,n,c,i,r),[c]):(Os(t,n,t,0,r),[c,t])):[c,t]}close(t,e,n,r){let o;if(void 0===t)o=As;else{if("number"!=typeof t||!ks(t))throw new TypeError("First argument must be a valid error code number");if(void 0!==e&&e.length){const n=Buffer.byteLength(e);if(n>123)throw new RangeError("The message must not be greater than 123 bytes");o=Buffer.allocUnsafe(2+n),o.writeUInt16BE(t,0),"string"==typeof e?o.write(e,2):o.set(e,2)}else o=Buffer.allocUnsafe(2),o.writeUInt16BE(t,0)}const i={[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(Fs.frame(o,i),r)}ping(t,e,n){let r,o;if("string"==typeof t?(r=Buffer.byteLength(t),o=!1):Ps(t)?(r=t.size,o=!1):(r=(t=Ts(t)).length,o=Ts.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:e,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};Ps(t)?0!==this._state?this.enqueue([this.getBlobData,t,!1,i,n]):this.getBlobData(t,!1,i,n):0!==this._state?this.enqueue([this.dispatch,t,!1,i,n]):this.sendFrame(Fs.frame(t,i),n)}pong(t,e,n){let r,o;if("string"==typeof t?(r=Buffer.byteLength(t),o=!1):Ps(t)?(r=t.size,o=!1):(r=(t=Ts(t)).length,o=Ts.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:e,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};Ps(t)?0!==this._state?this.enqueue([this.getBlobData,t,!1,i,n]):this.getBlobData(t,!1,i,n):0!==this._state?this.enqueue([this.dispatch,t,!1,i,n]):this.sendFrame(Fs.frame(t,i),n)}send(t,e,n){const r=this._extensions[cs.extensionName];let o,i,s=e.binary?2:1,a=e.compress;"string"==typeof t?(o=Buffer.byteLength(t),i=!1):Ps(t)?(o=t.size,i=!1):(o=(t=Ts(t)).length,i=Ts.readOnly),this._firstFragment?(this._firstFragment=!1,a&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=o>=r._threshold),this._compress=a):(a=!1,s=0),e.fin&&(this._firstFragment=!0);const c={[Ds]:o,fin:e.fin,generateMask:this._generateMask,mask:e.mask,maskBuffer:this._maskBuffer,opcode:s,readOnly:i,rsv1:a};Ps(t)?0!==this._state?this.enqueue([this.getBlobData,t,this._compress,c,n]):this.getBlobData(t,this._compress,c,n):0!==this._state?this.enqueue([this.dispatch,t,this._compress,c,n]):this.dispatch(t,this._compress,c,n)}getBlobData(t,e,n,r){this._bufferedBytes+=n[Ds],this._state=2,t.arrayBuffer().then((t=>{if(this._socket.destroyed){const t=new Error("The socket was closed while the blob was being read");return void process.nextTick(Ms,this,t,r)}this._bufferedBytes-=n[Ds];const o=Ts(t);e?this.dispatch(o,e,n,r):(this._state=0,this.sendFrame(Fs.frame(o,n),r),this.dequeue())})).catch((t=>{process.nextTick(zs,this,t,r)}))}dispatch(t,e,n,r){if(!e)return void this.sendFrame(Fs.frame(t,n),r);const o=this._extensions[cs.extensionName];this._bufferedBytes+=n[Ds],this._state=1,o.compress(t,n.fin,((t,e)=>{if(this._socket.destroyed){Ms(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(Fs.frame(e,n),r),this.dequeue()}))}dequeue(){for(;0===this._state&&this._queue.length;){const t=this._queue.shift();this._bufferedBytes-=t[3][Ds],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][Ds],this._queue.push(t)}sendFrame(t,e){2===t.length?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],e),this._socket.uncork()):this._socket.write(t[0],e)}}var Gs=Fs;function Ms(t,e,n){"function"==typeof n&&n(e);for(let n=0;n<t._queue.length;n++){const r=t._queue[n],o=r[r.length-1];"function"==typeof o&&o(e)}}function zs(t,e,n){Ms(t,e,n),t.onerror(e)}const{kForOnEventAttribute:Js,kListener:Ws}=ji,$s=Symbol("kCode"),Hs=Symbol("kData"),Vs=Symbol("kError"),Zs=Symbol("kMessage"),Ys=Symbol("kReason"),Ks=Symbol("kTarget"),Xs=Symbol("kType"),Qs=Symbol("kWasClean");class ta{constructor(t){this[Ks]=null,this[Xs]=t}get target(){return this[Ks]}get type(){return this[Xs]}}Object.defineProperty(ta.prototype,"target",{enumerable:!0}),Object.defineProperty(ta.prototype,"type",{enumerable:!0});class ea extends ta{constructor(t,e={}){super(t),this[$s]=void 0===e.code?0:e.code,this[Ys]=void 0===e.reason?"":e.reason,this[Qs]=void 0!==e.wasClean&&e.wasClean}get code(){return this[$s]}get reason(){return this[Ys]}get wasClean(){return this[Qs]}}Object.defineProperty(ea.prototype,"code",{enumerable:!0}),Object.defineProperty(ea.prototype,"reason",{enumerable:!0}),Object.defineProperty(ea.prototype,"wasClean",{enumerable:!0});class na extends ta{constructor(t,e={}){super(t),this[Vs]=void 0===e.error?null:e.error,this[Zs]=void 0===e.message?"":e.message}get error(){return this[Vs]}get message(){return this[Zs]}}Object.defineProperty(na.prototype,"error",{enumerable:!0}),Object.defineProperty(na.prototype,"message",{enumerable:!0});class ra extends ta{constructor(t,e={}){super(t),this[Hs]=void 0===e.data?null:e.data}get data(){return this[Hs]}}Object.defineProperty(ra.prototype,"data",{enumerable:!0});const oa={addEventListener(t,e,n={}){for(const r of this.listeners(t))if(!n[Js]&&r[Ws]===e&&!r[Js])return;let r;if("message"===t)r=function(t,n){const r=new ra("message",{data:n?t:t.toString()});r[Ks]=this,sa(e,this,r)};else if("close"===t)r=function(t,n){const r=new ea("close",{code:t,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[Ks]=this,sa(e,this,r)};else if("error"===t)r=function(t){const n=new na("error",{error:t,message:t.message});n[Ks]=this,sa(e,this,n)};else{if("open"!==t)return;r=function(){const t=new ta("open");t[Ks]=this,sa(e,this,t)}}r[Js]=!!n[Js],r[Ws]=e,n.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(const n of this.listeners(t))if(n[Ws]===e&&!n[Js]){this.removeListener(t,n);break}}};var ia={CloseEvent:ea,ErrorEvent:na,Event:ta,EventTarget:oa,MessageEvent:ra};function sa(t,e,n){"object"==typeof t&&t.handleEvent?t.handleEvent.call(t,n):t.call(e,n)}const{tokenChars:aa}=fs;function ca(t,e,n){void 0===t[e]?t[e]=[n]:t[e].push(n)}var ua={format:function(t){return Object.keys(t).map((e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map((t=>[e].concat(Object.keys(t).map((e=>{let n=t[e];return Array.isArray(n)||(n=[n]),n.map((t=>!0===t?e:`${e}=${t}`)).join("; ")}))).join("; "))).join(", ")})).join(", ")},parse:function(t){const e=Object.create(null);let n,r,o=Object.create(null),i=!1,s=!1,a=!1,c=-1,u=-1,d=-1,l=0;for(;l<t.length;l++)if(u=t.charCodeAt(l),void 0===n)if(-1===d&&1===aa[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=t.slice(c,d);44===u?(ca(e,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===aa[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),ca(o,t.slice(c,d),!0),44===u&&(ca(e,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=t.slice(c,l),c=d=-1}else if(s){if(1!==aa[u])throw new SyntaxError(`Unexpected character at index ${l}`);-1===c?c=l:i||(i=!0),s=!1}else if(a)if(1===aa[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===t.charCodeAt(l-1))a=!0;else if(-1===d&&1===aa[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=t.slice(c,d);i&&(s=s.replace(/\\/g,""),i=!1),ca(o,r,s),44===u&&(ca(e,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 h=t.slice(c,d);return void 0===n?ca(e,h,o):(void 0===r?ca(o,h,!0):ca(o,r,i?h.replace(/\\/g,""):h),ca(e,n,o)),e}};const{randomBytes:da,createHash:la}=G.default,{URL:ha}=x.default,{isBlob:pa}=fs,{BINARY_TYPES:fa,EMPTY_BUFFER:ma,GUID:va,kForOnEventAttribute:ba,kListener:ga,kStatusCode:ya,kWebSocket:wa,NOOP:Ea}=ji,{EventTarget:{addEventListener:Ia,removeEventListener:Ra}}=ia,{format:ja,parse:Sa}=ua,{toBuffer:_a}=Zi,Ca=Symbol("kAborted"),Aa=[8,13],Ua=["CONNECTING","OPEN","CLOSING","CLOSED"],xa=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class Pa extends _.default{constructor(t,e,n){super(),this._binaryType=fa[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ma,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Pa.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==t?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===e?e=[]:Array.isArray(e)||("object"==typeof e&&null!==e?(n=e,e=[]):e=[e]),Oa(this,t,e,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){fa.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,e,n){const r=new _s({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation}),o=new Gs(t,this._extensions,n.generateMask);this._receiver=r,this._sender=o,this._socket=t,r[wa]=this,o[wa]=this,t[wa]=this,r.on("conclude",Ba),r.on("drain",Fa),r.on("error",Ga),r.on("message",za),r.on("ping",Ja),r.on("pong",Wa),o.onerror=Ha,t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),e.length>0&&t.unshift(e),t.on("close",Za),t.on("data",Ya),t.on("end",Ka),t.on("error",Xa),this._readyState=Pa.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=Pa.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[cs.extensionName]&&this._extensions[cs.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Pa.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,e){if(this.readyState!==Pa.CLOSED)if(this.readyState!==Pa.CONNECTING)this.readyState!==Pa.CLOSING?(this._readyState=Pa.CLOSING,this._sender.close(t,e,!this._isServer,(t=>{t||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())})),Va(this)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();else{const t="WebSocket was closed before the connection was established";Na(this,this._req,t)}}pause(){this.readyState!==Pa.CONNECTING&&this.readyState!==Pa.CLOSED&&(this._paused=!0,this._socket.pause())}ping(t,e,n){if(this.readyState===Pa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(n=t,t=e=void 0):"function"==typeof e&&(n=e,e=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===Pa.OPEN?(void 0===e&&(e=!this._isServer),this._sender.ping(t||ma,e,n)):qa(this,t,n)}pong(t,e,n){if(this.readyState===Pa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");"function"==typeof t?(n=t,t=e=void 0):"function"==typeof e&&(n=e,e=void 0),"number"==typeof t&&(t=t.toString()),this.readyState===Pa.OPEN?(void 0===e&&(e=!this._isServer),this._sender.pong(t||ma,e,n)):qa(this,t,n)}resume(){this.readyState!==Pa.CONNECTING&&this.readyState!==Pa.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,e,n){if(this.readyState===Pa.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof e&&(n=e,e={}),"number"==typeof t&&(t=t.toString()),this.readyState!==Pa.OPEN)return void qa(this,t,n);const r={binary:"string"!=typeof t,mask:!this._isServer,compress:!0,fin:!0,...e};this._extensions[cs.extensionName]||(r.compress=!1),this._sender.send(t||ma,r,n)}terminate(){if(this.readyState!==Pa.CLOSED)if(this.readyState!==Pa.CONNECTING)this._socket&&(this._readyState=Pa.CLOSING,this._socket.destroy());else{const t="WebSocket was closed before the connection was established";Na(this,this._req,t)}}}Object.defineProperty(Pa,"CONNECTING",{enumerable:!0,value:Ua.indexOf("CONNECTING")}),Object.defineProperty(Pa.prototype,"CONNECTING",{enumerable:!0,value:Ua.indexOf("CONNECTING")}),Object.defineProperty(Pa,"OPEN",{enumerable:!0,value:Ua.indexOf("OPEN")}),Object.defineProperty(Pa.prototype,"OPEN",{enumerable:!0,value:Ua.indexOf("OPEN")}),Object.defineProperty(Pa,"CLOSING",{enumerable:!0,value:Ua.indexOf("CLOSING")}),Object.defineProperty(Pa.prototype,"CLOSING",{enumerable:!0,value:Ua.indexOf("CLOSING")}),Object.defineProperty(Pa,"CLOSED",{enumerable:!0,value:Ua.indexOf("CLOSED")}),Object.defineProperty(Pa.prototype,"CLOSED",{enumerable:!0,value:Ua.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach((t=>{Object.defineProperty(Pa.prototype,t,{enumerable:!0})})),["open","error","close","message"].forEach((t=>{Object.defineProperty(Pa.prototype,`on${t}`,{enumerable:!0,get(){for(const e of this.listeners(t))if(e[ba])return e[ga];return null},set(e){for(const e of this.listeners(t))if(e[ba]){this.removeListener(t,e);break}"function"==typeof e&&this.addEventListener(t,e,{[ba]:!0})}})})),Pa.prototype.addEventListener=Ia,Pa.prototype.removeEventListener=Ra;var ka=Pa;function Oa(t,e,n,r){const o={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Aa[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(t._autoPong=o.autoPong,!Aa.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${Aa.join(", ")})`);let i;if(e instanceof ha)i=e;else try{i=new ha(e)}catch(t){throw new SyntaxError(`Invalid URL: ${e}`)}"http:"===i.protocol?i.protocol="ws:":"https:"===i.protocol&&(i.protocol="wss:"),t._url=i.href;const s="wss:"===i.protocol,a="ws+unix:"===i.protocol;let c;if("ws:"===i.protocol||s||a?a&&!i.pathname?c="The URL's pathname is empty":i.hash&&(c="The URL contains a fragment identifier"):c='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"',c){const e=new SyntaxError(c);if(0===t._redirects)throw e;return void Ta(t,e)}const u=s?443:80,d=da(16).toString("base64"),l=s?k.default.request:U.default.request,h=new Set;let p,f;if(o.createConnection=o.createConnection||(s?La:Da),o.defaultPort=o.defaultPort||u,o.port=i.port||u,o.host=i.hostname.startsWith("[")?i.hostname.slice(1,-1):i.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":d,Connection:"Upgrade",Upgrade:"websocket"},o.path=i.pathname+i.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(p=new cs(!0!==o.perMessageDeflate?o.perMessageDeflate:{},!1,o.maxPayload),o.headers["Sec-WebSocket-Extensions"]=ja({[cs.extensionName]:p.offer()})),n.length){for(const t of n){if("string"!=typeof t||!xa.test(t)||h.has(t))throw new SyntaxError("An invalid or duplicated subprotocol was specified");h.add(t)}o.headers["Sec-WebSocket-Protocol"]=n.join(",")}if(o.origin&&(o.protocolVersion<13?o.headers["Sec-WebSocket-Origin"]=o.origin:o.headers.Origin=o.origin),(i.username||i.password)&&(o.auth=`${i.username}:${i.password}`),a){const t=o.path.split(":");o.socketPath=t[0],o.path=t[1]}if(o.followRedirects){if(0===t._redirects){t._originalIpc=a,t._originalSecure=s,t._originalHostOrSocketPath=a?o.socketPath:i.host;const e=r&&r.headers;if(r={...r,headers:{}},e)for(const[t,n]of Object.entries(e))r.headers[t.toLowerCase()]=n}else if(0===t.listenerCount("redirect")){const e=a?!!t._originalIpc&&o.socketPath===t._originalHostOrSocketPath:!t._originalIpc&&i.host===t._originalHostOrSocketPath;(!e||t._originalSecure&&!s)&&(delete o.headers.authorization,delete o.headers.cookie,e||delete o.headers.host,o.auth=void 0)}o.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(o.auth).toString("base64")),f=t._req=l(o),t._redirects&&t.emit("redirect",t.url,f)}else f=t._req=l(o);o.timeout&&f.on("timeout",(()=>{Na(t,f,"Opening handshake has timed out")})),f.on("error",(e=>{null===f||f[Ca]||(f=t._req=null,Ta(t,e))})),f.on("response",(i=>{const s=i.headers.location,a=i.statusCode;if(s&&o.followRedirects&&a>=300&&a<400){if(++t._redirects>o.maxRedirects)return void Na(t,f,"Maximum redirects exceeded");let i;f.abort();try{i=new ha(s,e)}catch(e){const n=new SyntaxError(`Invalid URL: ${s}`);return void Ta(t,n)}Oa(t,i,n,r)}else t.emit("unexpected-response",f,i)||Na(t,f,`Unexpected server response: ${i.statusCode}`)})),f.on("upgrade",((e,n,r)=>{if(t.emit("upgrade",e),t.readyState!==Pa.CONNECTING)return;f=t._req=null;const i=e.headers.upgrade;if(void 0===i||"websocket"!==i.toLowerCase())return void Na(t,n,"Invalid Upgrade header");const s=la("sha1").update(d+va).digest("base64");if(e.headers["sec-websocket-accept"]!==s)return void Na(t,n,"Invalid Sec-WebSocket-Accept header");const a=e.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(t,n,c);a&&(t._protocol=a);const u=e.headers["sec-websocket-extensions"];if(void 0!==u){if(!p){return void Na(t,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let e;try{e=Sa(u)}catch(e){return void Na(t,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(e);if(1!==r.length||r[0]!==cs.extensionName){return void Na(t,n,"Server indicated an extension that was not requested")}try{p.accept(e[cs.extensionName])}catch(e){return void Na(t,n,"Invalid Sec-WebSocket-Extensions header")}t._extensions[cs.extensionName]=p}t.setSocket(n,r,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})})),o.finishRequest?o.finishRequest(f,t):f.end()}function Ta(t,e){t._readyState=Pa.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function Da(t){return t.path=t.socketPath,L.default.connect(t)}function La(t){return t.path=void 0,t.servername||""===t.servername||(t.servername=L.default.isIP(t.host)?"":t.host),F.default.connect(t)}function Na(t,e,n){t._readyState=Pa.CLOSING;const r=new Error(n);Error.captureStackTrace(r,Na),e.setHeader?(e[Ca]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(Ta,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function qa(t,e,n){if(e){const n=pa(e)?e.size:_a(e).length;t._socket?t._sender._bufferedBytes+=n:t._bufferedAmount+=n}if(n){const e=new Error(`WebSocket is not open: readyState ${t.readyState} (${Ua[t.readyState]})`);process.nextTick(n,e)}}function Ba(t,e){const n=this[wa];n._closeFrameReceived=!0,n._closeMessage=e,n._closeCode=t,void 0!==n._socket[wa]&&(n._socket.removeListener("data",Ya),process.nextTick($a,n._socket),1005===t?n.close():n.close(t,e))}function Fa(){const t=this[wa];t.isPaused||t._socket.resume()}function Ga(t){const e=this[wa];void 0!==e._socket[wa]&&(e._socket.removeListener("data",Ya),process.nextTick($a,e._socket),e.close(t[ya])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function Ma(){this[wa].emitClose()}function za(t,e){this[wa].emit("message",t,e)}function Ja(t){const e=this[wa];e._autoPong&&e.pong(t,!this._isServer,Ea),e.emit("ping",t)}function Wa(t){this[wa].emit("pong",t)}function $a(t){t.resume()}function Ha(t){const e=this[wa];e.readyState!==Pa.CLOSED&&(e.readyState===Pa.OPEN&&(e._readyState=Pa.CLOSING,Va(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function Va(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),3e4)}function Za(){const t=this[wa];let e;this.removeListener("close",Za),this.removeListener("data",Ya),this.removeListener("end",Ka),t._readyState=Pa.CLOSING,this._readableState.endEmitted||t._closeFrameReceived||t._receiver._writableState.errorEmitted||null===(e=t._socket.read())||t._receiver.write(e),t._receiver.end(),this[wa]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",Ma),t._receiver.on("finish",Ma))}function Ya(t){this[wa]._receiver.write(t)||this.pause()}function Ka(){const t=this[wa];t._readyState=Pa.CLOSING,t._receiver.end(),this.end()}function Xa(){const t=this[wa];this.removeListener("error",Xa),this.on("error",Ea),t&&(t._readyState=Pa.CLOSING,this.destroy())}const{Duplex:Qa}=C.default;function tc(t){t.emit("close")}function ec(){!this.destroyed&&this._writableState.finished&&this.destroy()}function nc(t){this.removeListener("error",nc),this.destroy(),0===this.listenerCount("error")&&this.emit("error",t)}var rc=function(t,e){let n=!0;const r=new Qa({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",(function(e,n){const o=!n&&r._readableState.objectMode?e.toString():e;r.push(o)||t.pause()})),t.once("error",(function(t){r.destroyed||(n=!1,r.destroy(t))})),t.once("close",(function(){r.destroyed||r.push(null)})),r._destroy=function(e,o){if(t.readyState===t.CLOSED)return o(e),void process.nextTick(tc,r);let i=!1;t.once("error",(function(t){i=!0,o(t)})),t.once("close",(function(){i||o(e),process.nextTick(tc,r)})),n&&t.terminate()},r._final=function(e){t.readyState!==t.CONNECTING?null!==t._socket&&(t._socket._writableState.finished?(e(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",(function(){e()})),t.close())):t.once("open",(function(){r._final(e)}))},r._read=function(){t.isPaused&&t.resume()},r._write=function(e,n,o){t.readyState!==t.CONNECTING?t.send(e,o):t.once("open",(function(){r._write(e,n,o)}))},r.on("end",ec),r.on("error",nc),r},oc=function(t){function e(e,n,r,o,i,s){void 0===s&&(s=5e3);var a=t.call(this)||this;a.endpoint=e,a.headers=n,a.rewriteHostHeader=r,a.bindToAssign=o,a.agent=i,a.closeTimeout=s,a.protocol="TCP",a.openConnections=new Set,a.tcpServer=N.createServer(a.handleConnection.bind(a));var c=null==r?void 0:r.altHostnames.map((function(t){return(e=Ve(e=t))&&pr.test(e)?e.replace(hr,"\\$&"):e;var e})).join("|");return a.hostRegex=new RegExp("Host: (?:".concat(c,")(:.*$|$)"),"im"),a}return Y(e,t),Object.defineProperty(e.prototype,"bindTo",{get:function(){var t;return null!==(t=this.boundTo)&&void 0!==t?t:this.bindToAssign},enumerable:!1,configurable:!0}),e.prototype.open=function(){return X(this,void 0,void 0,(function(){var t=this;return Q(this,(function(e){return[2,new Promise((function(e){if(t.bindToAssign){var n=t.bindToAssign,r=n.port,o=n.address;t.tcpServer.listen(r,o,(function(){t.emit("tunnel-open",{address:o,port:r}),e({address:o,port:r})}))}else t.tcpServer.listen(0,(function(){var n=t.tcpServer.address(),r=n.address,o=n.port,i="0.0.0.0"===r||"::"===r?"127.0.0.1":r;t.boundTo={address:i,port:o},t.emit("tunnel-open",t.boundTo),e(t.boundTo)}))}))]}))}))},e.prototype.close=function(){return X(this,void 0,void 0,(function(){var t,e=this;return Q(this,(function(n){switch(n.label){case 0:return t=!1,[4,Promise.race([new Promise((function(n){e.tcpServer.close((function(){t=!0,e.emit("tunnel-close"),n()}))})),new Promise((function(n){new Promise((function(t){return setTimeout(t,e.closeTimeout)})).then((function(){t||(e.openConnections.forEach((function(t){t.destroy(),e.openConnections.delete(t)})),n())}))}))])];case 1:return n.sent(),[2]}}))}))},e.prototype.handleConnection=function(t){var e=this;this.openConnections.add(t);var n=this.endpoint.replace("https:","wss:"),r=new ka(n,{headers:this.headers,agent:this.agent}),o=rc(r),i=this.getHeaderTransform();this.rewriteHostHeader&&i?Ei(t,i,o):Ei(t,o),Ei(o,t),r.on("close",(function(t,n,r){e.emit("connection-close",t,n,r)})),o.on("error",(function(t){e.emit("connection-error",t)})),t.on("error",(function(t){e.emit("connection-error",t)})),this.emit("connection-accept")},e.prototype.getHeaderTransform=function(){if(this.rewriteHostHeader){var t=this.rewriteHostHeader.targetHostname,e=this.hostRegex;return new n.Transform({transform:function(n,r,o){var i=n.toString();if(i.split("\n",1)[0].includes("HTTP")){var s=i.replace(e,"Host: ".concat(t));o(null,Buffer.from(s))}else o(null,n)}})}},e}(t.EventEmitter),ic=function(t){function e(e,n,r,o){var i=t.call(this)||this;return i.endpoint=e,i.headers=n,i.bindToAssign=r,i.agent=o,i.protocol="UDP",i.udpSocket=z.default.createSocket("udp4"),i.handleConnection(),i}return Y(e,t),Object.defineProperty(e.prototype,"bindTo",{get:function(){var t;return null!==(t=this.boundTo)&&void 0!==t?t:this.bindToAssign},enumerable:!1,configurable:!0}),e.prototype.open=function(){return X(this,void 0,void 0,(function(){var t=this;return Q(this,(function(e){return[2,new Promise((function(e){if(t.bindToAssign){var n=t.bindToAssign,r=n.port,o=n.address;t.udpSocket.bind(r,o,(function(){t.emit("tunnel-open",{address:o,port:r}),e({address:o,port:r})}))}else t.udpSocket.bind(0,(function(){var n=t.udpSocket.address(),r=n.address,o=n.port,i="0.0.0.0"===r||"::"===r?"127.0.0.1":r;t.boundTo={address:i,port:o},t.emit("tunnel-open",t.boundTo),e(t.boundTo)}))}))]}))}))},e.prototype.close=function(){return X(this,void 0,void 0,(function(){var t=this;return Q(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e){t.udpSocket.close((function(){t.emit("tunnel-close"),e()}))}))];case 1:return e.sent(),[2]}}))}))},e.prototype.handleConnection=function(){var t,e=this,n=this.endpoint.replace("https:","wss:"),r=new ka(n,{headers:this.headers,agent:this.agent}),o=rc(r);this.udpSocket.on("message",(function(e,n){t=n,o.write(e)})),o.on("data",(function(n){t&&e.udpSocket.send(n,t.port,t.address,(function(t){t&&e.emit("connection-error",t)}))})),this.udpSocket.on("error",(function(t){e.emit("connection-error",t)})),o.on("error",(function(t){e.emit("connection-error",t)})),r.on("connection-close",(function(t,n,r){e.emit("connection-close",t,n,r)})),r.on("connection-error",(function(t){e.emit("connection-error",t)})),this.emit("connection-accept")},e}(t.EventEmitter),sc=function(t){function n(n,r,o,i){var s=t.call(this)||this;return s.contextProvider=n,s.listServices=r,s.listAddons=o,s.agent=i,s.connections=[],s.hostsFileMutex=new ii,s.ipAllocationMutex=new ii,s.stopForwarding=function(t){return X(s,void 0,void 0,(function(){var e,n,r,o,i,s,a;return Q(this,(function(c){switch(c.label){case 0:return[4,t.tunnel.close()];case 1:return c.sent(),e=t.forwardingContext,n=e.projectId,r=e.type,o=e.id,i=e.hostnames,s=e.ipOnly,i.length>0&&!s?[4,this.unregisterHostnames(null===(a=t.tunnel.bindTo)||void 0===a?void 0:a.address,i)]:[3,3];case 2:c.sent(),c.label=3;case 3:return this.connections.splice(this.connections.findIndex((function(t){var e=t.forwardingContext,i=e.type,s=e.id,a=e.projectId;return s===o&&a===n&&i===r})),1),[2]}}))}))},s.canExecuteWithHostnames=function(){return"win32"!==process.platform?process.getuid&&0!==process.getuid()?{error:!0,message:"You are not running this command with sufficient privileges (uid=".concat(null===(t=null===process||void 0===process?void 0:process.getuid)||void 0===t?void 0:t.call(process),"). Try running with 'sudo -E'.")}:{error:!1,type:"unix-admin"}:function(){try{return e.execSync("fsutil dirty query %systemdrive%"),!0}catch(t){if("ENOENT"===t.code)try{return e.execSync("fltmc"),!0}catch(t){return!1}return!1}}()?{error:!1,type:"windows-admin"}:{error:!0,message:"You are not running this command as administrator. Please start command line with admin rights."};var t},s.assertStartedWithNodejs=function(){if(!Oo)throw new Error("Port forwarding only possible when started with nodejs")},s.proxyApiClient=new qo(n,i),s}return Y(n,t),n.prototype.withProjectForwarding=function(t,e,n){return void 0===n&&(n=!0),X(this,void 0,void 0,(function(){var r;return Q(this,(function(o){switch(o.label){case 0:return[4,this.forwardProject(t,n)];case 1:r=o.sent(),o.label=2;case 2:return o.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,o.sent()];case 4:return[4,this.stopProjectForwarding(t)];case 5:return o.sent(),[7];case 6:return[2]}}))}))},n.prototype.forwardProject=function(t,e){return void 0===e&&(e=!0),X(this,void 0,void 0,(function(){var n,r,o,i,s,a=this;return Q(this,(function(c){switch(c.label){case 0:return this.assertStartedWithNodejs(),n=t.projectId,[4,this.listServices.all({parameters:{projectId:n}})];case 1:return r=c.sent(),[4,this.listAddons.all({parameters:{projectId:n}})];case 2:return o=c.sent(),[4,Promise.all(r.data.services.map((function(t){return X(a,void 0,void 0,(function(){return Q(this,(function(r){return[2,this.forwardService({projectId:n,serviceId:t.id},e)]}))}))})))];case 3:return i=c.sent(),[4,Promise.all(o.data.addons.map((function(t){return X(a,void 0,void 0,(function(){return Q(this,(function(r){switch(r.label){case 0:return[4,this.forwardAddon({projectId:n,addonId:t.id},e)];case 1:return[2,r.sent()]}}))}))})))];case 4:return s=c.sent(),[2,{services:i,addons:s}]}}))}))},n.prototype.withServiceForwarding=function(t,e,n){return void 0===n&&(n=!0),X(this,void 0,void 0,(function(){var r;return Q(this,(function(o){switch(o.label){case 0:return[4,this.forwardService(t,n)];case 1:r=o.sent(),o.label=2;case 2:return o.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,o.sent()];case 4:return[4,this.stopServiceForwarding(t)];case 5:return o.sent(),[7];case 6:return[2]}}))}))},n.prototype.forwardService=function(t,e){return void 0===e&&(e=!0),X(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,u=this;return Q(this,(function(d){switch(d.label){case 0:return this.assertStartedWithNodejs(),n=t.projectId,r=t.serviceId,[4,this.proxyApiClient.getServiceDetails(n,r)];case 1:return o=d.sent(),i=o.namespace,s=o.targetDomain,a=o.instances,c=o.ports,0===a.length?[2,[]]:[4,Lo(c,(function(t){var o,c="https://".concat(s,"/tunnel/projects/").concat(n,"/services/").concat(r,"/instance/").concat(a[0].podName,"/port/").concat(t.internalPort),d="".concat(r,".").concat(i,".svc.cluster.local"),l=["".concat(r)];t.name&&l.push("".concat(t.name,".").concat(r)),"HTTP"===t.protocol&&(o={altHostnames:l,targetHostname:d});var h=tt([d],l,!0);return u.forwardPort(c,t,h,"service",r,n,e,o)}))];case 2:return[2,d.sent()]}}))}))},n.prototype.withAddonForwarding=function(t,e,n){return void 0===n&&(n=!0),X(this,void 0,void 0,(function(){var r;return Q(this,(function(o){switch(o.label){case 0:return[4,this.forwardAddon(t,n)];case 1:r=o.sent(),o.label=2;case 2:return o.trys.push([2,,4,6]),[4,e(r)];case 3:return[2,o.sent()];case 4:return[4,this.stopAddonForwarding(t)];case 5:return o.sent(),[7];case 6:return[2]}}))}))},n.prototype.forwardAddon=function(t,e){return void 0===e&&(e=!0),X(this,void 0,void 0,(function(){var n,r,o,i,s=this;return Q(this,(function(a){switch(a.label){case 0:return this.assertStartedWithNodejs(),n=t.addonId,r=t.projectId,[4,this.proxyApiClient.getAddonDetails(r,n)];case 1:return o=a.sent(),i=o.instances.map((function(t){var e=t.podName,n=t.internalHostname;return t.ports.map((function(t){return{podName:e,internalHostname:n,port:t}}))})),[4,Lo((c=i,null!=c&&c.length?en(c,vr):[]),(function(t){var i=t.podName,a=t.internalHostname,c=t.port;return X(s,void 0,void 0,(function(){var t;return Q(this,(function(s){return t="https://".concat(o.targetDomain,"/tunnel/projects/").concat(r,"/addons/").concat(n,"/instance/").concat(i,"/port/").concat(c.internalPort),[2,this.forwardPort(t,c,[a],"addon",n,r,e)]}))}))}))];case 2:return[2,a.sent()]}var c}))}))},n.prototype.allocateIpAddress=function(t){return X(this,void 0,void 0,(function(){var e=this;return Q(this,(function(n){return[2,this.ipAllocationMutex.enter((function(){return X(e,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){switch(s.label){case 0:return e="127.24.1.1",n="127.24.255.255",r=null!==(i=this.nextIpAddress)&&void 0!==i?i:e,[4,Bo(t,r,n)];case 1:return o=s.sent(),this.nextIpAddress=zo(Mo(o)+1),Mo(this.nextIpAddress)>Mo(n)&&(this.nextIpAddress=e),[2,o]}}))}))}))]}))}))},n.prototype.forwardPort=function(t,e,n,r,o,i,s,a){var c;return void 0===s&&(s=!0),X(this,void 0,void 0,(function(){var u,d,l,h,p,f,m=this;return Q(this,(function(v){switch(v.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,e,s)];case 1:return l=v.sent(),h="UDP"===e.protocol?new ic(t,u,l,this.agent):new oc(t,u,a,l,this.agent),s?[3,3]:[4,this.registerHostnames(null===(c=h.bindTo)||void 0===c?void 0:c.address,n)];case 2:v.sent(),v.label=3;case 3:return h.on("connection-accept",(function(){return m.emit("connection-accept",h)})),h.on("connection-close",(function(){return X(m,void 0,void 0,(function(){return Q(this,(function(t){return[2,this.emit("connection-close",h)]}))}))})),[4,h.open()];case 4:return p=v.sent(),f={projectId:i,id:o,type:r,hostnames:n,ipOnly:s,port:p.port,address:p.address,protocol:e.protocol,portName:e.name},this.emit("tunnel-open",h,f),h.on("connection-error",(function(t){return m.emit("connection-error",h,f,t)})),h.on("tunnel-close",(function(){return m.emit("tunnel-close",h,f)})),this.connections.push({tunnel:h,forwardingContext:f}),[2,{data:f}]}}))}))},n.prototype.determineSocketAddress=function(t,e,n,r,o,i){return X(this,void 0,void 0,(function(){var s,a,c;return Q(this,(function(u){switch(u.label){case 0:return i&&"darwin"===D.default.platform()?[2,void 0]:(s=this.connections.filter((function(n){return n.forwardingContext.projectId===t&&n.forwardingContext.id===e&&n.forwardingContext.type===r})),(a=null==s?void 0:s.find((function(t){return n.find((function(e){return t.forwardingContext.hostnames.includes(e)}))})))?[2,{address:null==a?void 0:a.forwardingContext.address,port:o.internalPort}]:(c={},[4,this.allocateIpAddress(o.internalPort)]));case 1:return[2,(c.address=u.sent(),c.port=o.internalPort,c)]}}))}))},n.prototype.registerHostnames=function(t,e){return X(this,void 0,void 0,(function(){return Q(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.removeHosts.apply(n,e),n.add.apply(n,tt([t],e,!1))}))];case 1:return n.sent(),[2]}}))}))},n.prototype.unregisterHostnames=function(t,e){return X(this,void 0,void 0,(function(){return Q(this,(function(n){switch(n.label){case 0:return[4,this.modifyHostsFile((function(n){n.remove.apply(n,tt([t],e,!1))}))];case 1:return n.sent(),[2]}}))}))},n.prototype.modifyHostsFile=function(t){return X(this,void 0,void 0,(function(){var e=this;return Q(this,(function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter((function(){return X(e,void 0,void 0,(function(){var e,n=this;return Q(this,(function(r){switch(r.label){case 0:return[4,oi.load({header:"Northflank Proxy"})];case 1:return e=r.sent(),t(e),[4,e.backup({suffix:".backup-pre-northflank"})];case 2:r.sent(),r.label=3;case 3:return r.trys.push([3,5,,7]),[4,ac(5)((function(){return X(n,void 0,void 0,(function(){return Q(this,(function(t){switch(t.label){case 0:return[4,e.write({writeMode:"atomic"})];case 1:return t.sent(),[2]}}))}))}))];case 4:return r.sent(),[3,7];case 5:return r.sent(),[4,ac(5)((function(){return X(n,void 0,void 0,(function(){return Q(this,(function(t){switch(t.label){case 0:return[4,e.write({writeMode:"standard"})];case 1:return t.sent(),[2]}}))}))}))];case 6:return r.sent(),[3,7];case 7:return[2]}}))}))}))];case 1:return n.sent(),[2]}}))}))},n.prototype.stopProjectForwarding=function(t){return X(this,void 0,void 0,(function(){var e=this;return Q(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return e.forwardingContext.projectId===t.projectId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},n.prototype.stopServiceForwarding=function(t){return X(this,void 0,void 0,(function(){var e=this;return Q(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return"service"===e.forwardingContext.type&&e.forwardingContext.projectId===t.projectId&&e.forwardingContext.id===t.serviceId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},n.prototype.stopAddonForwarding=function(t){return X(this,void 0,void 0,(function(){var e=this;return Q(this,(function(n){switch(n.label){case 0:return[4,Promise.all(this.connections.filter((function(e){return"addon"===e.forwardingContext.type&&e.forwardingContext.projectId===t.projectId&&e.forwardingContext.id===t.addonId})).map((function(t){return e.stopForwarding(t)})))];case 1:return n.sent(),[2]}}))}))},n.prototype.stop=function(){return X(this,void 0,void 0,(function(){var t=this;return Q(this,(function(e){switch(e.label){case 0:return[4,Promise.all(this.connections.map((function(e){return X(t,void 0,void 0,(function(){return Q(this,(function(t){return[2,this.stopForwarding(e)]}))}))})))];case 1:return e.sent(),[2]}}))}))},n}(t.EventEmitter),ac=function(t,e){return void 0===e&&(e=50),function(n){var r=t,o=function(){return X(void 0,void 0,void 0,(function(){var t;return Q(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,4]),[4,n()];case 1:return[2,i.sent()];case 2:if(t=i.sent(),r<=0)throw t;return r-=1,[4,new Promise((function(t){return setTimeout((function(){return t()}),e)}))];case 3:return i.sent(),[2,o()];case 4:return[2]}}))}))};return o()}},cc=function(t){function e(e,n,r,o,i,s,a){void 0===i&&(i=new A.PassThrough),void 0===s&&(s=new A.PassThrough),void 0===a&&(a=new A.PassThrough);var c=t.call(this)||this;return c.baseUrl=e,c.execConfig=n,c.token=r,c.agent=o,c.stdOut=i,c.stdErr=s,c.stdIn=a,c.waitForCommandResult=function(){return X(c,void 0,void 0,(function(){return Q(this,(function(t){switch(t.label){case 0:if(void 0===this.currentCommand)throw new Error("No command is running");return[4,this.currentCommand];case 1:return[2,t.sent()]}}))}))},c.sendInputToCurrentCommand=function(t){return X(c,void 0,void 0,(function(){var e;return Q(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running");return null===(e=this.duplex)||void 0===e||e.write(this.constructPayloadPacket(t)),[2]}))}))},c.resizeTerminal=function(t){return X(c,void 0,void 0,(function(){var e;return Q(this,(function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running, can't resize terminal");return null===(e=this.duplex)||void 0===e||e.write(JSON.stringify({type:"resize",data:{ttyRows:null==t?void 0:t.rows,ttyColumns:null==t?void 0:t.columns}})),[2]}))}))},c.constructPayloadPacket=function(t){return JSON.stringify({type:"payload",data:t.toString()})},c.stdInEndPacket=JSON.stringify({type:"stdInEnd"}),c}return Y(e,t),Object.defineProperty(e.prototype,"execEndpoint",{get:function(){var t=this.execConfig,e=t.entityId,n=t.entityType,r=t.projectId,o="".concat(this.baseUrl,"/v1/command-exec/projects/").concat(r,"/");return"".concat(o).concat(function(){switch(n){case"service":return"services/".concat(e);case"job":return"jobs/".concat(e);case"addon":return"addons/".concat(e);case"build":return"builds/".concat(e);default:throw new Error("Unexpected Northflank entity type received in command exec endpoint generation: ".concat(n))}}())},enumerable:!1,configurable:!0}),e.prototype.start=function(){return X(this,void 0,void 0,(function(){var t=this;return Q(this,(function(e){if(void 0!==this.currentCommand)throw new Error("Command is already running");return this.currentCommand=new Promise((function(e,n){var r,o,i;void 0!==t.remote&&n(Error("Command is already running"));var s,a=t.execEndpoint.replace("https:","wss:").replace("http:","ws:");t.remote=new ka(a,{agent:t.agent});try{t.duplex=rc(t.remote)}catch(t){throw new Error("Failed to establish connection to command execution proxy: ".concat(t.message))}t.initialAuth(),t.stdIn.on("data",(function(e){var n,r;(null===(n=t.duplex)||void 0===n?void 0:n.writable)&&(null===(r=t.duplex)||void 0===r||r.write(t.constructPayloadPacket(e)))})),t.stdIn.on("end",(function(){var e,n;(null===(e=t.duplex)||void 0===e?void 0:e.writable)&&(null===(n=t.duplex)||void 0===n||n.write(t.stdInEndPacket))})),null===(r=t.duplex)||void 0===r||r.on("data",(function(e){var n,r,o,i,a,u=JSON.parse(e.toString());switch(null==u?void 0:u.type){case"init":var d=u.data;"successful"!==d.auth?c("Command initialization failed: ".concat(null!==(n=null==d?void 0:d.message)&&void 0!==n?n:"Reason unknown")):t.emit("auth-success",s);break;case"completion":s=u.data,t.emit("command-result",s),null===(r=t.duplex)||void 0===r||r.end();break;case"stdOut":t.emit("std-out-data",u.data),t.stdOut.write(u.data,null===(o=t.execConfig)||void 0===o?void 0:o.encoding);break;case"stdErr":t.emit("std-err-data",u.data),t.stdErr.write(u.data,null===(i=t.execConfig)||void 0===i?void 0:i.encoding);break;case"error":c(null===(a=u.data)||void 0===a?void 0:a.message);break;default:var l="unable to parse message: ".concat(JSON.stringify(u));c(l)}})),null===(o=t.duplex)||void 0===o||o.on("end",(function(){t.emit("command-completed"),t.reset(),e(s)})),null===(i=t.duplex)||void 0===i||i.on("error",(function(n){t.emit("error",n),t.emit("command-completed"),t.reset(),e(s)}));var c=function(e){t.emit("error",e),t.reset(),n(new Error(e))};t.emit("command-started")})),[2,this.currentCommand]}))}))},e.prototype.initialAuth=function(){var t,e=this.execConfig,n=e.command,r=e.containerName,o=e.shell,i=e.user,s=e.group,a=e.encoding,c=e.tty,u=e.ttyColumns,d=e.ttyRows,l={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{containerId:r,command:n,shell:o,user:i,group:s,encoding:a,tty:c,ttyColumns:u,ttyRows:d}}};null===(t=this.duplex)||void 0===t||t.write(JSON.stringify(l))},e.prototype.reset=function(){var t;this.remote=void 0,this.currentCommand=void 0,null===(t=this.duplex)||void 0===t||t.destroy(),this.duplex=void 0},e}(t.EventEmitter),uc=function(){function t(t,e){this.contextProvider=t,this.agent=e,this.assertStartedWithNodejs=function(){if(!Oo)throw new Error("Command exec only possible when started with nodejs")}}return t.prototype.execServiceCommand=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){return n=t.serviceId,r=t.projectId,o=K({projectId:r,entityId:n,entityType:"service"},e),[2,this.execCommand(o)]}))}))},t.prototype.execServiceSession=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){switch(i.label){case 0:return n=t.serviceId,r=t.projectId,o=K({projectId:r,entityId:n,entityType:"service"},e),[4,this.shellSession(o)];case 1:return[2,i.sent()]}}))}))},t.prototype.execJobCommand=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){return n=t.jobId,r=t.projectId,o=K({projectId:r,entityId:n,entityType:"job"},e),[2,this.execCommand(o)]}))}))},t.prototype.execJobSession=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){switch(i.label){case 0:return n=t.jobId,r=t.projectId,o=K({projectId:r,entityId:n,entityType:"job"},e),[4,this.shellSession(o)];case 1:return[2,i.sent()]}}))}))},t.prototype.execCommand=function(t){return X(this,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){switch(o.label){case 0:return this.assertStartedWithNodejs(),e=this.getCommandRunner(K({shell:"none"},t)),n=new No,r=new No,e.stdOut.pipe(n),e.stdErr.pipe(r),e.on("error",(function(t){throw new Error(t)})),[4,e.start()];case 1:return[2,{commandResult:o.sent(),stdOut:n.getContentsAsString(),stdErr:r.getContentsAsString()}]}}))}))},t.prototype.shellSession=function(t){return X(this,void 0,void 0,(function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:return this.assertStartedWithNodejs(),e=this.getCommandRunner(t),n=new Promise((function(t){e.on("auth-success",(function(){t()}))})),e.start(),[4,n];case 1:return r.sent(),[2,e]}}))}))},t.prototype.getCommandRunner=function(t){var e=this.contextProvider.getCurrentBaseUrl(!0),n=this.contextProvider.getCurrentToken();if(!n)throw Error("API token not found");return new cc(e,t,n,this.agent)},t}();const dc="object"==typeof process&&process?process:{stdout:null,stderr:null},lc=t=>!!t&&"object"==typeof t&&(t instanceof Zc||t instanceof J.default||hc(t)||pc(t)),hc=t=>!!t&&"object"==typeof t&&t instanceof v.EventEmitter&&"function"==typeof t.pipe&&t.pipe!==J.default.Writable.prototype.pipe,pc=t=>!!t&&"object"==typeof t&&t instanceof v.EventEmitter&&"function"==typeof t.write&&"function"==typeof t.end,fc=Symbol("EOF"),mc=Symbol("maybeEmitEnd"),vc=Symbol("emittedEnd"),bc=Symbol("emittingEnd"),gc=Symbol("emittedError"),yc=Symbol("closed"),wc=Symbol("read"),Ec=Symbol("flush"),Ic=Symbol("flushChunk"),Rc=Symbol("encoding"),jc=Symbol("decoder"),Sc=Symbol("flowing"),_c=Symbol("paused"),Cc=Symbol("resume"),Ac=Symbol("buffer"),Uc=Symbol("pipes"),xc=Symbol("bufferLength"),Pc=Symbol("bufferPush"),kc=Symbol("bufferShift"),Oc=Symbol("objectMode"),Tc=Symbol("destroyed"),Dc=Symbol("error"),Lc=Symbol("emitData"),Nc=Symbol("emitEnd"),qc=Symbol("emitEnd2"),Bc=Symbol("async"),Fc=Symbol("abort"),Gc=Symbol("aborted"),Mc=Symbol("signal"),zc=Symbol("dataListeners"),Jc=Symbol("discarded"),Wc=t=>Promise.resolve().then(t),$c=t=>t();class Hc{src;dest;opts;ondrain;constructor(t,e,n){this.src=t,this.dest=e,this.opts=n,this.ondrain=()=>t[Cc](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class Vc extends Hc{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,n){super(t,e,n),this.proxyErrors=t=>e.emit("error",t),t.on("error",this.proxyErrors)}}class Zc extends v.EventEmitter{[Sc]=!1;[_c]=!1;[Uc]=[];[Ac]=[];[Oc];[Rc];[Bc];[jc];[fc]=!1;[vc]=!1;[bc]=!1;[yc]=!1;[gc]=null;[xc]=0;[Tc]=!1;[Mc];[Gc]=!1;[zc]=0;[Jc]=!1;writable=!0;readable=!0;constructor(...t){const e=t[0]||{};if(super(),e.objectMode&&"string"==typeof e.encoding)throw new TypeError("Encoding and objectMode may not be used together");e.objectMode?(this[Oc]=!0,this[Rc]=null):(t=>!t.objectMode&&!!t.encoding&&"buffer"!==t.encoding)(e)?(this[Rc]=e.encoding,this[Oc]=!1):(this[Oc]=!1,this[Rc]=null),this[Bc]=!!e.async,this[jc]=this[Rc]?new g.StringDecoder(this[Rc]):null,e&&!0===e.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[Ac]}),e&&!0===e.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[Uc]});const{signal:n}=e;n&&(this[Mc]=n,n.aborted?this[Fc]():n.addEventListener("abort",(()=>this[Fc]())))}get bufferLength(){return this[xc]}get encoding(){return this[Rc]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Oc]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Bc]}set async(t){this[Bc]=this[Bc]||!!t}[Fc](){this[Gc]=!0,this.emit("abort",this[Mc]?.reason),this.destroy(this[Mc]?.reason)}get aborted(){return this[Gc]}set aborted(t){}write(t,e,n){if(this[Gc])return!1;if(this[fc])throw new Error("write after end");if(this[Tc])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof e&&(n=e,e="utf8"),e||(e="utf8");const r=this[Bc]?Wc:$c;if(!this[Oc]&&!Buffer.isBuffer(t))if(o=t,!Buffer.isBuffer(o)&&ArrayBuffer.isView(o))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if((t=>t instanceof ArrayBuffer||!!t&&"object"==typeof t&&t.constructor&&"ArrayBuffer"===t.constructor.name&&t.byteLength>=0)(t))t=Buffer.from(t);else if("string"!=typeof t)throw new Error("Non-contiguous data written to non-objectMode stream");var o;return this[Oc]?(this[Sc]&&0!==this[xc]&&this[Ec](!0),this[Sc]?this.emit("data",t):this[Pc](t),0!==this[xc]&&this.emit("readable"),n&&r(n),this[Sc]):t.length?("string"!=typeof t||e===this[Rc]&&!this[jc]?.lastNeed||(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[Rc]&&(t=this[jc].write(t)),this[Sc]&&0!==this[xc]&&this[Ec](!0),this[Sc]?this.emit("data",t):this[Pc](t),0!==this[xc]&&this.emit("readable"),n&&r(n),this[Sc]):(0!==this[xc]&&this.emit("readable"),n&&r(n),this[Sc])}read(t){if(this[Tc])return null;if(this[Jc]=!1,0===this[xc]||0===t||t&&t>this[xc])return this[mc](),null;this[Oc]&&(t=null),this[Ac].length>1&&!this[Oc]&&(this[Ac]=[this[Rc]?this[Ac].join(""):Buffer.concat(this[Ac],this[xc])]);const e=this[wc](t||null,this[Ac][0]);return this[mc](),e}[wc](t,e){if(this[Oc])this[kc]();else{const n=e;t===n.length||null===t?this[kc]():"string"==typeof n?(this[Ac][0]=n.slice(t),e=n.slice(0,t),this[xc]-=t):(this[Ac][0]=n.subarray(t),e=n.subarray(0,t),this[xc]-=t)}return this.emit("data",e),this[Ac].length||this[fc]||this.emit("drain"),e}end(t,e,n){return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e="utf8"),void 0!==t&&this.write(t,e),n&&this.once("end",n),this[fc]=!0,this.writable=!1,!this[Sc]&&this[_c]||this[mc](),this}[Cc](){this[Tc]||(this[zc]||this[Uc].length||(this[Jc]=!0),this[_c]=!1,this[Sc]=!0,this.emit("resume"),this[Ac].length?this[Ec]():this[fc]?this[mc]():this.emit("drain"))}resume(){return this[Cc]()}pause(){this[Sc]=!1,this[_c]=!0,this[Jc]=!1}get destroyed(){return this[Tc]}get flowing(){return this[Sc]}get paused(){return this[_c]}[Pc](t){this[Oc]?this[xc]+=1:this[xc]+=t.length,this[Ac].push(t)}[kc](){return this[Oc]?this[xc]-=1:this[xc]-=this[Ac][0].length,this[Ac].shift()}[Ec](t=!1){do{}while(this[Ic](this[kc]())&&this[Ac].length);t||this[Ac].length||this[fc]||this.emit("drain")}[Ic](t){return this.emit("data",t),this[Sc]}pipe(t,e){if(this[Tc])return t;this[Jc]=!1;const n=this[vc];return e=e||{},t===dc.stdout||t===dc.stderr?e.end=!1:e.end=!1!==e.end,e.proxyErrors=!!e.proxyErrors,n?e.end&&t.end():(this[Uc].push(e.proxyErrors?new Vc(this,t,e):new Hc(this,t,e)),this[Bc]?Wc((()=>this[Cc]())):this[Cc]()),t}unpipe(t){const e=this[Uc].find((e=>e.dest===t));e&&(1===this[Uc].length?(this[Sc]&&0===this[zc]&&(this[Sc]=!1),this[Uc]=[]):this[Uc].splice(this[Uc].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){const n=super.on(t,e);if("data"===t)this[Jc]=!1,this[zc]++,this[Uc].length||this[Sc]||this[Cc]();else if("readable"===t&&0!==this[xc])super.emit("readable");else if((t=>"end"===t||"finish"===t||"prefinish"===t)(t)&&this[vc])super.emit(t),this.removeAllListeners(t);else if("error"===t&&this[gc]){const t=e;this[Bc]?Wc((()=>t.call(this,this[gc]))):t.call(this,this[gc])}return n}removeListener(t,e){return this.off(t,e)}off(t,e){const n=super.off(t,e);return"data"===t&&(this[zc]=this.listeners("data").length,0!==this[zc]||this[Jc]||this[Uc].length||(this[Sc]=!1)),n}removeAllListeners(t){const e=super.removeAllListeners(t);return"data"!==t&&void 0!==t||(this[zc]=0,this[Jc]||this[Uc].length||(this[Sc]=!1)),e}get emittedEnd(){return this[vc]}[mc](){this[bc]||this[vc]||this[Tc]||0!==this[Ac].length||!this[fc]||(this[bc]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[yc]&&this.emit("close"),this[bc]=!1)}emit(t,...e){const n=e[0];if("error"!==t&&"close"!==t&&t!==Tc&&this[Tc])return!1;if("data"===t)return!(!this[Oc]&&!n)&&(this[Bc]?(Wc((()=>this[Lc](n))),!0):this[Lc](n));if("end"===t)return this[Nc]();if("close"===t){if(this[yc]=!0,!this[vc]&&!this[Tc])return!1;const t=super.emit("close");return this.removeAllListeners("close"),t}if("error"===t){this[gc]=n,super.emit(Dc,n);const t=!(this[Mc]&&!this.listeners("error").length)&&super.emit("error",n);return this[mc](),t}if("resume"===t){const t=super.emit("resume");return this[mc](),t}if("finish"===t||"prefinish"===t){const e=super.emit(t);return this.removeAllListeners(t),e}const r=super.emit(t,...e);return this[mc](),r}[Lc](t){for(const e of this[Uc])!1===e.dest.write(t)&&this.pause();const e=!this[Jc]&&super.emit("data",t);return this[mc](),e}[Nc](){return!this[vc]&&(this[vc]=!0,this.readable=!1,this[Bc]?(Wc((()=>this[qc]())),!0):this[qc]())}[qc](){if(this[jc]){const t=this[jc].end();if(t){for(const e of this[Uc])e.dest.write(t);this[Jc]||super.emit("data",t)}}for(const t of this[Uc])t.end();const t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){const t=Object.assign([],{dataLength:0});this[Oc]||(t.dataLength=0);const e=this.promise();return this.on("data",(e=>{t.push(e),this[Oc]||(t.dataLength+=e.length)})),await e,t}async concat(){if(this[Oc])throw new Error("cannot concat in objectMode");const t=await this.collect();return this[Rc]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise(((t,e)=>{this.on(Tc,(()=>e(new Error("stream destroyed")))),this.on("error",(t=>e(t))),this.on("end",(()=>t()))}))}[Symbol.asyncIterator](){this[Jc]=!1;let t=!1;const e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();const n=this.read();if(null!==n)return Promise.resolve({done:!1,value:n});if(this[fc])return e();let r,o;const i=t=>{this.off("data",s),this.off("end",a),this.off(Tc,c),e(),o(t)},s=t=>{this.off("error",i),this.off("end",a),this.off(Tc,c),this.pause(),r({value:t,done:!!this[fc]})},a=()=>{this.off("error",i),this.off("data",s),this.off(Tc,c),e(),r({done:!0,value:void 0})},c=()=>i(new Error("stream destroyed"));return new Promise(((t,e)=>{o=e,r=t,this.once(Tc,c),this.once("error",i),this.once("end",a),this.once("data",s)}))},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Jc]=!1;let t=!1;const e=()=>(this.pause(),this.off(Dc,e),this.off(Tc,e),this.off("end",e),t=!0,{done:!0,value:void 0});return this.once("end",e),this.once(Dc,e),this.once(Tc,e),{next:()=>{if(t)return e();const n=this.read();return null===n?e():{done:!1,value:n}},throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[Tc])return t?this.emit("error",t):this.emit(Tc),this;this[Tc]=!0,this[Jc]=!0,this[Ac].length=0,this[xc]=0;return"function"!=typeof this.close||this[yc]||this.close(),t?this.emit("error",t):this.emit(Tc),this}static get isStream(){return lc}}const Yc=q.default.writev,Kc=Symbol("_autoClose"),Xc=Symbol("_close"),Qc=Symbol("_ended"),tu=Symbol("_fd"),eu=Symbol("_finished"),nu=Symbol("_flags"),ru=Symbol("_flush"),ou=Symbol("_handleChunk"),iu=Symbol("_makeBuf"),su=Symbol("_mode"),au=Symbol("_needDrain"),cu=Symbol("_onerror"),uu=Symbol("_onopen"),du=Symbol("_onread"),lu=Symbol("_onwrite"),hu=Symbol("_open"),pu=Symbol("_path"),fu=Symbol("_pos"),mu=Symbol("_queue"),vu=Symbol("_read"),bu=Symbol("_readSize"),gu=Symbol("_reading"),yu=Symbol("_remain"),wu=Symbol("_size"),Eu=Symbol("_write"),Iu=Symbol("_writing"),Ru=Symbol("_defaultFlag"),ju=Symbol("_errored");class Su extends Zc{[ju]=!1;[tu];[pu];[bu];[gu]=!1;[wu];[yu];[Kc];constructor(t,e){if(super(e=e||{}),this.readable=!0,this.writable=!1,"string"!=typeof t)throw new TypeError("path must be a string");this[ju]=!1,this[tu]="number"==typeof e.fd?e.fd:void 0,this[pu]=t,this[bu]=e.readSize||16777216,this[gu]=!1,this[wu]="number"==typeof e.size?e.size:1/0,this[yu]=this[wu],this[Kc]="boolean"!=typeof e.autoClose||e.autoClose,"number"==typeof this[tu]?this[vu]():this[hu]()}get fd(){return this[tu]}get path(){return this[pu]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[hu](){q.default.open(this[pu],"r",((t,e)=>this[uu](t,e)))}[uu](t,e){t?this[cu](t):(this[tu]=e,this.emit("open",e),this[vu]())}[iu](){return Buffer.allocUnsafe(Math.min(this[bu],this[yu]))}[vu](){if(!this[gu]){this[gu]=!0;const t=this[iu]();if(0===t.length)return process.nextTick((()=>this[du](null,0,t)));q.default.read(this[tu],t,0,t.length,null,((t,e,n)=>this[du](t,e,n)))}}[du](t,e,n){this[gu]=!1,t?this[cu](t):this[ou](e,n)&&this[vu]()}[Xc](){if(this[Kc]&&"number"==typeof this[tu]){const t=this[tu];this[tu]=void 0,q.default.close(t,(t=>t?this.emit("error",t):this.emit("close")))}}[cu](t){this[gu]=!0,this[Xc](),this.emit("error",t)}[ou](t,e){let n=!1;return this[yu]-=t,t>0&&(n=super.write(t<e.length?e.subarray(0,t):e)),(0===t||this[yu]<=0)&&(n=!1,this[Xc](),super.end()),n}emit(t,...e){switch(t){case"prefinish":case"finish":return!1;case"drain":return"number"==typeof this[tu]&&this[vu](),!1;case"error":return!this[ju]&&(this[ju]=!0,super.emit(t,...e));default:return super.emit(t,...e)}}}class _u extends Su{[hu](){let t=!0;try{this[uu](null,q.default.openSync(this[pu],"r")),t=!1}finally{t&&this[Xc]()}}[vu](){let t=!0;try{if(!this[gu]){for(this[gu]=!0;;){const t=this[iu](),e=0===t.length?0:q.default.readSync(this[tu],t,0,t.length,null);if(!this[ou](e,t))break}this[gu]=!1}t=!1}finally{t&&this[Xc]()}}[Xc](){if(this[Kc]&&"number"==typeof this[tu]){const t=this[tu];this[tu]=void 0,q.default.closeSync(t),this.emit("close")}}}class Cu extends _.default{readable=!1;writable=!0;[ju]=!1;[Iu]=!1;[Qc]=!1;[mu]=[];[au]=!1;[pu];[su];[Kc];[tu];[Ru];[nu];[eu]=!1;[fu];constructor(t,e){super(e=e||{}),this[pu]=t,this[tu]="number"==typeof e.fd?e.fd:void 0,this[su]=void 0===e.mode?438:e.mode,this[fu]="number"==typeof e.start?e.start:void 0,this[Kc]="boolean"!=typeof e.autoClose||e.autoClose;const n=void 0!==this[fu]?"r+":"w";this[Ru]=void 0===e.flags,this[nu]=void 0===e.flags?n:e.flags,void 0===this[tu]&&this[hu]()}emit(t,...e){if("error"===t){if(this[ju])return!1;this[ju]=!0}return super.emit(t,...e)}get fd(){return this[tu]}get path(){return this[pu]}[cu](t){this[Xc](),this[Iu]=!0,this.emit("error",t)}[hu](){q.default.open(this[pu],this[nu],this[su],((t,e)=>this[uu](t,e)))}[uu](t,e){this[Ru]&&"r+"===this[nu]&&t&&"ENOENT"===t.code?(this[nu]="w",this[hu]()):t?this[cu](t):(this[tu]=e,this.emit("open",e),this[Iu]||this[ru]())}end(t,e){return t&&this.write(t,e),this[Qc]=!0,this[Iu]||this[mu].length||"number"!=typeof this[tu]||this[lu](null,0),this}write(t,e){return"string"==typeof t&&(t=Buffer.from(t,e)),this[Qc]?(this.emit("error",new Error("write() after end()")),!1):void 0===this[tu]||this[Iu]||this[mu].length?(this[mu].push(t),this[au]=!0,!1):(this[Iu]=!0,this[Eu](t),!0)}[Eu](t){q.default.write(this[tu],t,0,t.length,this[fu],((t,e)=>this[lu](t,e)))}[lu](t,e){t?this[cu](t):(void 0!==this[fu]&&"number"==typeof e&&(this[fu]+=e),this[mu].length?this[ru]():(this[Iu]=!1,this[Qc]&&!this[eu]?(this[eu]=!0,this[Xc](),this.emit("finish")):this[au]&&(this[au]=!1,this.emit("drain"))))}[ru](){if(0===this[mu].length)this[Qc]&&this[lu](null,0);else if(1===this[mu].length)this[Eu](this[mu].pop());else{const t=this[mu];this[mu]=[],Yc(this[tu],t,this[fu],((t,e)=>this[lu](t,e)))}}[Xc](){if(this[Kc]&&"number"==typeof this[tu]){const t=this[tu];this[tu]=void 0,q.default.close(t,(t=>t?this.emit("error",t):this.emit("close")))}}}class Au extends Cu{[hu](){let t;if(this[Ru]&&"r+"===this[nu])try{t=q.default.openSync(this[pu],this[nu],this[su])}catch(t){if("ENOENT"===t?.code)return this[nu]="w",this[hu]();throw t}else t=q.default.openSync(this[pu],this[nu],this[su]);this[uu](null,t)}[Xc](){if(this[Kc]&&"number"==typeof this[tu]){const t=this[tu];this[tu]=void 0,q.default.closeSync(t),this.emit("close")}}[Eu](t){let e=!0;try{this[lu](null,q.default.writeSync(this[tu],t,0,t.length,this[fu])),e=!1}finally{if(e)try{this[Xc]()}catch{}}}}const Uu=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]),xu=t=>{const e=Uu.get(t);return e||t},Pu=(t={})=>{if(!t)return{};const e={};for(const[n,r]of Object.entries(t)){e[xu(n)]=r}return void 0===e.chmod&&!1===e.noChmod&&(e.chmod=!0),delete e.noChmod,e},ku=(t,e,n,r,o)=>Object.assign(((i=[],s,a)=>{Array.isArray(i)&&(s=i,i={}),"function"==typeof s&&(a=s,s=void 0),s=s?Array.from(s):[];const c=Pu(i);if(o?.(c,s),(u=c).sync&&u.file){if("function"==typeof a)throw new TypeError("callback not supported for sync tar functions");return t(c,s)}if((t=>!t.sync&&!!t.file)(c)){const t=e(c,s),n=a||void 0;return n?t.then((()=>n()),n):t}if((t=>!!t.sync&&!t.file)(c)){if("function"==typeof a)throw new TypeError("callback not supported for sync tar functions");return n(c,s)}if((t=>!t.sync&&!t.file)(c)){if("function"==typeof a)throw new TypeError("callback only supported with file option");return r(c,s)}throw new Error("impossible options??");var u}),{syncFile:t,asyncFile:e,syncNoFile:n,asyncNoFile:r,validate:o}),Ou="object"==typeof process&&process?process:{stdout:null,stderr:null},Tu=t=>!!t&&"object"==typeof t&&(t instanceof gd||t instanceof J.default||Du(t)||Lu(t)),Du=t=>!!t&&"object"==typeof t&&t instanceof v.EventEmitter&&"function"==typeof t.pipe&&t.pipe!==J.default.Writable.prototype.pipe,Lu=t=>!!t&&"object"==typeof t&&t instanceof v.EventEmitter&&"function"==typeof t.write&&"function"==typeof t.end,Nu=Symbol("EOF"),qu=Symbol("maybeEmitEnd"),Bu=Symbol("emittedEnd"),Fu=Symbol("emittingEnd"),Gu=Symbol("emittedError"),Mu=Symbol("closed"),zu=Symbol("read"),Ju=Symbol("flush"),Wu=Symbol("flushChunk"),$u=Symbol("encoding"),Hu=Symbol("decoder"),Vu=Symbol("flowing"),Zu=Symbol("paused"),Yu=Symbol("resume"),Ku=Symbol("buffer"),Xu=Symbol("pipes"),Qu=Symbol("bufferLength"),td=Symbol("bufferPush"),ed=Symbol("bufferShift"),nd=Symbol("objectMode"),rd=Symbol("destroyed"),od=Symbol("error"),id=Symbol("emitData"),sd=Symbol("emitEnd"),ad=Symbol("emitEnd2"),cd=Symbol("async"),ud=Symbol("abort"),dd=Symbol("aborted"),ld=Symbol("signal"),hd=Symbol("dataListeners"),pd=Symbol("discarded"),fd=t=>Promise.resolve().then(t),md=t=>t();class vd{src;dest;opts;ondrain;constructor(t,e,n){this.src=t,this.dest=e,this.opts=n,this.ondrain=()=>t[Yu](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(t){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class bd extends vd{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(t,e,n){super(t,e,n),this.proxyErrors=t=>e.emit("error",t),t.on("error",this.proxyErrors)}}class gd extends v.EventEmitter{[Vu]=!1;[Zu]=!1;[Xu]=[];[Ku]=[];[nd];[$u];[cd];[Hu];[Nu]=!1;[Bu]=!1;[Fu]=!1;[Mu]=!1;[Gu]=null;[Qu]=0;[rd]=!1;[ld];[dd]=!1;[hd]=0;[pd]=!1;writable=!0;readable=!0;constructor(...t){const e=t[0]||{};if(super(),e.objectMode&&"string"==typeof e.encoding)throw new TypeError("Encoding and objectMode may not be used together");e.objectMode?(this[nd]=!0,this[$u]=null):(t=>!t.objectMode&&!!t.encoding&&"buffer"!==t.encoding)(e)?(this[$u]=e.encoding,this[nd]=!1):(this[nd]=!1,this[$u]=null),this[cd]=!!e.async,this[Hu]=this[$u]?new g.StringDecoder(this[$u]):null,e&&!0===e.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[Ku]}),e&&!0===e.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[Xu]});const{signal:n}=e;n&&(this[ld]=n,n.aborted?this[ud]():n.addEventListener("abort",(()=>this[ud]())))}get bufferLength(){return this[Qu]}get encoding(){return this[$u]}set encoding(t){throw new Error("Encoding must be set at instantiation time")}setEncoding(t){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[nd]}set objectMode(t){throw new Error("objectMode must be set at instantiation time")}get async(){return this[cd]}set async(t){this[cd]=this[cd]||!!t}[ud](){this[dd]=!0,this.emit("abort",this[ld]?.reason),this.destroy(this[ld]?.reason)}get aborted(){return this[dd]}set aborted(t){}write(t,e,n){if(this[dd])return!1;if(this[Nu])throw new Error("write after end");if(this[rd])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof e&&(n=e,e="utf8"),e||(e="utf8");const r=this[cd]?fd:md;if(!this[nd]&&!Buffer.isBuffer(t))if(o=t,!Buffer.isBuffer(o)&&ArrayBuffer.isView(o))t=Buffer.from(t.buffer,t.byteOffset,t.byteLength);else if((t=>t instanceof ArrayBuffer||!!t&&"object"==typeof t&&t.constructor&&"ArrayBuffer"===t.constructor.name&&t.byteLength>=0)(t))t=Buffer.from(t);else if("string"!=typeof t)throw new Error("Non-contiguous data written to non-objectMode stream");var o;return this[nd]?(this[Vu]&&0!==this[Qu]&&this[Ju](!0),this[Vu]?this.emit("data",t):this[td](t),0!==this[Qu]&&this.emit("readable"),n&&r(n),this[Vu]):t.length?("string"!=typeof t||e===this[$u]&&!this[Hu]?.lastNeed||(t=Buffer.from(t,e)),Buffer.isBuffer(t)&&this[$u]&&(t=this[Hu].write(t)),this[Vu]&&0!==this[Qu]&&this[Ju](!0),this[Vu]?this.emit("data",t):this[td](t),0!==this[Qu]&&this.emit("readable"),n&&r(n),this[Vu]):(0!==this[Qu]&&this.emit("readable"),n&&r(n),this[Vu])}read(t){if(this[rd])return null;if(this[pd]=!1,0===this[Qu]||0===t||t&&t>this[Qu])return this[qu](),null;this[nd]&&(t=null),this[Ku].length>1&&!this[nd]&&(this[Ku]=[this[$u]?this[Ku].join(""):Buffer.concat(this[Ku],this[Qu])]);const e=this[zu](t||null,this[Ku][0]);return this[qu](),e}[zu](t,e){if(this[nd])this[ed]();else{const n=e;t===n.length||null===t?this[ed]():"string"==typeof n?(this[Ku][0]=n.slice(t),e=n.slice(0,t),this[Qu]-=t):(this[Ku][0]=n.subarray(t),e=n.subarray(0,t),this[Qu]-=t)}return this.emit("data",e),this[Ku].length||this[Nu]||this.emit("drain"),e}end(t,e,n){return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e="utf8"),void 0!==t&&this.write(t,e),n&&this.once("end",n),this[Nu]=!0,this.writable=!1,!this[Vu]&&this[Zu]||this[qu](),this}[Yu](){this[rd]||(this[hd]||this[Xu].length||(this[pd]=!0),this[Zu]=!1,this[Vu]=!0,this.emit("resume"),this[Ku].length?this[Ju]():this[Nu]?this[qu]():this.emit("drain"))}resume(){return this[Yu]()}pause(){this[Vu]=!1,this[Zu]=!0,this[pd]=!1}get destroyed(){return this[rd]}get flowing(){return this[Vu]}get paused(){return this[Zu]}[td](t){this[nd]?this[Qu]+=1:this[Qu]+=t.length,this[Ku].push(t)}[ed](){return this[nd]?this[Qu]-=1:this[Qu]-=this[Ku][0].length,this[Ku].shift()}[Ju](t=!1){do{}while(this[Wu](this[ed]())&&this[Ku].length);t||this[Ku].length||this[Nu]||this.emit("drain")}[Wu](t){return this.emit("data",t),this[Vu]}pipe(t,e){if(this[rd])return t;this[pd]=!1;const n=this[Bu];return e=e||{},t===Ou.stdout||t===Ou.stderr?e.end=!1:e.end=!1!==e.end,e.proxyErrors=!!e.proxyErrors,n?e.end&&t.end():(this[Xu].push(e.proxyErrors?new bd(this,t,e):new vd(this,t,e)),this[cd]?fd((()=>this[Yu]())):this[Yu]()),t}unpipe(t){const e=this[Xu].find((e=>e.dest===t));e&&(1===this[Xu].length?(this[Vu]&&0===this[hd]&&(this[Vu]=!1),this[Xu]=[]):this[Xu].splice(this[Xu].indexOf(e),1),e.unpipe())}addListener(t,e){return this.on(t,e)}on(t,e){const n=super.on(t,e);if("data"===t)this[pd]=!1,this[hd]++,this[Xu].length||this[Vu]||this[Yu]();else if("readable"===t&&0!==this[Qu])super.emit("readable");else if((t=>"end"===t||"finish"===t||"prefinish"===t)(t)&&this[Bu])super.emit(t),this.removeAllListeners(t);else if("error"===t&&this[Gu]){const t=e;this[cd]?fd((()=>t.call(this,this[Gu]))):t.call(this,this[Gu])}return n}removeListener(t,e){return this.off(t,e)}off(t,e){const n=super.off(t,e);return"data"===t&&(this[hd]=this.listeners("data").length,0!==this[hd]||this[pd]||this[Xu].length||(this[Vu]=!1)),n}removeAllListeners(t){const e=super.removeAllListeners(t);return"data"!==t&&void 0!==t||(this[hd]=0,this[pd]||this[Xu].length||(this[Vu]=!1)),e}get emittedEnd(){return this[Bu]}[qu](){this[Fu]||this[Bu]||this[rd]||0!==this[Ku].length||!this[Nu]||(this[Fu]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Mu]&&this.emit("close"),this[Fu]=!1)}emit(t,...e){const n=e[0];if("error"!==t&&"close"!==t&&t!==rd&&this[rd])return!1;if("data"===t)return!(!this[nd]&&!n)&&(this[cd]?(fd((()=>this[id](n))),!0):this[id](n));if("end"===t)return this[sd]();if("close"===t){if(this[Mu]=!0,!this[Bu]&&!this[rd])return!1;const t=super.emit("close");return this.removeAllListeners("close"),t}if("error"===t){this[Gu]=n,super.emit(od,n);const t=!(this[ld]&&!this.listeners("error").length)&&super.emit("error",n);return this[qu](),t}if("resume"===t){const t=super.emit("resume");return this[qu](),t}if("finish"===t||"prefinish"===t){const e=super.emit(t);return this.removeAllListeners(t),e}const r=super.emit(t,...e);return this[qu](),r}[id](t){for(const e of this[Xu])!1===e.dest.write(t)&&this.pause();const e=!this[pd]&&super.emit("data",t);return this[qu](),e}[sd](){return!this[Bu]&&(this[Bu]=!0,this.readable=!1,this[cd]?(fd((()=>this[ad]())),!0):this[ad]())}[ad](){if(this[Hu]){const t=this[Hu].end();if(t){for(const e of this[Xu])e.dest.write(t);this[pd]||super.emit("data",t)}}for(const t of this[Xu])t.end();const t=super.emit("end");return this.removeAllListeners("end"),t}async collect(){const t=Object.assign([],{dataLength:0});this[nd]||(t.dataLength=0);const e=this.promise();return this.on("data",(e=>{t.push(e),this[nd]||(t.dataLength+=e.length)})),await e,t}async concat(){if(this[nd])throw new Error("cannot concat in objectMode");const t=await this.collect();return this[$u]?t.join(""):Buffer.concat(t,t.dataLength)}async promise(){return new Promise(((t,e)=>{this.on(rd,(()=>e(new Error("stream destroyed")))),this.on("error",(t=>e(t))),this.on("end",(()=>t()))}))}[Symbol.asyncIterator](){this[pd]=!1;let t=!1;const e=async()=>(this.pause(),t=!0,{value:void 0,done:!0});return{next:()=>{if(t)return e();const n=this.read();if(null!==n)return Promise.resolve({done:!1,value:n});if(this[Nu])return e();let r,o;const i=t=>{this.off("data",s),this.off("end",a),this.off(rd,c),e(),o(t)},s=t=>{this.off("error",i),this.off("end",a),this.off(rd,c),this.pause(),r({value:t,done:!!this[Nu]})},a=()=>{this.off("error",i),this.off("data",s),this.off(rd,c),e(),r({done:!0,value:void 0})},c=()=>i(new Error("stream destroyed"));return new Promise(((t,e)=>{o=e,r=t,this.once(rd,c),this.once("error",i),this.once("end",a),this.once("data",s)}))},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[pd]=!1;let t=!1;const e=()=>(this.pause(),this.off(od,e),this.off(rd,e),this.off("end",e),t=!0,{done:!0,value:void 0});return this.once("end",e),this.once(od,e),this.once(rd,e),{next:()=>{if(t)return e();const n=this.read();return null===n?e():{done:!1,value:n}},throw:e,return:e,[Symbol.iterator](){return this}}}destroy(t){if(this[rd])return t?this.emit("error",t):this.emit(rd),this;this[rd]=!0,this[pd]=!0,this[Ku].length=0,this[Qu]=0;return"function"!=typeof this.close||this[Mu]||this.close(),t?this.emit("error",t):this.emit(rd),this}static get isStream(){return Tu}}const yd=O.default.constants||{ZLIB_VERNUM:4736},wd=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},yd)),Ed=f.Buffer.concat,Id=Object.getOwnPropertyDescriptor(f.Buffer,"concat"),Rd=t=>t,jd=!0===Id?.writable||void 0!==Id?.set?t=>{f.Buffer.concat=t?Rd:Ed}:t=>{},Sd=Symbol("_superWrite");class _d extends Error{code;errno;constructor(t){super("zlib: "+t.message),this.code=t.code,this.errno=t.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+t.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}const Cd=Symbol("flushFlag");class Ad extends gd{#t=!1;#e=!1;#n;#r;#o;#i;#s;get sawError(){return this.#t}get handle(){return this.#i}get flushFlag(){return this.#n}constructor(t,e){if(!t||"object"!=typeof t)throw new TypeError("invalid options for ZlibBase constructor");super(t),this.#n=t.flush??0,this.#r=t.finishFlush??0,this.#o=t.fullFlushFlag??0;try{this.#i=new T[e](t)}catch(t){throw new _d(t)}this.#s=t=>{this.#t||(this.#t=!0,this.close(),this.emit("error",t))},this.#i?.on("error",(t=>this.#s(new _d(t)))),this.once("end",(()=>this.close))}close(){this.#i&&(this.#i.close(),this.#i=void 0,this.emit("close"))}reset(){if(!this.#t)return H.default(this.#i,"zlib binding closed"),this.#i.reset?.()}flush(t){this.ended||("number"!=typeof t&&(t=this.#o),this.write(Object.assign(f.Buffer.alloc(0),{[Cd]:t})))}end(t,e,n){return"function"==typeof t&&(n=t,e=void 0,t=void 0),"function"==typeof e&&(n=e,e=void 0),t&&(e?this.write(t,e):this.write(t)),this.flush(this.#r),this.#e=!0,super.end(n)}get ended(){return this.#e}[Sd](t){return super.write(t)}write(t,e,n){if("function"==typeof e&&(n=e,e="utf8"),"string"==typeof t&&(t=f.Buffer.from(t,e)),this.#t)return;H.default(this.#i,"zlib binding closed");const r=this.#i._handle,o=r.close;r.close=()=>{};const i=this.#i.close;let s,a;this.#i.close=()=>{},jd(!0);try{const e="number"==typeof t[Cd]?t[Cd]:this.#n;s=this.#i._processChunk(t,e),jd(!1)}catch(t){jd(!1),this.#s(new _d(t))}finally{this.#i&&(this.#i._handle=r,r.close=o,this.#i.close=i,this.#i.removeAllListeners("error"))}if(this.#i&&this.#i.on("error",(t=>this.#s(new _d(t)))),s)if(Array.isArray(s)&&s.length>0){const t=s[0];a=this[Sd](f.Buffer.from(t));for(let t=1;t<s.length;t++)a=this[Sd](s[t])}else a=this[Sd](f.Buffer.from(s));return n&&n(),a}}class Ud extends Ad{#a;#c;constructor(t,e){(t=t||{}).flush=t.flush||wd.Z_NO_FLUSH,t.finishFlush=t.finishFlush||wd.Z_FINISH,t.fullFlushFlag=wd.Z_FULL_FLUSH,super(t,e),this.#a=t.level,this.#c=t.strategy}params(t,e){if(!this.sawError){if(!this.handle)throw new Error("cannot switch params when binding is closed");if(!this.handle.params)throw new Error("not supported in this implementation");if(this.#a!==t||this.#c!==e){this.flush(wd.Z_SYNC_FLUSH),H.default(this.handle,"zlib binding closed");const n=this.handle.flush;this.handle.flush=(t,e)=>{"function"==typeof t&&(e=t,t=this.flushFlag),this.flush(t),e?.()};try{this.handle.params(t,e)}finally{this.handle.flush=n}this.handle&&(this.#a=t,this.#c=e)}}}}class xd extends Ud{#u;constructor(t){super(t,"Gzip"),this.#u=t&&!!t.portable}[Sd](t){return this.#u?(this.#u=!1,t[9]=255,super[Sd](t)):super[Sd](t)}}class Pd extends Ud{constructor(t){super(t,"Unzip")}}class kd extends Ad{constructor(t,e){(t=t||{}).flush=t.flush||wd.BROTLI_OPERATION_PROCESS,t.finishFlush=t.finishFlush||wd.BROTLI_OPERATION_FINISH,t.fullFlushFlag=wd.BROTLI_OPERATION_FLUSH,super(t,e)}}class Od extends kd{constructor(t){super(t,"BrotliCompress")}}class Td extends kd{constructor(t){super(t,"BrotliDecompress")}}class Dd{tail;head;length=0;static create(t=[]){return new Dd(t)}constructor(t=[]){for(const e of t)this.push(e)}*[Symbol.iterator](){for(let t=this.head;t;t=t.next)yield t.value}removeNode(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");const e=t.next,n=t.prev;return e&&(e.prev=n),n&&(n.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=n),this.length--,t.next=void 0,t.prev=void 0,t.list=void 0,e}unshiftNode(t){if(t===this.head)return;t.list&&t.list.removeNode(t);const e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}pushNode(t){if(t===this.tail)return;t.list&&t.list.removeNode(t);const e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}push(...t){for(let e=0,n=t.length;e<n;e++)Nd(this,t[e]);return this.length}unshift(...t){for(var e=0,n=t.length;e<n;e++)qd(this,t[e]);return this.length}pop(){if(!this.tail)return;const t=this.tail.value,e=this.tail;return this.tail=this.tail.prev,this.tail?this.tail.next=void 0:this.head=void 0,e.list=void 0,this.length--,t}shift(){if(!this.head)return;const t=this.head.value,e=this.head;return this.head=this.head.next,this.head?this.head.prev=void 0:this.tail=void 0,e.list=void 0,this.length--,t}forEach(t,e){e=e||this;for(let n=this.head,r=0;n;r++)t.call(e,n.value,r,this),n=n.next}forEachReverse(t,e){e=e||this;for(let n=this.tail,r=this.length-1;n;r--)t.call(e,n.value,r,this),n=n.prev}get(t){let e=0,n=this.head;for(;n&&e<t;e++)n=n.next;if(e===t&&n)return n.value}getReverse(t){let e=0,n=this.tail;for(;n&&e<t;e++)n=n.prev;if(e===t&&n)return n.value}map(t,e){e=e||this;const n=new Dd;for(let r=this.head;r;)n.push(t.call(e,r.value,this)),r=r.next;return n}mapReverse(t,e){e=e||this;var n=new Dd;for(let r=this.tail;r;)n.push(t.call(e,r.value,this)),r=r.prev;return n}reduce(t,e){let n,r=this.head;if(arguments.length>1)n=e;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;r;o++)n=t(n,r.value,o),r=r.next;return n}reduceReverse(t,e){let n,r=this.tail;if(arguments.length>1)n=e;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(let e=this.length-1;r;e--)n=t(n,r.value,e),r=r.prev;return n}toArray(){const t=new Array(this.length);for(let e=0,n=this.head;n;e++)t[e]=n.value,n=n.next;return t}toArrayReverse(){const t=new Array(this.length);for(let e=0,n=this.tail;n;e++)t[e]=n.value,n=n.prev;return t}slice(t=0,e=this.length){e<0&&(e+=this.length),t<0&&(t+=this.length);const n=new Dd;if(e<t||e<0)return n;t<0&&(t=0),e>this.length&&(e=this.length);let r=this.head,o=0;for(o=0;r&&o<t;o++)r=r.next;for(;r&&o<e;o++,r=r.next)n.push(r.value);return n}sliceReverse(t=0,e=this.length){e<0&&(e+=this.length),t<0&&(t+=this.length);const n=new Dd;if(e<t||e<0)return n;t<0&&(t=0),e>this.length&&(e=this.length);let r=this.length,o=this.tail;for(;o&&r>e;r--)o=o.prev;for(;o&&r>t;r--,o=o.prev)n.push(o.value);return n}splice(t,e=0,...n){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);let r=this.head;for(let e=0;r&&e<t;e++)r=r.next;const o=[];for(let t=0;r&&t<e;t++)o.push(r.value),r=this.removeNode(r);r?r!==this.tail&&(r=r.prev):r=this.tail;for(const t of n)r=Ld(this,r,t);return o}reverse(){const t=this.head,e=this.tail;for(let e=t;e;e=e.prev){const t=e.prev;e.prev=e.next,e.next=t}return this.head=e,this.tail=t,this}}function Ld(t,e,n){const r=e,o=e?e.next:t.head,i=new Bd(n,r,o,t);return void 0===i.next&&(t.tail=i),void 0===i.prev&&(t.head=i),t.length++,i}function Nd(t,e){t.tail=new Bd(e,t.tail,void 0,t),t.head||(t.head=t.tail),t.length++}function qd(t,e){t.head=new Bd(e,void 0,t.head,t),t.tail||(t.tail=t.head),t.length++}class Bd{list;next;prev;value;constructor(t,e,n,r){this.list=r,this.value=t,e?(e.next=this,this.prev=e):this.prev=void 0,n?(n.prev=this,this.next=n):this.next=void 0}}const Fd=(t,e)=>{e[0]=128;for(var n=e.length;n>1;n--)e[n-1]=255&t,t=Math.floor(t/256)},Gd=(t,e)=>{e[0]=255;var n=!1;t*=-1;for(var r=e.length;r>1;r--){var o=255&t;t=Math.floor(t/256),n?e[r-1]=Jd(o):0===o?e[r-1]=0:(n=!0,e[r-1]=Wd(o))}},Md=t=>{for(var e=t.length,n=0,r=!1,o=e-1;o>-1;o--){var i,s=Number(t[o]);r?i=Jd(s):0===s?i=s:(r=!0,i=Wd(s)),0!==i&&(n-=i*Math.pow(256,e-o-1))}return n},zd=t=>{for(var e=t.length,n=0,r=e-1;r>-1;r--){var o=Number(t[r]);0!==o&&(n+=o*Math.pow(256,e-r-1))}return n},Jd=t=>255&(255^t),Wd=t=>1+(255^t)&255,$d=t=>Hd.has(t),Hd=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),Vd=new Map(Array.from(Hd).map((t=>[t[1],t[0]])));class Zd{cksumValid=!1;needPax=!1;nullBlock=!1;block;path;mode;uid;gid;size;cksum;#d="Unsupported";linkpath;uname;gname;devmaj=0;devmin=0;atime;ctime;mtime;charset;comment;constructor(t,e=0,n,r){Buffer.isBuffer(t)?this.decode(t,e||0,n,r):t&&this.#l(t)}decode(t,e,n,r){if(e||(e=0),!(t&&t.length>=e+512))throw new Error("need 512 bytes for header");this.path=Kd(t,e,100),this.mode=tl(t,e+100,8),this.uid=tl(t,e+108,8),this.gid=tl(t,e+116,8),this.size=tl(t,e+124,12),this.mtime=Xd(t,e+136,12),this.cksum=tl(t,e+148,12),r&&this.#l(r,!0),n&&this.#l(n);const o=Kd(t,e+156,1);if($d(o)&&(this.#d=o||"0"),"0"===this.#d&&"/"===this.path.slice(-1)&&(this.#d="5"),"5"===this.#d&&(this.size=0),this.linkpath=Kd(t,e+157,100),"ustar\x0000"===t.subarray(e+257,e+265).toString())if(this.uname=Kd(t,e+265,32),this.gname=Kd(t,e+297,32),this.devmaj=tl(t,e+329,8)??0,this.devmin=tl(t,e+337,8)??0,0!==t[e+475]){const n=Kd(t,e+345,155);this.path=n+"/"+this.path}else{const n=Kd(t,e+345,130);n&&(this.path=n+"/"+this.path),this.atime=Xd(t,e+476,12),this.ctime=Xd(t,e+488,12)}let i=256;for(let n=e;n<e+148;n++)i+=t[n];for(let n=e+156;n<e+512;n++)i+=t[n];this.cksumValid=i===this.cksum,void 0===this.cksum&&256===i&&(this.nullBlock=!0)}#l(t,e=!1){Object.assign(this,Object.fromEntries(Object.entries(t).filter((([t,n])=>!(null==n||"path"===t&&e||"linkpath"===t&&e||"global"===t)))))}encode(t,e=0){if(t||(t=this.block=Buffer.alloc(512)),"Unsupported"===this.#d&&(this.#d="0"),!(t.length>=e+512))throw new Error("need 512 bytes for header");const n=this.ctime||this.atime?130:155,r=Yd(this.path||"",n),o=r[0],i=r[1];this.needPax=!!r[2],this.needPax=ul(t,e,100,o)||this.needPax,this.needPax=rl(t,e+100,8,this.mode)||this.needPax,this.needPax=rl(t,e+108,8,this.uid)||this.needPax,this.needPax=rl(t,e+116,8,this.gid)||this.needPax,this.needPax=rl(t,e+124,12,this.size)||this.needPax,this.needPax=al(t,e+136,12,this.mtime)||this.needPax,t[e+156]=this.#d.charCodeAt(0),this.needPax=ul(t,e+157,100,this.linkpath)||this.needPax,t.write("ustar\x0000",e+257,8),this.needPax=ul(t,e+265,32,this.uname)||this.needPax,this.needPax=ul(t,e+297,32,this.gname)||this.needPax,this.needPax=rl(t,e+329,8,this.devmaj)||this.needPax,this.needPax=rl(t,e+337,8,this.devmin)||this.needPax,this.needPax=ul(t,e+345,n,i)||this.needPax,0!==t[e+475]?this.needPax=ul(t,e+345,155,i)||this.needPax:(this.needPax=ul(t,e+345,130,i)||this.needPax,this.needPax=al(t,e+476,12,this.atime)||this.needPax,this.needPax=al(t,e+488,12,this.ctime)||this.needPax);let s=256;for(let n=e;n<e+148;n++)s+=t[n];for(let n=e+156;n<e+512;n++)s+=t[n];return this.cksum=s,rl(t,e+148,8,this.cksum),this.cksumValid=!0,this.needPax}get type(){return"Unsupported"===this.#d?this.#d:Hd.get(this.#d)}get typeKey(){return this.#d}set type(t){const e=String(Vd.get(t));if($d(e)||"Unsupported"===e)this.#d=e;else{if(!$d(t))throw new TypeError("invalid entry type: "+t);this.#d=t}}}const Yd=(t,e)=>{const n=100;let r,o=t,i="";const s=y.posix.parse(t).root||".";if(Buffer.byteLength(o)<n)r=[o,i,!1];else{i=y.posix.dirname(o),o=y.posix.basename(o);do{Buffer.byteLength(o)<=n&&Buffer.byteLength(i)<=e?r=[o,i,!1]:Buffer.byteLength(o)>n&&Buffer.byteLength(i)<=e?r=[o.slice(0,99),i,!0]:(o=y.posix.join(y.posix.basename(i),o),i=y.posix.dirname(i))}while(i!==s&&void 0===r);r||(r=[t.slice(0,99),"",!0])}return r},Kd=(t,e,n)=>t.subarray(e,e+n).toString("utf8").replace(/\0.*/,""),Xd=(t,e,n)=>Qd(tl(t,e,n)),Qd=t=>void 0===t?void 0:new Date(1e3*t),tl=(t,e,n)=>128&Number(t[e])?(t=>{const e=t[0],n=128===e?zd(t.subarray(1,t.length)):255===e?Md(t):null;if(null===n)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(n))throw Error("parsed number outside of javascript safe integer range");return n})(t.subarray(e,e+n)):el(t,e,n),el=(t,e,n)=>{return r=parseInt(t.subarray(e,e+n).toString("utf8").replace(/\0.*$/,"").trim(),8),isNaN(r)?void 0:r;var r},nl={12:8589934591,8:2097151},rl=(t,e,n,r)=>void 0!==r&&(r>nl[n]||r<0?(((t,e)=>{if(!Number.isSafeInteger(t))throw Error("cannot encode number outside of javascript safe integer range");t<0?Gd(t,e):Fd(t,e)})(r,t.subarray(e,e+n)),!0):(ol(t,e,n,r),!1)),ol=(t,e,n,r)=>t.write(il(r,n),e,n,"ascii"),il=(t,e)=>sl(Math.floor(t).toString(8),e),sl=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join("0")+t+" ")+"\0",al=(t,e,n,r)=>void 0!==r&&rl(t,e,n,r.getTime()/1e3),cl=new Array(156).join("\0"),ul=(t,e,n,r)=>void 0!==r&&(t.write(r+cl,e,n,"utf8"),r.length!==Buffer.byteLength(r)||r.length>n);class dl{atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(t,e=!1){this.atime=t.atime,this.charset=t.charset,this.comment=t.comment,this.ctime=t.ctime,this.dev=t.dev,this.gid=t.gid,this.global=e,this.gname=t.gname,this.ino=t.ino,this.linkpath=t.linkpath,this.mtime=t.mtime,this.nlink=t.nlink,this.path=t.path,this.size=t.size,this.uid=t.uid,this.uname=t.uname}encode(){const t=this.encodeBody();if(""===t)return Buffer.allocUnsafe(0);const e=Buffer.byteLength(t),n=512*Math.ceil(1+e/512),r=Buffer.allocUnsafe(n);for(let t=0;t<512;t++)r[t]=0;new Zd({path:("PaxHeader/"+y.basename(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:e,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(r),r.write(t,512,e,"utf8");for(let t=e+512;t<r.length;t++)r[t]=0;return r}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(t){if(void 0===this[t])return"";const e=this[t],n=" "+("dev"===t||"ino"===t||"nlink"===t?"SCHILY.":"")+t+"="+(e instanceof Date?e.getTime()/1e3:e)+"\n",r=Buffer.byteLength(n);let o=Math.floor(Math.log(r)/Math.log(10))+1;r+o>=Math.pow(10,o)&&(o+=1);return o+r+n}static parse(t,e,n=!1){return new dl(ll(hl(t),e),n)}}const ll=(t,e)=>e?Object.assign({},e,t):t,hl=t=>t.replace(/\n$/,"").split("\n").reduce(pl,Object.create(null)),pl=(t,e)=>{const n=parseInt(e,10);if(n!==Buffer.byteLength(e)+1)return t;const r=(e=e.slice((n+" ").length)).split("="),o=r.shift();if(!o)return t;const i=o.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),s=r.join("=");return t[i]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(i)?new Date(1e3*Number(s)):/^[0-9]+$/.test(s)?+s:s,t},fl="win32"!==(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform)?t=>t:t=>t&&t.replace(/\\/g,"/");class ml extends gd{extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(t,e,n){switch(super({}),this.pause(),this.extended=e,this.globalExtended=n,this.header=t,this.remain=t.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=t.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!t.path)throw new Error("no path provided for tar.ReadEntry");this.path=fl(t.path),this.mode=t.mode,this.mode&&(this.mode=4095&this.mode),this.uid=t.uid,this.gid=t.gid,this.uname=t.uname,this.gname=t.gname,this.size=this.remain,this.mtime=t.mtime,this.atime=t.atime,this.ctime=t.ctime,this.linkpath=t.linkpath?fl(t.linkpath):void 0,this.uname=t.uname,this.gname=t.gname,e&&this.#l(e),n&&this.#l(n,!0)}write(t){const e=t.length;if(e>this.blockRemain)throw new Error("writing more to entry than is appropriate");const n=this.remain,r=this.blockRemain;return this.remain=Math.max(0,n-e),this.blockRemain=Math.max(0,r-e),!!this.ignore||(n>=e?super.write(t):super.write(t.subarray(0,n)))}#l(t,e=!1){t.path&&(t.path=fl(t.path)),t.linkpath&&(t.linkpath=fl(t.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(t).filter((([t,n])=>!(null==n||"path"===t&&e)))))}}const vl=(t,e,n,r={})=>{t.file&&(r.file=t.file),t.cwd&&(r.cwd=t.cwd),r.code=n instanceof Error&&n.code||e,r.tarCode=e,t.strict||!1===r.recoverable?n instanceof Error?t.emit("error",Object.assign(n,r)):t.emit("error",Object.assign(new Error(`${e}: ${n}`),r)):(n instanceof Error&&(r=Object.assign(n,r),n=n.message),t.emit("warn",e,n,r))},bl=Buffer.from([31,139]),gl=Symbol("state"),yl=Symbol("writeEntry"),wl=Symbol("readEntry"),El=Symbol("nextEntry"),Il=Symbol("processEntry"),Rl=Symbol("extendedHeader"),jl=Symbol("globalExtendedHeader"),Sl=Symbol("meta"),_l=Symbol("emitMeta"),Cl=Symbol("buffer"),Al=Symbol("queue"),Ul=Symbol("ended"),xl=Symbol("emittedEnd"),Pl=Symbol("emit"),kl=Symbol("unzip"),Ol=Symbol("consumeChunk"),Tl=Symbol("consumeChunkSub"),Dl=Symbol("consumeBody"),Ll=Symbol("consumeMeta"),Nl=Symbol("consumeHeader"),ql=Symbol("consuming"),Bl=Symbol("bufferConcat"),Fl=Symbol("maybeEnd"),Gl=Symbol("writing"),Ml=Symbol("aborted"),zl=Symbol("onDone"),Jl=Symbol("sawValidEntry"),Wl=Symbol("sawNullBlock"),$l=Symbol("sawEOF"),Hl=Symbol("closeStream"),Vl=()=>!0;class Zl extends t.EventEmitter{file;strict;maxMetaEntrySize;filter;brotli;writable=!0;readable=!1;[Al]=new Dd;[Cl];[wl];[yl];[gl]="begin";[Sl]="";[Rl];[jl];[Ul]=!1;[kl];[Ml]=!1;[Jl];[Wl]=!1;[$l]=!1;[Gl]=!1;[ql]=!1;[xl]=!1;constructor(t={}){super(),this.file=t.file||"",this.on(zl,(()=>{"begin"!==this[gl]&&!1!==this[Jl]||this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")})),t.ondone?this.on(zl,t.ondone):this.on(zl,(()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")})),this.strict=!!t.strict,this.maxMetaEntrySize=t.maxMetaEntrySize||1048576,this.filter="function"==typeof t.filter?t.filter:Vl;const e=t.file&&(t.file.endsWith(".tar.br")||t.file.endsWith(".tbr"));this.brotli=t.gzip||void 0===t.brotli?!!e&&void 0:t.brotli,this.on("end",(()=>this[Hl]())),"function"==typeof t.onwarn&&this.on("warn",t.onwarn),"function"==typeof t.onReadEntry&&this.on("entry",t.onReadEntry)}warn(t,e,n={}){vl(this,t,e,n)}[Nl](t,e){let n;void 0===this[Jl]&&(this[Jl]=!1);try{n=new Zd(t,e,this[Rl],this[jl])}catch(t){return this.warn("TAR_ENTRY_INVALID",t)}if(n.nullBlock)this[Wl]?(this[$l]=!0,"begin"===this[gl]&&(this[gl]="header"),this[Pl]("eof")):(this[Wl]=!0,this[Pl]("nullBlock"));else if(this[Wl]=!1,n.cksumValid)if(n.path){const t=n.type;if(/^(Symbolic)?Link$/.test(t)&&!n.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:n});else if(/^(Symbolic)?Link$/.test(t)||/^(Global)?ExtendedHeader$/.test(t)||!n.linkpath){const t=this[yl]=new ml(n,this[Rl],this[jl]);if(!this[Jl])if(t.remain){const e=()=>{t.invalid||(this[Jl]=!0)};t.on("end",e)}else this[Jl]=!0;t.meta?t.size>this.maxMetaEntrySize?(t.ignore=!0,this[Pl]("ignoredEntry",t),this[gl]="ignore",t.resume()):t.size>0&&(this[Sl]="",t.on("data",(t=>this[Sl]+=t)),this[gl]="meta"):(this[Rl]=void 0,t.ignore=t.ignore||!this.filter(t.path,t),t.ignore?(this[Pl]("ignoredEntry",t),this[gl]=t.remain?"ignore":"header",t.resume()):(t.remain?this[gl]="body":(this[gl]="header",t.end()),this[wl]?this[Al].push(t):(this[Al].push(t),this[El]())))}else this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:n})}else this.warn("TAR_ENTRY_INVALID","path is required",{header:n});else this.warn("TAR_ENTRY_INVALID","checksum failure",{header:n})}[Hl](){queueMicrotask((()=>this.emit("close")))}[Il](t){let e=!0;if(t)if(Array.isArray(t)){const[e,...n]=t;this.emit(e,...n)}else this[wl]=t,this.emit("entry",t),t.emittedEnd||(t.on("end",(()=>this[El]())),e=!1);else this[wl]=void 0,e=!1;return e}[El](){do{}while(this[Il](this[Al].shift()));if(!this[Al].length){const t=this[wl];!t||t.flowing||t.size===t.remain?this[Gl]||this.emit("drain"):t.once("drain",(()=>this.emit("drain")))}}[Dl](t,e){const n=this[yl];if(!n)throw new Error("attempt to consume body without entry??");const r=n.blockRemain??0,o=r>=t.length&&0===e?t:t.subarray(e,e+r);return n.write(o),n.blockRemain||(this[gl]="header",this[yl]=void 0,n.end()),o.length}[Ll](t,e){const n=this[yl],r=this[Dl](t,e);return!this[yl]&&n&&this[_l](n),r}[Pl](t,e,n){this[Al].length||this[wl]?this[Al].push([t,e,n]):this.emit(t,e,n)}[_l](t){switch(this[Pl]("meta",this[Sl]),t.type){case"ExtendedHeader":case"OldExtendedHeader":this[Rl]=dl.parse(this[Sl],this[Rl],!1);break;case"GlobalExtendedHeader":this[jl]=dl.parse(this[Sl],this[jl],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":{const t=this[Rl]??Object.create(null);this[Rl]=t,t.path=this[Sl].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{const t=this[Rl]||Object.create(null);this[Rl]=t,t.linkpath=this[Sl].replace(/\0.*/,"");break}default:throw new Error("unknown meta: "+t.type)}}abort(t){this[Ml]=!0,this.emit("abort",t),this.warn("TAR_ABORT",t,{recoverable:!1})}write(t,e,n){if("function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,"string"==typeof e?e:"utf8")),this[Ml])return n?.(),!1;if((void 0===this[kl]||void 0===this.brotli&&!1===this[kl])&&t){if(this[Cl]&&(t=Buffer.concat([this[Cl],t]),this[Cl]=void 0),t.length<bl.length)return this[Cl]=t,n?.(),!0;for(let e=0;void 0===this[kl]&&e<bl.length;e++)t[e]!==bl[e]&&(this[kl]=!1);const e=void 0===this.brotli;if(!1===this[kl]&&e)if(t.length<512){if(!this[Ul])return this[Cl]=t,n?.(),!0;this.brotli=!0}else try{new Zd(t.subarray(0,512)),this.brotli=!1}catch(t){this.brotli=!0}if(void 0===this[kl]||!1===this[kl]&&this.brotli){const e=this[Ul];this[Ul]=!1,this[kl]=void 0===this[kl]?new Pd({}):new Td({}),this[kl].on("data",(t=>this[Ol](t))),this[kl].on("error",(t=>this.abort(t))),this[kl].on("end",(()=>{this[Ul]=!0,this[Ol]()})),this[Gl]=!0;const r=!!this[kl][e?"end":"write"](t);return this[Gl]=!1,n?.(),r}}this[Gl]=!0,this[kl]?this[kl].write(t):this[Ol](t),this[Gl]=!1;const r=!this[Al].length&&(!this[wl]||this[wl].flowing);return r||this[Al].length||this[wl]?.once("drain",(()=>this.emit("drain"))),n?.(),r}[Bl](t){t&&!this[Ml]&&(this[Cl]=this[Cl]?Buffer.concat([this[Cl],t]):t)}[Fl](){if(this[Ul]&&!this[xl]&&!this[Ml]&&!this[ql]){this[xl]=!0;const t=this[yl];if(t&&t.blockRemain){const e=this[Cl]?this[Cl].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${t.blockRemain} more bytes, only ${e} available)`,{entry:t}),this[Cl]&&t.write(this[Cl]),t.end()}this[Pl](zl)}}[Ol](t){if(this[ql]&&t)this[Bl](t);else if(t||this[Cl]){if(t){if(this[ql]=!0,this[Cl]){this[Bl](t);const e=this[Cl];this[Cl]=void 0,this[Tl](e)}else this[Tl](t);for(;this[Cl]&&this[Cl]?.length>=512&&!this[Ml]&&!this[$l];){const t=this[Cl];this[Cl]=void 0,this[Tl](t)}this[ql]=!1}}else this[Fl]();this[Cl]&&!this[Ul]||this[Fl]()}[Tl](t){let e=0;const n=t.length;for(;e+512<=n&&!this[Ml]&&!this[$l];)switch(this[gl]){case"begin":case"header":this[Nl](t,e),e+=512;break;case"ignore":case"body":e+=this[Dl](t,e);break;case"meta":e+=this[Ll](t,e);break;default:throw new Error("invalid state: "+this[gl])}e<n&&(this[Cl]?this[Cl]=Buffer.concat([t.subarray(e),this[Cl]]):this[Cl]=t.subarray(e))}end(t,e,n){return"function"==typeof t&&(n=t,e=void 0,t=void 0),"function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,e)),n&&this.once("finish",n),this[Ml]||(this[kl]?(t&&this[kl].write(t),this[kl].end()):(this[Ul]=!0,void 0===this.brotli&&(t=t||Buffer.alloc(0)),t&&this.write(t),this[Fl]())),this}}const Yl=t=>{let e=t.length-1,n=-1;for(;e>-1&&"/"===t.charAt(e);)n=e,e--;return-1===n?t:t.slice(0,n)},Kl=(t,e)=>{const n=new Map(e.map((t=>[Yl(t),!0]))),r=t.filter,o=(t,e="")=>{const r=e||l.parse(t).root||".";let i;if(t===r)i=!1;else{const e=n.get(t);i=void 0!==e?e:o(l.dirname(t),r)}return n.set(t,i),i};t.filter=r?(t,e)=>r(t,e)&&o(Yl(t)):t=>o(Yl(t))},Xl=ku((t=>{const e=new Zl(t),n=t.file;let r;try{const o=$.default.statSync(n),i=t.maxReadSize||16777216;if(o.size<i)e.end($.default.readFileSync(n));else{let t=0;const s=Buffer.allocUnsafe(i);for(r=$.default.openSync(n,"r");t<o.size;){const n=$.default.readSync(r,s,0,i,t);t+=n,e.write(s.subarray(0,n))}e.end()}}finally{if("number"==typeof r)try{$.default.closeSync(r)}catch(t){}}}),((t,e)=>{const n=new Zl(t),r=t.maxReadSize||16777216,o=t.file,i=new Promise(((t,e)=>{n.on("error",e),n.on("end",t),$.default.stat(o,((t,i)=>{if(t)e(t);else{const t=new Su(o,{readSize:r,size:i.size});t.on("error",e),t.pipe(n)}}))}));return i}),(t=>new Zl(t)),(t=>new Zl(t)),((t,e)=>{e?.length&&Kl(t,e),t.noResume||(t=>{const e=t.onReadEntry;t.onReadEntry=e?t=>{e(t),t.resume()}:t=>t.resume()})(t)})),Ql=(t,e,n)=>(t&=4095,n&&(t=-19&t|384),e&&(256&t&&(t|=64),32&t&&(t|=8),4&t&&(t|=1)),t),{isAbsolute:th,parse:eh}=y.win32,nh=t=>{let e="",n=eh(t);for(;th(t)||n.root;){const r="/"===t.charAt(0)&&"//?/"!==t.slice(0,4)?"/":n.root;t=t.slice(r.length),e+=r,n=eh(t)}return[e,t]},rh=["|","<",">","?",":"],oh=rh.map((t=>String.fromCharCode(61440+t.charCodeAt(0)))),ih=new Map(rh.map(((t,e)=>[t,oh[e]]))),sh=new Map(oh.map(((t,e)=>[t,rh[e]]))),ah=t=>rh.reduce(((t,e)=>t.split(e).join(ih.get(e))),t),ch=(t,e)=>e?(t=fl(t).replace(/^\.(\/|$)/,""),Yl(e)+"/"+t):fl(t),uh=Symbol("process"),dh=Symbol("file"),lh=Symbol("directory"),hh=Symbol("symlink"),ph=Symbol("hardlink"),fh=Symbol("header"),mh=Symbol("read"),vh=Symbol("lstat"),bh=Symbol("onlstat"),gh=Symbol("onread"),yh=Symbol("onreadlink"),wh=Symbol("openfile"),Eh=Symbol("onopenfile"),Ih=Symbol("close"),Rh=Symbol("mode"),jh=Symbol("awaitDrain"),Sh=Symbol("ondrain"),_h=Symbol("prefix");class Ch extends gd{path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#h=!1;constructor(t,e={}){const n=Pu(e);super(),this.path=fl(t),this.portable=!!n.portable,this.maxReadSize=n.maxReadSize||16777216,this.linkCache=n.linkCache||new Map,this.statCache=n.statCache||new Map,this.preservePaths=!!n.preservePaths,this.cwd=fl(n.cwd||process.cwd()),this.strict=!!n.strict,this.noPax=!!n.noPax,this.noMtime=!!n.noMtime,this.mtime=n.mtime,this.prefix=n.prefix?fl(n.prefix):void 0,this.onWriteEntry=n.onWriteEntry,"function"==typeof n.onwarn&&this.on("warn",n.onwarn);let r=!1;if(!this.preservePaths){const[t,e]=nh(this.path);t&&"string"==typeof e&&(this.path=e,r=t)}var o;this.win32=!!n.win32||"win32"===process.platform,this.win32&&(this.path=(o=this.path.replace(/\\/g,"/"),oh.reduce(((t,e)=>t.split(e).join(sh.get(e))),o)),t=t.replace(/\\/g,"/")),this.absolute=fl(n.absolute||B.default.resolve(this.cwd,t)),""===this.path&&(this.path="./"),r&&this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path});const i=this.statCache.get(this.absolute);i?this[bh](i):this[vh]()}warn(t,e,n={}){return vl(this,t,e,n)}emit(t,...e){return"error"===t&&(this.#h=!0),super.emit(t,...e)}[vh](){q.default.lstat(this.absolute,((t,e)=>{if(t)return this.emit("error",t);this[bh](e)}))}[bh](t){this.statCache.set(this.absolute,t),this.stat=t,t.isFile()||(t.size=0),this.type=xh(t),this.emit("stat",t),this[uh]()}[uh](){switch(this.type){case"File":return this[dh]();case"Directory":return this[lh]();case"SymbolicLink":return this[hh]();default:return this.end()}}[Rh](t){return Ql(t,"Directory"===this.type,this.portable)}[_h](t){return ch(t,this.prefix)}[fh](){if(!this.stat)throw new Error("cannot write header before stat");"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.onWriteEntry?.(this),this.header=new Zd({path:this[_h](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[_h](this.linkpath):this.linkpath,mode:this[Rh](this.stat.mode),uid:this.portable?void 0:this.stat.uid,gid:this.portable?void 0:this.stat.gid,size:this.stat.size,mtime:this.noMtime?void 0:this.mtime||this.stat.mtime,type:"Unsupported"===this.type?void 0:this.type,uname:this.portable?void 0:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?void 0:this.stat.atime,ctime:this.portable?void 0:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new dl({atime:this.portable?void 0:this.header.atime,ctime:this.portable?void 0:this.header.ctime,gid:this.portable?void 0:this.header.gid,mtime:this.noMtime?void 0:this.mtime||this.header.mtime,path:this[_h](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[_h](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?void 0:this.header.uid,uname:this.portable?void 0:this.header.uname,dev:this.portable?void 0:this.stat.dev,ino:this.portable?void 0:this.stat.ino,nlink:this.portable?void 0:this.stat.nlink}).encode());const t=this.header?.block;if(!t)throw new Error("failed to encode header");super.write(t)}[lh](){if(!this.stat)throw new Error("cannot create directory entry without stat");"/"!==this.path.slice(-1)&&(this.path+="/"),this.stat.size=0,this[fh](),this.end()}[hh](){q.default.readlink(this.absolute,((t,e)=>{if(t)return this.emit("error",t);this[yh](e)}))}[yh](t){this.linkpath=fl(t),this[fh](),this.end()}[ph](t){if(!this.stat)throw new Error("cannot create link entry without stat");this.type="Link",this.linkpath=fl(B.default.relative(this.cwd,t)),this.stat.size=0,this[fh](),this.end()}[dh](){if(!this.stat)throw new Error("cannot create file entry without stat");if(this.stat.nlink>1){const t=`${this.stat.dev}:${this.stat.ino}`,e=this.linkCache.get(t);if(0===e?.indexOf(this.cwd))return this[ph](e);this.linkCache.set(t,this.absolute)}if(this[fh](),0===this.stat.size)return this.end();this[wh]()}[wh](){q.default.open(this.absolute,"r",((t,e)=>{if(t)return this.emit("error",t);this[Eh](e)}))}[Eh](t){if(this.fd=t,this.#h)return this[Ih]();if(!this.stat)throw new Error("should stat before calling onopenfile");this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;const e=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(e),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[mh]()}[mh](){const{fd:t,buf:e,offset:n,length:r,pos:o}=this;if(void 0===t||void 0===e)throw new Error("cannot read file without first opening");q.default.read(t,e,n,r,o,((t,e)=>{if(t)return this[Ih]((()=>this.emit("error",t)));this[gh](e)}))}[Ih](t=()=>{}){void 0!==this.fd&&q.default.close(this.fd,t)}[gh](t){if(t<=0&&this.remain>0){const t=Object.assign(new Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[Ih]((()=>this.emit("error",t)))}if(t>this.remain){const t=Object.assign(new Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[Ih]((()=>this.emit("error",t)))}if(!this.buf)throw new Error("should have created buffer prior to reading");if(t===this.remain)for(let e=t;e<this.length&&t<this.blockRemain;e++)this.buf[e+this.offset]=0,t++,this.remain++;const e=0===this.offset&&t===this.buf.length?this.buf:this.buf.subarray(this.offset,this.offset+t);this.write(e)?this[Sh]():this[jh]((()=>this[Sh]()))}[jh](t){this.once("drain",t)}write(t,e,n){if("function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,"string"==typeof e?e:"utf8")),this.blockRemain<t.length){const t=Object.assign(new Error("writing more data than expected"),{path:this.absolute});return this.emit("error",t)}return this.remain-=t.length,this.blockRemain-=t.length,this.pos+=t.length,this.offset+=t.length,super.write(t,null,n)}[Sh](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[Ih]((t=>t?this.emit("error",t):this.end()));if(!this.buf)throw new Error("buffer lost somehow in ONDRAIN");this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[mh]()}}class Ah extends Ch{sync=!0;[vh](){this[bh](q.default.lstatSync(this.absolute))}[hh](){this[yh](q.default.readlinkSync(this.absolute))}[wh](){this[Eh](q.default.openSync(this.absolute,"r"))}[mh](){let t=!0;try{const{fd:e,buf:n,offset:r,length:o,pos:i}=this;if(void 0===e||void 0===n)throw new Error("fd and buf must be set in READ method");const s=q.default.readSync(e,n,r,o,i);this[gh](s),t=!1}finally{if(t)try{this[Ih]((()=>{}))}catch(t){}}}[jh](t){t()}[Ih](t=()=>{}){void 0!==this.fd&&q.default.closeSync(this.fd),t()}}class Uh extends gd{blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(t,e,n={}){return vl(this,t,e,n)}constructor(t,e={}){const n=Pu(e);super(),this.preservePaths=!!n.preservePaths,this.portable=!!n.portable,this.strict=!!n.strict,this.noPax=!!n.noPax,this.noMtime=!!n.noMtime,this.onWriteEntry=n.onWriteEntry,this.readEntry=t;const{type:r}=t;if("Unsupported"===r)throw new Error("writing entry that should be ignored");this.type=r,"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.prefix=n.prefix,this.path=fl(t.path),this.mode=void 0!==t.mode?this[Rh](t.mode):void 0,this.uid=this.portable?void 0:t.uid,this.gid=this.portable?void 0:t.gid,this.uname=this.portable?void 0:t.uname,this.gname=this.portable?void 0:t.gname,this.size=t.size,this.mtime=this.noMtime?void 0:n.mtime||t.mtime,this.atime=this.portable?void 0:t.atime,this.ctime=this.portable?void 0:t.ctime,this.linkpath=void 0!==t.linkpath?fl(t.linkpath):void 0,"function"==typeof n.onwarn&&this.on("warn",n.onwarn);let o=!1;if(!this.preservePaths){const[t,e]=nh(this.path);t&&"string"==typeof e&&(this.path=e,o=t)}this.remain=t.size,this.blockRemain=t.startBlockSize,this.onWriteEntry?.(this),this.header=new Zd({path:this[_h](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[_h](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?void 0:this.uid,gid:this.portable?void 0:this.gid,size:this.size,mtime:this.noMtime?void 0:this.mtime,type:this.type,uname:this.portable?void 0:this.uname,atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime}),o&&this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:this,path:o+this.path}),this.header.encode()&&!this.noPax&&super.write(new dl({atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime,gid:this.portable?void 0:this.gid,mtime:this.noMtime?void 0:this.mtime,path:this[_h](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[_h](this.linkpath):this.linkpath,size:this.size,uid:this.portable?void 0:this.uid,uname:this.portable?void 0:this.uname,dev:this.portable?void 0:this.readEntry.dev,ino:this.portable?void 0:this.readEntry.ino,nlink:this.portable?void 0:this.readEntry.nlink}).encode());const i=this.header?.block;if(!i)throw new Error("failed to encode header");super.write(i),t.pipe(this)}[_h](t){return ch(t,this.prefix)}[Rh](t){return Ql(t,"Directory"===this.type,this.portable)}write(t,e,n){"function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,"string"==typeof e?e:"utf8"));const r=t.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(t,n)}end(t,e,n){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),"function"==typeof t&&(n=t,e=void 0,t=void 0),"function"==typeof e&&(n=e,e=void 0),"string"==typeof t&&(t=Buffer.from(t,e??"utf8")),n&&this.once("finish",n),t?super.end(t,n):super.end(n),this}}const xh=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";class Ph{path;absolute;entry;stat;readdir;pending=!1;ignore=!1;piped=!1;constructor(t,e){this.path=t||"./",this.absolute=e}}const kh=Buffer.alloc(1024),Oh=Symbol("onStat"),Th=Symbol("ended"),Dh=Symbol("queue"),Lh=Symbol("current"),Nh=Symbol("process"),qh=Symbol("processing"),Bh=Symbol("processJob"),Fh=Symbol("jobs"),Gh=Symbol("jobDone"),Mh=Symbol("addFSEntry"),zh=Symbol("addTarEntry"),Jh=Symbol("stat"),Wh=Symbol("readdir"),$h=Symbol("onreaddir"),Hh=Symbol("pipe"),Vh=Symbol("entry"),Zh=Symbol("entryOpt"),Yh=Symbol("writeEntryClass"),Kh=Symbol("write"),Xh=Symbol("ondrain");class Qh extends gd{opt;cwd;maxReadSize;preservePaths;strict;noPax;prefix;linkCache;statCache;file;portable;zip;readdirCache;noDirRecurse;follow;noMtime;mtime;filter;jobs;[Yh];onWriteEntry;[Dh];[Fh]=0;[qh]=!1;[Th]=!1;constructor(t={}){if(super(),this.opt=t,this.file=t.file||"",this.cwd=t.cwd||process.cwd(),this.maxReadSize=t.maxReadSize,this.preservePaths=!!t.preservePaths,this.strict=!!t.strict,this.noPax=!!t.noPax,this.prefix=fl(t.prefix||""),this.linkCache=t.linkCache||new Map,this.statCache=t.statCache||new Map,this.readdirCache=t.readdirCache||new Map,this.onWriteEntry=t.onWriteEntry,this[Yh]=Ch,"function"==typeof t.onwarn&&this.on("warn",t.onwarn),this.portable=!!t.portable,t.gzip||t.brotli){if(t.gzip&&t.brotli)throw new TypeError("gzip and brotli are mutually exclusive");if(t.gzip&&("object"!=typeof t.gzip&&(t.gzip={}),this.portable&&(t.gzip.portable=!0),this.zip=new xd(t.gzip)),t.brotli&&("object"!=typeof t.brotli&&(t.brotli={}),this.zip=new Od(t.brotli)),!this.zip)throw new Error("impossible");const e=this.zip;e.on("data",(t=>super.write(t))),e.on("end",(()=>super.end())),e.on("drain",(()=>this[Xh]())),this.on("resume",(()=>e.resume()))}else this.on("drain",this[Xh]);this.noDirRecurse=!!t.noDirRecurse,this.follow=!!t.follow,this.noMtime=!!t.noMtime,t.mtime&&(this.mtime=t.mtime),this.filter="function"==typeof t.filter?t.filter:()=>!0,this[Dh]=new Dd,this[Fh]=0,this.jobs=Number(t.jobs)||4,this[qh]=!1,this[Th]=!1}[Kh](t){return super.write(t)}add(t){return this.write(t),this}end(t,e,n){return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e=void 0),t&&this.add(t),this[Th]=!0,this[Nh](),n&&n(),this}write(t){if(this[Th])throw new Error("write after end");return t instanceof ml?this[zh](t):this[Mh](t),this.flowing}[zh](t){const e=fl(B.default.resolve(this.cwd,t.path));if(this.filter(t.path,t)){const n=new Ph(t.path,e);n.entry=new Uh(t,this[Zh](n)),n.entry.on("end",(()=>this[Gh](n))),this[Fh]+=1,this[Dh].push(n)}else t.resume();this[Nh]()}[Mh](t){const e=fl(B.default.resolve(this.cwd,t));this[Dh].push(new Ph(t,e)),this[Nh]()}[Jh](t){t.pending=!0,this[Fh]+=1;const e=this.follow?"stat":"lstat";q.default[e](t.absolute,((e,n)=>{t.pending=!1,this[Fh]-=1,e?this.emit("error",e):this[Oh](t,n)}))}[Oh](t,e){this.statCache.set(t.absolute,e),t.stat=e,this.filter(t.path,e)||(t.ignore=!0),this[Nh]()}[Wh](t){t.pending=!0,this[Fh]+=1,q.default.readdir(t.absolute,((e,n)=>{if(t.pending=!1,this[Fh]-=1,e)return this.emit("error",e);this[$h](t,n)}))}[$h](t,e){this.readdirCache.set(t.absolute,e),t.readdir=e,this[Nh]()}[Nh](){if(!this[qh]){this[qh]=!0;for(let t=this[Dh].head;t&&this[Fh]<this.jobs;t=t.next)if(this[Bh](t.value),t.value.ignore){const e=t.next;this[Dh].removeNode(t),t.next=e}this[qh]=!1,this[Th]&&!this[Dh].length&&0===this[Fh]&&(this.zip?this.zip.end(kh):(super.write(kh),super.end()))}}get[Lh](){return this[Dh]&&this[Dh].head&&this[Dh].head.value}[Gh](t){this[Dh].shift(),this[Fh]-=1,this[Nh]()}[Bh](t){if(!t.pending)if(t.entry)t!==this[Lh]||t.piped||this[Hh](t);else{if(!t.stat){const e=this.statCache.get(t.absolute);e?this[Oh](t,e):this[Jh](t)}if(t.stat&&!t.ignore){if(!this.noDirRecurse&&t.stat.isDirectory()&&!t.readdir){const e=this.readdirCache.get(t.absolute);if(e?this[$h](t,e):this[Wh](t),!t.readdir)return}t.entry=this[Vh](t),t.entry?t!==this[Lh]||t.piped||this[Hh](t):t.ignore=!0}}}[Zh](t){return{onwarn:(t,e,n)=>this.warn(t,e,n),noPax:this.noPax,cwd:this.cwd,absolute:t.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[Vh](t){this[Fh]+=1;try{return new this[Yh](t.path,this[Zh](t)).on("end",(()=>this[Gh](t))).on("error",(t=>this.emit("error",t)))}catch(t){this.emit("error",t)}}[Xh](){this[Lh]&&this[Lh].entry&&this[Lh].entry.resume()}[Hh](t){t.piped=!0,t.readdir&&t.readdir.forEach((e=>{const n=t.path,r="./"===n?"":n.replace(/\/*$/,"/");this[Mh](r+e)}));const e=t.entry,n=this.zip;if(!e)throw new Error("cannot pipe without source");n?e.on("data",(t=>{n.write(t)||e.pause()})):e.on("data",(t=>{super.write(t)||e.pause()}))}pause(){return this.zip&&this.zip.pause(),super.pause()}warn(t,e,n={}){vl(this,t,e,n)}}class tp extends Qh{sync=!0;constructor(t){super(t),this[Yh]=Ah}pause(){}resume(){}[Jh](t){const e=this.follow?"statSync":"lstatSync";this[Oh](t,q.default[e](t.absolute))}[Wh](t){this[$h](t,q.default.readdirSync(t.absolute))}[Hh](t){const e=t.entry,n=this.zip;if(t.readdir&&t.readdir.forEach((e=>{const n=t.path,r="./"===n?"":n.replace(/\/*$/,"/");this[Mh](r+e)})),!e)throw new Error("Cannot pipe without source");n?e.on("data",(t=>{n.write(t)})):e.on("data",(t=>{super[Kh](t)}))}}const ep=(t,e)=>{e.forEach((e=>{"@"===e.charAt(0)?Xl({file:W.default.resolve(t.cwd,e.slice(1)),sync:!0,noResume:!0,onReadEntry:e=>t.add(e)}):t.add(e)})),t.end()},np=async(t,e)=>{for(let n=0;n<e.length;n++){const r=String(e[n]);"@"===r.charAt(0)?await Xl({file:W.default.resolve(String(t.cwd),r.slice(1)),noResume:!0,onReadEntry:e=>{t.add(e)}}):t.add(r)}t.end()},rp=ku(((t,e)=>{const n=new tp(t),r=new Au(t.file,{mode:t.mode||438});n.pipe(r),ep(n,e)}),((t,e)=>{const n=new Qh(t),r=new Cu(t.file,{mode:t.mode||438});n.pipe(r);const o=new Promise(((t,e)=>{r.on("error",e),r.on("close",t),n.on("error",e)}));return np(n,e),o}),((t,e)=>{const n=new tp(t);return ep(n,e),n}),((t,e)=>{const n=new Qh(t);return np(n,e),n}),((t,e)=>{if(!e?.length)throw new TypeError("no paths specified to add to archive")})),op="win32"===(process.env.__FAKE_PLATFORM__||process.platform),{O_CREAT:ip,O_TRUNC:sp,O_WRONLY:ap}=q.default.constants,cp=Number(process.env.__FAKE_FS_O_FILENAME__)||q.default.constants.UV_FS_O_FILEMAP||0,up=cp|sp|ip|ap,dp=op&&!!cp?t=>t<524288?up:"w":()=>"w",lp=(t,e,n)=>{try{return $.default.lchownSync(t,e,n)}catch(t){if("ENOENT"!==t?.code)throw t}},hp=(t,e,n,r)=>{$.default.lchown(t,e,n,(t=>{r(t&&"ENOENT"!==t?.code?t:null)}))},pp=(t,e,n,r,o)=>{if(e.isDirectory())fp(W.default.resolve(t,e.name),n,r,(i=>{if(i)return o(i);const s=W.default.resolve(t,e.name);hp(s,n,r,o)}));else{const i=W.default.resolve(t,e.name);hp(i,n,r,o)}},fp=(t,e,n,r)=>{$.default.readdir(t,{withFileTypes:!0},((o,i)=>{if(o){if("ENOENT"===o.code)return r();if("ENOTDIR"!==o.code&&"ENOTSUP"!==o.code)return r(o)}if(o||!i.length)return hp(t,e,n,r);let s=i.length,a=null;const c=o=>{if(!a)return o?r(a=o):0===--s?hp(t,e,n,r):void 0};for(const r of i)pp(t,r,e,n,c)}))},mp=(t,e,n,r)=>{e.isDirectory()&&vp(W.default.resolve(t,e.name),n,r),lp(W.default.resolve(t,e.name),n,r)},vp=(t,e,n)=>{let r;try{r=$.default.readdirSync(t,{withFileTypes:!0})}catch(r){const o=r;if("ENOENT"===o?.code)return;if("ENOTDIR"===o?.code||"ENOTSUP"===o?.code)return lp(t,e,n);throw o}for(const o of r)mp(t,o,e,n);return lp(t,e,n)},bp=t=>{if(t)if("object"==typeof t)t={mode:511,...t};else if("number"==typeof t)t={mode:t};else{if("string"!=typeof t)throw new TypeError("invalid options argument");t={mode:parseInt(t,8)}}else t={mode:511};const e=t,n=t.fs||{};return t.mkdir=t.mkdir||n.mkdir||d.mkdir,t.mkdirAsync=t.mkdirAsync?t.mkdirAsync:async(t,n)=>new Promise(((r,o)=>e.mkdir(t,n,((t,e)=>t?o(t):r(e))))),t.stat=t.stat||n.stat||d.stat,t.statAsync=t.statAsync?t.statAsync:async t=>new Promise(((n,r)=>e.stat(t,((t,e)=>t?r(t):n(e))))),t.statSync=t.statSync||n.statSync||d.statSync,t.mkdirSync=t.mkdirSync||n.mkdirSync||d.mkdirSync,e},gp=(t,e,n)=>{const r=l.dirname(t),o={...bp(e),recursive:!1};if(r===t)try{return o.mkdirSync(t,o)}catch(t){if(t&&"EISDIR"!==t.code)throw t;return}try{return o.mkdirSync(t,o),n||t}catch(e){const i=e;if(i&&"ENOENT"===i.code)return gp(t,o,gp(r,o,n));if(i&&"EEXIST"!==i.code&&i&&"EROFS"!==i.code)throw e;try{if(!o.statSync(t).isDirectory())throw e}catch(t){throw e}}},yp=Object.assign((async(t,e,n)=>{const r=bp(e);r.recursive=!1;const o=l.dirname(t);return o===t?r.mkdirAsync(t,r).catch((t=>{if(t&&"EISDIR"!==t.code)throw t})):r.mkdirAsync(t,r).then((()=>n||t),(async e=>{const i=e;if(i&&"ENOENT"===i.code)return yp(o,r).then((e=>yp(t,r,e)));if(i&&"EEXIST"!==i.code&&"EROFS"!==i.code)throw e;return r.statAsync(t).then((t=>{if(t.isDirectory())return n;throw e}),(()=>{throw e}))}))}),{sync:gp}),wp=async(t,e,n)=>{if(n!==e)return t.statAsync(e).then((t=>t.isDirectory()?n:void 0),(n=>n&&"ENOENT"===n.code?wp(t,l.dirname(e),e):void 0))},Ep=(t,e,n)=>{if(n!==e)try{return t.statSync(e).isDirectory()?n:void 0}catch(n){return n&&"ENOENT"===n.code?Ep(t,l.dirname(e),e):void 0}},Ip=(t,e)=>{const n=bp(e);n.recursive=!0;if(l.dirname(t)===t)return n.mkdirSync(t,n);const r=Ep(n,t);try{return n.mkdirSync(t,n),r}catch(e){if(e&&"ENOENT"===e.code)return gp(t,n);throw e}},Rp=Object.assign((async(t,e)=>{const n={...bp(e),recursive:!0};return l.dirname(t)===t?await n.mkdirAsync(t,n):wp(n,t).then((e=>n.mkdirAsync(t,n).then((t=>e||t)).catch((e=>{if(e&&"ENOENT"===e.code)return yp(t,n);throw e}))))}),{sync:Ip}),jp=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,Sp=t=>{if(/\0/.test(t))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"});if(t=l.resolve(t),"win32"===jp){const e=/[*|"<>?:]/,{root:n}=l.parse(t);if(e.test(t.substring(n.length)))throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}return t},_p=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),Cp=+_p[0]>10||10===+_p[0]&&+_p[1]>=12,Ap=Cp?t=>bp(t).mkdirSync===d.mkdirSync:()=>!1,Up=Object.assign(Cp?t=>bp(t).mkdir===d.mkdir:()=>!1,{sync:Ap}),xp=(t,e)=>{t=Sp(t);const n=bp(e);return Ap(n)?Ip(t,n):gp(t,n)},Pp=Object.assign((async(t,e)=>{t=Sp(t);const n=bp(e);return Up(n)?Rp(t,n):yp(t,n)}),{mkdirpSync:xp,mkdirpNative:Rp,mkdirpNativeSync:Ip,mkdirpManual:yp,mkdirpManualSync:gp,sync:xp,native:Rp,nativeSync:Ip,manual:yp,manualSync:gp,useNative:Up,useNativeSync:Ap});class kp extends Error{path;code;syscall="chdir";constructor(t,e){super(`${e}: Cannot cd into '${t}'`),this.path=t,this.code=e}get name(){return"CwdError"}}class Op extends Error{path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(t,e){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"),this.symlink=t,this.path=e}get name(){return"SymlinkError"}}const Tp=(t,e)=>t.get(fl(e)),Dp=(t,e,n)=>t.set(fl(e),n),Lp=(t,e,n)=>{t=fl(t);const r=e.umask??18,o=448|e.mode,i=0!==(o&r),s=e.uid,a=e.gid,c="number"==typeof s&&"number"==typeof a&&(s!==e.processUid||a!==e.processGid),u=e.preserve,d=e.unlink,l=e.cache,h=fl(e.cwd),p=(e,r)=>{e?n(e):(Dp(l,t,!0),r&&c?fp(r,s,a,(t=>p(t))):i?q.default.chmod(t,o,n):n())};if(l&&!0===Tp(l,t))return p();if(t===h)return((t,e)=>{q.default.stat(t,((n,r)=>{!n&&r.isDirectory()||(n=new kp(t,n?.code||"ENOTDIR")),e(n)}))})(t,p);if(u)return Pp(t,{mode:o}).then((t=>p(null,t??void 0)),p);const f=fl(W.default.relative(h,t)).split("/");Np(h,f,o,l,d,h,void 0,p)},Np=(t,e,n,r,o,i,s,a)=>{if(!e.length)return a(null,s);const c=e.shift(),u=fl(W.default.resolve(t+"/"+c));if(Tp(r,u))return Np(u,e,n,r,o,i,s,a);q.default.mkdir(u,n,qp(u,e,n,r,o,i,s,a))},qp=(t,e,n,r,o,i,s,a)=>c=>{c?q.default.lstat(t,((u,d)=>{if(u)u.path=u.path&&fl(u.path),a(u);else if(d.isDirectory())Np(t,e,n,r,o,i,s,a);else if(o)q.default.unlink(t,(c=>{if(c)return a(c);q.default.mkdir(t,n,qp(t,e,n,r,o,i,s,a))}));else{if(d.isSymbolicLink())return a(new Op(t,t+"/"+e.join("/")));a(c)}})):Np(t,e,n,r,o,i,s=s||t,a)},Bp=(t,e)=>{t=fl(t);const n=e.umask??18,r=448|e.mode,o=0!==(r&n),i=e.uid,s=e.gid,a="number"==typeof i&&"number"==typeof s&&(i!==e.processUid||s!==e.processGid),c=e.preserve,u=e.unlink,d=e.cache,l=fl(e.cwd),h=e=>{Dp(d,t,!0),e&&a&&vp(e,i,s),o&&q.default.chmodSync(t,r)};if(d&&!0===Tp(d,t))return h();if(t===l)return(t=>{let e,n=!1;try{n=q.default.statSync(t).isDirectory()}catch(t){e=t?.code}finally{if(!n)throw new kp(t,e??"ENOTDIR")}})(l),h();if(c)return h(xp(t,r)??void 0);const p=fl(W.default.relative(l,t)).split("/");let f;for(let t=p.shift(),e=l;t&&(e+="/"+t);t=p.shift())if(e=fl(W.default.resolve(e)),!Tp(d,e))try{q.default.mkdirSync(e,r),f=f||e,Dp(d,e,!0)}catch(t){const n=q.default.lstatSync(e);if(n.isDirectory()){Dp(d,e,!0);continue}if(u){q.default.unlinkSync(e),q.default.mkdirSync(e,r),f=f||e,Dp(d,e,!0);continue}if(n.isSymbolicLink())return new Op(e,e+"/"+p.join("/"))}return h(f)},Fp=Object.create(null),{hasOwnProperty:Gp}=Object.prototype,Mp=t=>(Gp.call(Fp,t)||(Fp[t]=t.normalize("NFD")),Fp[t]),zp="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform);class Jp{#p=new Map;#f=new Map;#m=new Set;reserve(t,e){t=zp?["win32 parallelization disabled"]:t.map((t=>Yl(y.join(Mp(t))).toLowerCase()));const n=new Set(t.map((t=>(t=>{const e=t.split("/").slice(0,-1).reduce(((t,e)=>{const n=t[t.length-1];return void 0!==n&&(e=y.join(n,e)),t.push(e||"/"),t}),[]);return e})(t))).reduce(((t,e)=>t.concat(e))));this.#f.set(e,{dirs:n,paths:t});for(const n of t){const t=this.#p.get(n);t?t.push(e):this.#p.set(n,[e])}for(const t of n){const n=this.#p.get(t);if(n){const t=n[n.length-1];t instanceof Set?t.add(e):n.push(new Set([e]))}else this.#p.set(t,[new Set([e])])}return this.#v(e)}#b(t){const e=this.#f.get(t);if(!e)throw new Error("function does not have any path reservations");return{paths:e.paths.map((t=>this.#p.get(t))),dirs:[...e.dirs].map((t=>this.#p.get(t)))}}check(t){const{paths:e,dirs:n}=this.#b(t);return e.every((e=>e&&e[0]===t))&&n.every((e=>e&&e[0]instanceof Set&&e[0].has(t)))}#v(t){return!(this.#m.has(t)||!this.check(t))&&(this.#m.add(t),t((()=>this.#g(t))),!0)}#g(t){if(!this.#m.has(t))return!1;const e=this.#f.get(t);if(!e)throw new Error("invalid reservation");const{paths:n,dirs:r}=e,o=new Set;for(const e of n){const n=this.#p.get(e);if(!n||n?.[0]!==t)continue;const r=n[1];if(r)if(n.shift(),"function"==typeof r)o.add(r);else for(const t of r)o.add(t);else this.#p.delete(e)}for(const e of r){const n=this.#p.get(e),r=n?.[0];if(n&&r instanceof Set)if(1!==r.size||1!==n.length)if(1===r.size){n.shift();const t=n[0];"function"==typeof t&&o.add(t)}else r.delete(t);else this.#p.delete(e)}return this.#m.delete(t),o.forEach((t=>this.#v(t))),!0}}const Wp=Symbol("onEntry"),$p=Symbol("checkFs"),Hp=Symbol("checkFs2"),Vp=Symbol("pruneCache"),Zp=Symbol("isReusable"),Yp=Symbol("makeFs"),Kp=Symbol("file"),Xp=Symbol("directory"),Qp=Symbol("link"),tf=Symbol("symlink"),ef=Symbol("hardlink"),nf=Symbol("unsupported"),rf=Symbol("checkPath"),of=Symbol("mkdir"),sf=Symbol("onError"),af=Symbol("pending"),cf=Symbol("pend"),uf=Symbol("unpend"),df=Symbol("ended"),lf=Symbol("maybeClose"),hf=Symbol("skip"),pf=Symbol("doChown"),ff=Symbol("uid"),mf=Symbol("gid"),vf=Symbol("checkedCwd"),bf="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform),gf=(t,e,n)=>void 0!==t&&t===t>>>0?t:void 0!==e&&e===e>>>0?e:n,yf=t=>Yl(fl(Mp(t))).toLowerCase();class wf extends Zl{[df]=!1;[vf]=!1;[af]=0;reservations=new Jp;transform;writable=!0;readable=!1;dirCache;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(t={}){if(t.ondone=()=>{this[df]=!0,this[lf]()},super(t),this.transform=t.transform,this.dirCache=t.dirCache||new Map,this.chmod=!!t.chmod,"number"==typeof t.uid||"number"==typeof t.gid){if("number"!=typeof t.uid||"number"!=typeof t.gid)throw new TypeError("cannot set owner without number uid and gid");if(t.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=t.uid,this.gid=t.gid,this.setOwner=!0}else this.uid=void 0,this.gid=void 0,this.setOwner=!1;void 0===t.preserveOwner&&"number"!=typeof t.uid?this.preserveOwner=!(!process.getuid||0!==process.getuid()):this.preserveOwner=!!t.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():void 0,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():void 0,this.maxDepth="number"==typeof t.maxDepth?t.maxDepth:1024,this.forceChown=!0===t.forceChown,this.win32=!!t.win32||bf,this.newer=!!t.newer,this.keep=!!t.keep,this.noMtime=!!t.noMtime,this.preservePaths=!!t.preservePaths,this.unlink=!!t.unlink,this.cwd=fl(W.default.resolve(t.cwd||process.cwd())),this.strip=Number(t.strip)||0,this.processUmask=this.chmod?"number"==typeof t.processUmask?t.processUmask:process.umask():0,this.umask="number"==typeof t.umask?t.umask:this.processUmask,this.dmode=t.dmode||511&~this.umask,this.fmode=t.fmode||438&~this.umask,this.on("entry",(t=>this[Wp](t)))}warn(t,e,n={}){return"TAR_BAD_ARCHIVE"!==t&&"TAR_ABORT"!==t||(n.recoverable=!1),super.warn(t,e,n)}[lf](){this[df]&&0===this[af]&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[rf](t){const e=fl(t.path),n=e.split("/");if(this.strip){if(n.length<this.strip)return!1;if("Link"===t.type){const e=fl(String(t.linkpath)).split("/");if(!(e.length>=this.strip))return!1;t.linkpath=e.slice(this.strip).join("/")}n.splice(0,this.strip),t.path=n.join("/")}if(isFinite(this.maxDepth)&&n.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:t,path:e,depth:n.length,maxDepth:this.maxDepth}),!1;if(!this.preservePaths){if(n.includes("..")||bf&&/^[a-z]:\.\.$/i.test(n[0]??""))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:t,path:e}),!1;const[r,o]=nh(e);r&&(t.path=String(o),this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:t,path:e}))}if(W.default.isAbsolute(t.path)?t.absolute=fl(W.default.resolve(t.path)):t.absolute=fl(W.default.resolve(this.cwd,t.path)),!this.preservePaths&&"string"==typeof t.absolute&&0!==t.absolute.indexOf(this.cwd+"/")&&t.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:t,path:fl(t.path),resolvedPath:t.absolute,cwd:this.cwd}),!1;if(t.absolute===this.cwd&&"Directory"!==t.type&&"GNUDumpDir"!==t.type)return!1;if(this.win32){const{root:e}=W.default.win32.parse(String(t.absolute));t.absolute=e+ah(String(t.absolute).slice(e.length));const{root:n}=W.default.win32.parse(t.path);t.path=n+ah(t.path.slice(n.length))}return!0}[Wp](t){if(!this[rf](t))return t.resume();switch(V.default.equal(typeof t.absolute,"string"),t.type){case"Directory":case"GNUDumpDir":t.mode&&(t.mode=448|t.mode);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[$p](t);default:return this[nf](t)}}[sf](t,e){"CwdError"===t.name?this.emit("error",t):(this.warn("TAR_ENTRY_ERROR",t,{entry:e}),this[uf](),e.resume())}[of](t,e,n){Lp(fl(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:e},n)}[pf](t){return this.forceChown||this.preserveOwner&&("number"==typeof t.uid&&t.uid!==this.processUid||"number"==typeof t.gid&&t.gid!==this.processGid)||"number"==typeof this.uid&&this.uid!==this.processUid||"number"==typeof this.gid&&this.gid!==this.processGid}[ff](t){return gf(this.uid,t.uid,this.processUid)}[mf](t){return gf(this.gid,t.gid,this.processGid)}[Kp](t,e){const n="number"==typeof t.mode?4095&t.mode:this.fmode,r=new Cu(String(t.absolute),{flags:dp(t.size),mode:n,autoClose:!1});r.on("error",(n=>{r.fd&&$.default.close(r.fd,(()=>{})),r.write=()=>!0,this[sf](n,t),e()}));let o=1;const i=n=>{if(n)return r.fd&&$.default.close(r.fd,(()=>{})),this[sf](n,t),void e();0===--o&&void 0!==r.fd&&$.default.close(r.fd,(n=>{n?this[sf](n,t):this[uf](),e()}))};r.on("finish",(()=>{const e=String(t.absolute),n=r.fd;if("number"==typeof n&&t.mtime&&!this.noMtime){o++;const r=t.atime||new Date,s=t.mtime;$.default.futimes(n,r,s,(t=>t?$.default.utimes(e,r,s,(e=>i(e&&t))):i()))}if("number"==typeof n&&this[pf](t)){o++;const r=this[ff](t),s=this[mf](t);"number"==typeof r&&"number"==typeof s&&$.default.fchown(n,r,s,(t=>t?$.default.chown(e,r,s,(e=>i(e&&t))):i()))}i()}));const s=this.transform&&this.transform(t)||t;s!==t&&(s.on("error",(n=>{this[sf](n,t),e()})),t.pipe(s)),s.pipe(r)}[Xp](t,e){const n="number"==typeof t.mode?4095&t.mode:this.dmode;this[of](String(t.absolute),n,(n=>{if(n)return this[sf](n,t),void e();let r=1;const o=()=>{0===--r&&(e(),this[uf](),t.resume())};t.mtime&&!this.noMtime&&(r++,$.default.utimes(String(t.absolute),t.atime||new Date,t.mtime,o)),this[pf](t)&&(r++,$.default.chown(String(t.absolute),Number(this[ff](t)),Number(this[mf](t)),o)),o()}))}[nf](t){t.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${t.type}`,{entry:t}),t.resume()}[tf](t,e){this[Qp](t,String(t.linkpath),"symlink",e)}[ef](t,e){const n=fl(W.default.resolve(this.cwd,String(t.linkpath)));this[Qp](t,n,"link",e)}[cf](){this[af]++}[uf](){this[af]--,this[lf]()}[hf](t){this[uf](),t.resume()}[Zp](t,e){return"File"===t.type&&!this.unlink&&e.isFile()&&e.nlink<=1&&!bf}[$p](t){this[cf]();const e=[t.path];t.linkpath&&e.push(t.linkpath),this.reservations.reserve(e,(e=>this[Hp](t,e)))}[Vp](t){"SymbolicLink"===t.type?(t=>{for(const e of t.keys())t.delete(e)})(this.dirCache):"Directory"!==t.type&&((t,e)=>{e=yf(e);for(const n of t.keys()){const r=yf(n);r!==e&&0!==r.indexOf(e+"/")||t.delete(n)}})(this.dirCache,String(t.absolute))}[Hp](t,e){this[Vp](t);const n=n=>{this[Vp](t),e(n)},r=()=>{this[of](this.cwd,this.dmode,(e=>{if(e)return this[sf](e,t),void n();this[vf]=!0,o()}))},o=()=>{if(t.absolute!==this.cwd){const e=fl(W.default.dirname(String(t.absolute)));if(e!==this.cwd)return this[of](e,this.dmode,(e=>{if(e)return this[sf](e,t),void n();i()}))}i()},i=()=>{$.default.lstat(String(t.absolute),((e,r)=>{if(r&&(this.keep||this.newer&&r.mtime>(t.mtime??r.mtime)))return this[hf](t),void n();if(e||this[Zp](t,r))return this[Yp](null,t,n);if(r.isDirectory()){if("Directory"===t.type){const e=e=>this[Yp](e??null,t,n);return this.chmod&&t.mode&&(4095&r.mode)!==t.mode?$.default.chmod(String(t.absolute),Number(t.mode),e):e()}if(t.absolute!==this.cwd)return $.default.rmdir(String(t.absolute),(e=>this[Yp](e??null,t,n)))}if(t.absolute===this.cwd)return this[Yp](null,t,n);((t,e)=>{if(!bf)return $.default.unlink(t,e);const n=t+".DELETE."+R.randomBytes(16).toString("hex");$.default.rename(t,n,(t=>{if(t)return e(t);$.default.unlink(n,e)}))})(String(t.absolute),(e=>this[Yp](e??null,t,n)))}))};this[vf]?o():r()}[Yp](t,e,n){if(t)return this[sf](t,e),void n();switch(e.type){case"File":case"OldFile":case"ContiguousFile":return this[Kp](e,n);case"Link":return this[ef](e,n);case"SymbolicLink":return this[tf](e,n);case"Directory":case"GNUDumpDir":return this[Xp](e,n)}}[Qp](t,e,n,r){$.default[n](e,String(t.absolute),(e=>{e?this[sf](e,t):(this[uf](),t.resume()),r()}))}}const Ef=t=>{try{return[null,t()]}catch(t){return[t,null]}};class If extends wf{sync=!0;[Yp](t,e){return super[Yp](t,e,(()=>{}))}[$p](t){if(this[Vp](t),!this[vf]){const e=this[of](this.cwd,this.dmode);if(e)return this[sf](e,t);this[vf]=!0}if(t.absolute!==this.cwd){const e=fl(W.default.dirname(String(t.absolute)));if(e!==this.cwd){const n=this[of](e,this.dmode);if(n)return this[sf](n,t)}}const[e,n]=Ef((()=>$.default.lstatSync(String(t.absolute))));if(n&&(this.keep||this.newer&&n.mtime>(t.mtime??n.mtime)))return this[hf](t);if(e||this[Zp](t,n))return this[Yp](null,t);if(n.isDirectory()){if("Directory"===t.type){const e=this.chmod&&t.mode&&(4095&n.mode)!==t.mode,[r]=e?Ef((()=>{$.default.chmodSync(String(t.absolute),Number(t.mode))})):[];return this[Yp](r,t)}const[e]=Ef((()=>$.default.rmdirSync(String(t.absolute))));this[Yp](e,t)}const[r]=t.absolute===this.cwd?[]:Ef((()=>(t=>{if(!bf)return $.default.unlinkSync(t);const e=t+".DELETE."+R.randomBytes(16).toString("hex");$.default.renameSync(t,e),$.default.unlinkSync(e)})(String(t.absolute))));this[Yp](r,t)}[Kp](t,e){const n="number"==typeof t.mode?4095&t.mode:this.fmode,r=n=>{let r;try{$.default.closeSync(o)}catch(t){r=t}(n||r)&&this[sf](n||r,t),e()};let o;try{o=$.default.openSync(String(t.absolute),dp(t.size),n)}catch(t){return r(t)}const i=this.transform&&this.transform(t)||t;i!==t&&(i.on("error",(e=>this[sf](e,t))),t.pipe(i)),i.on("data",(t=>{try{$.default.writeSync(o,t,0,t.length)}catch(t){r(t)}})),i.on("end",(()=>{let e=null;if(t.mtime&&!this.noMtime){const n=t.atime||new Date,r=t.mtime;try{$.default.futimesSync(o,n,r)}catch(o){try{$.default.utimesSync(String(t.absolute),n,r)}catch(t){e=o}}}if(this[pf](t)){const n=this[ff](t),r=this[mf](t);try{$.default.fchownSync(o,Number(n),Number(r))}catch(o){try{$.default.chownSync(String(t.absolute),Number(n),Number(r))}catch(t){e=e||o}}}r(e)}))}[Xp](t,e){const n="number"==typeof t.mode?4095&t.mode:this.dmode,r=this[of](String(t.absolute),n);if(r)return this[sf](r,t),void e();if(t.mtime&&!this.noMtime)try{$.default.utimesSync(String(t.absolute),t.atime||new Date,t.mtime)}catch(r){}if(this[pf](t))try{$.default.chownSync(String(t.absolute),Number(this[ff](t)),Number(this[mf](t)))}catch(r){}e(),t.resume()}[of](t,e){try{return Bp(fl(t),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:e})}catch(t){return t}}[Qp](t,e,n,r){const o=`${n}Sync`;try{$.default[o](e,String(t.absolute)),r(),t.resume()}catch(e){return this[sf](e,t)}}}const Rf=ku((t=>{const e=new If(t),n=t.file,r=$.default.statSync(n),o=t.maxReadSize||16777216;new _u(n,{readSize:o,size:r.size}).pipe(e)}),((t,e)=>{const n=new wf(t),r=t.maxReadSize||16777216,o=t.file,i=new Promise(((t,e)=>{n.on("error",e),n.on("close",t),$.default.stat(o,((t,i)=>{if(t)e(t);else{const t=new Su(o,{readSize:r,size:i.size});t.on("error",e),t.pipe(n)}}))}));return i}),(t=>new If(t)),(t=>new wf(t)),((t,e)=>{e?.length&&Kl(t,e)})),jf=(t,e,n,r,o)=>{const i=new Au(t.file,{fd:r,start:n});e.pipe(i),Sf(e,o)},Sf=(t,e)=>{e.forEach((e=>{"@"===e.charAt(0)?Xl({file:W.default.resolve(t.cwd,e.slice(1)),sync:!0,noResume:!0,onReadEntry:e=>t.add(e)}):t.add(e)})),t.end()},_f=async(t,e)=>{for(let n=0;n<e.length;n++){const r=String(e[n]);"@"===r.charAt(0)?await Xl({file:W.default.resolve(String(t.cwd),r.slice(1)),noResume:!0,onReadEntry:e=>t.add(e)}):t.add(r)}t.end()},Cf=ku(((t,e)=>{const n=new tp(t);let r,o,i=!0;try{try{r=$.default.openSync(t.file,"r+")}catch(e){if("ENOENT"!==e?.code)throw e;r=$.default.openSync(t.file,"w+")}const s=$.default.fstatSync(r),a=Buffer.alloc(512);t:for(o=0;o<s.size;o+=512){for(let t=0,e=0;t<512;t+=e){if(e=$.default.readSync(r,a,t,a.length-t,o+t),0===o&&31===a[0]&&139===a[1])throw new Error("cannot append to compressed archives");if(!e)break t}const e=new Zd(a);if(!e.cksumValid)break;const n=512*Math.ceil((e.size||0)/512);if(o+n+512>s.size)break;o+=n,t.mtimeCache&&e.mtime&&t.mtimeCache.set(String(e.path),e.mtime)}i=!1,jf(t,n,o,r,e)}finally{if(i)try{$.default.closeSync(r)}catch(t){}}}),((t,e)=>{e=Array.from(e);const n=new Qh(t),r=new Promise(((r,o)=>{n.on("error",o);let i="r+";const s=(a,c)=>a&&"ENOENT"===a.code&&"r+"===i?(i="w+",$.default.open(t.file,i,s)):a||!c?o(a):void $.default.fstat(c,((i,s)=>{if(i)return $.default.close(c,(()=>o(i)));((e,n,r)=>{const o=(t,n)=>{t?$.default.close(e,(e=>r(t))):r(null,n)};let i=0;if(0===n)return o(null,0);let s=0;const a=Buffer.alloc(512),c=(r,u)=>{if(r||void 0===u)return o(r);if(s+=u,s<512&&u)return $.default.read(e,a,s,a.length-s,i+s,c);if(0===i&&31===a[0]&&139===a[1])return o(new Error("cannot append to compressed archives"));if(s<512)return o(null,i);const d=new Zd(a);if(!d.cksumValid)return o(null,i);const l=512*Math.ceil((d.size??0)/512);return i+l+512>n?o(null,i):(i+=l+512,i>=n?o(null,i):(t.mtimeCache&&d.mtime&&t.mtimeCache.set(String(d.path),d.mtime),s=0,void $.default.read(e,a,0,512,i,c)))};$.default.read(e,a,0,512,i,c)})(c,s.size,((i,s)=>{if(i)return o(i);const a=new Cu(t.file,{fd:c,start:s});n.pipe(a),a.on("error",o),a.on("close",r),_f(n,e)}))}));$.default.open(t.file,i,s)}));return r}),(()=>{throw new TypeError("file is required")}),(()=>{throw new TypeError("file is required")}),((t,e)=>{if(!t.file)throw new TypeError("file is required");if(t.gzip||t.brotli||t.file.endsWith(".br")||t.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!e?.length)throw new TypeError("no paths specified to add/replace")}));ku(Cf.syncFile,Cf.asyncFile,Cf.syncNoFile,Cf.asyncNoFile,((t,e=[])=>{Cf.validate?.(t,e),Af(t)}));const Af=t=>{const e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(n,r)=>e(n,r)&&!((t.mtimeCache?.get(n)??r.mtime??0)>(r.mtime??0)):(e,n)=>!((t.mtimeCache?.get(e)??n.mtime??0)>(n.mtime??0))};function Uf(t){return Array.isArray(t)?t:[t]}const xf=/^\s+$/,Pf=/(?:[^\\]|^)\\$/,kf=/^\\!/,Of=/^\\#/,Tf=/\r?\n/g,Df=/^\.*\/|^\.+$/;let Lf="node-ignore";"undefined"!=typeof Symbol&&(Lf=Symbol.for("node-ignore"));const Nf=Lf,qf=/([0-z])-([0-z])/g,Bf=()=>!1,Ff=[[/^\uFEFF/,()=>""],[/((?:\\\\)*?)(\\?\s+)$/,(t,e,n)=>e+(0===n.indexOf("\\")?" ":"")],[/(\\+?)\s/g,(t,e)=>{const{length:n}=e;return e.slice(0,n-n%2)+" "}],[/[\\$.|*+(){^]/g,t=>`\\${t}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(t,e,n)=>e+6<n.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(t,e,n)=>e+n.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(t,e,n,r,o)=>"\\"===e?`\\[${n}${(t=>{const{length:e}=t;return t.slice(0,e-e%2)})(r)}${o}`:"]"===o&&r.length%2==0?`[${(t=>t.replace(qf,((t,e,n)=>e.charCodeAt(0)<=n.charCodeAt(0)?t:"")))(n)}${r}]`:"[]"],[/(?:[^*])$/,t=>/\/$/.test(t)?`${t}$`:`${t}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(t,e)=>`${e?`${e}[^/]+`:"[^/]*"}(?=$|\\/$)`]],Gf=Object.create(null),Mf=t=>"string"==typeof t;class zf{constructor(t,e,n,r){this.origin=t,this.pattern=e,this.negative=n,this.regex=r}}const Jf=(t,e)=>{const n=t;let r=!1;0===t.indexOf("!")&&(r=!0,t=t.substr(1));const o=((t,e)=>{let n=Gf[t];return n||(n=Ff.reduce(((e,[n,r])=>e.replace(n,r.bind(t))),t),Gf[t]=n),e?new RegExp(n,"i"):new RegExp(n)})(t=t.replace(kf,"!").replace(Of,"#"),e);return new zf(n,t,r,o)},Wf=(t,e)=>{throw new e(t)},$f=(t,e,n)=>{if(!Mf(t))return n(`path must be a string, but got \`${e}\``,TypeError);if(!t)return n("path must not be empty",TypeError);if($f.isNotRelative(t)){return n(`path should be a ${"`path.relative()`d"} string, but got "${e}"`,RangeError)}return!0},Hf=t=>Df.test(t);$f.isNotRelative=Hf,$f.convert=t=>t;class Vf{constructor({ignorecase:t=!0,ignoreCase:e=t,allowRelativePaths:n=!1}={}){var r,o,i;r=this,o=Nf,i=!0,Object.defineProperty(r,o,{value:i}),this._rules=[],this._ignoreCase=e,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[Nf])return this._rules=this._rules.concat(t._rules),void(this._added=!0);if((t=>t&&Mf(t)&&!xf.test(t)&&!Pf.test(t)&&0!==t.indexOf("#"))(t)){const e=Jf(t,this._ignoreCase);this._added=!0,this._rules.push(e)}}add(t){return this._added=!1,Uf(Mf(t)?(t=>t.split(Tf))(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,e){let n=!1,r=!1;return this._rules.forEach((o=>{const{negative:i}=o;if(r===i&&n!==r||i&&!n&&!r&&!e)return;o.regex.test(t)&&(n=!i,r=i)})),{ignored:n,unignored:r}}_test(t,e,n,r){const o=t&&$f.convert(t);return $f(o,t,this._allowRelativePaths?Bf:Wf),this._t(o,e,n,r)}_t(t,e,n,r){if(t in e)return e[t];if(r||(r=t.split("/")),r.pop(),!r.length)return e[t]=this._testOne(t,n);const o=this._t(r.join("/")+"/",e,n,r);return e[t]=o.ignored?o:this._testOne(t,n)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return Uf(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}}const Zf=t=>new Vf(t);Zf.isPathValid=t=>$f(t&&$f.convert(t),t,Bf),Zf.default=Zf;var Yf=Zf;if("undefined"!=typeof process&&(process.env&&process.env.IGNORE_TEST_WIN32||"win32"===process.platform)){const t=t=>/^\\\\\?\\/.test(t)||/["<>|\u0000-\u001F]+/u.test(t)?t:t.replace(/\\/g,"/");$f.convert=t;const e=/^[a-z]:\//i;$f.isNotRelative=t=>e.test(t)||Hf(t)}var Kf,Xf=function(){function t(t,e){var n=this;if(this.exec=t,this.parameters=e,this.defaultEncoding="base64",this.getFileIgnoreFilter=function(t){if(void 0!==t){var e=Yf({allowRelativePaths:!0}).add(t);return function(t){return!e.ignores(t)}}},this.getTarTransformFn=function(t,e){return function(n){n.path=n.path.replace(t,e)}},this.ensureDirRemote=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){switch(o.label){case 0:return e=["mkdir","-p",t],[4,this.runCommand(e)];case 1:if(n=o.sent(),"Success"!==(null===(r=null==n?void 0:n.commandResult)||void 0===r?void 0:r.status))throw new Error("Failed creating remote directory.");return[2]}}))}))},this.ensureTarCmd=function(){return X(n,void 0,void 0,(function(){var t,e,n;return Q(this,(function(r){switch(r.label){case 0:return t=["tar","--version"],[4,this.runCommand(t)];case 1:if(e=r.sent(),"Success"!==(null===(n=null==e?void 0:e.commandResult)||void 0===n?void 0:n.status))throw new Error("Tar command not found on remote container. Required for file copy.");return[2]}}))}))},this.pathExistsRemote=function(t){return X(n,void 0,void 0,(function(){var e;return Q(this,(function(n){switch(n.label){case 0:return e=["test","-e",t],[4,this.runCommand(e)];case 1:return[2,0===n.sent().commandResult.exitCode]}}))}))},this.checkIsDirRemote=function(t){return X(n,void 0,void 0,(function(){var e;return Q(this,(function(n){switch(n.label){case 0:return e=["test","-d",t],[4,this.runCommand(e)];case 1:return[2,0===n.sent().commandResult.exitCode]}}))}))},this.runCommand=function(t){return X(n,void 0,void 0,(function(){var e,n,r,o,i,s,a,c,u;return Q(this,(function(d){switch(d.label){case 0:return n=(e=this).exec,r=e.parameters,o=r.projectId,i=r.resourceId,s=r.resourceType,a=r.containerName,c={command:t,shell:"none",containerName:a},"service"!==s?[3,2]:[4,n.execServiceCommand({projectId:o,serviceId:i},c)];case 1:return u=d.sent(),[3,4];case 2:return[4,n.execJobCommand({projectId:o,jobId:i},c)];case 3:u=d.sent(),d.label=4;case 4:return[2,u]}}))}))},this.runSession=function(t){return X(n,void 0,void 0,(function(){var e,n,r,o,i,s,a,c,u;return Q(this,(function(d){switch(d.label){case 0:return n=(e=this).exec,r=e.parameters,o=r.projectId,i=r.resourceId,s=r.resourceType,a=r.containerName,c={command:t,shell:"none",tty:!1,encoding:this.defaultEncoding,containerName:a},"service"!==s?[3,2]:[4,n.execServiceSession({projectId:o,serviceId:i},c)];case 1:return u=d.sent(),[3,4];case 2:return[4,n.execJobSession({projectId:o,jobId:i},c)];case 3:u=d.sent(),d.label=4;case 4:return[2,u]}}))}))},!["service","job"].includes(e.resourceType))throw new Error("Invalid resource type: ".concat(e.resourceType,", only 'service' and 'job' supported"))}return t.prototype.uploadFiles=function(t,e,n){return X(this,void 0,void 0,(function(){var r,o,i,s,a,c,u,d,l,h,p,f;return Q(this,(function(m){switch(m.label){case 0:if(void 0===t||!q.default.existsSync(t))throw new Error("Local path '".concat(t,"' does not exists but is required for uploads."));return r=q.default.lstatSync(t).isFile(),o=r?B.default.dirname(t):t,i=r?B.default.basename(t):".",s=r&&void 0!==e&&""!==B.default.extname(e),a=s?B.default.dirname(e):null!=e?e:o,c=void 0!==e?B.default.basename(e):i,u=rp({gzip:{encoding:this.defaultEncoding},cwd:o,filter:this.getFileIgnoreFilter(n),preservePaths:!0,onWriteEntry:s?this.getTarTransformFn(i,c):void 0},Do(i)),[4,this.ensureTarCmd()];case 1:return m.sent(),[4,this.ensureDirRemote(a)];case 2:return m.sent(),d=tt(tt(["tar","-xzvf","-"],["--no-same-owner"],!0),["-C",a],!1),[4,this.runSession(d)];case 3:return l=m.sent(),h=new No,p=new No,l.stdErr.pipe(h),l.stdOut.pipe(p),u.pipe(l.stdIn),[4,l.waitForCommandResult()];case 4:if("Success"!==(null==(f=m.sent())?void 0:f.status))throw new Error("Failed to upload file to container: ".concat(null==f?void 0:f.message,", error details: ").concat(h.getContentsAsString(),"; ").concat(p.getContentsAsString()));return r?[2,{type:exports.CopyType.FILE_UPLOAD,sourceDirectory:o,sourceFile:i,targetDirectory:a,targetFile:c}]:[2,{type:exports.CopyType.DIRECTORY_UPLOAD,sourceDirectory:o,targetDirectory:a}]}}))}))},t.prototype.downloadFiles=function(t,e,n){return X(this,void 0,void 0,(function(){var r,o,i,s,a,c,u,d,l,h,p,f,m,v;return Q(this,(function(b){switch(b.label){case 0:return(r=void 0===t)?[3,2]:[4,this.pathExistsRemote(t)];case 1:r=!b.sent(),b.label=2;case 2:if(r)throw new Error("Remote path '".concat(t,"' does not exists but is required for downloads."));return[4,this.checkIsDirRemote(t)];case 3:return o=b.sent(),i=o?t:B.default.dirname(t),s=o?".":B.default.basename(t),a=void 0!==e&&""!==B.default.extname(e),c=!o&&a?B.default.basename(e):s,(u=void 0!==e?a?B.default.dirname(e):e:".")&&q.default.mkdirSync(u,{recursive:!0}),d=Do(null!=n?n:[]).map((function(t){return"--exclude=".concat(t)})),l=tt(tt(["tar","-zcf","-"],["--no-same-owner"],!0),d,!0),h=tt(tt([],l,!0),["-C",i,s],!1),[4,this.runSession(h)];case 4:return p=b.sent(),f=Rf({cwd:u,gzip:{encoding:this.defaultEncoding},onReadEntry:c?this.getTarTransformFn(s,c):void 0}),m=new No,p.stdErr.pipe(m),p.stdOut.pipe(f),[4,p.waitForCommandResult()];case 5:if("Success"!==(null==(v=b.sent())?void 0:v.status))throw new Error("Failed to download file from container: ".concat(null==v?void 0:v.message,", error details: ").concat(m.getContentsAsString()));return o?[2,{type:exports.CopyType.DIRECTORY_DOWNLOAD,sourceDirectory:i,targetDirectory:u}]:[2,{type:exports.CopyType.FILE_DOWNLOAD,sourceDirectory:i,sourceFile:s,targetDirectory:u,targetFile:c}]}}))}))},t}();exports.CopyType=void 0,(Kf=exports.CopyType||(exports.CopyType={})).DIRECTORY_UPLOAD="directory-upload",Kf.FILE_UPLOAD="file-upload",Kf.DIRECTORY_DOWNLOAD="directory-download",Kf.FILE_DOWNLOAD="file-download";var Qf,tm=function(){function t(t,e){this.exec=t,this.stdIgnoreList=["*.*~"],e&&(this.stdIgnoreList=e)}return t.prototype.downloadServiceFiles=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){switch(i.label){case 0:return n=t.serviceId,r=t.projectId,o={projectId:r,resourceId:n,resourceType:"service"},[4,this.copy(o,e,"download")];case 1:return[2,i.sent()]}}))}))},t.prototype.uploadServiceFiles=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){switch(i.label){case 0:return n=t.serviceId,r=t.projectId,o={projectId:r,resourceId:n,resourceType:"service"},[4,this.copy(o,e,"upload")];case 1:return[2,i.sent()]}}))}))},t.prototype.downloadJobFiles=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){switch(i.label){case 0:return n=t.jobId,r=t.projectId,o={projectId:r,resourceId:n,resourceType:"job"},[4,this.copy(o,e,"download")];case 1:return[2,i.sent()]}}))}))},t.prototype.uploadJobFiles=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){switch(i.label){case 0:return n=t.jobId,r=t.projectId,o={projectId:r,resourceId:n,resourceType:"job"},[4,this.copy(o,e,"upload")];case 1:return[2,i.sent()]}}))}))},t.prototype.copy=function(t,e,n){var r;return X(this,void 0,void 0,(function(){var o,i;return Q(this,(function(s){switch(s.label){case 0:switch(o=new Xf(this.exec,K(K({},t),{containerName:e.containerName})),i=tt(tt([],null!==(r=e.ignoreList)&&void 0!==r?r:[],!0),this.stdIgnoreList,!0),n){case"download":return[3,1];case"upload":return[3,3]}return[3,5];case 1:return[4,o.downloadFiles(e.remotePath,e.localPath,i)];case 2:case 4:return[2,s.sent()];case 3:return[4,o.uploadFiles(e.localPath,e.remotePath,i)];case 5:return[2]}}))}))},t}(),em=function(t){function e(e){var n=this.constructor,r=t.call(this,e.message)||this;r.name="NorthflankApiCallError",r.message=e.message,r.status=e.status,r.id=e.id,r.details=e.details;var o=n.prototype;return Object.setPrototypeOf?Object.setPrototypeOf(r,o):r.__proto__=o,r}return Y(e,t),e}(Error),nm=function(t){function e(e,n,r,o){var i=t.call(this)||this;return i.baseUrl=e,i.logsConfig=n,i.token=r,i.agent=o,i.stop=function(){return X(i,void 0,void 0,(function(){var t;return Q(this,(function(e){if(void 0===this.logSession)throw new Error("No command is running");return null===(t=this.remote)||void 0===t||t.close(),[2]}))}))},i}return Y(e,t),e.getLogsEndpoint=function(t){var e=t.containerName,n=t.types,r=t.entityId,o=t.entityType,i=t.buildId,s=t.runId,a=t.backupId,c=t.restoreId,u=t.deploymentId,d=t.isBuild,l=t.lineLimit,h=t.projectId,p=t.queryType,f=t.startTime,m=t.endTime,v=t.duration,b=t.direction,g=t.textIncludes,y=t.textNotIncludes,w=t.regexIncludes,E=t.regexNotIncludes,I="/v1/projects/".concat(h,"/"),R=new URLSearchParams;return R.append("queryType",p),void 0!==f&&R.append("startTime",f.toISOString()),void 0!==m&&R.append("endTime",m.toISOString()),void 0!==l&&R.append("lineLimit",l.toString()),void 0!==e&&R.append("containerName",e),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!==E&&R.append("regexNotIncludes",E),void 0!==b&&R.append("direction",b),void 0!==v&&R.append("duration",v.toString()),void 0!==n&&n.forEach((function(t){return R.append("type",t)})),"".concat(I).concat(function(){var t=d?"/build-logs":"/logs";switch(o){case"service":return"services/".concat(r).concat(t);case"job":return"jobs/".concat(r).concat(t);case"addon":return"addons/".concat(r).concat(t);case"addonBackup":return"addons/".concat(r,"/backups/").concat(a).concat(t);case"addonRestore":return"addons/".concat(r,"/backups/").concat(a,"/restores/").concat(c).concat(t);default:throw new Error("Unexpected Northflank entity type received in logs endpoint generation: ".concat(o))}}(),"?").concat(R.toString())},Object.defineProperty(e.prototype,"logsEndpoint",{get:function(){return"".concat(this.baseUrl).concat(e.getLogsEndpoint(this.logsConfig))},enumerable:!1,configurable:!0}),e.prototype.start=function(){return X(this,void 0,void 0,(function(){var t=this;return Q(this,(function(e){switch(e.label){case 0:if(void 0!==this.logSession)throw new Error("Command is already running");return this.logSession=new Promise((function(e,n){var r,o,i,s;void 0!==t.remote&&n(Error("Command is already running"));var a=t.logsEndpoint.replace("https:","wss:").replace("http:","ws:");t.remote=new ka(a,{agent:t.agent}),null===(r=t.remote)||void 0===r||r.on("message",(function(e){var n,r,o=JSON.parse(e.toString());switch(null==o?void 0:o.type){case"init":var i=o.data;"successful"!==i.auth&&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;t.emit("logs-received",s.map(mm));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=t.remote)||void 0===o||o.on("close",(function(){t.emit("close"),t.reset(),e()})),null===(i=t.remote)||void 0===i||i.on("open",(function(){t.emit("open")})),null===(s=t.remote)||void 0===s||s.on("error",(function(n){t.emit("error",n),t.reset(),e()}));var c=function(e){t.emit("error",{message:e}),t.reset(),n(new Error(e))}})),[4,new Promise((function(e){var n;t.remote.on("open",(function(){return e()})),null===(n=t.remote)||void 0===n||n.on("error",(function(){e()}))}))];case 1:return e.sent(),this.initialAuth(),[2,this.logSession]}}))}))},e.prototype.initialAuth=function(){var t,e={type:"init",data:{auth:{type:"apiToken",apiToken:this.token}}};null===(t=this.remote)||void 0===t||t.send(JSON.stringify(e))},e.prototype.reset=function(){this.remote=void 0,this.logSession=void 0},e}(t.EventEmitter),rm=function(){if(Oo)try{return JSON.parse(q.default.readFileSync(B.default.join(B.default.dirname(o.fileURLToPath("undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||new URL("api-client.js",document.baseURI).href)),"../../package.json")).toString())}catch(t){return{}}return{}},om=function(){function t(t,e){var n=this;this.opts=e,this.call=function(t){return X(n,void 0,void 0,(function(){return Q(this,(function(e){return[2,this.executeCall(t)]}))}))},this.contextProvider=t}return t.prototype.getDefaultHeaders=function(){var t,e,n=this.contextProvider.getCurrentToken(),r=(null===(t=this.opts)||void 0===t?void 0:t.customUserAgent)?" (".concat(this.opts.customUserAgent,")"):"";return{Authorization:this.withAuth?"Bearer ".concat(n):void 0,"Content-Type":"application/json","User-Agent":"northflank-js-client/".concat(null===(e=rm())||void 0===e?void 0:e.version).concat(r)}},t.prototype.executeCall=function(t){var e;return X(this,void 0,void 0,(function(){var n,r,o,i,s,a,c,u,d,l,h,p,f=this;return Q(this,(function(m){switch(m.label){case 0:if(n=this.method,r=this.opts.agent,o={method:n,headers:this.getDefaultHeaders(),agent:r},!(i=null===(e=this.contextProvider)||void 0===e?void 0:e.getCurrentBaseUrl()))throw new Error("Api client context not correctly initialized, please provide a url to the context.");return s="".concat(i).concat(this.endpointUrl(t)),a=this.body(t),c=K(K({url:s},o),{body:a}),[4,hm(s,K(K({},o),{body:a}))];case 1:return[4,(u=m.sent()).text()];case 2:return d=m.sent(),l=function(){if(200!==u.status){var t=null==h?void 0:h.error,e=(null==t?void 0:t.message)||"",n={status:u.status,message:e,id:null==t?void 0:t.id,details:null==t?void 0:t.details};if(f.opts.throwErrorOnHttpErrorCode)throw new em(n);return n}},h=function(){try{return JSON.parse(d)}catch(t){throw Error("Failed reading api request result: \n\tStatus: ".concat(u.statusText," (").concat(u.status,")\n\tMessage: ").concat(d))}}(),p=l(),[2,{data:null==h?void 0:h.data,rawResponse:u,request:c,error:p,pagination:null==h?void 0:h.pagination}]}}))}))},t}(),im=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="get",e.body=function(){},e}return Y(e,t),e}(om),sm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.all=function(t){return X(e,void 0,void 0,(function(){return Q(this,(function(e){return[2,new lm(this,t).getAll()]}))}))},e.call=function(n){return X(e,void 0,void 0,(function(){var e,r=this;return Q(this,(function(o){switch(o.label){case 0:return[4,t.prototype.executeCall.call(this,n)];case 1:return e=o.sent(),[2,K(K({},e),{pagination:K(K({},e.pagination),{getNextPage:function(){return X(r,void 0,void 0,(function(){var t,r,o,i,s,a,c,u=this;return Q(this,(function(d){return void 0===(null===(a=e.pagination)||void 0===a?void 0:a.cursor)?(t=Object.keys(e.data),r=1===t.length?((s={})[t[0]]=[],s):{},o=K(K({},e),{pagination:K(K({},e.pagination),{count:0}),data:r}),[2,(i=function(t){return K(K({},t),{pagination:K(K({},t.pagination),{getNextPage:function(){return X(u,void 0,void 0,(function(){return Q(this,(function(e){return[2,i(t)]}))}))}})})})(o)]):[2,new lm(this,n,null===(c=e.pagination)||void 0===c?void 0:c.cursor).getNext()]}))}))}})})]}}))}))},e}return Y(e,t),e}(im),am=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="post",e}return Y(e,t),e}(om),cm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="delete",e.body=function(){},e}return Y(e,t),e}(om),um=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="put",e}return Y(e,t),e}(om),dm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.method="patch",e}return Y(e,t),e}(om),lm=function(){function t(t,e,n){void 0===n&&(n=null);var r=this;this.endpoint=t,this.opts=e,this._currentOffset=0,this.hasNext=function(){return void 0!==r.cursor},this.cursor=n}return Object.defineProperty(t.prototype,"currentOffset",{get:function(){return this._currentOffset},enumerable:!1,configurable:!0}),t.prototype.getNext=function(){var t,e,n;return X(this,void 0,void 0,(function(){var r,o,i,s,a,c;return Q(this,(function(u){switch(u.label){case 0:return[4,this.endpoint.call(K(K({},this.opts),{options:K(K({},null===(t=this.opts)||void 0===t?void 0:t.options),{cursor:null!==(e=this.cursor)&&void 0!==e?e:void 0})}))];case 1:return r=u.sent(),o=r.data,i=r.request,s=r.error,a=r.pagination,c=r.rawResponse,this.cursor=null==a?void 0:a.cursor,this._currentOffset+=null!==(n=null==a?void 0:a.count)&&void 0!==n?n:0,[2,{data:o,request:i,error:s,pagination:a,rawResponse:c}]}}))}))},t.prototype.getAll=function(){var t,e;return X(this,void 0,void 0,(function(){var n,r,o,i,s;return Q(this,(function(a){switch(a.label){case 0:n=[],a.label=1;case 1:return this.hasNext()?[4,this.getNext()]:[3,3];case 2:return(r=a.sent()).error?[2,r]:(n.push(r),[3,1]);case 3:return i=n.flatMap((function(t){var e=Object.keys(t.data);return 1===e.length?(o=e[0],t.data[e[0]]):t.data})),[2,{data:void 0===o?i:(s={},s[o]=i,s),request:null===(t=n[0])||void 0===t?void 0:t.request,rawResponse:null===(e=n[0])||void 0===e?void 0:e.rawResponse}]}}))}))},t}(),hm=function(t,e,n,r){return void 0===e&&(e={}),void 0===n&&(n=3),void 0===r&&(r=500),new Promise((function(o,i){var s=function(n){return To(t,e).then((function(t){o(t)})).catch((function(t){return X(void 0,void 0,void 0,(function(){return Q(this,(function(e){switch(e.label){case 0:return n>0?[4,(o=r,new Promise((function(t){setTimeout((function(){t()}),o)})))]:[3,2];case 1:return e.sent(),[2,s(n-1)];case 2:return[2,i(t)]}var o}))}))}))};return s(n)}))},pm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetch log lines over a specific time span",e.withAuth=!0,e.requiredPermissions="Account > Service | Job | Addon > General > Read",e.endpointUrl=function(t){return nm.getLogsEndpoint(t)},e.body=function(){},e}return Y(e,t),e}(im);exports.LogType=void 0,(Qf=exports.LogType||(exports.LogType={})).CDN="cdn",Qf.Mesh="mesh",Qf.Ingress="ingress",Qf.Runtime="runtime";var fm,mm=function(t){return{containerId:t.containerId,log:t.log,ts:new Date(t.ts)}},vm=function(t,e){void 0===e&&(e={});var n=this;this.contextProvider=t,this.clientOpts=e,this.getServiceLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.logRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,o=e.serviceId,i={entityId:o,projectId:r},[2,this.logRange(i,K(K({},n),{isBuild:!0}),"service")]}))}))},this.getJobLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.logRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,o=e.jobId,i={entityId:o,projectId:r},[2,this.logRange(i,K(K({},n),{isBuild:!0}),"job")]}))}))},this.getAddonLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logRange(r,null!=n?n:{},"addon")]}))}))},this.getAddonBackupLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logRange(r,K(K({},n),{backupId:e.backupId}),"addonBackup")]}))}))},this.getAddonRestoresLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r,o;return Q(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},o={backupId:e.backupId,restoreId:e.restoreId},[2,this.logRange(r,K(K({},n),o),"addonRestore")]}))}))},this.logRange=function(t,e,r){return X(n,void 0,void 0,(function(){var n,o,i,s,a;return Q(this,(function(c){switch(c.label){case 0:return n=t.entityId,o=t.projectId,i=K(K({projectId:o,entityId:n,entityType:r},e),{queryType:"range"}),[4,new pm(this.contextProvider,this.clientOpts).call(i)];case 1:return(s=c.sent()).error?[2,s]:[2,K(K({},s),{data:null===(a=null==s?void 0:s.data)||void 0===a?void 0:a.map(mm)})]}}))}))},this.tailServiceLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.logTail(r,null!=n?n:{},"service")]}))}))},this.tailServiceBuildLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){return e=t.parameters,n=t.options,r=e.serviceId,o=e.projectId,i={entityId:r,projectId:o},[2,this.logTail(i,K(K({},n),{isBuild:!0}),"service")]}))}))},this.tailJobLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.logTail(r,null!=n?n:{},"job")]}))}))},this.tailJobBuildLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,o=e.jobId,i={entityId:o,projectId:r},[2,this.logTail(i,K(K({},n),{isBuild:!0}),"job")]}))}))},this.tailAddonLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logTail(r,null!=n?n:{},"addon")]}))}))},this.tailAddonBackupLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.logTail(r,K(K({},n),{backupId:e.backupId}),"addonBackup")]}))}))},this.tailAddonRestoresLogs=function(t){return X(n,void 0,void 0,(function(){var e,n,r,o;return Q(this,(function(i){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},o={backupId:e.backupId,restoreId:e.restoreId},[2,this.logTail(r,K(K({},n),o),"addonRestore")]}))}))},this.logTail=function(t,e,r){return X(n,void 0,void 0,(function(){var n,o,i,s,a;return Q(this,(function(c){if(n=t.entityId,o=t.projectId,i=K({queryType:"tail",projectId:o,entityId:n,entityType:r},e),this.assertStartedWithNodejs(),s=this.contextProvider.getCurrentBaseUrl(!0),!(a=this.contextProvider.getCurrentToken()))throw new Error("API token not found");return[2,new nm(s,i,a,this.clientOpts.agent)]}))}))},this.assertStartedWithNodejs=function(){if(!Oo)throw new Error("Command exec only possible when started with nodejs")}},bm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetch metrics entries over a specific time span",e.withAuth=!0,e.requiredPermissions="Account > Service | Job | Addon > General > Read",e.endpointUrl=function(t){var e=t.projectId,n=t.entityId,r=t.entityType,o=t.deploymentId,i=t.runId,s=t.buildId,a=t.isBuild,c=t.queryType,u=t.metricTypes,d=t.startTime,l=t.endTime,h=t.duration,p=t.containerName,f=t.timestamp,m="/v1/projects/".concat(e,"/");var v=new URLSearchParams;return v.append("queryType",c),void 0!==d&&v.append("startTime",d.toISOString()),void 0!==l&&v.append("endTime",l.toISOString()),void 0!==p&&v.append("containerName",p),void 0!==o&&v.append("deploymentId",o),void 0!==i&&v.append("runId",i),void 0!==s&&v.append("buildId",s),void 0!==f&&v.append("timestamp",f.toISOString()),void 0!==h&&v.append("duration",h.toString()),void 0!==u&&u.forEach((function(t){return v.append("metricTypes",t)})),"".concat(m).concat(function(){var t=a?"/build-metrics":"/metrics";switch(r){case"service":return"services/".concat(n).concat(t);case"job":return"jobs/".concat(n).concat(t);case"addon":return"addons/".concat(n).concat(t);default:throw new Error("Unexpected Northflank entity type received in metrics endpoint generation: ".concat(r))}}(),"?").concat(v.toString())},e.body=function(){},e}return Y(e,t),e}(im),gm=function(t){return{metadata:t.metadata,data:t.data.map((function(t){return{value:t.value,ts:new Date(t.ts)}}))}};exports.MetricType=void 0,(fm=exports.MetricType||(exports.MetricType={})).Cpu="cpu",fm.Memory="memory",fm.NetworkIngress="networkIngress",fm.NetworkEgress="networkEgress",fm.TcpConnectionOpen="tcpConnectionsOpen",fm.PvcUsage="diskUsage",fm.Requests="requests",fm.Http4xxResponses="http4xxResponses",fm.Http5xxResponses="http5xxResponses",fm.Bandwidth="bandwidth",fm.BandwidthVolume="bandwidthVolume";var ym=function(t){var e=this;this.contextProvider=t,this.getServiceMetrics=function(t){return X(e,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.metricsSingle(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetrics=function(t){return X(e,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){return e=t.parameters,n=t.options,r=e.serviceId,o=e.projectId,i={entityId:r,projectId:o},[2,this.metricsSingle(i,K(K({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetrics=function(t){return X(e,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.metricsSingle(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetrics=function(t){return X(e,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){return e=t.parameters,n=t.options,r=e.jobId,o=e.projectId,i={entityId:r,projectId:o},[2,this.metricsSingle(i,K(K({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetrics=function(t){return X(e,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.metricsSingle(r,null!=n?n:{},"addon")]}))}))},this.metricsSingle=function(t,n,r){return X(e,void 0,void 0,(function(){var e,o,i;return Q(this,(function(s){return e=t.entityId,o=t.projectId,i=K(K({projectId:o,entityId:e,entityType:r},n),{queryType:"single"}),[2,this.getMetrics(i)]}))}))},this.getServiceMetricsRange=function(t){return X(e,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.serviceId,projectId:e.projectId},[2,this.metricsRange(r,null!=n?n:{},"service")]}))}))},this.getServiceBuildMetricsRange=function(t){return X(e,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,o=e.serviceId,i={entityId:o,projectId:r},[2,this.metricsRange(i,K(K({},n),{isBuild:!0}),"service")]}))}))},this.getJobMetricsRange=function(t){return X(e,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.jobId,projectId:e.projectId},[2,this.metricsRange(r,null!=n?n:{},"job")]}))}))},this.getJobBuildMetricsRange=function(t){return X(e,void 0,void 0,(function(){var e,n,r,o,i;return Q(this,(function(s){return e=t.parameters,n=t.options,r=e.projectId,o=e.jobId,i={entityId:o,projectId:r},[2,this.metricsRange(i,K(K({},n),{isBuild:!0}),"job")]}))}))},this.getAddonMetricsRange=function(t){return X(e,void 0,void 0,(function(){var e,n,r;return Q(this,(function(o){return e=t.parameters,n=t.options,r={entityId:e.addonId,projectId:e.projectId},[2,this.metricsRange(r,null!=n?n:{},"addon")]}))}))},this.metricsRange=function(t,n,r){return X(e,void 0,void 0,(function(){var e,o,i;return Q(this,(function(s){return e=t.entityId,o=t.projectId,i=K(K({projectId:o,entityId:e,entityType:r},n),{queryType:"range"}),[2,this.getMetrics(i)]}))}))},this.getMetrics=function(t){return X(e,void 0,void 0,(function(){var e;return Q(this,(function(n){switch(n.label){case 0:return[4,new bm(this.contextProvider,{}).call(t)];case 1:return(e=n.sent()).error?[2,e]:[2,K(K({},e),{data:Object.fromEntries(Object.entries(e.data).map((function(t){var e=t[0],n=t[1];return[e,K(K({},n),{values:n.values.map(gm)})]})))})]}}))}))}},wm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the available addon types",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/addon-types"},e.body=function(){},e}return Y(e,t),e}(im),Em=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the backup destinations saved to this account. Does not display secrets.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/backup-destinations".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Im=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new backup destination to this account.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Create",e.endpointUrl=function(t){return"/v1/backup-destinations"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Rm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a backup destination, including secrets.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Read",e.endpointUrl=function(t){return["backupDestinationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/backup-destinations/".concat(encodeURIComponent(t.parameters.backupDestinationId))},e.body=function(){},e}return Y(e,t),e}(im),jm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a backup destination.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Update",e.endpointUrl=function(t){return["backupDestinationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/backup-destinations/".concat(encodeURIComponent(t.parameters.backupDestinationId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Sm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a backup destination.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Delete",e.endpointUrl=function(t){return["backupDestinationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/backup-destinations/".concat(encodeURIComponent(t.parameters.backupDestinationId))},e.body=function(){},e}return Y(e,t),e}(cm),_m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the backups associated with a backup destinations.",e.withAuth=!0,e.requiredPermissions="Account > BackupDestinations > General > Read",e.endpointUrl=function(t){var e;["backupDestinationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/backup-destinations/".concat(encodeURIComponent(t.parameters.backupDestinationId),"/backups").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Cm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of past invoices",e.withAuth=!0,e.requiredPermissions="Account > Billing > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/billing/invoices".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Am=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about an invoice. If `timestamp` is passed in as a query parameter, this endpoint returns details about the invoice containing that timestamp. Otherwise, returns a preview invoice displaying billing data from after the most recent invoice.",e.withAuth=!0,e.requiredPermissions="Account > Billing > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/billing/invoices/details".concat(r)},e.body=function(){},e}return Y(e,t),e}(im),Um=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud providers",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/cloud-providers"},e.body=function(){},e}return Y(e,t),e}(im),xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists clusters for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/clusters".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Pm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),km=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or update a cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/clusters"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),Om=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given cluster",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){return["clusterId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId))},e.body=function(){},e}return Y(e,t),e}(im),Tm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a cluster.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Dm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given cluster. Fails if the cluster has associated projects.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Delete",e.endpointUrl=function(t){return["clusterId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId))},e.body=function(){},e}return Y(e,t),e}(cm),Lm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of nodes for the given cluster",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Read",e.endpointUrl=function(t){var e;["clusterId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId),"/nodes").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Nm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Cordon a node on the cluster to prevent new pods from scheduling on it.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId","nodeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId),"/nodes/").concat(encodeURIComponent(t.parameters.nodeId),"/cordon")},e.body=function(){},e}return Y(e,t),e}(am),qm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Drain a node by evicting all running pods.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId","nodeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId),"/nodes/").concat(encodeURIComponent(t.parameters.nodeId),"/drain")},e.body=function(){},e}return Y(e,t),e}(am),Bm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Uncordon a node on the cluster if it was previously cordoned.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Clusters > Update",e.endpointUrl=function(t){return["clusterId","nodeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/clusters/".concat(encodeURIComponent(t.parameters.clusterId),"/nodes/").concat(encodeURIComponent(t.parameters.nodeId),"/uncordon")},e.body=function(){},e}return Y(e,t),e}(am),Fm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists docker registries for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/docker-registries".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Gm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new docker registry.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/docker-registries"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Mm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a docker registry.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Create",e.endpointUrl=function(t){return["registryId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/docker-registries"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),zm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given docker registry",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Read",e.endpointUrl=function(t){return["registryId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/docker-registries/".concat(encodeURIComponent(t.parameters.registryId))},e.body=function(){},e}return Y(e,t),e}(im),Jm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a docker registry.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Update",e.endpointUrl=function(t){return["registryId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/docker-registries/".concat(encodeURIComponent(t.parameters.registryId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Wm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given docker registry. Fails if the docker registry is associated with existing clusters.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Registries > Delete",e.endpointUrl=function(t){return["registryId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/docker-registries/".concat(encodeURIComponent(t.parameters.registryId))},e.body=function(){},e}return Y(e,t),e}(cm),$m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists integrations for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/integrations".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Hm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new integration.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Create",e.endpointUrl=function(t){return"/v1/cloud-providers/integrations"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Vm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a integration.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Create",e.endpointUrl=function(t){return["integrationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/integrations"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),Zm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given integration",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Read",e.endpointUrl=function(t){return["integrationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(t.parameters.integrationId))},e.body=function(){},e}return Y(e,t),e}(im),Ym=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a integration.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Update",e.endpointUrl=function(t){return["integrationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(t.parameters.integrationId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Km=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given integration. Fails if the integration is associated with existing clusters.",e.withAuth=!0,e.requiredPermissions="Account > Cloud > Integrations > Delete",e.endpointUrl=function(t){return["integrationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/cloud-providers/integrations/".concat(encodeURIComponent(t.parameters.integrationId))},e.body=function(){},e}return Y(e,t),e}(cm),Xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud provider node types",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/node-types".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Qm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists supported cloud provider regions",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/cloud-providers/regions".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),tv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the partially random string used when generating host names for the authenticated account.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){return"/v1/dns-id"},e.body=function(){},e}return Y(e,t),e}(im),ev=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available domains",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/domains".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),nv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Registers a new domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Create",e.endpointUrl=function(t){return"/v1/domains"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),rv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain))},e.body=function(){},e}return Y(e,t),e}(im),ov=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a domain and each of its registered subdomains.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Delete",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain))},e.body=function(){},e}return Y(e,t),e}(cm),iv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Retrieve certificate data for a domain to verify its contents.",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Read",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/certificate")},e.body=function(){},e}return Y(e,t),e}(im),sv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Import a certificate for the domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Update",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/import")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),av=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new subdomain to the domain.",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),cv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Read",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain))},e.body=function(){},e}return Y(e,t),e}(im),uv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes a subdomain from a domain.",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain))},e.body=function(){},e}return Y(e,t),e}(cm),dv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Assigns a service port to the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/assign")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),lv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes a subdomain from its assigned service",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){var e;["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/assign").concat(r)},e.body=function(){},e}return Y(e,t),e}(cm),hv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Removes the CDN integration from the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/cdn/disable")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),pv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Enables a CDN integration on the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/cdn/enable")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),fv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new path to the subdomain.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Create",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),mv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="List paths for a given subdomain.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Read",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths")},e.body=function(){},e}return Y(e,t),e}(im),vv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get subdomain path details.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Read",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath))},e.body=function(){},e}return Y(e,t),e}(im),bv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a path.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Update",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath))},e.body=function(){},e}return Y(e,t),e}(cm),gv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a subdomain path.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Update",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),yv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Assign a subdomain path to a port.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Update",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath),"/assign")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),wv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Unassign a subdomain path to a port.",e.withAuth=!0,e.requiredPermissions="Account > SubdomainPaths > General > Update",e.endpointUrl=function(t){return["domain","subdomain","subdomainPath"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/paths/").concat(encodeURIComponent(t.parameters.subdomainPath),"/assign")},e.body=function(){},e}return Y(e,t),e}(cm),Ev=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the given subdomain",e.withAuth=!0,e.requiredPermissions="Account > Subdomains > General > Update",e.endpointUrl=function(t){return["domain","subdomain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/subdomains/").concat(encodeURIComponent(t.parameters.subdomain),"/verify")},e.body=function(){},e}return Y(e,t),e}(am),Iv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Attempts to verify the domain",e.withAuth=!0,e.requiredPermissions="Account > Domains > General > Create",e.endpointUrl=function(t){return["domain"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/domains/".concat(encodeURIComponent(t.parameters.domain),"/verify")},e.body=function(){},e}return Y(e,t),e}(am),Rv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of log sinks added to this account.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/log-sinks".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),jv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Create",e.endpointUrl=function(t){return"/v1/integrations/log-sinks"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Sv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a given log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Read",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId))},e.body=function(){},e}return Y(e,t),e}(im),_v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Delete",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId))},e.body=function(){},e}return Y(e,t),e}(cm),Cv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pauses a given log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId),"/pause")},e.body=function(){},e}return Y(e,t),e}(am),Av=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes a paused log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId),"/resume")},e.body=function(){},e}return Y(e,t),e}(am),Uv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the settings for a log sink.",e.withAuth=!0,e.requiredPermissions="Account > Sinks > General > Update",e.endpointUrl=function(t){return["logSinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/log-sinks/".concat(encodeURIComponent(t.parameters.logSinkId),"/settings")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),xv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists notification integrations for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/notifications".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Pv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a new notification integration.",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Manage",e.endpointUrl=function(t){return["notificationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/notifications"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),kv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a notification integration.",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Read",e.endpointUrl=function(t){return["notificationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/notifications/".concat(encodeURIComponent(t.parameters.notificationId))},e.body=function(){},e}return Y(e,t),e}(im),Ov=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a notification integration",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Manage",e.endpointUrl=function(t){return["notificationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/notifications/".concat(encodeURIComponent(t.parameters.notificationId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Tv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a notification integration",e.withAuth=!0,e.requiredPermissions="Account > Team > Notifications > Manage",e.endpointUrl=function(t){return["notificationId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/notifications/".concat(encodeURIComponent(t.parameters.notificationId))},e.body=function(){},e}return Y(e,t),e}(cm),Dv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the container registry credentials saved to this account. Does not display secrets.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/registries".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Lv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Adds a new set of container registry credentials to this account.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Create",e.endpointUrl=function(t){return"/v1/integrations/registries"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Nv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Views a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Read Encrypted",e.endpointUrl=function(t){return["credentialId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/registries/".concat(encodeURIComponent(t.parameters.credentialId))},e.body=function(){},e}return Y(e,t),e}(im),qv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Delete",e.endpointUrl=function(t){return["credentialId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/registries/".concat(encodeURIComponent(t.parameters.credentialId))},e.body=function(){},e}return Y(e,t),e}(cm),Bv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a set of registry credential data.",e.withAuth=!0,e.requiredPermissions="Account > Credentials > General > Update",e.endpointUrl=function(t){return["credentialId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/integrations/registries/".concat(encodeURIComponent(t.parameters.credentialId),"/modify")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Fv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists linked version control providers",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){return"/v1/integrations/vcs"},e.body=function(){},e}return Y(e,t),e}(im),Gv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Generate a token for a specific VCS link.",e.withAuth=!0,e.requiredPermissions="Account > Git > Tokens > Read",e.endpointUrl=function(t){var e;["customVCSId","vcsLinkId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/vcs/custom/".concat(encodeURIComponent(t.parameters.customVCSId),"/token/").concat(encodeURIComponent(t.parameters.vcsLinkId)).concat(r)},e.body=function(){},e}return Y(e,t),e}(am),Mv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of repositories accessible to this account",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/vcs/repos".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),zv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of branches for the repo",e.withAuth=!0,e.requiredPermissions="Account > Git > General > Read",e.endpointUrl=function(t){var e;["vcsService","repositoryOwner","repositoryName"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/integrations/vcs/repos/".concat(encodeURIComponent(t.parameters.vcsService),"/").concat(encodeURIComponent(t.parameters.repositoryOwner),"/").concat(encodeURIComponent(t.parameters.repositoryName),"/branches").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Jv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available billing plans",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/plans"},e.body=function(){},e}return Y(e,t),e}(im),Wv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists projects for the authenticated user or team.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),$v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Create",e.endpointUrl=function(t){return"/v1/projects"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Hv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Create",e.endpointUrl=function(t){return"/v1/projects"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),Vv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a project.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Update",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Zv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given project",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Read",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId))},e.body=function(){},e}return Y(e,t),e}(im),Yv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete the given project. Fails if the project isn't empty.",e.withAuth=!0,e.requiredPermissions="Project > Projects > Manage > Delete",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId)).concat(r)},e.body=function(){},e}return Y(e,t),e}(cm),Kv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of addons belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Xv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Qv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates an addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),tb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(){},e}return Y(e,t),e}(im),eb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates an addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),nb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Delete",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(){},e}return Y(e,t),e}(cm),rb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about an addon's backup schedules",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backup-schedules").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),ob=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a new backup schedule for an addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backup-schedules")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),ib=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a backup schedule for an addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","scheduleId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backup-schedules/").concat(encodeURIComponent(t.parameters.scheduleId))},e.body=function(){},e}return Y(e,t),e}(cm),sb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns a list of backups for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),ab=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Initiates a backup for the given addon",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),cb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId))},e.body=function(){},e}return Y(e,t),e}(im),ub=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes a given backup",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId))},e.body=function(){},e}return Y(e,t),e}(cm),db=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the in progress backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/abort")},e.body=function(){},e}return Y(e,t),e}(am),lb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts an in-progress backup restore.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){var e;["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/abort-restore").concat(r)},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),hb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Generates a temporary download link for downloading the given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/download-link")},e.body=function(){},e}return Y(e,t),e}(im),pb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restores the given addon to the given backup state.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){var e;["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/restore").concat(r)},e.body=function(){},e}return Y(e,t),e}(am),fb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of restores for the given backup.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/restores").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),mb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Flags a temporary backup generated by a backup schedule to be retained indefinitely rather than being deleted after the expiry date.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId","backupId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/backups/").concat(encodeURIComponent(t.parameters.backupId),"/retain")},e.body=function(){},e}return Y(e,t),e}(am),vb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > Deployment > View Instances",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/containers").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),bb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the credentials for connecting to the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/credentials")},e.body=function(){},e}return Y(e,t),e}(im),gb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Imports a database from an external archive or existing live database.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/import")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),yb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the network settings for the addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/network-settings")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),wb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/pause")},e.body=function(){},e}return Y(e,t),e}(am),Eb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Reset the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Delete",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/reset")},e.body=function(){},e}return Y(e,t),e}(am),Ib=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restart the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/restart")},e.body=function(){},e}return Y(e,t),e}(am),Rb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns a list of restores for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){var e;["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/restores").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),jb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resume the given addon if it is paused.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/resume")},e.body=function(){},e}return Y(e,t),e}(am),Sb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the allocated resources for the given addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),_b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the security rules for the addon.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/security")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Cb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about the current addon version including available upgrades and upgrade history.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Read",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/version")},e.body=function(){},e}return Y(e,t),e}(im),Ab=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Upgrades the addon to a new version.",e.withAuth=!0,e.requiredPermissions="Project > Addons > General > Update",e.endpointUrl=function(t){return["projectId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/addons/").concat(encodeURIComponent(t.parameters.addonId),"/version")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Ub=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of jobs belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),xb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/cron")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Pb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/cron")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),kb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a cron job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/cron/").concat(encodeURIComponent(t.parameters.jobId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Ob=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/manual")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Tb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/manual")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),Db=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a new manual job that only runs when initiated via the UI, CLI, API or JS client.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/manual/").concat(encodeURIComponent(t.parameters.jobId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Lb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId))},e.body=function(){},e}return Y(e,t),e}(im),Nb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Delete",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId))},e.body=function(){},e}return Y(e,t),e}(cm),qb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the branches of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/branches").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Bb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists builds for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Fb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Start a new build for the given job. Given a commit sha, it will build that commit.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Gb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the build arguments of the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-arguments").concat(r)},e.body=function(){},e}return Y(e,t),e}(im),Mb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets build arguments for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-arguments")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),zb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the build arguments accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-arguments/details")},e.body=function(){},e}return Y(e,t),e}(im),Jb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the build options for a given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-options")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Wb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the version control source for a given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build-source")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),$b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about a build for the job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId","buildId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build/").concat(encodeURIComponent(t.parameters.buildId))},e.body=function(){},e}return Y(e,t),e}(im),Hb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given job build",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId","buildId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/build/").concat(encodeURIComponent(t.parameters.buildId))},e.body=function(){},e}return Y(e,t),e}(cm),Vb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > View Instance Logs",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/containers").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Zb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the deployment of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/deployment")},e.body=function(){},e}return Y(e,t),e}(im),Yb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the deployment settings of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Update Deployment",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Kb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the health checks for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/health-checks")},e.body=function(){},e}return Y(e,t),e}(im),Xb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates health checks for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/health-checks")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Qb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/pause")},e.body=function(){},e}return Y(e,t),e}(am),tg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the pull-requests of the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/pull-requests").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),eg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes the given job. Optionally takes several arguments to override resumed settings.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/resume")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),ng=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Fetches run history for the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runs").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),rg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Starts a new job run for the given job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),og=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns data about the given job run",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Read",e.endpointUrl=function(t){return["projectId","jobId","runId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runs/").concat(encodeURIComponent(t.parameters.runId))},e.body=function(){},e}return Y(e,t),e}(im),ig=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given job run",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","jobId","runId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runs/").concat(encodeURIComponent(t.parameters.runId))},e.body=function(){},e}return Y(e,t),e}(cm),sg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Returns the runtime environment for the given job. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Read",e.endpointUrl=function(t){var e;["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runtime-environment").concat(r)},e.body=function(){},e}return Y(e,t),e}(im),ag=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the runtime environment for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runtime-environment")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),cg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the runtime environment accessible by the given job. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Jobs > Read",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/runtime-environment/details")},e.body=function(){},e}return Y(e,t),e}(im),ug=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the scaling settings for the given job.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > Deployment > Scale Job",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),dg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates settings for the job",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/settings")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),lg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modify cron job to toggle suspending of its schedule.",e.withAuth=!0,e.requiredPermissions="Project > Jobs > General > Update",e.endpointUrl=function(t){return["projectId","jobId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/jobs/").concat(encodeURIComponent(t.parameters.jobId),"/suspend")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),hg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists all pipelines for a project",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),pg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a pipeline",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId))},e.body=function(){},e}return Y(e,t),e}(im),fg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given preview template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),mg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a given preview template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Create",e.endpointUrl=function(t){return["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),vg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of active preview environments for a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs/previews").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),bg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a preview environment generated by a preview template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Delete",e.endpointUrl=function(t){return["projectId","pipelineId","previewId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs/previews/").concat(encodeURIComponent(t.parameters.previewId))},e.body=function(){},e}return Y(e,t),e}(cm),gg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of preview template runs",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs/runs").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),yg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given preview template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId","templateRunId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/preview-envs/runs/").concat(encodeURIComponent(t.parameters.templateRunId))},e.body=function(){},e}return Y(e,t),e}(im),wg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets details about a release flow",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId","stage"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage))},e.body=function(){},e}return Y(e,t),e}(im),Eg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a release flow",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Update",e.endpointUrl=function(t){return["projectId","pipelineId","stage"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Ig=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Runs a given release flow with given arguments. This endpoint can be used as part of a CI pipeline to automatically trigger a release process.",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Update",e.endpointUrl=function(t){return["projectId","pipelineId","stage"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage),"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Rg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists runs of a release flow",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){var e;["projectId","pipelineId","stage"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage),"/runs").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),jg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given release flow run",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Read",e.endpointUrl=function(t){return["projectId","pipelineId","stage","runId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage),"/runs/").concat(encodeURIComponent(t.parameters.runId))},e.body=function(){},e}return Y(e,t),e}(im),Sg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Abort the given release flow run",e.withAuth=!0,e.requiredPermissions="Project > Pipelines > General > Update",e.endpointUrl=function(t){return["projectId","pipelineId","stage","runId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/pipelines/").concat(encodeURIComponent(t.parameters.pipelineId),"/release-flows/").concat(encodeURIComponent(t.parameters.stage),"/runs/").concat(encodeURIComponent(t.parameters.runId),"/abort")},e.body=function(){},e}return Y(e,t),e}(am),_g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of secrets belonging to the project",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Cg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Ag=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),Ug=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a secret with the specified payload",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),xg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a secret including its contents",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){var e;["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId)).concat(r)},e.body=function(){},e}return Y(e,t),e}(im),Pg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a secret",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId))},e.body=function(){},e}return Y(e,t),e}(cm),kg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a secret",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Og=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Link an addon to the secret group or edit the settings of the linked addon.",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Tg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about a given addon link.",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(){},e}return Y(e,t),e}(im),Dg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Unlinks an addon from the secret group.",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId","addonId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId),"/addons/").concat(encodeURIComponent(t.parameters.addonId))},e.body=function(){},e}return Y(e,t),e}(cm),Lg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View a secret with details about its linked addons",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return["projectId","secretId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/secrets/").concat(encodeURIComponent(t.parameters.secretId),"/details")},e.body=function(){},e}return Y(e,t),e}(im),Ng=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of services belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),qg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/build")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Bg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/build")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),Fg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a build service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/build/").concat(encodeURIComponent(t.parameters.serviceId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Gg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/combined")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Mg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/combined")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),zg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/combined/").concat(encodeURIComponent(t.parameters.serviceId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Jg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a new deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Wg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates or updates a deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),$g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates a deployment service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/deployment/").concat(encodeURIComponent(t.parameters.serviceId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Hg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId))},e.body=function(){},e}return Y(e,t),e}(im),Vg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Delete",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId)).concat(r)},e.body=function(){},e}return Y(e,t),e}(cm),Zg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the branches of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/branches").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Yg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the builds for the service",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Kg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Start a new build for the given combined or build service. If given a commit sha, it will build that commit. Otherwise, the most recent relevant commit will be built. If the service provided is a build service, a branch name or pull request to build from is required.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Xg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the build arguments of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-arguments").concat(r)},e.body=function(){},e}return Y(e,t),e}(im),Qg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the build arguments for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-arguments")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),ty=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the build arguments accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-arguments/details")},e.body=function(){},e}return Y(e,t),e}(im),ey=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the build options for a given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-options")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),ny=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the version control source for a given build or combined service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build-source")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),ry=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about a build for the service",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId","buildId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build/").concat(encodeURIComponent(t.parameters.buildId))},e.body=function(){},e}return Y(e,t),e}(im),oy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Aborts the given service build",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Deploy Build",e.endpointUrl=function(t){return["projectId","serviceId","buildId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/build/").concat(encodeURIComponent(t.parameters.buildId))},e.body=function(){},e}return Y(e,t),e}(cm),iy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of containers for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > View Instances",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/containers").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),sy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the deployment of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > View Instances",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/deployment")},e.body=function(){},e}return Y(e,t),e}(im),ay=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the deployment settings of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Update Deployment",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/deployment")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),cy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the health checks for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/health-checks")},e.body=function(){},e}return Y(e,t),e}(im),uy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates health checks for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/health-checks")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),dy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Pause the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/pause")},e.body=function(){},e}return Y(e,t),e}(am),ly=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists the ports for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/ports")},e.body=function(){},e}return Y(e,t),e}(im),hy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Updates the list of ports for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/ports")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),py=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets information about the pull-requests of the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/pull-requests").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),fy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Restarts the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/restart")},e.body=function(){},e}return Y(e,t),e}(am),my=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Resumes the given service. Optionally takes several arguments to override resumed settings.",e.withAuth=!0,e.requiredPermissions="Project > Services > General > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/resume")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),vy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets the runtime environment of the given service. If the API key does not have the permission 'Project > Secrets > General > Read', secrets inherited from secret groups will not be displayed.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Read",e.endpointUrl=function(t){var e;["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/runtime-environment").concat(r)},e.body=function(){},e}return Y(e,t),e}(im),by=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Sets the runtime environment for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Update",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/runtime-environment")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),gy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get details about the runtime environment accessible by the given service. Also requires the permission 'Project > Secrets > General > Read'",e.withAuth=!0,e.requiredPermissions="Project > Secrets > Services > Read",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/runtime-environment/details")},e.body=function(){},e}return Y(e,t),e}(im),yy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Modifies the scaling settings for the given service.",e.withAuth=!0,e.requiredPermissions="Project > Services > Deployment > Scale Service",e.endpointUrl=function(t){return["projectId","serviceId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/services/").concat(encodeURIComponent(t.parameters.serviceId),"/scale")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),wy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Gets a list of volumes belonging to the project",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Read",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes")},e.body=function(){},e}return Y(e,t),e}(im),Ey=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Creates a volume with the specified payload",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Create",e.endpointUrl=function(t){return["projectId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Iy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Retrieve a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Read",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId))},e.body=function(){},e}return Y(e,t),e}(im),Ry=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update volume mounts and storage size",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),jy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Deletes this volume and its associated data.",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Delete",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId))},e.body=function(){},e}return Y(e,t),e}(cm),Sy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Attach a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId),"/attach")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),_y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Detach a volume",e.withAuth=!0,e.requiredPermissions="Project > Volumes > General > Update",e.endpointUrl=function(t){return["projectId","volumeId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/projects/".concat(encodeURIComponent(t.parameters.projectId),"/volumes/").concat(encodeURIComponent(t.parameters.volumeId),"/detach")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Cy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Lists available project regions",e.withAuth=!0,e.requiredPermissions="undefined",e.endpointUrl=function(t){return"/v1/regions"},e.body=function(){},e}return Y(e,t),e}(im),Ay=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="List the resource tags for this entity.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/tags".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Uy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Add a new resource tag for this entity.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Create",e.endpointUrl=function(t){return"/v1/tags"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),xy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update or create a resource tag.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Update",e.endpointUrl=function(t){return["resourceTagId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/tags"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(um),Py=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="View details for a given resource tag.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Read",e.endpointUrl=function(t){return["resourceTagId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/tags/".concat(encodeURIComponent(t.parameters.resourceTagId))},e.body=function(){},e}return Y(e,t),e}(im),ky=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Patch a resource tag.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Update",e.endpointUrl=function(t){return["resourceTagId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/tags/".concat(encodeURIComponent(t.parameters.resourceTagId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(dm),Oy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a resource tag.",e.withAuth=!0,e.requiredPermissions="Account > Tags > General > Delete",e.endpointUrl=function(t){return["resourceTagId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/tags/".concat(encodeURIComponent(t.parameters.resourceTagId))},e.body=function(){},e}return Y(e,t),e}(cm),Ty=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of templates",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e,n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates".concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Dy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Create a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Create",e.endpointUrl=function(t){return"/v1/templates"},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Ly=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given template.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId)).concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Ny=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Update a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Update",e.endpointUrl=function(t){return["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId))},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),qy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Delete a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Delete",e.endpointUrl=function(t){return["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId))},e.body=function(){},e}return Y(e,t),e}(cm),By=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Run a template",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Run",e.endpointUrl=function(t){return["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId),"/runs")},e.body=function(t){return JSON.stringify(t.data)},e}return Y(e,t),e}(am),Fy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get a list of template runs",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){var e;["templateId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))}));var n=Object.entries(null!==(e=null==t?void 0:t.options)&&void 0!==e?e:{}).filter((function(t){return void 0!==t[1]})),r=n.length>0?"?".concat(n.map((function(t){return"".concat(t[0],"=").concat(t[1])})).join("&")):"";return"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId),"/runs").concat(r)},e.body=function(){},e}return Y(e,t),e}(sm),Gy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Get information about the given template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > General > Read",e.endpointUrl=function(t){return["templateId","templateRunId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId),"/runs/").concat(encodeURIComponent(t.parameters.templateRunId))},e.body=function(){},e}return Y(e,t),e}(im),My=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.description="Abort the given template run.",e.withAuth=!0,e.requiredPermissions="Account > Templates > Runs > Abort",e.endpointUrl=function(t){return["templateId","templateRunId"].forEach((function(e){var n;if(void 0===(null===(n=null==t?void 0:t.parameters)||void 0===n?void 0:n[e]))throw new Error("Required argument not set: '".concat(e,"'"))})),"/v1/templates/".concat(encodeURIComponent(t.parameters.templateId),"/runs/").concat(encodeURIComponent(t.parameters.templateRunId),"/abort")},e.body=function(){},e}return Y(e,t),e}(am),zy=function(){function t(){this.loadContext()}return t.prototype.loadContext=function(){this.contextWrapper=this.loadContextWrapper()},t.prototype.getInfo=function(){return""},t.prototype.storeContext=function(t){return X(this,void 0,void 0,(function(){return Q(this,(function(e){switch(e.label){case 0:return[4,this.writeContext(t)];case 1:return e.sent(),this.contextWrapper=t,[2]}}))}))},t.prototype.addContext=function(t,e){return void 0===e&&(e=!0),X(this,void 0,void 0,(function(){var n,r,o;return Q(this,(function(i){switch(i.label){case 0:if(e||void 0===this.findContext(t.name))return[3,1];throw new Error("Context with name ".concat(t.name," already exists"));case 1:return[4,this.removeContext(t.name)];case 2:i.sent(),i.label=3;case 3:return n=K({host:"https://api.northflank.com"},t),r=this.contextWrapper,o={current:n.name,contexts:tt(tt([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(o)];case 4:return i.sent(),[2]}}))}))},t.prototype.removeContext=function(t){return X(this,void 0,void 0,(function(){var e,n,r,o;return Q(this,(function(i){switch(i.label){case 0:return e=this.contextWrapper,n=e.contexts.filter((function(e){return e.name!==t})),r=e.current===t?void 0:e.current,o={current:r,contexts:tt([],n,!0),lastUpdateCheck:e.lastUpdateCheck},[4,this.storeContext(o)];case 1:return i.sent(),[2]}}))}))},t.prototype.getCurrentContext=function(){var t=this.contextWrapper.current;return void 0===t?t:this.findContext(t)},t.prototype.findContext=function(t){return this.contextWrapper.contexts.find((function(e){return e.name===t}))},t.prototype.getCurrentBaseUrl=function(t){var e=this.getCurrentContext();if(!0===t&&!(null==e?void 0:e.host))throw new Error("Context (".concat(null==e?void 0:e.name,") doesn't have a target API host. Please login again."));return null==e?void 0:e.host},t.prototype.getCurrentProjectName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.project},t.prototype.getCurrentName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.name},t.prototype.getCurrentToken=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.token},t.prototype.getCurrentServiceName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.service},t.prototype.getCurrentJobName=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.job},t.prototype.getCurrentPlanId=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.plan},t.prototype.getCurrentRegion=function(){var t;return null===(t=this.getCurrentContext())||void 0===t?void 0:t.region},t.prototype.useContext=function(t){return X(this,void 0,void 0,(function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:if(!this.findContext(t))throw new Error("Context with name ".concat(t," doesn't exist"));return e=this.contextWrapper,n=K(K({},e),{current:t}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.updateToken=function(t,e){return X(this,void 0,void 0,(function(){var n,r,o,i,s;return Q(this,(function(a){switch(a.label){case 0:if(n=null!=e?e:this.getCurrentName(),!(r=this.findContext(n)))throw new Error("Context with name ".concat(e," doesn't exist"));return o=this.contextWrapper,i=o.contexts.map((function(e){return e.name===n?K(K({},r),{token:t}):e})),s=K(K({},o),{contexts:i}),[4,this.storeContext(s)];case 1:return a.sent(),[2]}}))}))},t.prototype.useProjectId=function(t){return X(this,void 0,void 0,(function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set project id to current context, current context not defined");return n=K(K({},e),{project:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useServiceId=function(t){return X(this,void 0,void 0,(function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set service id to current context, current context not defined");return n=K(K({},e),{service:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useJobId=function(t){return X(this,void 0,void 0,(function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set job id to current context, current context not defined");return n=K(K({},e),{job:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.usePlanId=function(t){return X(this,void 0,void 0,(function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set plan id to current context, current context not defined");return n=K(K({},e),{plan:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.useRegion=function(t){return X(this,void 0,void 0,(function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:if(void 0===(e=this.getCurrentContext()))throw new Error("Failed to set region id to current context, current context not defined");return n=K(K({},e),{region:t}),[4,this.addContext(n)];case 1:return r.sent(),[2]}}))}))},t.prototype.getLastUpdateCheck=function(){return this.contextWrapper.lastUpdateCheck||new Date},t.prototype.setLastUpdateCheck=function(t){return X(this,void 0,void 0,(function(){var e,n;return Q(this,(function(r){switch(r.label){case 0:return e=this.contextWrapper,n=K(K({},e),{lastUpdateCheck:t}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}}))}))},t}(),Jy=function(t){function e(e){var n=t.call(this)||this;return n.assertDir=function(t){return X(n,void 0,void 0,(function(){var e;return Q(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),q.default.existsSync(t)?[3,2]:[4,q.default.promises.mkdir(t,{recursive:!0})];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:throw e=n.sent(),console.log("Failed to login, local files could not be created: ".concat(t,", error: ").concat(e.message)),e;case 4:return[2]}}))}))},n.configPath=e||"".concat(D.default.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return Y(e,t),e.prototype.loadContextWrapper=function(){try{return JSON.parse(q.default.readFileSync(this.configFile,"utf8"))}catch(t){return{contexts:[],lastUpdateCheck:new Date(0)}}},e.prototype.writeContext=function(t){return X(this,void 0,void 0,(function(){var e;return Q(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,q.default.promises.writeFile(this.configFile,JSON.stringify(t,null,"\t"),{mode:416})];case 3:return n.sent(),[3,5];case 4:throw e=n.sent(),console.log("Failed to persist api context, local files could not be created, error: ".concat(e.message)),e;case 5:return[2]}}))}))},e.prototype.assertConfigDir=function(){return X(this,void 0,void 0,(function(){return Q(this,(function(t){switch(t.label){case 0:return[4,this.assertDir(this.configPath)];case 1:return t.sent(),[2]}}))}))},e.prototype.getInfo=function(){return"Cli config stored in: ".concat(this.configPath)},e}(zy),Wy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},e}return Y(e,t),e.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},e.prototype.writeContext=function(t){return X(this,void 0,void 0,(function(){return Q(this,(function(e){return this.inMemoryContextWrapper=t,[2]}))}))},e}(zy),$y=function(t,e){void 0===e&&(e={});var n,r,o,i=this;this.baseUrl=function(){return i.contextProvider.getCurrentBaseUrl()},this.contextProvider=t,this.forwarding=new sc(t,new Ng(t,e),new Kv(t,e),e.agent),this.exec=new uc(t,e.agent),this.logs=new vm(t,e),this.metrics=new ym(t),this.fileCopy=new tm(this.exec),this.endpoints={get:(o={},o.addon=((r=new tb(t,e)).types=new wm(t,e),r.backupSchedules=new rb(t,e),r.backups=new sb(t,e),r.backup=((n=new cb(t,e)).download=new hb(t,e),n.restores=new fb(t,e),n),r.containers=new vb(t,e),r.credentials=new bb(t,e),r.restores=new Rb(t,e),r.version=new Cb(t,e),r),o.backupDestination=new Rm(t,e),o.invoice=function(){var n={};return n.details=new Am(t,e),n}(),o.cloud=function(){var n={};return n.cluster=new Om(t,e),n.dockerRegistry=new zm(t,e),n.integration=new Zm(t,e),n}(),o.dnsId=new tv(t,e),o.domain=new rv(t,e),o.domainCertificate=new iv(t,e),o.subdomain=function(){var n=new cv(t,e);return n.path=new vv(t,e),n}(),o.logSink=new Sv(t,e),o.notification=new kv(t,e),o.registryCredentials=new Nv(t,e),o.project=new Zv(t,e),o.job=function(){var n=new Lb(t,e);return n.branches=new qb(t,e),n.builds=new Bb(t,e),n.buildArguments=new Gb(t,e),n.buildArgumentDetails=new zb(t,e),n.build=new $b(t,e),n.containers=new Vb(t,e),n.deployment=new Zb(t,e),n.healthChecks=new Kb(t,e),n.pullRequests=new tg(t,e),n.runs=new ng(t,e),n.run=new og(t,e),n.runtimeEnvironment=new sg(t,e),n.runtimeEnvironmentDetails=new cg(t,e),n}(),o.pipeline=new pg(t,e),o.previewTemplate=new fg(t,e),o.previewTemplateRun=new yg(t,e),o.releaseFlow=new wg(t,e),o.releaseFlowRun=new jg(t,e),o.secret=new xg(t,e),o.secretLink=new Tg(t,e),o.secretDetails=new Lg(t,e),o.service=function(){var n=new Hg(t,e);return n.branches=new Zg(t,e),n.builds=new Yg(t,e),n.buildArguments=new Xg(t,e),n.buildArgumentDetails=new ty(t,e),n.build=new ry(t,e),n.containers=new iy(t,e),n.deployment=new sy(t,e),n.healthChecks=new cy(t,e),n.ports=new ly(t,e),n.pullRequests=new py(t,e),n.runtimeEnvironment=new vy(t,e),n.runtimeEnvironmentDetails=new gy(t,e),n}(),o.volume=new Iy(t,e),o.tag=new Py(t,e),o.template=new Ly(t,e),o.templateRun=new Gy(t,e),o),list:function(){var n={};return n.backupDestinations=new Em(t,e),n.backupDestinationsBackups=new _m(t,e),n.invoices=new Cm(t,e),n.cloud=function(){var n={};return n.providers=new Um(t,e),n.clusters=new xm(t,e),n.cluster=function(){var n={};return n.nodes=new Lm(t,e),n}(),n.dockerRegistry=new Fm(t,e),n.integrations=new $m(t,e),n.nodeTypes=new Xm(t,e),n.regions=new Qm(t,e),n}(),n.domains=new ev(t,e),n.subdomain=function(){var n={};return n.path=new mv(t,e),n}(),n.logSinks=new Rv(t,e),n.notifications=new xv(t,e),n.registryCredentials=new Dv(t,e),n.vcs=new Fv(t,e),n.repos=new Mv(t,e),n.branches=new zv(t,e),n.plans=new Jv(t,e),n.projects=new Wv(t,e),n.addons=new Kv(t,e),n.jobs=new Ub(t,e),n.pipelines=new hg(t,e),n.previewTemplatePreviews=new vg(t,e),n.previewTemplateRuns=new gg(t,e),n.releaseFlowRuns=new Rg(t,e),n.secrets=new _g(t,e),n.services=new Ng(t,e),n.volumes=new wy(t,e),n.regions=new Cy(t,e),n.tags=new Ay(t,e),n.templates=new Ty(t,e),n.templateRuns=new Fy(t,e),n}(),add:function(){var n={};return n.backupDestination=new Im(t,e),n.domain=function(){var n={};return n.subdomain=new av(t,e),n}(),n.subdomain=function(){var n={};return n.path=new fv(t,e),n}(),n.registryCredentials=new Lv(t,e),n.tag=new Uy(t,e),n}(),patch:function(){var n={};return n.backupDestination=new jm(t,e),n.cloud=function(){var n={};return n.cluster=new Tm(t,e),n.dockerRegistry=new Jm(t,e),n.integration=new Ym(t,e),n}(),n.project=new Vv(t,e),n.addon=new eb(t,e),n.job=function(){var n={};return n.cron=new kb(t,e),n.manual=new Db(t,e),n}(),n.secret=new Ug(t,e),n.service=function(){var n={};return n.build=new Fg(t,e),n.combined=new zg(t,e),n.deployment=new $g(t,e),n}(),n.tag=new ky(t,e),n}(),delete:function(){var n={};return n.backupDestination=new Sm(t,e),n.cloud=function(){var n={};return n.cluster=new Dm(t,e),n.dockerRegistry=new Wm(t,e),n.integration=new Km(t,e),n}(),n.domain=new ov(t,e),n.subdomain=function(){var n=new uv(t,e);return n.path=new bv(t,e),n}(),n.logSink=new _v(t,e),n.notification=new Tv(t,e),n.registryCredentials=new qv(t,e),n.project=new Yv(t,e),n.addon=function(){var n=new nb(t,e);return n.backupSchedule=new ib(t,e),n}(),n.backup=new ub(t,e),n.job=new Nb(t,e),n.previewTemplatePreview=new bg(t,e),n.secret=new Pg(t,e),n.secretLink=new Dg(t,e),n.service=new Vg(t,e),n.volume=new jy(t,e),n.tag=new Oy(t,e),n.template=new qy(t,e),n}(),create:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Pm(t,e),n.dockerRegistry=new Gm(t,e),n.integration=new Hm(t,e),n}(),n.domain=new nv(t,e),n.logSink=new jv(t,e),n.notification=new Pv(t,e),n.customVcs=function(){var n={};return n.token=new Gv(t,e),n}(),n.project=new $v(t,e),n.addon=function(){var n=new Xv(t,e);return n.backupSchedule=new ob(t,e),n}(),n.job=function(){var n={};return n.cron=new xb(t,e),n.manual=new Ob(t,e),n}(),n.secret=new Cg(t,e),n.service=function(){var n={};return n.build=new qg(t,e),n.combined=new Gg(t,e),n.deployment=new Jg(t,e),n}(),n.volume=new Ey(t,e),n.template=new Dy(t,e),n}(),put:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new km(t,e),n.dockerRegistry=new Mm(t,e),n.integration=new Vm(t,e),n}(),n.project=new Hv(t,e),n.addon=new Qv(t,e),n.job=function(){var n={};return n.cron=new Pb(t,e),n.manual=new Tb(t,e),n}(),n.secret=new Ag(t,e),n.service=function(){var n={};return n.build=new Bg(t,e),n.combined=new Mg(t,e),n.deployment=new Wg(t,e),n}(),n.tag=new xy(t,e),n}(),cordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new Nm(t,e),n}(),n}(),n}(),drain:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new qm(t,e),n}(),n}(),n}(),uncordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new Bm(t,e),n}(),n}(),n}(),import:function(){var n={};return n.domainCertificate=new sv(t,e),n.addon=function(){var n={};return n.backup=new gb(t,e),n}(),n}(),assign:function(){var n={};return n.subdomain=function(){var n={};return n.service=new dv(t,e),n.path=new yv(t,e),n}(),n}(),unassign:function(){var n={};return n.subdomain=function(){var n=new lv(t,e);return n.path=new wv(t,e),n}(),n}(),disable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new hv(t,e),n}(),n}(),enable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new pv(t,e),n}(),n}(),update:function(){var n={};return n.subdomain=function(){var n={};return n.path=new gv(t,e),n}(),n.logSink=new Uv(t,e),n.notification=new Ov(t,e),n.registryCredentials=new Bv(t,e),n.addon=function(){var n={};return n.networkSettings=new yb(t,e),n.security=new _b(t,e),n.version=new Ab(t,e),n}(),n.job=function(){var n={};return n.buildArguments=new Mb(t,e),n.buildOptions=new Jb(t,e),n.buildSource=new Wb(t,e),n.deployment=new Yb(t,e),n.healthChecks=new Xb(t,e),n.runtimeEnvironment=new ag(t,e),n.settings=new dg(t,e),n}(),n.previewTemplate=new mg(t,e),n.releaseFlow=new Eg(t,e),n.secret=new kg(t,e),n.secretLink=new Og(t,e),n.service=function(){var n={};return n.buildArguments=new Qg(t,e),n.buildOptions=new ey(t,e),n.buildSource=new ny(t,e),n.deployment=new ay(t,e),n.healthChecks=new uy(t,e),n.ports=new hy(t,e),n.runtimeEnvironment=new by(t,e),n}(),n.volume=new Ry(t,e),n.template=new Ny(t,e),n}(),verify:function(){var n={};return n.subdomain=new Ev(t,e),n.domain=new Iv(t,e),n}(),pause:function(){var n={};return n.logSink=new Cv(t,e),n.addon=new wb(t,e),n.job=new Qb(t,e),n.service=new dy(t,e),n}(),resume:function(){var n={};return n.logSink=new Av(t,e),n.addon=new jb(t,e),n.job=new eg(t,e),n.service=new my(t,e),n}(),backup:function(){var n={};return n.addon=new ab(t,e),n}(),abort:function(){var n={};return n.addon=function(){var n={};return n.backup=new db(t,e),n.restore=new lb(t,e),n}(),n.job=function(){var n={};return n.build=new Hb(t,e),n.run=new ig(t,e),n}(),n.releaseFlowRun=new Sg(t,e),n.service=function(){var n={};return n.build=new oy(t,e),n}(),n.templateRun=new My(t,e),n}(),restore:function(){var n={};return n.addon=function(){var n={};return n.backup=new pb(t,e),n}(),n}(),retain:function(){var n={};return n.addon=function(){var n={};return n.backup=new mb(t,e),n}(),n}(),reset:function(){var n={};return n.addon=new Eb(t,e),n}(),restart:function(){var n={};return n.addon=new Ib(t,e),n.service=new fy(t,e),n}(),scale:function(){var n={};return n.addon=new Sb(t,e),n.job=new ug(t,e),n.service=new yy(t,e),n}(),start:function(){var n={};return n.job=function(){var n={};return n.build=new Fb(t,e),n.run=new rg(t,e),n}(),n.service=function(){var n={};return n.build=new Kg(t,e),n}(),n}(),suspend:function(){var n={};return n.job=new lg(t,e),n}(),run:function(){var n={};return n.releaseFlow=new Ig(t,e),n.template=new By(t,e),n}(),attach:function(){var n={};return n.volume=new Sy(t,e),n}(),detach:function(){var n={};return n.volume=new _y(t,e),n}(),download:function(){var t={};return t.service=function(){var t={};return t.files=i.fileCopy.downloadServiceFiles.bind(i.fileCopy),t}(),t.job=function(){var t={};return t.files=i.fileCopy.downloadJobFiles.bind(i.fileCopy),t}(),t}(),upload:function(){var t={};return t.service=function(){var t={};return t.files=i.fileCopy.uploadServiceFiles.bind(i.fileCopy),t}(),t.job=function(){var t={};return t.files=i.fileCopy.uploadJobFiles.bind(i.fileCopy),t}(),t}()},this.download=function(){var t={};return t.service=function(){var t={};return t.files=i.endpoints.download.service.files,t}(),t.job=function(){var t={};return t.files=i.endpoints.download.job.files,t}(),t}(),this.upload=function(){var t={};return t.service=function(){var t={};return t.files=i.endpoints.upload.service.files,t}(),t.job=function(){var t={};return t.files=i.endpoints.upload.job.files,t}(),t}(),this.get=function(){var t={};return t.addon=function(){var t=i.endpoints.get.addon.call;return t.types=i.endpoints.get.addon.types.call,t.backupSchedules=function(){var t=i.endpoints.get.addon.backupSchedules.call;return t.all=i.endpoints.get.addon.backupSchedules.all,t}(),t.backups=function(){var t=i.endpoints.get.addon.backups.call;return t.all=i.endpoints.get.addon.backups.all,t}(),t.backup=function(){var t=i.endpoints.get.addon.backup.call;return t.download=i.endpoints.get.addon.backup.download.call,t.restores=function(){var t=i.endpoints.get.addon.backup.restores.call;return t.all=i.endpoints.get.addon.backup.restores.all,t}(),t.logs=i.logs.getAddonBackupLogs,t.logTail=i.logs.tailAddonBackupLogs,t}(),t.containers=function(){var t=i.endpoints.get.addon.containers.call;return t.all=i.endpoints.get.addon.containers.all,t}(),t.credentials=i.endpoints.get.addon.credentials.call,t.restores=function(){var t=function(){var t=i.endpoints.get.addon.restores.call;return t.all=i.endpoints.get.addon.restores.all,t}();return t.logs=i.logs.getAddonRestoresLogs,t.logTail=i.logs.tailAddonRestoresLogs,t}(),t.version=i.endpoints.get.addon.version.call,t.logs=i.logs.getAddonLogs,t.logTail=i.logs.tailAddonLogs,t.metrics=i.metrics.getAddonMetrics,t.metricsRange=i.metrics.getAddonMetricsRange,t}(),t.backupDestination=i.endpoints.get.backupDestination.call,t.invoice=function(){var t={};return t.details=i.endpoints.get.invoice.details.call,t}(),t.cloud=function(){var t={};return t.cluster=i.endpoints.get.cloud.cluster.call,t.dockerRegistry=i.endpoints.get.cloud.dockerRegistry.call,t.integration=i.endpoints.get.cloud.integration.call,t}(),t.dnsId=i.endpoints.get.dnsId.call,t.domain=i.endpoints.get.domain.call,t.domainCertificate=i.endpoints.get.domainCertificate.call,t.subdomain=function(){var t=i.endpoints.get.subdomain.call;return t.path=i.endpoints.get.subdomain.path.call,t}(),t.logSink=i.endpoints.get.logSink.call,t.notification=i.endpoints.get.notification.call,t.registryCredentials=i.endpoints.get.registryCredentials.call,t.project=i.endpoints.get.project.call,t.job=function(){var t=i.endpoints.get.job.call;return t.branches=function(){var t=i.endpoints.get.job.branches.call;return t.all=i.endpoints.get.job.branches.all,t}(),t.builds=function(){var t=i.endpoints.get.job.builds.call;return t.all=i.endpoints.get.job.builds.all,t}(),t.buildArguments=i.endpoints.get.job.buildArguments.call,t.buildArgumentDetails=i.endpoints.get.job.buildArgumentDetails.call,t.build=i.endpoints.get.job.build.call,t.containers=function(){var t=i.endpoints.get.job.containers.call;return t.all=i.endpoints.get.job.containers.all,t}(),t.deployment=i.endpoints.get.job.deployment.call,t.healthChecks=i.endpoints.get.job.healthChecks.call,t.pullRequests=function(){var t=i.endpoints.get.job.pullRequests.call;return t.all=i.endpoints.get.job.pullRequests.all,t}(),t.runs=function(){var t=i.endpoints.get.job.runs.call;return t.all=i.endpoints.get.job.runs.all,t}(),t.run=i.endpoints.get.job.run.call,t.runtimeEnvironment=i.endpoints.get.job.runtimeEnvironment.call,t.runtimeEnvironmentDetails=i.endpoints.get.job.runtimeEnvironmentDetails.call,t.logs=i.logs.getJobLogs,t.buildLogs=i.logs.getJobBuildLogs,t.logTail=i.logs.tailJobLogs,t.buildLogTail=i.logs.tailJobBuildLogs,t.metrics=i.metrics.getJobMetrics,t.buildMetrics=i.metrics.getJobBuildMetrics,t.metricsRange=i.metrics.getJobMetricsRange,t.buildMetricsRange=i.metrics.getJobBuildMetricsRange,t}(),t.pipeline=i.endpoints.get.pipeline.call,t.previewTemplate=function(){var t=i.endpoints.get.previewTemplate.call;return t.all=i.endpoints.get.previewTemplate.all,t}(),t.previewTemplateRun=i.endpoints.get.previewTemplateRun.call,t.releaseFlow=i.endpoints.get.releaseFlow.call,t.releaseFlowRun=i.endpoints.get.releaseFlowRun.call,t.secret=i.endpoints.get.secret.call,t.secretLink=i.endpoints.get.secretLink.call,t.secretDetails=i.endpoints.get.secretDetails.call,t.service=function(){var t=i.endpoints.get.service.call;return t.branches=function(){var t=i.endpoints.get.service.branches.call;return t.all=i.endpoints.get.service.branches.all,t}(),t.builds=function(){var t=i.endpoints.get.service.builds.call;return t.all=i.endpoints.get.service.builds.all,t}(),t.buildArguments=i.endpoints.get.service.buildArguments.call,t.buildArgumentDetails=i.endpoints.get.service.buildArgumentDetails.call,t.build=i.endpoints.get.service.build.call,t.containers=function(){var t=i.endpoints.get.service.containers.call;return t.all=i.endpoints.get.service.containers.all,t}(),t.deployment=i.endpoints.get.service.deployment.call,t.healthChecks=i.endpoints.get.service.healthChecks.call,t.ports=i.endpoints.get.service.ports.call,t.pullRequests=function(){var t=i.endpoints.get.service.pullRequests.call;return t.all=i.endpoints.get.service.pullRequests.all,t}(),t.runtimeEnvironment=i.endpoints.get.service.runtimeEnvironment.call,t.runtimeEnvironmentDetails=i.endpoints.get.service.runtimeEnvironmentDetails.call,t.logs=i.logs.getServiceLogs,t.buildLogs=i.logs.getServiceBuildLogs,t.logTail=i.logs.tailServiceLogs,t.buildLogTail=i.logs.tailServiceBuildLogs,t.metrics=i.metrics.getServiceMetrics,t.buildMetrics=i.metrics.getServiceBuildMetrics,t.metricsRange=i.metrics.getServiceMetricsRange,t.buildMetricsRange=i.metrics.getServiceBuildMetricsRange,t}(),t.volume=i.endpoints.get.volume.call,t.tag=i.endpoints.get.tag.call,t.template=function(){var t=i.endpoints.get.template.call;return t.all=i.endpoints.get.template.all,t}(),t.templateRun=i.endpoints.get.templateRun.call,t}(),this.list=function(){var t={};return t.backupDestinations=function(){var t=i.endpoints.list.backupDestinations.call;return t.all=i.endpoints.list.backupDestinations.all,t}(),t.backupDestinationsBackups=function(){var t=i.endpoints.list.backupDestinationsBackups.call;return t.all=i.endpoints.list.backupDestinationsBackups.all,t}(),t.invoices=function(){var t=i.endpoints.list.invoices.call;return t.all=i.endpoints.list.invoices.all,t}(),t.cloud=function(){var t={};return t.providers=i.endpoints.list.cloud.providers.call,t.clusters=function(){var t=i.endpoints.list.cloud.clusters.call;return t.all=i.endpoints.list.cloud.clusters.all,t}(),t.cluster=function(){var t={};return t.nodes=function(){var t=i.endpoints.list.cloud.cluster.nodes.call;return t.all=i.endpoints.list.cloud.cluster.nodes.all,t}(),t}(),t.dockerRegistry=function(){var t=i.endpoints.list.cloud.dockerRegistry.call;return t.all=i.endpoints.list.cloud.dockerRegistry.all,t}(),t.integrations=function(){var t=i.endpoints.list.cloud.integrations.call;return t.all=i.endpoints.list.cloud.integrations.all,t}(),t.nodeTypes=function(){var t=i.endpoints.list.cloud.nodeTypes.call;return t.all=i.endpoints.list.cloud.nodeTypes.all,t}(),t.regions=function(){var t=i.endpoints.list.cloud.regions.call;return t.all=i.endpoints.list.cloud.regions.all,t}(),t}(),t.domains=function(){var t=i.endpoints.list.domains.call;return t.all=i.endpoints.list.domains.all,t}(),t.subdomain=function(){var t={};return t.path=i.endpoints.list.subdomain.path.call,t}(),t.logSinks=function(){var t=i.endpoints.list.logSinks.call;return t.all=i.endpoints.list.logSinks.all,t}(),t.notifications=function(){var t=i.endpoints.list.notifications.call;return t.all=i.endpoints.list.notifications.all,t}(),t.registryCredentials=function(){var t=i.endpoints.list.registryCredentials.call;return t.all=i.endpoints.list.registryCredentials.all,t}(),t.vcs=i.endpoints.list.vcs.call,t.repos=function(){var t=i.endpoints.list.repos.call;return t.all=i.endpoints.list.repos.all,t}(),t.branches=function(){var t=i.endpoints.list.branches.call;return t.all=i.endpoints.list.branches.all,t}(),t.plans=i.endpoints.list.plans.call,t.projects=function(){var t=i.endpoints.list.projects.call;return t.all=i.endpoints.list.projects.all,t}(),t.addons=function(){var t=i.endpoints.list.addons.call;return t.all=i.endpoints.list.addons.all,t}(),t.jobs=function(){var t=i.endpoints.list.jobs.call;return t.all=i.endpoints.list.jobs.all,t}(),t.pipelines=function(){var t=i.endpoints.list.pipelines.call;return t.all=i.endpoints.list.pipelines.all,t}(),t.previewTemplatePreviews=function(){var t=i.endpoints.list.previewTemplatePreviews.call;return t.all=i.endpoints.list.previewTemplatePreviews.all,t}(),t.previewTemplateRuns=function(){var t=i.endpoints.list.previewTemplateRuns.call;return t.all=i.endpoints.list.previewTemplateRuns.all,t}(),t.releaseFlowRuns=function(){var t=i.endpoints.list.releaseFlowRuns.call;return t.all=i.endpoints.list.releaseFlowRuns.all,t}(),t.secrets=function(){var t=i.endpoints.list.secrets.call;return t.all=i.endpoints.list.secrets.all,t}(),t.services=function(){var t=i.endpoints.list.services.call;return t.all=i.endpoints.list.services.all,t}(),t.volumes=i.endpoints.list.volumes.call,t.regions=i.endpoints.list.regions.call,t.tags=function(){var t=i.endpoints.list.tags.call;return t.all=i.endpoints.list.tags.all,t}(),t.templates=function(){var t=i.endpoints.list.templates.call;return t.all=i.endpoints.list.templates.all,t}(),t.templateRuns=function(){var t=i.endpoints.list.templateRuns.call;return t.all=i.endpoints.list.templateRuns.all,t}(),t}(),this.add=function(){var t={};return t.backupDestination=i.endpoints.add.backupDestination.call,t.domain=function(){var t={};return t.subdomain=i.endpoints.add.domain.subdomain.call,t}(),t.subdomain=function(){var t={};return t.path=i.endpoints.add.subdomain.path.call,t}(),t.registryCredentials=i.endpoints.add.registryCredentials.call,t.tag=i.endpoints.add.tag.call,t}(),this.patch=function(){var t={};return t.backupDestination=i.endpoints.patch.backupDestination.call,t.cloud=function(){var t={};return t.cluster=i.endpoints.patch.cloud.cluster.call,t.dockerRegistry=i.endpoints.patch.cloud.dockerRegistry.call,t.integration=i.endpoints.patch.cloud.integration.call,t}(),t.project=i.endpoints.patch.project.call,t.addon=i.endpoints.patch.addon.call,t.job=function(){var t={};return t.cron=i.endpoints.patch.job.cron.call,t.manual=i.endpoints.patch.job.manual.call,t}(),t.secret=i.endpoints.patch.secret.call,t.service=function(){var t={};return t.build=i.endpoints.patch.service.build.call,t.combined=i.endpoints.patch.service.combined.call,t.deployment=i.endpoints.patch.service.deployment.call,t}(),t.tag=i.endpoints.patch.tag.call,t}(),this.delete=function(){var t={};return t.backupDestination=i.endpoints.delete.backupDestination.call,t.cloud=function(){var t={};return t.cluster=i.endpoints.delete.cloud.cluster.call,t.dockerRegistry=i.endpoints.delete.cloud.dockerRegistry.call,t.integration=i.endpoints.delete.cloud.integration.call,t}(),t.domain=i.endpoints.delete.domain.call,t.subdomain=function(){var t=i.endpoints.delete.subdomain.call;return t.path=i.endpoints.delete.subdomain.path.call,t}(),t.logSink=i.endpoints.delete.logSink.call,t.notification=i.endpoints.delete.notification.call,t.registryCredentials=i.endpoints.delete.registryCredentials.call,t.project=i.endpoints.delete.project.call,t.addon=function(){var t=i.endpoints.delete.addon.call;return t.backupSchedule=i.endpoints.delete.addon.backupSchedule.call,t}(),t.backup=i.endpoints.delete.backup.call,t.job=i.endpoints.delete.job.call,t.previewTemplatePreview=i.endpoints.delete.previewTemplatePreview.call,t.secret=i.endpoints.delete.secret.call,t.secretLink=i.endpoints.delete.secretLink.call,t.service=i.endpoints.delete.service.call,t.volume=i.endpoints.delete.volume.call,t.tag=i.endpoints.delete.tag.call,t.template=i.endpoints.delete.template.call,t}(),this.create=function(){var t={};return t.cloud=function(){var t={};return t.cluster=i.endpoints.create.cloud.cluster.call,t.dockerRegistry=i.endpoints.create.cloud.dockerRegistry.call,t.integration=i.endpoints.create.cloud.integration.call,t}(),t.domain=i.endpoints.create.domain.call,t.logSink=i.endpoints.create.logSink.call,t.notification=i.endpoints.create.notification.call,t.customVcs=function(){var t={};return t.token=i.endpoints.create.customVcs.token.call,t}(),t.project=i.endpoints.create.project.call,t.addon=function(){var t=i.endpoints.create.addon.call;return t.backupSchedule=i.endpoints.create.addon.backupSchedule.call,t}(),t.job=function(){var t={};return t.cron=i.endpoints.create.job.cron.call,t.manual=i.endpoints.create.job.manual.call,t}(),t.secret=i.endpoints.create.secret.call,t.service=function(){var t={};return t.build=i.endpoints.create.service.build.call,t.combined=i.endpoints.create.service.combined.call,t.deployment=i.endpoints.create.service.deployment.call,t}(),t.volume=i.endpoints.create.volume.call,t.template=i.endpoints.create.template.call,t}(),this.put=function(){var t={};return t.cloud=function(){var t={};return t.cluster=i.endpoints.put.cloud.cluster.call,t.dockerRegistry=i.endpoints.put.cloud.dockerRegistry.call,t.integration=i.endpoints.put.cloud.integration.call,t}(),t.project=i.endpoints.put.project.call,t.addon=i.endpoints.put.addon.call,t.job=function(){var t={};return t.cron=i.endpoints.put.job.cron.call,t.manual=i.endpoints.put.job.manual.call,t}(),t.secret=i.endpoints.put.secret.call,t.service=function(){var t={};return t.build=i.endpoints.put.service.build.call,t.combined=i.endpoints.put.service.combined.call,t.deployment=i.endpoints.put.service.deployment.call,t}(),t.tag=i.endpoints.put.tag.call,t}(),this.cordon=function(){var t={};return t.cloud=function(){var t={};return t.cluster=function(){var t={};return t.node=i.endpoints.cordon.cloud.cluster.node.call,t}(),t}(),t}(),this.drain=function(){var t={};return t.cloud=function(){var t={};return t.cluster=function(){var t={};return t.node=i.endpoints.drain.cloud.cluster.node.call,t}(),t}(),t}(),this.uncordon=function(){var t={};return t.cloud=function(){var t={};return t.cluster=function(){var t={};return t.node=i.endpoints.uncordon.cloud.cluster.node.call,t}(),t}(),t}(),this.import=function(){var t={};return t.domainCertificate=i.endpoints.import.domainCertificate.call,t.addon=function(){var t={};return t.backup=i.endpoints.import.addon.backup.call,t}(),t}(),this.assign=function(){var t={};return t.subdomain=function(){var t={};return t.service=i.endpoints.assign.subdomain.service.call,t.path=i.endpoints.assign.subdomain.path.call,t}(),t}(),this.unassign=function(){var t={};return t.subdomain=function(){var t=i.endpoints.unassign.subdomain.call;return t.path=i.endpoints.unassign.subdomain.path.call,t}(),t}(),this.disable=function(){var t={};return t.subdomain=function(){var t={};return t.cdn=i.endpoints.disable.subdomain.cdn.call,t}(),t}(),this.enable=function(){var t={};return t.subdomain=function(){var t={};return t.cdn=i.endpoints.enable.subdomain.cdn.call,t}(),t}(),this.update=function(){var t={};return t.subdomain=function(){var t={};return t.path=i.endpoints.update.subdomain.path.call,t}(),t.logSink=i.endpoints.update.logSink.call,t.notification=i.endpoints.update.notification.call,t.registryCredentials=i.endpoints.update.registryCredentials.call,t.addon=function(){var t={};return t.networkSettings=i.endpoints.update.addon.networkSettings.call,t.security=i.endpoints.update.addon.security.call,t.version=i.endpoints.update.addon.version.call,t}(),t.job=function(){var t={};return t.buildArguments=i.endpoints.update.job.buildArguments.call,t.buildOptions=i.endpoints.update.job.buildOptions.call,t.buildSource=i.endpoints.update.job.buildSource.call,t.deployment=i.endpoints.update.job.deployment.call,t.healthChecks=i.endpoints.update.job.healthChecks.call,t.runtimeEnvironment=i.endpoints.update.job.runtimeEnvironment.call,t.settings=i.endpoints.update.job.settings.call,t}(),t.previewTemplate=i.endpoints.update.previewTemplate.call,t.releaseFlow=i.endpoints.update.releaseFlow.call,t.secret=i.endpoints.update.secret.call,t.secretLink=i.endpoints.update.secretLink.call,t.service=function(){var t={};return t.buildArguments=i.endpoints.update.service.buildArguments.call,t.buildOptions=i.endpoints.update.service.buildOptions.call,t.buildSource=i.endpoints.update.service.buildSource.call,t.deployment=i.endpoints.update.service.deployment.call,t.healthChecks=i.endpoints.update.service.healthChecks.call,t.ports=i.endpoints.update.service.ports.call,t.runtimeEnvironment=i.endpoints.update.service.runtimeEnvironment.call,t}(),t.volume=i.endpoints.update.volume.call,t.template=i.endpoints.update.template.call,t}(),this.verify=function(){var t={};return t.subdomain=i.endpoints.verify.subdomain.call,t.domain=i.endpoints.verify.domain.call,t}(),this.pause=function(){var t={};return t.logSink=i.endpoints.pause.logSink.call,t.addon=i.endpoints.pause.addon.call,t.job=i.endpoints.pause.job.call,t.service=i.endpoints.pause.service.call,t}(),this.resume=function(){var t={};return t.logSink=i.endpoints.resume.logSink.call,t.addon=i.endpoints.resume.addon.call,t.job=i.endpoints.resume.job.call,t.service=i.endpoints.resume.service.call,t}(),this.backup=function(){var t={};return t.addon=i.endpoints.backup.addon.call,t}(),this.abort=function(){var t={};return t.addon=function(){var t={};return t.backup=i.endpoints.abort.addon.backup.call,t.restore=i.endpoints.abort.addon.restore.call,t}(),t.job=function(){var t={};return t.build=i.endpoints.abort.job.build.call,t.run=i.endpoints.abort.job.run.call,t}(),t.releaseFlowRun=i.endpoints.abort.releaseFlowRun.call,t.service=function(){var t={};return t.build=i.endpoints.abort.service.build.call,t}(),t.templateRun=i.endpoints.abort.templateRun.call,t}(),this.restore=function(){var t={};return t.addon=function(){var t={};return t.backup=i.endpoints.restore.addon.backup.call,t}(),t}(),this.retain=function(){var t={};return t.addon=function(){var t={};return t.backup=i.endpoints.retain.addon.backup.call,t}(),t}(),this.reset=function(){var t={};return t.addon=i.endpoints.reset.addon.call,t}(),this.restart=function(){var t={};return t.addon=i.endpoints.restart.addon.call,t.service=i.endpoints.restart.service.call,t}(),this.scale=function(){var t={};return t.addon=i.endpoints.scale.addon.call,t.job=i.endpoints.scale.job.call,t.service=i.endpoints.scale.service.call,t}(),this.start=function(){var t={};return t.job=function(){var t={};return t.build=i.endpoints.start.job.build.call,t.run=i.endpoints.start.job.run.call,t}(),t.service=function(){var t={};return t.build=i.endpoints.start.service.build.call,t}(),t}(),this.suspend=function(){var t={};return t.job=i.endpoints.suspend.job.call,t}(),this.run=function(){var t={};return t.releaseFlow=i.endpoints.run.releaseFlow.call,t.template=i.endpoints.run.template.call,t}(),this.attach=function(){var t={};return t.volume=i.endpoints.attach.volume.call,t}(),this.detach=function(){var t={};return t.volume=i.endpoints.detach.volume.call,t}()};exports.AbortAddonBackupEndpoint=db,exports.AbortAddonRestoreEndpoint=lb,exports.AbortJobBuildEndpoint=Hb,exports.AbortJobRunEndpoint=ig,exports.AbortReleaseflowrunEndpoint=Sg,exports.AbortServiceBuildEndpoint=oy,exports.AbortTemplaterunEndpoint=My,exports.AddBackupdestinationEndpoint=Im,exports.AddDomainSubdomainEndpoint=av,exports.AddRegistrycredentialsEndpoint=Lv,exports.AddSubdomainPathEndpoint=fv,exports.AddTagEndpoint=Uy,exports.ApiClient=$y,exports.ApiClientContextProvider=zy,exports.ApiClientFileContextProvider=Jy,exports.ApiClientInMemoryContextProvider=Wy,exports.ApiEndpoint=om,exports.AssignSubdomainPathEndpoint=yv,exports.AssignSubdomainServiceEndpoint=dv,exports.AttachVolumeEndpoint=Sy,exports.BackupAddonEndpoint=ab,exports.CordonCloudClusterNodeEndpoint=Nm,exports.CreateAddonBackupscheduleEndpoint=ob,exports.CreateAddonEndpoint=Xv,exports.CreateCloudClusterEndpoint=Pm,exports.CreateCloudDockerregistryEndpoint=Gm,exports.CreateCloudIntegrationEndpoint=Hm,exports.CreateCustomvcsTokenEndpoint=Gv,exports.CreateDomainEndpoint=nv,exports.CreateJobCronEndpoint=xb,exports.CreateJobManualEndpoint=Ob,exports.CreateLogsinkEndpoint=jv,exports.CreateNotificationEndpoint=Pv,exports.CreateProjectEndpoint=$v,exports.CreateSecretEndpoint=Cg,exports.CreateServiceBuildEndpoint=qg,exports.CreateServiceCombinedEndpoint=Gg,exports.CreateServiceDeploymentEndpoint=Jg,exports.CreateTemplateEndpoint=Dy,exports.CreateVolumeEndpoint=Ey,exports.DeleteAddonBackupscheduleEndpoint=ib,exports.DeleteAddonEndpoint=nb,exports.DeleteApiEndpoint=cm,exports.DeleteBackupEndpoint=ub,exports.DeleteBackupdestinationEndpoint=Sm,exports.DeleteCloudClusterEndpoint=Dm,exports.DeleteCloudDockerregistryEndpoint=Wm,exports.DeleteCloudIntegrationEndpoint=Km,exports.DeleteDomainEndpoint=ov,exports.DeleteJobEndpoint=Nb,exports.DeleteLogsinkEndpoint=_v,exports.DeleteNotificationEndpoint=Tv,exports.DeletePreviewtemplatepreviewEndpoint=bg,exports.DeleteProjectEndpoint=Yv,exports.DeleteRegistrycredentialsEndpoint=qv,exports.DeleteSecretEndpoint=Pg,exports.DeleteSecretlinkEndpoint=Dg,exports.DeleteServiceEndpoint=Vg,exports.DeleteSubdomainEndpoint=uv,exports.DeleteSubdomainPathEndpoint=bv,exports.DeleteTagEndpoint=Oy,exports.DeleteTemplateEndpoint=qy,exports.DeleteVolumeEndpoint=jy,exports.DetachVolumeEndpoint=_y,exports.DisableSubdomainCdnEndpoint=hv,exports.DrainCloudClusterNodeEndpoint=qm,exports.EnableSubdomainCdnEndpoint=pv,exports.ExecCommandStandard=cc,exports.GetAddonBackupDownloadEndpoint=hb,exports.GetAddonBackupEndpoint=cb,exports.GetAddonBackupRestoresEndpoint=fb,exports.GetAddonBackupsEndpoint=sb,exports.GetAddonBackupschedulesEndpoint=rb,exports.GetAddonContainersEndpoint=vb,exports.GetAddonCredentialsEndpoint=bb,exports.GetAddonEndpoint=tb,exports.GetAddonRestoresEndpoint=Rb,exports.GetAddonTypesEndpoint=wm,exports.GetAddonVersionEndpoint=Cb,exports.GetApiEndpoint=im,exports.GetApiEndpointPaginated=sm,exports.GetBackupdestinationEndpoint=Rm,exports.GetCloudClusterEndpoint=Om,exports.GetCloudDockerregistryEndpoint=zm,exports.GetCloudIntegrationEndpoint=Zm,exports.GetDnsidEndpoint=tv,exports.GetDomainEndpoint=rv,exports.GetDomaincertificateEndpoint=iv,exports.GetInvoiceDetailsEndpoint=Am,exports.GetJobBranchesEndpoint=qb,exports.GetJobBuildEndpoint=$b,exports.GetJobBuildargumentdetailsEndpoint=zb,exports.GetJobBuildargumentsEndpoint=Gb,exports.GetJobBuildsEndpoint=Bb,exports.GetJobContainersEndpoint=Vb,exports.GetJobDeploymentEndpoint=Zb,exports.GetJobEndpoint=Lb,exports.GetJobHealthchecksEndpoint=Kb,exports.GetJobPullrequestsEndpoint=tg,exports.GetJobRunEndpoint=og,exports.GetJobRunsEndpoint=ng,exports.GetJobRuntimeenvironmentEndpoint=sg,exports.GetJobRuntimeenvironmentdetailsEndpoint=cg,exports.GetLogsinkEndpoint=Sv,exports.GetNotificationEndpoint=kv,exports.GetPipelineEndpoint=pg,exports.GetPreviewtemplateEndpoint=fg,exports.GetPreviewtemplaterunEndpoint=yg,exports.GetProjectEndpoint=Zv,exports.GetRegistrycredentialsEndpoint=Nv,exports.GetReleaseflowEndpoint=wg,exports.GetReleaseflowrunEndpoint=jg,exports.GetSecretEndpoint=xg,exports.GetSecretdetailsEndpoint=Lg,exports.GetSecretlinkEndpoint=Tg,exports.GetServiceBranchesEndpoint=Zg,exports.GetServiceBuildEndpoint=ry,exports.GetServiceBuildargumentdetailsEndpoint=ty,exports.GetServiceBuildargumentsEndpoint=Xg,exports.GetServiceBuildsEndpoint=Yg,exports.GetServiceContainersEndpoint=iy,exports.GetServiceDeploymentEndpoint=sy,exports.GetServiceEndpoint=Hg,exports.GetServiceHealthchecksEndpoint=cy,exports.GetServicePortsEndpoint=ly,exports.GetServicePullrequestsEndpoint=py,exports.GetServiceRuntimeenvironmentEndpoint=vy,exports.GetServiceRuntimeenvironmentdetailsEndpoint=gy,exports.GetSubdomainEndpoint=cv,exports.GetSubdomainPathEndpoint=vv,exports.GetTagEndpoint=Py,exports.GetTemplateEndpoint=Ly,exports.GetTemplaterunEndpoint=Gy,exports.GetVolumeEndpoint=Iy,exports.ImportAddonBackupEndpoint=gb,exports.ImportDomaincertificateEndpoint=sv,exports.ListAddonsEndpoint=Kv,exports.ListBackupdestinationsEndpoint=Em,exports.ListBackupdestinationsbackupsEndpoint=_m,exports.ListBranchesEndpoint=zv,exports.ListCloudClusterNodesEndpoint=Lm,exports.ListCloudClustersEndpoint=xm,exports.ListCloudDockerregistryEndpoint=Fm,exports.ListCloudIntegrationsEndpoint=$m,exports.ListCloudNodetypesEndpoint=Xm,exports.ListCloudProvidersEndpoint=Um,exports.ListCloudRegionsEndpoint=Qm,exports.ListDomainsEndpoint=ev,exports.ListInvoicesEndpoint=Cm,exports.ListJobsEndpoint=Ub,exports.ListLogsinksEndpoint=Rv,exports.ListNotificationsEndpoint=xv,exports.ListPipelinesEndpoint=hg,exports.ListPlansEndpoint=Jv,exports.ListPreviewtemplatepreviewsEndpoint=vg,exports.ListPreviewtemplaterunsEndpoint=gg,exports.ListProjectsEndpoint=Wv,exports.ListRegionsEndpoint=Cy,exports.ListRegistrycredentialsEndpoint=Dv,exports.ListReleaseflowrunsEndpoint=Rg,exports.ListReposEndpoint=Mv,exports.ListSecretsEndpoint=_g,exports.ListServicesEndpoint=Ng,exports.ListSubdomainPathEndpoint=mv,exports.ListTagsEndpoint=Ay,exports.ListTemplaterunsEndpoint=Fy,exports.ListTemplatesEndpoint=Ty,exports.ListVcsEndpoint=Fv,exports.ListVolumesEndpoint=wy,exports.NorthflankApiCallError=em,exports.NorthflankExecCommand=uc,exports.NorthflankFileCopy=tm,exports.NorthflankLogFetch=vm,exports.NorthflankMetricFetch=ym,exports.NorthflankPortForwarder=sc,exports.PatchAddonEndpoint=eb,exports.PatchApiEndpoint=dm,exports.PatchBackupdestinationEndpoint=jm,exports.PatchCloudClusterEndpoint=Tm,exports.PatchCloudDockerregistryEndpoint=Jm,exports.PatchCloudIntegrationEndpoint=Ym,exports.PatchJobCronEndpoint=kb,exports.PatchJobManualEndpoint=Db,exports.PatchProjectEndpoint=Vv,exports.PatchSecretEndpoint=Ug,exports.PatchServiceBuildEndpoint=Fg,exports.PatchServiceCombinedEndpoint=zg,exports.PatchServiceDeploymentEndpoint=$g,exports.PatchTagEndpoint=ky,exports.PauseAddonEndpoint=wb,exports.PauseJobEndpoint=Qb,exports.PauseLogsinkEndpoint=Cv,exports.PauseServiceEndpoint=dy,exports.PostApiEndpoint=am,exports.PutAddonEndpoint=Qv,exports.PutApiEndpoint=um,exports.PutCloudClusterEndpoint=km,exports.PutCloudDockerregistryEndpoint=Mm,exports.PutCloudIntegrationEndpoint=Vm,exports.PutJobCronEndpoint=Pb,exports.PutJobManualEndpoint=Tb,exports.PutProjectEndpoint=Hv,exports.PutSecretEndpoint=Ag,exports.PutServiceBuildEndpoint=Bg,exports.PutServiceCombinedEndpoint=Mg,exports.PutServiceDeploymentEndpoint=Wg,exports.PutTagEndpoint=xy,exports.ResetAddonEndpoint=Eb,exports.RestartAddonEndpoint=Ib,exports.RestartServiceEndpoint=fy,exports.RestoreAddonBackupEndpoint=pb,exports.ResumeAddonEndpoint=jb,exports.ResumeJobEndpoint=eg,exports.ResumeLogsinkEndpoint=Av,exports.ResumeServiceEndpoint=my,exports.RetainAddonBackupEndpoint=mb,exports.RunReleaseflowEndpoint=Ig,exports.RunTemplateEndpoint=By,exports.ScaleAddonEndpoint=Sb,exports.ScaleJobEndpoint=ug,exports.ScaleServiceEndpoint=yy,exports.StartJobBuildEndpoint=Fb,exports.StartJobRunEndpoint=rg,exports.StartServiceBuildEndpoint=Kg,exports.SuspendJobEndpoint=lg,exports.UnassignSubdomainEndpoint=lv,exports.UnassignSubdomainPathEndpoint=wv,exports.UncordonCloudClusterNodeEndpoint=Bm,exports.UpdateAddonNetworksettingsEndpoint=yb,exports.UpdateAddonSecurityEndpoint=_b,exports.UpdateAddonVersionEndpoint=Ab,exports.UpdateJobBuildargumentsEndpoint=Mb,exports.UpdateJobBuildoptionsEndpoint=Jb,exports.UpdateJobBuildsourceEndpoint=Wb,exports.UpdateJobDeploymentEndpoint=Yb,exports.UpdateJobHealthchecksEndpoint=Xb,exports.UpdateJobRuntimeenvironmentEndpoint=ag,exports.UpdateJobSettingsEndpoint=dg,exports.UpdateLogsinkEndpoint=Uv,exports.UpdateNotificationEndpoint=Ov,exports.UpdatePreviewtemplateEndpoint=mg,exports.UpdateRegistrycredentialsEndpoint=Bv,exports.UpdateReleaseflowEndpoint=Eg,exports.UpdateSecretEndpoint=kg,exports.UpdateSecretlinkEndpoint=Og,exports.UpdateServiceBuildargumentsEndpoint=Qg,exports.UpdateServiceBuildoptionsEndpoint=ey,exports.UpdateServiceBuildsourceEndpoint=ny,exports.UpdateServiceDeploymentEndpoint=ay,exports.UpdateServiceHealthchecksEndpoint=uy,exports.UpdateServicePortsEndpoint=hy,exports.UpdateServiceRuntimeenvironmentEndpoint=by,exports.UpdateSubdomainPathEndpoint=gv,exports.UpdateTemplateEndpoint=Ny,exports.UpdateVolumeEndpoint=Ry,exports.VerifyDomainEndpoint=Iv,exports.VerifySubdomainEndpoint=Ev;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("events"),t=require("child_process"),n=require("stream"),r=require("http"),o=require("url"),i=require("https"),u=require("zlib"),s=require("os"),a=require("net"),c=require("fs"),d=require("path"),l=require("tls"),h=require("crypto"),p=require("buffer"),f=require("dgram"),m=require("node:events"),v=require("node:stream"),E=require("node:string_decoder"),A=require("node:path"),b=require("node:fs"),y=require("assert"),g=require("node:assert"),C=require("node:crypto");function w(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function F(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var D=w(e),B=w(n),I=F(n),S=w(r),R=w(o),j=w(i),_=w(u),U=F(u),x=w(s),P=w(a),O=F(a),k=w(c),T=w(d),L=w(l),N=w(h),q=w(p),G=w(f),M=w(v),z=w(A),J=w(b),$=w(y),W=w(g),V=function(e,t){return V=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])},V(e,t)};function H(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}V(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Z=function(){return Z=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},Z.apply(this,arguments)};function Y(e,t,n,r){return new(n||(n=Promise))(function(o,i){function u(e){try{a(r.next(e))}catch(e){i(e)}}function s(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(u,s)}a((r=r.apply(e,t||[])).next())})}function K(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=s(0),u.throw=s(1),u.return=s(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;u&&(u=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function X(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 Q="object"==typeof global&&global&&global.Object===Object&&global,ee="object"==typeof self&&self&&self.Object===Object&&self,te=Q||ee||Function("return this")(),ne=te.Symbol,re=Object.prototype,oe=re.hasOwnProperty,ie=re.toString,ue=ne?ne.toStringTag:void 0;var se=Object.prototype.toString;var ae=ne?ne.toStringTag:void 0;function ce(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ae&&ae in Object(e)?function(e){var t=oe.call(e,ue),n=e[ue];try{e[ue]=void 0;var r=!0}catch(e){}var o=ie.call(e);return r&&(t?e[ue]=n:delete e[ue]),o}(e):function(e){return se.call(e)}(e)}function de(e){return null!=e&&"object"==typeof e}function le(e){return"symbol"==typeof e||de(e)&&"[object Symbol]"==ce(e)}function he(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 pe=Array.isArray,fe=ne?ne.prototype:void 0,me=fe?fe.toString:void 0;function ve(e){if("string"==typeof e)return e;if(pe(e))return he(e,ve)+"";if(le(e))return me?me.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ee(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ae(e){return e}function be(e){if(!Ee(e))return!1;var t=ce(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var ye,ge=te["__core-js_shared__"],Ce=(ye=/[^.]+$/.exec(ge&&ge.keys&&ge.keys.IE_PROTO||""))?"Symbol(src)_1."+ye:"";var we=Function.prototype.toString;function Fe(e){if(null!=e){try{return we.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var De=/^\[object .+?Constructor\]$/,Be=Function.prototype,Ie=Object.prototype,Se=Be.toString,Re=Ie.hasOwnProperty,je=RegExp("^"+Se.call(Re).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _e(e){return!(!Ee(e)||(t=e,Ce&&Ce in t))&&(be(e)?je:De).test(Fe(e));var t}function Ue(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return _e(n)?n:void 0}var xe=Ue(te,"WeakMap"),Pe=Object.create,Oe=function(){function e(){}return function(t){if(!Ee(t))return{};if(Pe)return Pe(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var ke=Date.now;var Te,Le,Ne,qe=function(){try{var e=Ue(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Ge=qe,Me=Ge?function(e,t){return Ge(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Ae,ze=(Te=Me,Le=0,Ne=0,function(){var e=ke(),t=16-(e-Ne);if(Ne=e,t>0){if(++Le>=800)return arguments[0]}else Le=0;return Te.apply(void 0,arguments)}),Je=/^(?:0|[1-9]\d*)$/;function $e(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Je.test(e))&&e>-1&&e%1==0&&e<t}function We(e,t,n){"__proto__"==t&&Ge?Ge(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ve(e,t){return e===t||e!=e&&t!=t}var He=Object.prototype.hasOwnProperty;function Ze(e,t,n){var r=e[t];He.call(e,t)&&Ve(r,n)&&(void 0!==n||t in e)||We(e,t,n)}var Ye=Math.max;function Ke(e,t){return ze(function(e,t,n){return t=Ye(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=Ye(r.length-t,0),u=Array(i);++o<i;)u[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(u),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,s)}}(e,t,Ae),e+"")}function Xe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Qe(e){return null!=e&&Xe(e.length)&&!be(e)}var et=Object.prototype;function tt(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||et)}function nt(e){return de(e)&&"[object Arguments]"==ce(e)}var rt=Object.prototype,ot=rt.hasOwnProperty,it=rt.propertyIsEnumerable,ut=nt(function(){return arguments}())?nt:function(e){return de(e)&&ot.call(e,"callee")&&!it.call(e,"callee")};var st="object"==typeof exports&&exports&&!exports.nodeType&&exports,at=st&&"object"==typeof module&&module&&!module.nodeType&&module,ct=at&&at.exports===st?te.Buffer:void 0,dt=(ct?ct.isBuffer:void 0)||function(){return!1},lt={};lt["[object Float32Array]"]=lt["[object Float64Array]"]=lt["[object Int8Array]"]=lt["[object Int16Array]"]=lt["[object Int32Array]"]=lt["[object Uint8Array]"]=lt["[object Uint8ClampedArray]"]=lt["[object Uint16Array]"]=lt["[object Uint32Array]"]=!0,lt["[object Arguments]"]=lt["[object Array]"]=lt["[object ArrayBuffer]"]=lt["[object Boolean]"]=lt["[object DataView]"]=lt["[object Date]"]=lt["[object Error]"]=lt["[object Function]"]=lt["[object Map]"]=lt["[object Number]"]=lt["[object Object]"]=lt["[object RegExp]"]=lt["[object Set]"]=lt["[object String]"]=lt["[object WeakMap]"]=!1;var ht="object"==typeof exports&&exports&&!exports.nodeType&&exports,pt=ht&&"object"==typeof module&&module&&!module.nodeType&&module,ft=pt&&pt.exports===ht&&Q.process,mt=function(){try{var e=pt&&pt.require&&pt.require("util").types;return e||ft&&ft.binding&&ft.binding("util")}catch(e){}}(),vt=mt&&mt.isTypedArray,Et=vt?function(e){return function(t){return e(t)}}(vt):function(e){return de(e)&&Xe(e.length)&&!!lt[ce(e)]},At=Et,bt=Object.prototype.hasOwnProperty;function yt(e,t){var n=pe(e),r=!n&&ut(e),o=!n&&!r&&dt(e),i=!n&&!r&&!o&&At(e),u=n||r||o||i,s=u?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],a=s.length;for(var c in e)!t&&!bt.call(e,c)||u&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||$e(c,a))||s.push(c);return s}function gt(e,t){return function(n){return e(t(n))}}var Ct=gt(Object.keys,Object),wt=Object.prototype.hasOwnProperty;function Ft(e){return Qe(e)?yt(e):function(e){if(!tt(e))return Ct(e);var t=[];for(var n in Object(e))wt.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}var Dt=Object.prototype.hasOwnProperty;function Bt(e){if(!Ee(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=tt(e),n=[];for(var r in e)("constructor"!=r||!t&&Dt.call(e,r))&&n.push(r);return n}function It(e){return Qe(e)?yt(e,!0):Bt(e)}var St=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rt=/^\w*$/;function jt(e,t){if(pe(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!le(e))||(Rt.test(e)||!St.test(e)||null!=t&&e in Object(t))}var _t=Ue(Object,"create");var Ut=Object.prototype.hasOwnProperty;var xt=Object.prototype.hasOwnProperty;function Pt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ot(e,t){for(var n=e.length;n--;)if(Ve(e[n][0],t))return n;return-1}Pt.prototype.clear=function(){this.__data__=_t?_t(null):{},this.size=0},Pt.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Pt.prototype.get=function(e){var t=this.__data__;if(_t){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ut.call(t,e)?t[e]:void 0},Pt.prototype.has=function(e){var t=this.__data__;return _t?void 0!==t[e]:xt.call(t,e)},Pt.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=_t&&void 0===t?"__lodash_hash_undefined__":t,this};var kt=Array.prototype.splice;function Tt(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])}}Tt.prototype.clear=function(){this.__data__=[],this.size=0},Tt.prototype.delete=function(e){var t=this.__data__,n=Ot(t,e);return!(n<0)&&(n==t.length-1?t.pop():kt.call(t,n,1),--this.size,!0)},Tt.prototype.get=function(e){var t=this.__data__,n=Ot(t,e);return n<0?void 0:t[n][1]},Tt.prototype.has=function(e){return Ot(this.__data__,e)>-1},Tt.prototype.set=function(e,t){var n=this.__data__,r=Ot(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Lt=Ue(te,"Map");function Nt(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function qt(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])}}qt.prototype.clear=function(){this.size=0,this.__data__={hash:new Pt,map:new(Lt||Tt),string:new Pt}},qt.prototype.delete=function(e){var t=Nt(this,e).delete(e);return this.size-=t?1:0,t},qt.prototype.get=function(e){return Nt(this,e).get(e)},qt.prototype.has=function(e){return Nt(this,e).has(e)},qt.prototype.set=function(e,t){var n=Nt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Gt(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 u=e.apply(this,r);return n.cache=i.set(o,u)||i,u};return n.cache=new(Gt.Cache||qt),n}Gt.Cache=qt;var Mt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zt=/\\(\\)?/g,Jt=function(e){var t=Gt(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Mt,function(e,n,r,o){t.push(r?o.replace(zt,"$1"):n||e)}),t}),$t=Jt;function Wt(e){return null==e?"":ve(e)}function Vt(e,t){return pe(e)?e:jt(e,t)?[e]:$t(Wt(e))}function Ht(e){if("string"==typeof e||le(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Zt(e,t){for(var n=0,r=(t=Vt(t,e)).length;null!=e&&n<r;)e=e[Ht(t[n++])];return n&&n==r?e:void 0}function Yt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Kt=ne?ne.isConcatSpreadable:void 0;function Xt(e){return pe(e)||ut(e)||!!(Kt&&e&&e[Kt])}function Qt(e,t,n,r,o){var i=-1,u=e.length;for(n||(n=Xt),o||(o=[]);++i<u;){var s=e[i];t>0&&n(s)?t>1?Qt(s,t-1,n,r,o):Yt(o,s):r||(o[o.length]=s)}return o}var en=gt(Object.getPrototypeOf,Object),tn=Function.prototype,nn=Object.prototype,rn=tn.toString,on=nn.hasOwnProperty,un=rn.call(Object);function sn(e){var t=this.__data__=new Tt(e);this.size=t.size}sn.prototype.clear=function(){this.__data__=new Tt,this.size=0},sn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},sn.prototype.get=function(e){return this.__data__.get(e)},sn.prototype.has=function(e){return this.__data__.has(e)},sn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Tt){var r=n.__data__;if(!Lt||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qt(r)}return n.set(e,t),this.size=n.size,this};var an="object"==typeof exports&&exports&&!exports.nodeType&&exports,cn=an&&"object"==typeof module&&module&&!module.nodeType&&module,dn=cn&&cn.exports===an?te.Buffer:void 0,ln=dn?dn.allocUnsafe:void 0;var hn=Object.prototype.propertyIsEnumerable,pn=Object.getOwnPropertySymbols,fn=pn?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 u=e[n];t(u,n,e)&&(i[o++]=u)}return i}(pn(e),function(t){return hn.call(e,t)}))}:function(){return[]};function mn(e){return function(e,t,n){var r=t(e);return pe(e)?r:Yt(r,n(e))}(e,Ft,fn)}var vn=Ue(te,"DataView"),En=Ue(te,"Promise"),An=Ue(te,"Set"),bn="[object Map]",yn="[object Promise]",gn="[object Set]",Cn="[object WeakMap]",wn="[object DataView]",Fn=Fe(vn),Dn=Fe(Lt),Bn=Fe(En),In=Fe(An),Sn=Fe(xe),Rn=ce;(vn&&Rn(new vn(new ArrayBuffer(1)))!=wn||Lt&&Rn(new Lt)!=bn||En&&Rn(En.resolve())!=yn||An&&Rn(new An)!=gn||xe&&Rn(new xe)!=Cn)&&(Rn=function(e){var t=ce(e),n="[object Object]"==t?e.constructor:void 0,r=n?Fe(n):"";if(r)switch(r){case Fn:return wn;case Dn:return bn;case Bn:return yn;case In:return gn;case Sn:return Cn}return t});var jn=Rn,_n=te.Uint8Array;function Un(e,t){var n,r,o=t?(n=e.buffer,r=new n.constructor(n.byteLength),new _n(r).set(new _n(n)),r):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function xn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qt;++t<n;)this.add(e[t])}function Pn(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}xn.prototype.add=xn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},xn.prototype.has=function(e){return this.__data__.has(e)};function On(e,t,n,r,o,i){var u=1&n,s=e.length,a=t.length;if(s!=a&&!(u&&a>s))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var l=-1,h=!0,p=2&n?new xn:void 0;for(i.set(e,t),i.set(t,e);++l<s;){var f=e[l],m=t[l];if(r)var v=u?r(m,f,l,t,e,i):r(f,m,l,e,t,i);if(void 0!==v){if(v)continue;h=!1;break}if(p){if(!Pn(t,function(e,t){if(u=t,!p.has(u)&&(f===e||o(f,e,n,r,i)))return p.push(t);var u})){h=!1;break}}else if(f!==m&&!o(f,m,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h}function kn(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function Tn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Ln=ne?ne.prototype:void 0,Nn=Ln?Ln.valueOf:void 0;var qn=Object.prototype.hasOwnProperty;var Gn="[object Arguments]",Mn="[object Array]",zn="[object Object]",Jn=Object.prototype.hasOwnProperty;function $n(e,t,n,r,o,i){var u=pe(e),s=pe(t),a=u?Mn:jn(e),c=s?Mn:jn(t),d=(a=a==Gn?zn:a)==zn,l=(c=c==Gn?zn:c)==zn,h=a==c;if(h&&dt(e)){if(!dt(t))return!1;u=!0,d=!1}if(h&&!d)return i||(i=new sn),u||At(e)?On(e,t,n,r,o,i):function(e,t,n,r,o,i,u){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 _n(e),new _n(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ve(+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 s=kn;case"[object Set]":var a=1&r;if(s||(s=Tn),e.size!=t.size&&!a)return!1;var c=u.get(e);if(c)return c==t;r|=2,u.set(e,t);var d=On(s(e),s(t),r,o,i,u);return u.delete(e),d;case"[object Symbol]":if(Nn)return Nn.call(e)==Nn.call(t)}return!1}(e,t,a,n,r,o,i);if(!(1&n)){var p=d&&Jn.call(e,"__wrapped__"),f=l&&Jn.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,v=f?t.value():t;return i||(i=new sn),o(m,v,n,r,i)}}return!!h&&(i||(i=new sn),function(e,t,n,r,o,i){var u=1&n,s=mn(e),a=s.length;if(a!=mn(t).length&&!u)return!1;for(var c=a;c--;){var d=s[c];if(!(u?d in t:qn.call(t,d)))return!1}var l=i.get(e),h=i.get(t);if(l&&h)return l==t&&h==e;var p=!0;i.set(e,t),i.set(t,e);for(var f=u;++c<a;){var m=e[d=s[c]],v=t[d];if(r)var E=u?r(v,m,d,t,e,i):r(m,v,d,e,t,i);if(!(void 0===E?m===v||o(m,v,n,r,i):E)){p=!1;break}f||(f="constructor"==d)}if(p&&!f){var A=e.constructor,b=t.constructor;A==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof A&&A instanceof A&&"function"==typeof b&&b instanceof b||(p=!1)}return i.delete(e),i.delete(t),p}(e,t,n,r,o,i))}function Wn(e,t,n,r,o){return e===t||(null==e||null==t||!de(e)&&!de(t)?e!=e&&t!=t:$n(e,t,n,r,Wn,o))}function Vn(e){return e==e&&!Ee(e)}function Hn(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function Zn(e){var t=function(e){for(var t=Ft(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Vn(o)]}return t}(e);return 1==t.length&&t[0][2]?Hn(t[0][0],t[0][1]):function(n){return n===e||function(e,t,n,r){var o=n.length,i=o,u=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(u&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var a=(s=n[o])[0],c=e[a],d=s[1];if(u&&s[2]){if(void 0===c&&!(a in e))return!1}else{var l=new sn;if(r)var h=r(c,d,a,e,t,l);if(!(void 0===h?Wn(d,c,3,r,l):h))return!1}}return!0}(n,e,t)}}function Yn(e,t){return null!=e&&t in Object(e)}function Kn(e,t){return null!=e&&function(e,t,n){for(var r=-1,o=(t=Vt(t,e)).length,i=!1;++r<o;){var u=Ht(t[r]);if(!(i=null!=e&&n(e,u)))break;e=e[u]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Xe(o)&&$e(u,o)&&(pe(e)||ut(e))}(e,t,Yn)}function Xn(e,t){return jt(e)&&Vn(t)?Hn(Ht(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Zt(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?Kn(n,e):Wn(t,r,3)}}function Qn(e){return jt(e)?(t=Ht(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Zt(t,e)}}(e);var t}function er(e){return"function"==typeof e?e:null==e?Ae:"object"==typeof e?pe(e)?Xn(e[0],e[1]):Zn(e):Qn(e)}var tr,nr=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),u=i.length;u--;){var s=i[tr?u:++r];if(!1===t(o[s],s,o))break}return e};var rr=function(e,t){return function(n,r){if(null==n)return n;if(!Qe(n))return e(n,r);for(var o=n.length,i=t?o:-1,u=Object(n);(t?i--:++i<o)&&!1!==r(u[i],i,u););return n}}(function(e,t){return e&&nr(e,t,Ft)}),or=rr;function ir(e,t,n){(void 0!==n&&!Ve(e[t],n)||void 0===n&&!(t in e))&&We(e,t,n)}function ur(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function sr(e){return function(e,t,n,r){var o=!n;n||(n={});for(var i=-1,u=t.length;++i<u;){var s=t[i],a=r?r(n[s],e[s],s,n,e):void 0;void 0===a&&(a=e[s]),o?We(n,s,a):Ze(n,s,a)}return n}(e,It(e))}function ar(e,t,n,r,o,i,u){var s=ur(e,n),a=ur(t,n),c=u.get(a);if(c)ir(e,n,c);else{var d,l=i?i(s,a,n+"",e,t,u):void 0,h=void 0===l;if(h){var p=pe(a),f=!p&&dt(a),m=!p&&!f&&At(a);l=a,p||f||m?pe(s)?l=s:de(d=s)&&Qe(d)?l=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(s):f?(h=!1,l=function(e,t){if(t)return e.slice();var n=e.length,r=ln?ln(n):new e.constructor(n);return e.copy(r),r}(a,!0)):m?(h=!1,l=Un(a,!0)):l=[]:function(e){if(!de(e)||"[object Object]"!=ce(e))return!1;var t=en(e);if(null===t)return!0;var n=on.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&rn.call(n)==un}(a)||ut(a)?(l=s,ut(s)?l=sr(s):Ee(s)&&!be(s)||(l=function(e){return"function"!=typeof e.constructor||tt(e)?{}:Oe(en(e))}(a))):h=!1}h&&(u.set(a,l),o(l,a,r,i,u),u.delete(a)),ir(e,n,l)}}function cr(e,t,n,r,o){e!==t&&nr(t,function(i,u){if(o||(o=new sn),Ee(i))ar(e,t,u,n,cr,r,o);else{var s=r?r(ur(e,u),i,u+"",e,t,o):void 0;void 0===s&&(s=i),ir(e,u,s)}},It)}var dr=/[\\^$.*+?()[\]{}|]/g,lr=RegExp(dr.source);function hr(e,t){var n=-1,r=Qe(e)?Array(e.length):[];return or(e,function(e,o,i){r[++n]=t(e,o,i)}),r}function pr(e,t){return Qt(function(e,t){return(pe(e)?he:hr)(e,er(t))}(e,t),1)}var fr=1/0;function mr(e,t){return e>t}function vr(e){return"string"==typeof e||!pe(e)&&de(e)&&"[object String]"==ce(e)}function Er(e,t){return e&&e.length?function(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],u=t(i);if(null!=u&&(void 0===s?u==u&&!le(u):n(u,s)))var s=u,a=i}return a}(e,er(t),mr):void 0}var Ar,br=(Ar=function(e,t,n){cr(e,t,n)},Ke(function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=Ar.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!Ee(n))return!1;var r=typeof t;return!!("number"==r?Qe(n)&&$e(t,n.length):"string"==r&&t in n)&&Ve(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var u=t[n];u&&Ar(e,u,n,o)}return e})),yr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function gr(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function Cr(e,t){return e(t={exports:{}},t.exports),t.exports}var wr=Cr(function(e,t){function n(e,t,n){return n.globals&&(e=n.globals[e.name]),new e(`${n.context?n.context:"Value"} ${t}.`)}function r(e,t){if("bigint"==typeof e)throw n(TypeError,"is a BigInt which cannot be converted to a number",t);return t.globals?t.globals.Number(e):Number(e)}function o(e){return s(e>0&&e%1==.5&&!(1&e)||e<0&&e%1==-.5&&!(1&~e)?Math.floor(e):Math.round(e))}function i(e){return s(Math.trunc(e))}function u(e){return e<0?-1:1}function s(e){return 0===e?0:e}function a(e,{unsigned:t}){let a,c;t?(a=0,c=2**e-1):(a=-(2**(e-1)),c=2**(e-1)-1);const d=2**e,l=2**(e-1);return(e,h={})=>{let p=r(e,h);if(p=s(p),h.enforceRange){if(!Number.isFinite(p))throw n(TypeError,"is not a finite number",h);if(p=i(p),p<a||p>c)throw n(TypeError,`is outside the accepted range of ${a} to ${c}, inclusive`,h);return p}return!Number.isNaN(p)&&h.clamp?(p=Math.min(Math.max(p,a),c),p=o(p),p):Number.isFinite(p)&&0!==p?(p=i(p),p>=a&&p<=c?p:(p=function(e,t){const n=e%t;return u(t)!==u(n)?n+t:n}(p,d),!t&&p>=l?p-d:p)):0}}function c(e,{unsigned:t}){const u=Number.MAX_SAFE_INTEGER,a=t?0:Number.MIN_SAFE_INTEGER,c=t?BigInt.asUintN:BigInt.asIntN;return(t,d={})=>{let l=r(t,d);if(l=s(l),d.enforceRange){if(!Number.isFinite(l))throw n(TypeError,"is not a finite number",d);if(l=i(l),l<a||l>u)throw n(TypeError,`is outside the accepted range of ${a} to ${u}, inclusive`,d);return l}if(!Number.isNaN(l)&&d.clamp)return l=Math.min(Math.max(l,a),u),l=o(l),l;if(!Number.isFinite(l)||0===l)return 0;let h=BigInt(i(l));return h=c(e,h),Number(h)}}t.any=e=>e,t.undefined=()=>{},t.boolean=e=>Boolean(e),t.byte=a(8,{unsigned:!1}),t.octet=a(8,{unsigned:!0}),t.short=a(16,{unsigned:!1}),t["unsigned short"]=a(16,{unsigned:!0}),t.long=a(32,{unsigned:!1}),t["unsigned long"]=a(32,{unsigned:!0}),t["long long"]=c(64,{unsigned:!1}),t["unsigned long long"]=c(64,{unsigned:!0}),t.double=(e,t={})=>{const o=r(e,t);if(!Number.isFinite(o))throw n(TypeError,"is not a finite floating-point value",t);return o},t["unrestricted double"]=(e,t={})=>r(e,t),t.float=(e,t={})=>{const o=r(e,t);if(!Number.isFinite(o))throw n(TypeError,"is not a finite floating-point value",t);if(Object.is(o,-0))return o;const i=Math.fround(o);if(!Number.isFinite(i))throw n(TypeError,"is outside the range of a single-precision floating-point value",t);return i},t["unrestricted float"]=(e,t={})=>{const n=r(e,t);return isNaN(n)||Object.is(n,-0)?n:Math.fround(n)},t.DOMString=(e,t={})=>{if(t.treatNullAsEmptyString&&null===e)return"";if("symbol"==typeof e)throw n(TypeError,"is a symbol, which cannot be converted to a string",t);return(t.globals?t.globals.String:String)(e)},t.ByteString=(e,r={})=>{const o=t.DOMString(e,r);let i;for(let e=0;void 0!==(i=o.codePointAt(e));++e)if(i>255)throw n(TypeError,"is not a valid ByteString",r);return o},t.USVString=(e,n={})=>{const r=t.DOMString(e,n),o=r.length,i=[];for(let e=0;e<o;++e){const t=r.charCodeAt(e);if(t<55296||t>57343)i.push(String.fromCodePoint(t));else if(56320<=t&&t<=57343)i.push(String.fromCodePoint(65533));else if(e===o-1)i.push(String.fromCodePoint(65533));else{const n=r.charCodeAt(e+1);if(56320<=n&&n<=57343){const r=1023&t,o=1023&n;i.push(String.fromCodePoint(65536+1024*r+o)),++e}else i.push(String.fromCodePoint(65533))}}return i.join("")},t.object=(e,t={})=>{if(null===e||"object"!=typeof e&&"function"!=typeof e)throw n(TypeError,"is not an object",t);return e};const d=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get,l="function"==typeof SharedArrayBuffer?Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype,"byteLength").get:null;function h(e){try{return d.call(e),!0}catch{return!1}}function p(e){try{return l.call(e),!0}catch{return!1}}function f(e){try{return new Uint8Array(e),!1}catch{return!0}}t.ArrayBuffer=(e,t={})=>{if(!h(e)){if(t.allowShared&&!p(e))throw n(TypeError,"is not an ArrayBuffer or SharedArrayBuffer",t);throw n(TypeError,"is not an ArrayBuffer",t)}if(f(e))throw n(TypeError,"is a detached ArrayBuffer",t);return e};const m=Object.getOwnPropertyDescriptor(DataView.prototype,"byteLength").get;t.DataView=(e,t={})=>{try{m.call(e)}catch(e){throw n(TypeError,"is not a DataView",t)}if(!t.allowShared&&p(e.buffer))throw n(TypeError,"is backed by a SharedArrayBuffer, which is not allowed",t);if(f(e.buffer))throw n(TypeError,"is backed by a detached ArrayBuffer",t);return e};const v=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array).prototype,Symbol.toStringTag).get;[Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Uint8ClampedArray,Float32Array,Float64Array].forEach(e=>{const{name:r}=e,o=/^[AEIOU]/u.test(r)?"an":"a";t[r]=(e,t={})=>{if(!ArrayBuffer.isView(e)||v.call(e)!==r)throw n(TypeError,`is not ${o} ${r} object`,t);if(!t.allowShared&&p(e.buffer))throw n(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",t);if(f(e.buffer))throw n(TypeError,"is a view on a detached ArrayBuffer",t);return e}}),t.ArrayBufferView=(e,t={})=>{if(!ArrayBuffer.isView(e))throw n(TypeError,"is not a view on an ArrayBuffer or SharedArrayBuffer",t);if(!t.allowShared&&p(e.buffer))throw n(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",t);if(f(e.buffer))throw n(TypeError,"is a view on a detached ArrayBuffer",t);return e},t.BufferSource=(e,t={})=>{if(ArrayBuffer.isView(e)){if(!t.allowShared&&p(e.buffer))throw n(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",t);if(f(e.buffer))throw n(TypeError,"is a view on a detached ArrayBuffer",t);return e}if(!t.allowShared&&!h(e))throw n(TypeError,"is not an ArrayBuffer or a view on one",t);if(t.allowShared&&!p(e)&&!h(e))throw n(TypeError,"is not an ArrayBuffer, SharedArrayBuffer, or a view on one",t);if(f(e))throw n(TypeError,"is a detached ArrayBuffer",t);return e},t.DOMTimeStamp=t["unsigned long long"]});wr.any,wr.undefined,wr.octet,wr.DOMString,wr.ByteString,wr.USVString,wr.object,wr.ArrayBuffer,wr.DataView,wr.ArrayBufferView,wr.BufferSource,wr.DOMTimeStamp;var Fr=Cr(function(e,t){const n=Function.prototype.call.bind(Object.prototype.hasOwnProperty);const r=Symbol("wrapper"),o=Symbol("impl"),i=Symbol("SameObject caches"),u=Symbol.for("[webidl2js] constructor registry"),s=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);function a(e){if(n(e,u))return e[u];const t=Object.create(null);t["%Object.prototype%"]=e.Object.prototype,t["%IteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf((new e.Array)[Symbol.iterator]()));try{t["%AsyncIteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf(e.eval("(async function* () {})").prototype))}catch{t["%AsyncIteratorPrototype%"]=s}return e[u]=t,t}function c(e){return e?e[r]:null}function d(e){return e?e[o]:null}const l=Symbol("internal");const h=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get;const p=Symbol("supports property index"),f=Symbol("supported property indices"),m=Symbol("supports property name"),v=Symbol("supported property names"),E=Symbol("indexed property get"),A=Symbol("indexed property set new"),b=Symbol("indexed property set existing"),y=Symbol("named property get"),g=Symbol("named property set new"),C=Symbol("named property set existing"),w=Symbol("named property delete"),F=Symbol("async iterator get the next iteration result"),D=Symbol("async iterator return steps"),B=Symbol("async iterator initialization steps"),I=Symbol("async iterator end of iteration");e.exports={isObject:function(e){return"object"==typeof e&&null!==e||"function"==typeof e},hasOwn:n,define:function(e,t){for(const n of Reflect.ownKeys(t)){const r=Reflect.getOwnPropertyDescriptor(t,n);if(r&&!Reflect.defineProperty(e,n,r))throw new TypeError(`Cannot redefine property: ${String(n)}`)}},newObjectInRealm:function(e,t){const n=a(e);return Object.defineProperties(Object.create(n["%Object.prototype%"]),Object.getOwnPropertyDescriptors(t))},wrapperSymbol:r,implSymbol:o,getSameObject:function(e,t,n){return e[i]||(e[i]=Object.create(null)),t in e[i]||(e[i][t]=n()),e[i][t]},ctorRegistrySymbol:u,initCtorRegistry:a,wrapperForImpl:c,implForWrapper:d,tryWrapperForImpl:function(e){const t=c(e);return t||e},tryImplForWrapper:function(e){const t=d(e);return t||e},iterInternalSymbol:l,isArrayBuffer:function(e){try{return h.call(e),!0}catch(e){return!1}},isArrayIndexPropName:function(e){if("string"!=typeof e)return!1;const t=e>>>0;return t!==2**32-1&&e===`${t}`},supportsPropertyIndex:p,supportedPropertyIndices:f,supportsPropertyName:m,supportedPropertyNames:v,indexedGet:E,indexedSetNew:A,indexedSetExisting:b,namedGet:y,namedSetNew:g,namedSetExisting:C,namedDelete:w,asyncIteratorNext:F,asyncIteratorReturn:D,asyncIteratorInit:B,asyncIteratorEOI:I,iteratorResult:function([e,t],n){let r;switch(n){case"key":r=e;break;case"value":r=t;break;case"key+value":r=[e,t]}return{value:r,done:!1}}}});const Dr=2147483647,Br=36,Ir={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Sr=Math.floor,Rr=String.fromCharCode;function jr(e){throw new RangeError(Ir[e])}function _r(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const r=e.charCodeAt(n++);56320==(64512&r)?t.push(((1023&o)<<10)+(1023&r)+65536):(t.push(o),n--)}else t.push(o)}return t}const Ur=function(e){return e>=48&&e<58?e-48+26:e>=65&&e<91?e-65:e>=97&&e<123?e-97:Br},xr=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},Pr=function(e,t,n){let r=0;for(e=n?Sr(e/700):e>>1,e+=Sr(e/t);e>455;r+=Br)e=Sr(e/35);return Sr(r+36*e/(e+38))},Or=function(e){const t=[],n=e.length;let r=0,o=128,i=72,u=e.lastIndexOf("-");u<0&&(u=0);for(let n=0;n<u;++n)e.charCodeAt(n)>=128&&jr("not-basic"),t.push(e.charCodeAt(n));for(let s=u>0?u+1:0;s<n;){const u=r;for(let t=1,o=Br;;o+=Br){s>=n&&jr("invalid-input");const u=Ur(e.charCodeAt(s++));u>=Br&&jr("invalid-input"),u>Sr((Dr-r)/t)&&jr("overflow"),r+=u*t;const a=o<=i?1:o>=i+26?26:o-i;if(u<a)break;const c=Br-a;t>Sr(Dr/c)&&jr("overflow"),t*=c}const a=t.length+1;i=Pr(r-u,a,0==u),Sr(r/a)>Dr-o&&jr("overflow"),o+=Sr(r/a),r%=a,t.splice(r++,0,o)}return String.fromCodePoint(...t)},kr=function(e){const t=[],n=(e=_r(e)).length;let r=128,o=0,i=72;for(const n of e)n<128&&t.push(Rr(n));const u=t.length;let s=u;for(u&&t.push("-");s<n;){let n=Dr;for(const t of e)t>=r&&t<n&&(n=t);const a=s+1;n-r>Sr((Dr-o)/a)&&jr("overflow"),o+=(n-r)*a,r=n;for(const n of e)if(n<r&&++o>Dr&&jr("overflow"),n===r){let e=o;for(let n=Br;;n+=Br){const r=n<=i?1:n>=i+26?26:n-i;if(e<r)break;const o=e-r,u=Br-r;t.push(Rr(xr(r+o%u,0))),e=Sr(o/u)}t.push(Rr(xr(e,0))),i=Pr(o,a,s===u),o=0,++s}++o,++r}return t.join("")},Tr=Or,Lr=kr;var Nr,qr={combiningMarks:/[\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\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\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-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\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-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11000}-\u{11002}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11082}\u{110B0}-\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{11134}\u{11145}\u{11146}\u{11173}\u{11180}-\u{11182}\u{111B3}-\u{111C0}\u{111C9}-\u{111CC}\u{111CE}\u{111CF}\u{1122C}-\u{11237}\u{1123E}\u{11241}\u{112DF}-\u{112EA}\u{11300}-\u{11303}\u{1133B}\u{1133C}\u{1133E}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11357}\u{11362}\u{11363}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113B8}-\u{113C0}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}-\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11435}-\u{11446}\u{1145E}\u{114B0}-\u{114C3}\u{115AF}-\u{115B5}\u{115B8}-\u{115C0}\u{115DC}\u{115DD}\u{11630}-\u{11640}\u{116AB}-\u{116B7}\u{1171D}-\u{1172B}\u{1182C}-\u{1183A}\u{11930}-\u{11935}\u{11937}\u{11938}\u{1193B}-\u{1193E}\u{11940}\u{11942}\u{11943}\u{119D1}-\u{119D7}\u{119DA}-\u{119E0}\u{119E4}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A39}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A5B}\u{11A8A}-\u{11A99}\u{11C2F}-\u{11C36}\u{11C38}-\u{11C3F}\u{11C92}-\u{11CA7}\u{11CA9}-\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D8A}-\u{11D8E}\u{11D90}\u{11D91}\u{11D93}-\u{11D97}\u{11EF3}-\u{11EF6}\u{11F00}\u{11F01}\u{11F03}\u{11F34}-\u{11F3A}\u{11F3E}-\u{11F42}\u{11F5A}\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F51}-\u{16F87}\u{16F8F}-\u{16F92}\u{16FE4}\u{16FF0}\u{16FF1}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D165}-\u{1D169}\u{1D16D}-\u{1D172}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]/u,combiningClassVirama:/[\u094D\u09CD\u0A4D\u0ACD\u0B4D\u0BCD\u0C4D\u0CCD\u0D3B\u0D3C\u0D4D\u0DCA\u0E3A\u0EBA\u0F84\u1039\u103A\u1714\u1715\u1734\u17D2\u1A60\u1B44\u1BAA\u1BAB\u1BF2\u1BF3\u2D7F\uA806\uA82C\uA8C4\uA953\uA9C0\uAAF6\uABED\u{10A3F}\u{11046}\u{11070}\u{1107F}\u{110B9}\u{11133}\u{11134}\u{111C0}\u{11235}\u{112EA}\u{1134D}\u{113CE}-\u{113D0}\u{11442}\u{114C2}\u{115BF}\u{1163F}\u{116B6}\u{1172B}\u{11839}\u{1193D}\u{1193E}\u{119E0}\u{11A34}\u{11A47}\u{11A99}\u{11C3F}\u{11D44}\u{11D45}\u{11D97}\u{11F41}\u{11F42}\u{1612F}]/u,validZWNJ:/[\u0620\u0626\u0628\u062A-\u062E\u0633-\u063F\u0641-\u0647\u0649\u064A\u066E\u066F\u0678-\u0687\u069A-\u06BF\u06C1\u06C2\u06CC\u06CE\u06D0\u06D1\u06FA-\u06FC\u06FF\u0712-\u0714\u071A-\u071D\u071F-\u0727\u0729\u072B\u072D\u072E\u074E-\u0758\u075C-\u076A\u076D-\u0770\u0772\u0775-\u0777\u077A-\u077F\u07CA-\u07EA\u0841-\u0845\u0848\u084A-\u0853\u0855\u0860\u0862-\u0865\u0868\u0886\u0889-\u088D\u08A0-\u08A9\u08AF\u08B0\u08B3-\u08B8\u08BA-\u08C8\u1807\u1820-\u1878\u1887-\u18A8\u18AA\uA840-\uA872\u{10AC0}-\u{10AC4}\u{10ACD}\u{10AD3}-\u{10ADC}\u{10ADE}-\u{10AE0}\u{10AEB}-\u{10AEE}\u{10B80}\u{10B82}\u{10B86}-\u{10B88}\u{10B8A}\u{10B8B}\u{10B8D}\u{10B90}\u{10BAD}\u{10BAE}\u{10D00}-\u{10D21}\u{10D23}\u{10EC3}\u{10EC4}\u{10F30}-\u{10F32}\u{10F34}-\u{10F44}\u{10F51}-\u{10F53}\u{10F70}-\u{10F73}\u{10F76}-\u{10F81}\u{10FB0}\u{10FB2}\u{10FB3}\u{10FB8}\u{10FBB}\u{10FBC}\u{10FBE}\u{10FBF}\u{10FC1}\u{10FC4}\u{10FCA}\u{10FCB}\u{1E900}-\u{1E943}][\xAD\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u061C\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200B\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFEFF\uFFF9-\uFFFB\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C3F}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{13430}-\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94B}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*\u200C[\xAD\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u061C\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200B\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFEFF\uFFF9-\uFFFB\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C3F}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{13430}-\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94B}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*[\u0620\u0622-\u063F\u0641-\u064A\u066E\u066F\u0671-\u0673\u0675-\u06D3\u06D5\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u077F\u07CA-\u07EA\u0840-\u0858\u0860\u0862-\u0865\u0867-\u086A\u0870-\u0882\u0886\u0889-\u088E\u08A0-\u08AC\u08AE-\u08C8\u1807\u1820-\u1878\u1887-\u18A8\u18AA\uA840-\uA871\u{10AC0}-\u{10AC5}\u{10AC7}\u{10AC9}\u{10ACA}\u{10ACE}-\u{10AD6}\u{10AD8}-\u{10AE1}\u{10AE4}\u{10AEB}-\u{10AEF}\u{10B80}-\u{10B91}\u{10BA9}-\u{10BAE}\u{10D01}-\u{10D23}\u{10EC2}-\u{10EC4}\u{10F30}-\u{10F44}\u{10F51}-\u{10F54}\u{10F70}-\u{10F81}\u{10FB0}\u{10FB2}-\u{10FB6}\u{10FB8}-\u{10FBF}\u{10FC1}-\u{10FC4}\u{10FC9}\u{10FCA}\u{1E900}-\u{1E943}]/u,bidiDomain:/[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0605\u0608\u060B\u060D\u061B-\u064A\u0660-\u0669\u066B-\u066F\u0671-\u06D5\u06DD\u06E5\u06E6\u06EE\u06EF\u06FA-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u08A0-\u08C9\u08E2\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D6F}-\u{10D85}\u{10D8E}\u{10D8F}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}]/u,bidiS1LTR:/[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02BB-\u02C1\u02D0\u02D1\u02E0-\u02E4\u02EE\u0370-\u0373\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0482\u048A-\u052F\u0531-\u0556\u0559-\u0589\u0903-\u0939\u093B\u093D-\u0940\u0949-\u094C\u094E-\u0950\u0958-\u0961\u0964-\u0980\u0982\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C0\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09FA\u09FC\u09FD\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A40\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A76\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC0\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0\u0AE1\u0AE6-\u0AF0\u0AF9\u0B02\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0BE6-\u0BF2\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C41-\u0C44\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C77\u0C7F\u0C80\u0C82-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D02-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D4F\u0D54-\u0D61\u0D66-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E4F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3E-\u0F47\u0F49-\u0F6C\u0F7F\u0F85\u0F88-\u0F8C\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u1000-\u102C\u1031\u1038\u103B\u103C\u103F-\u1057\u105A-\u105D\u1061-\u1070\u1075-\u1081\u1083\u1084\u1087-\u108C\u108E-\u109C\u109E-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1360-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u167F\u1681-\u169A\u16A0-\u16F8\u1700-\u1711\u1715\u171F-\u1731\u1734-\u1736\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17B6\u17BE-\u17C5\u17C7\u17C8\u17D4-\u17DA\u17DC\u17E0-\u17E9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A19\u1A1A\u1A1E-\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1A80-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1B04-\u1B33\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B4C\u1B4E-\u1B6A\u1B74-\u1B7F\u1B82-\u1BA1\u1BA6\u1BA7\u1BAA\u1BAE-\u1BE5\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1BFC-\u1C2B\u1C34\u1C35\u1C3B-\u1C49\u1C4D-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF7\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200E\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u214F\u2160-\u2188\u2336-\u237A\u2395\u249C-\u24E9\u26AC\u2800-\u28FF\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u302E\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31BF\u31F0-\u321C\u3220-\u324F\u3260-\u327B\u327F-\u32B0\u32C0-\u32CB\u32D0-\u3376\u337B-\u33DD\u33E0-\u33FE\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA60C\uA610-\uA62B\uA640-\uA66E\uA680-\uA69D\uA6A0-\uA6EF\uA6F2-\uA6F7\uA722-\uA787\uA789-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA824\uA827\uA830-\uA837\uA840-\uA873\uA880-\uA8C3\uA8CE-\uA8D9\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA952\uA953\uA95F-\uA97C\uA983-\uA9B2\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA2F\uAA30\uAA33\uAA34\uAA40-\uAA42\uAA44-\uAA4B\uAA4D\uAA50-\uAA59\uAA5C-\uAA7B\uAA7D-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAAEB\uAAEE-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB69\uAB70-\uABE4\uABE6\uABE7\uABE9-\uABEC\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1013F}\u{1018D}\u{1018E}\u{101D0}-\u{101FC}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{11000}\u{11002}-\u{11037}\u{11047}-\u{1104D}\u{11066}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11082}-\u{110B2}\u{110B7}\u{110B8}\u{110BB}-\u{110C1}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{1112C}\u{11136}-\u{11147}\u{11150}-\u{11172}\u{11174}-\u{11176}\u{11182}-\u{111B5}\u{111BF}-\u{111C8}\u{111CD}\u{111CE}\u{111D0}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122E}\u{11232}\u{11233}\u{11235}\u{11238}-\u{1123D}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112DE}\u{112E0}-\u{112E2}\u{112F0}-\u{112F9}\u{11302}\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}-\u{1133F}\u{11341}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}-\u{113BA}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}\u{113CD}\u{113CF}\u{113D1}\u{113D3}-\u{113D5}\u{113D7}\u{113D8}\u{11400}-\u{11437}\u{11440}\u{11441}\u{11445}\u{11447}-\u{1145B}\u{1145D}\u{1145F}-\u{11461}\u{11480}-\u{114B2}\u{114B9}\u{114BB}-\u{114BE}\u{114C1}\u{114C4}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B1}\u{115B8}-\u{115BB}\u{115BE}\u{115C1}-\u{115DB}\u{11600}-\u{11632}\u{1163B}\u{1163C}\u{1163E}\u{11641}-\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116AC}\u{116AE}\u{116AF}\u{116B6}\u{116B8}\u{116B9}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{1171E}\u{11720}\u{11721}\u{11726}\u{11730}-\u{11746}\u{11800}-\u{1182E}\u{11838}\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193D}\u{1193F}-\u{11942}\u{11944}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D3}\u{119DC}-\u{119DF}\u{119E1}-\u{119E4}\u{11A00}\u{11A07}\u{11A08}\u{11A0B}-\u{11A32}\u{11A39}\u{11A3A}\u{11A3F}-\u{11A46}\u{11A50}\u{11A57}\u{11A58}\u{11A5C}-\u{11A89}\u{11A97}\u{11A9A}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11BC0}-\u{11BE1}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2F}\u{11C3E}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11CA9}\u{11CB1}\u{11CB4}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D93}\u{11D94}\u{11D96}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11EF5}-\u{11EF8}\u{11F02}-\u{11F10}\u{11F12}-\u{11F35}\u{11F3E}\u{11F3F}\u{11F41}\u{11F43}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{1343F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{1612A}-\u{1612C}\u{16130}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF5}\u{16B00}-\u{16B2F}\u{16B37}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D79}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F50}-\u{16F87}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18CFF}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}\u{1BC9F}\u{1CCD6}-\u{1CCEF}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D166}\u{1D16A}-\u{1D172}\u{1D183}\u{1D184}\u{1D18C}-\u{1D1A9}\u{1D1AE}-\u{1D1E8}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D800}-\u{1D9FF}\u{1DA37}-\u{1DA3A}\u{1DA6D}-\u{1DA74}\u{1DA76}-\u{1DA83}\u{1DA85}-\u{1DA8B}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E5D0}-\u{1E5ED}\u{1E5F0}-\u{1E5FA}\u{1E5FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1F110}-\u{1F12E}\u{1F130}-\u{1F169}\u{1F170}-\u{1F1AC}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}]/u,bidiS1RTL:/[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D4A}-\u{10D65}\u{10D6F}-\u{10D85}\u{10D8E}\u{10D8F}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}]/u,bidiS2:/^[\0-\x08\x0E-\x1B!-@\[-`\{-\x84\x86-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02B9\u02BA\u02C2-\u02CF\u02D2-\u02DF\u02E5-\u02ED\u02EF-\u036F\u0374\u0375\u037E\u0384\u0385\u0387\u03F6\u0483-\u0489\u058A\u058D-\u058F\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\u0600-\u070D\u070F-\u074A\u074D-\u07B1\u07C0-\u07FA\u07FD-\u082D\u0830-\u083E\u0840-\u085B\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u0897-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09F2\u09F3\u09FB\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AF1\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0BF3-\u0BFA\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C78-\u0C7E\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E3F\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39-\u0F3D\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1390-\u1399\u1400\u169B\u169C\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DB\u17DD\u17F0-\u17F9\u1800-\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1940\u1944\u1945\u19DE-\u19FF\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u200B-\u200D\u200F-\u2027\u202F-\u205E\u2060-\u2064\u206A-\u2070\u2074-\u207E\u2080-\u208E\u20A0-\u20C0\u20D0-\u20F0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u2150-\u215F\u2189-\u218B\u2190-\u2335\u237B-\u2394\u2396-\u2429\u2440-\u244A\u2460-\u249B\u24EA-\u26AB\u26AD-\u27FF\u2900-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF9-\u2CFF\u2D7F\u2DE0-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u3004\u3008-\u3020\u302A-\u302D\u3030\u3036\u3037\u303D-\u303F\u3099-\u309C\u30A0\u30FB\u31C0-\u31E5\u31EF\u321D\u321E\u3250-\u325F\u327C-\u327E\u32B1-\u32BF\u32CC-\u32CF\u3377-\u337A\u33DE\u33DF\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA60D-\uA60F\uA66F-\uA67F\uA69E\uA69F\uA6F0\uA6F1\uA700-\uA721\uA788\uA802\uA806\uA80B\uA825\uA826\uA828-\uA82C\uA838\uA839\uA874-\uA877\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uAB6A\uAB6B\uABE5\uABE8\uABED\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD8F\uFD92-\uFDC7\uFDCF\uFDF0-\uFE19\uFE20-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFE70-\uFE74\uFE76-\uFEFC\uFEFF\uFF01-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD\u{10101}\u{10140}-\u{1018C}\u{10190}-\u{1019C}\u{101A0}\u{101FD}\u{102E0}-\u{102FB}\u{10376}-\u{1037A}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{1091F}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A38}-\u{10A3A}\u{10A3F}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE6}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B39}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D27}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D69}-\u{10D85}\u{10D8E}\u{10D8F}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAB}-\u{10EAD}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10EFC}-\u{10F27}\u{10F30}-\u{10F59}\u{10F70}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{11001}\u{11038}-\u{11046}\u{11052}-\u{11065}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{11660}-\u{1166C}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{11FD5}-\u{11FF1}\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE2}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1CC00}-\u{1CCD5}\u{1CCF0}-\u{1CCF9}\u{1CD00}-\u{1CEB3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D1E9}\u{1D1EA}\u{1D200}-\u{1D245}\u{1D300}-\u{1D356}\u{1D6C1}\u{1D6DB}\u{1D6FB}\u{1D715}\u{1D735}\u{1D74F}\u{1D76F}\u{1D789}\u{1D7A9}\u{1D7C3}\u{1D7CE}-\u{1D7FF}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E2FF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8D6}\u{1E900}-\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1EEF0}\u{1EEF1}\u{1F000}-\u{1F02B}\u{1F030}-\u{1F093}\u{1F0A0}-\u{1F0AE}\u{1F0B1}-\u{1F0BF}\u{1F0C1}-\u{1F0CF}\u{1F0D1}-\u{1F0F5}\u{1F100}-\u{1F10F}\u{1F12F}\u{1F16A}-\u{1F16F}\u{1F1AD}\u{1F260}-\u{1F265}\u{1F300}-\u{1F6D7}\u{1F6DC}-\u{1F6EC}\u{1F6F0}-\u{1F6FC}\u{1F700}-\u{1F776}\u{1F77B}-\u{1F7D9}\u{1F7E0}-\u{1F7EB}\u{1F7F0}\u{1F800}-\u{1F80B}\u{1F810}-\u{1F847}\u{1F850}-\u{1F859}\u{1F860}-\u{1F887}\u{1F890}-\u{1F8AD}\u{1F8B0}-\u{1F8BB}\u{1F8C0}\u{1F8C1}\u{1F900}-\u{1FA53}\u{1FA60}-\u{1FA6D}\u{1FA70}-\u{1FA7C}\u{1FA80}-\u{1FA89}\u{1FA8F}-\u{1FAC6}\u{1FACE}-\u{1FADC}\u{1FADF}-\u{1FAE9}\u{1FAF0}-\u{1FAF8}\u{1FB00}-\u{1FB92}\u{1FB94}-\u{1FBF9}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*$/u,bidiS3:/[0-9\xB2\xB3\xB9\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0605\u0608\u060B\u060D\u061B-\u064A\u0660-\u0669\u066B-\u066F\u0671-\u06D5\u06DD\u06E5\u06E6\u06EE-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u08A0-\u08C9\u08E2\u200F\u2070\u2074-\u2079\u2080-\u2089\u2488-\u249B\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\u{102E1}-\u{102FB}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10D40}-\u{10D65}\u{10D6F}-\u{10D85}\u{10D8E}\u{10D8F}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10EC2}-\u{10EC4}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1CCF0}-\u{1CCF9}\u{1D7CE}-\u{1D7FF}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10A}\u{1FBF0}-\u{1FBF9}][\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\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]*$/u,bidiS4EN:/[0-9\xB2\xB3\xB9\u06F0-\u06F9\u2070\u2074-\u2079\u2080-\u2089\u2488-\u249B\uFF10-\uFF19\u{102E1}-\u{102FB}\u{1CCF0}-\u{1CCF9}\u{1D7CE}-\u{1D7FF}\u{1F100}-\u{1F10A}\u{1FBF0}-\u{1FBF9}]/u,bidiS4AN:/[\u0600-\u0605\u0660-\u0669\u066B\u066C\u06DD\u0890\u0891\u08E2\u{10D30}-\u{10D39}\u{10D40}-\u{10D49}\u{10E60}-\u{10E7E}]/u,bidiS5:/^[\0-\x08\x0E-\x1B!-\x84\x86-\u0377\u037A-\u037F\u0384-\u038A\u038C\u038E-\u03A1\u03A3-\u052F\u0531-\u0556\u0559-\u058A\u058D-\u058F\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0606\u0607\u0609\u060A\u060C\u060E-\u061A\u064B-\u065F\u066A\u0670\u06D6-\u06DC\u06DE-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07F6-\u07F9\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B77\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C77-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4F\u0D54-\u0D63\u0D66-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E3A\u0E3F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FDA\u1000-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u13A0-\u13F5\u13F8-\u13FD\u1400-\u167F\u1681-\u169C\u16A0-\u16F8\u1700-\u1715\u171F-\u1736\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u1800-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1940\u1944-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u19DE-\u1A1B\u1A1E-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1AB0-\u1ACE\u1B00-\u1B4C\u1B4E-\u1BF3\u1BFC-\u1C37\u1C3B-\u1C49\u1C4D-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD0-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u200B-\u200E\u2010-\u2027\u202F-\u205E\u2060-\u2064\u206A-\u2071\u2074-\u208E\u2090-\u209C\u20A0-\u20C0\u20D0-\u20F0\u2100-\u218B\u2190-\u2429\u2440-\u244A\u2460-\u2B73\u2B76-\u2B95\u2B97-\u2CF3\u2CF9-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3001-\u303F\u3041-\u3096\u3099-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31E5\u31EF-\u321E\u3220-\uA48C\uA490-\uA4C6\uA4D0-\uA62B\uA640-\uA6F7\uA700-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA82C\uA830-\uA839\uA840-\uA877\uA880-\uA8C5\uA8CE-\uA8D9\uA8E0-\uA953\uA95F-\uA97C\uA980-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA5C-\uAAC2\uAADB-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB6B\uAB70-\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1E\uFB29\uFD3E-\uFD4F\uFDCF\uFDFD-\uFE19\uFE20-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}-\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1018E}\u{10190}-\u{1019C}\u{101A0}\u{101D0}-\u{101FD}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E0}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{1037A}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{1091F}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10B39}-\u{10B3F}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6E}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11000}-\u{1104D}\u{11052}-\u{11075}\u{1107F}-\u{110C2}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11100}-\u{11134}\u{11136}-\u{11147}\u{11150}-\u{11176}\u{11180}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{11241}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112EA}\u{112F0}-\u{112F9}\u{11300}-\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133B}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}-\u{113C0}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}-\u{113D5}\u{113D7}\u{113D8}\u{113E1}\u{113E2}\u{11400}-\u{1145B}\u{1145D}-\u{11461}\u{11480}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B5}\u{115B8}-\u{115DD}\u{11600}-\u{11644}\u{11650}-\u{11659}\u{11660}-\u{1166C}\u{11680}-\u{116B9}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{1171D}-\u{1172B}\u{11730}-\u{11746}\u{11800}-\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193B}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D7}\u{119DA}-\u{119E4}\u{11A00}-\u{11A47}\u{11A50}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11BC0}-\u{11BE1}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C36}\u{11C38}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11C92}-\u{11CA7}\u{11CA9}-\u{11CB6}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D47}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D90}\u{11D91}\u{11D93}-\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF8}\u{11F00}-\u{11F10}\u{11F12}-\u{11F3A}\u{11F3E}-\u{11F5A}\u{11FB0}\u{11FC0}-\u{11FF1}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{13455}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF0}-\u{16AF5}\u{16B00}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D79}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F4F}-\u{16F87}\u{16F8F}-\u{16F9F}\u{16FE0}-\u{16FE4}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18CFF}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}-\u{1BCA3}\u{1CC00}-\u{1CCF9}\u{1CD00}-\u{1CEB3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D1EA}\u{1D200}-\u{1D245}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D300}-\u{1D356}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D7CB}\u{1D7CE}-\u{1DA8B}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E030}-\u{1E06D}\u{1E08F}\u{1E100}-\u{1E12C}\u{1E130}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AE}\u{1E2C0}-\u{1E2F9}\u{1E2FF}\u{1E4D0}-\u{1E4F9}\u{1E5D0}-\u{1E5FA}\u{1E5FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{1EEF0}\u{1EEF1}\u{1F000}-\u{1F02B}\u{1F030}-\u{1F093}\u{1F0A0}-\u{1F0AE}\u{1F0B1}-\u{1F0BF}\u{1F0C1}-\u{1F0CF}\u{1F0D1}-\u{1F0F5}\u{1F100}-\u{1F1AD}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{1F260}-\u{1F265}\u{1F300}-\u{1F6D7}\u{1F6DC}-\u{1F6EC}\u{1F6F0}-\u{1F6FC}\u{1F700}-\u{1F776}\u{1F77B}-\u{1F7D9}\u{1F7E0}-\u{1F7EB}\u{1F7F0}\u{1F800}-\u{1F80B}\u{1F810}-\u{1F847}\u{1F850}-\u{1F859}\u{1F860}-\u{1F887}\u{1F890}-\u{1F8AD}\u{1F8B0}-\u{1F8BB}\u{1F8C0}\u{1F8C1}\u{1F900}-\u{1FA53}\u{1FA60}-\u{1FA6D}\u{1FA70}-\u{1FA7C}\u{1FA80}-\u{1FA89}\u{1FA8F}-\u{1FAC6}\u{1FACE}-\u{1FADC}\u{1FADF}-\u{1FAE9}\u{1FAF0}-\u{1FAF8}\u{1FB00}-\u{1FB92}\u{1FB94}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}]*$/u,bidiS6:/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02BB-\u02C1\u02D0\u02D1\u02E0-\u02E4\u02EE\u0370-\u0373\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0482\u048A-\u052F\u0531-\u0556\u0559-\u0589\u06F0-\u06F9\u0903-\u0939\u093B\u093D-\u0940\u0949-\u094C\u094E-\u0950\u0958-\u0961\u0964-\u0980\u0982\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C0\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09FA\u09FC\u09FD\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A40\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A76\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC0\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0\u0AE1\u0AE6-\u0AF0\u0AF9\u0B02\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0BE6-\u0BF2\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C41-\u0C44\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C77\u0C7F\u0C80\u0C82-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D02-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D4F\u0D54-\u0D61\u0D66-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E4F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3E-\u0F47\u0F49-\u0F6C\u0F7F\u0F85\u0F88-\u0F8C\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u1000-\u102C\u1031\u1038\u103B\u103C\u103F-\u1057\u105A-\u105D\u1061-\u1070\u1075-\u1081\u1083\u1084\u1087-\u108C\u108E-\u109C\u109E-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1360-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u167F\u1681-\u169A\u16A0-\u16F8\u1700-\u1711\u1715\u171F-\u1731\u1734-\u1736\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17B6\u17BE-\u17C5\u17C7\u17C8\u17D4-\u17DA\u17DC\u17E0-\u17E9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A19\u1A1A\u1A1E-\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1A80-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1B04-\u1B33\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B4C\u1B4E-\u1B6A\u1B74-\u1B7F\u1B82-\u1BA1\u1BA6\u1BA7\u1BAA\u1BAE-\u1BE5\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1BFC-\u1C2B\u1C34\u1C35\u1C3B-\u1C49\u1C4D-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF7\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200E\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u214F\u2160-\u2188\u2336-\u237A\u2395\u2488-\u24E9\u26AC\u2800-\u28FF\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u302E\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31BF\u31F0-\u321C\u3220-\u324F\u3260-\u327B\u327F-\u32B0\u32C0-\u32CB\u32D0-\u3376\u337B-\u33DD\u33E0-\u33FE\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA60C\uA610-\uA62B\uA640-\uA66E\uA680-\uA69D\uA6A0-\uA6EF\uA6F2-\uA6F7\uA722-\uA787\uA789-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA824\uA827\uA830-\uA837\uA840-\uA873\uA880-\uA8C3\uA8CE-\uA8D9\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA952\uA953\uA95F-\uA97C\uA983-\uA9B2\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA2F\uAA30\uAA33\uAA34\uAA40-\uAA42\uAA44-\uAA4B\uAA4D\uAA50-\uAA59\uAA5C-\uAA7B\uAA7D-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAAEB\uAAEE-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB69\uAB70-\uABE4\uABE6\uABE7\uABE9-\uABEC\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1013F}\u{1018D}\u{1018E}\u{101D0}-\u{101FC}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E1}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{105C0}-\u{105F3}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{11000}\u{11002}-\u{11037}\u{11047}-\u{1104D}\u{11066}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11082}-\u{110B2}\u{110B7}\u{110B8}\u{110BB}-\u{110C1}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{1112C}\u{11136}-\u{11147}\u{11150}-\u{11172}\u{11174}-\u{11176}\u{11182}-\u{111B5}\u{111BF}-\u{111C8}\u{111CD}\u{111CE}\u{111D0}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122E}\u{11232}\u{11233}\u{11235}\u{11238}-\u{1123D}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112DE}\u{112E0}-\u{112E2}\u{112F0}-\u{112F9}\u{11302}\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}-\u{1133F}\u{11341}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11380}-\u{11389}\u{1138B}\u{1138E}\u{11390}-\u{113B5}\u{113B7}-\u{113BA}\u{113C2}\u{113C5}\u{113C7}-\u{113CA}\u{113CC}\u{113CD}\u{113CF}\u{113D1}\u{113D3}-\u{113D5}\u{113D7}\u{113D8}\u{11400}-\u{11437}\u{11440}\u{11441}\u{11445}\u{11447}-\u{1145B}\u{1145D}\u{1145F}-\u{11461}\u{11480}-\u{114B2}\u{114B9}\u{114BB}-\u{114BE}\u{114C1}\u{114C4}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B1}\u{115B8}-\u{115BB}\u{115BE}\u{115C1}-\u{115DB}\u{11600}-\u{11632}\u{1163B}\u{1163C}\u{1163E}\u{11641}-\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116AC}\u{116AE}\u{116AF}\u{116B6}\u{116B8}\u{116B9}\u{116C0}-\u{116C9}\u{116D0}-\u{116E3}\u{11700}-\u{1171A}\u{1171E}\u{11720}\u{11721}\u{11726}\u{11730}-\u{11746}\u{11800}-\u{1182E}\u{11838}\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193D}\u{1193F}-\u{11942}\u{11944}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D3}\u{119DC}-\u{119DF}\u{119E1}-\u{119E4}\u{11A00}\u{11A07}\u{11A08}\u{11A0B}-\u{11A32}\u{11A39}\u{11A3A}\u{11A3F}-\u{11A46}\u{11A50}\u{11A57}\u{11A58}\u{11A5C}-\u{11A89}\u{11A97}\u{11A9A}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11BC0}-\u{11BE1}\u{11BF0}-\u{11BF9}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2F}\u{11C3E}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11CA9}\u{11CB1}\u{11CB4}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D93}\u{11D94}\u{11D96}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11EF5}-\u{11EF8}\u{11F02}-\u{11F10}\u{11F12}-\u{11F35}\u{11F3E}\u{11F3F}\u{11F41}\u{11F43}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{1343F}\u{13441}-\u{13446}\u{13460}-\u{143FA}\u{14400}-\u{14646}\u{16100}-\u{1611D}\u{1612A}-\u{1612C}\u{16130}-\u{16139}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF5}\u{16B00}-\u{16B2F}\u{16B37}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16D40}-\u{16D79}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F50}-\u{16F87}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18CFF}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}\u{1BC9F}\u{1CCD6}-\u{1CCF9}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D166}\u{1D16A}-\u{1D172}\u{1D183}\u{1D184}\u{1D18C}-\u{1D1A9}\u{1D1AE}-\u{1D1E8}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6C0}\u{1D6C2}-\u{1D6DA}\u{1D6DC}-\u{1D6FA}\u{1D6FC}-\u{1D714}\u{1D716}-\u{1D734}\u{1D736}-\u{1D74E}\u{1D750}-\u{1D76E}\u{1D770}-\u{1D788}\u{1D78A}-\u{1D7A8}\u{1D7AA}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D9FF}\u{1DA37}-\u{1DA3A}\u{1DA6D}-\u{1DA74}\u{1DA76}-\u{1DA83}\u{1DA85}-\u{1DA8B}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E5D0}-\u{1E5ED}\u{1E5F0}-\u{1E5FA}\u{1E5FF}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1F100}-\u{1F10A}\u{1F110}-\u{1F12E}\u{1F130}-\u{1F169}\u{1F170}-\u{1F1AC}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2EBF0}-\u{2EE5D}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}][\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\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10D69}-\u{10D6D}\u{10EAB}\u{10EAC}\u{10EFC}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{113BB}-\u{113C0}\u{113CE}\u{113D0}\u{113D2}\u{113E1}\u{113E2}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11F5A}\u{13440}\u{13447}-\u{13455}\u{1611E}-\u{16129}\u{1612D}-\u{1612F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E5EE}\u{1E5EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]*$/u},Gr={STATUS_MAPPING:{mapped:1,valid:2,disallowed:3,deviation:6,ignored:7}},Mr=(Nr=Object.freeze({__proto__:null}))&&Nr.default||Nr;const{STATUS_MAPPING:zr}=Gr;function Jr(e){return/[^\x00-\x7F]/u.test(e)}function $r(e){let t=0,n=Mr.length-1;for(;t<=n;){const r=Math.floor((t+n)/2),o=Mr[r],i=Array.isArray(o[0])?o[0][0]:o[0],u=Array.isArray(o[0])?o[0][1]:o[0];if(i<=e&&u>=e)return o.slice(1);i>e?n=r-1:t=r+1}return null}function Wr(e,{checkHyphens:t,checkBidi:n,checkJoiners:r,transitionalProcessing:o,useSTD3ASCIIRules:i,isBidi:u}){if(0===e.length)return!0;if(e.normalize("NFC")!==e)return!1;const s=Array.from(e);if(t&&("-"===s[2]&&"-"===s[3]||e.startsWith("-")||e.endsWith("-")))return!1;if(!t&&e.startsWith("xn--"))return!1;if(e.includes("."))return!1;if(qr.combiningMarks.test(s[0]))return!1;for(const e of s){const t=e.codePointAt(0),[n]=$r(t);if(o){if(n!==zr.valid)return!1}else if(n!==zr.valid&&n!==zr.deviation)return!1;if(i&&t<=127&&!/^(?:[a-z]|[0-9]|-)$/u.test(e))return!1}if(r){let e=0;for(const[t,n]of s.entries())if("‌"===n||"‍"===n){if(t>0){if(qr.combiningClassVirama.test(s[t-1]))continue;if("‌"===n){const n=s.indexOf("‌",t+1),r=n<0?s.slice(e):s.slice(e,n);if(qr.validZWNJ.test(r.join(""))){e=t+1;continue}}}return!1}}if(n&&u){let t;if(qr.bidiS1LTR.test(s[0]))t=!1;else{if(!qr.bidiS1RTL.test(s[0]))return!1;t=!0}if(t){if(!qr.bidiS2.test(e)||!qr.bidiS3.test(e)||qr.bidiS4EN.test(e)&&qr.bidiS4AN.test(e))return!1}else if(!qr.bidiS5.test(e)||!qr.bidiS6.test(e))return!1}return!0}function Vr(e,t){let n=function(e,{transitionalProcessing:t}){let n="";for(const r of e){const[e,o]=$r(r.codePointAt(0));switch(e){case zr.disallowed:n+=r;break;case zr.ignored:break;case zr.mapped:n+=t&&"ẞ"===r?"ss":o;break;case zr.deviation:n+=t?o:r;break;case zr.valid:n+=r}}return n}(e,t);n=n.normalize("NFC");const r=n.split("."),o=function(e){const t=e.map(e=>{if(e.startsWith("xn--"))try{return Tr(e.substring(4))}catch{return""}return e}).join(".");return qr.bidiDomain.test(t)}(r);let i=!1;for(const[e,n]of r.entries()){let u=n,s=t.transitionalProcessing;if(u.startsWith("xn--")){if(Jr(u)){i=!0;continue}try{u=Tr(u.substring(4))}catch{if(!t.ignoreInvalidPunycode){i=!0;continue}}r[e]=u,""!==u&&Jr(u)||(i=!0),s=!1}if(i)continue;Wr(u,{...t,transitionalProcessing:s,isBidi:o})||(i=!0)}return{string:r.join("."),error:i}}var Hr={toASCII:function(e,{checkHyphens:t=!1,checkBidi:n=!1,checkJoiners:r=!1,useSTD3ASCIIRules:o=!1,verifyDNSLength:i=!1,transitionalProcessing:u=!1,ignoreInvalidPunycode:s=!1}={}){const a=Vr(e,{checkHyphens:t,checkBidi:n,checkJoiners:r,useSTD3ASCIIRules:o,transitionalProcessing:u,ignoreInvalidPunycode:s});let c=a.string.split(".");if(c=c.map(e=>{if(Jr(e))try{return`xn--${Lr(e)}`}catch{a.error=!0}return e}),i){const e=c.join(".").length;(e>253||0===e)&&(a.error=!0);for(let e=0;e<c.length;++e)if(c[e].length>63||0===c[e].length){a.error=!0;break}}return a.error?null:c.join(".")},toUnicode:function(e,{checkHyphens:t=!1,checkBidi:n=!1,checkJoiners:r=!1,useSTD3ASCIIRules:o=!1,transitionalProcessing:i=!1,ignoreInvalidPunycode:u=!1}={}){const s=Vr(e,{checkHyphens:t,checkBidi:n,checkJoiners:r,useSTD3ASCIIRules:o,transitionalProcessing:i,ignoreInvalidPunycode:u});return{domain:s.string,error:s.error}}};function Zr(e){return e>=48&&e<=57}function Yr(e){return e>=65&&e<=90||e>=97&&e<=122}var Kr={isASCIIDigit:Zr,isASCIIAlpha:Yr,isASCIIAlphanumeric:function(e){return Yr(e)||Zr(e)},isASCIIHex:function(e){return Zr(e)||e>=65&&e<=70||e>=97&&e<=102}};const Xr=new TextEncoder,Qr=new TextDecoder("utf-8",{ignoreBOM:!0});var eo={utf8Encode:function(e){return Xr.encode(e)},utf8DecodeWithoutBOM:function(e){return Qr.decode(e)}};const{isASCIIHex:to}=Kr,{utf8Encode:no}=eo;function ro(e){return e.codePointAt(0)}function oo(e){let t=e.toString(16).toUpperCase();return 1===t.length&&(t=`0${t}`),`%${t}`}function io(e){const t=new Uint8Array(e.byteLength);let n=0;for(let r=0;r<e.byteLength;++r){const o=e[r];if(37!==o)t[n++]=o;else if(37!==o||to(e[r+1])&&to(e[r+2])){const o=parseInt(String.fromCodePoint(e[r+1],e[r+2]),16);t[n++]=o,r+=2}else t[n++]=o}return t.slice(0,n)}function uo(e){return e<=31||e>126}const so=new Set([ro(" "),ro('"'),ro("<"),ro(">"),ro("`")]);const ao=new Set([ro(" "),ro('"'),ro("#"),ro("<"),ro(">")]);function co(e){return uo(e)||ao.has(e)}const lo=new Set([ro("?"),ro("`"),ro("{"),ro("}"),ro("^")]);function ho(e){return co(e)||lo.has(e)}const po=new Set([ro("/"),ro(":"),ro(";"),ro("="),ro("@"),ro("["),ro("\\"),ro("]"),ro("|")]);function fo(e){return ho(e)||po.has(e)}const mo=new Set([ro("$"),ro("%"),ro("&"),ro("+"),ro(",")]);const vo=new Set([ro("!"),ro("'"),ro("("),ro(")"),ro("~")]);function Eo(e,t){const n=no(e);let r="";for(const e of n)t(e)?r+=oo(e):r+=String.fromCharCode(e);return r}var Ao={isC0ControlPercentEncode:uo,isFragmentPercentEncode:function(e){return uo(e)||so.has(e)},isQueryPercentEncode:co,isSpecialQueryPercentEncode:function(e){return co(e)||e===ro("'")},isPathPercentEncode:ho,isUserinfoPercentEncode:fo,isURLEncodedPercentEncode:function(e){return function(e){return fo(e)||mo.has(e)}(e)||vo.has(e)},percentDecodeString:function(e){return io(no(e))},percentDecodeBytes:io,utf8PercentEncodeString:function(e,t,n=!1){let r="";for(const o of e)r+=n&&" "===o?"+":Eo(o,t);return r},utf8PercentEncodeCodePoint:function(e,t){return Eo(String.fromCodePoint(e),t)}},bo=Cr(function(e){const{utf8DecodeWithoutBOM:t}=eo,{percentDecodeString:n,utf8PercentEncodeCodePoint:r,utf8PercentEncodeString:o,isC0ControlPercentEncode:i,isFragmentPercentEncode:u,isQueryPercentEncode:s,isSpecialQueryPercentEncode:a,isPathPercentEncode:c,isUserinfoPercentEncode:d}=Ao;function l(e){return e.codePointAt(0)}const h={ftp:21,file:null,http:80,https:443,ws:80,wss:443},p=Symbol("failure");function f(e){return[...e].length}function m(e,t){const n=e[t];return isNaN(n)?void 0:String.fromCodePoint(n)}function v(e){return"."===e||"%2e"===e.toLowerCase()}function E(e){return 2===e.length&&Kr.isASCIIAlpha(e.codePointAt(0))&&(":"===e[1]||"|"===e[1])}function A(e){return-1!==e.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|<|>|\?|@|\[|\\|\]|\^|\|/u)}function b(e){return void 0!==h[e]}function y(e){return b(e.scheme)}function g(e){return!b(e.scheme)}function C(e){return h[e]}function w(e){if(""===e)return p;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;let n=/[^0-7]/u;return 10===t&&(n=/[^0-9]/u),16===t&&(n=/[^0-9A-Fa-f]/u),n.test(e)?p:parseInt(e,t)}function F(e,r=!1){if("["===e[0])return"]"!==e[e.length-1]?p:function(e){const t=[0,0,0,0,0,0,0,0];let n=0,r=null,o=0;if((e=Array.from(e,e=>e.codePointAt(0)))[o]===l(":")){if(e[o+1]!==l(":"))return p;o+=2,++n,r=n}for(;o<e.length;){if(8===n)return p;if(e[o]===l(":")){if(null!==r)return p;++o,++n,r=n;continue}let i=0,u=0;for(;u<4&&Kr.isASCIIHex(e[o]);)i=16*i+parseInt(m(e,o),16),++o,++u;if(e[o]===l(".")){if(0===u)return p;if(o-=u,n>6)return p;let r=0;for(;void 0!==e[o];){let i=null;if(r>0){if(!(e[o]===l(".")&&r<4))return p;++o}if(!Kr.isASCIIDigit(e[o]))return p;for(;Kr.isASCIIDigit(e[o]);){const t=parseInt(m(e,o));if(null===i)i=t;else{if(0===i)return p;i=10*i+t}if(i>255)return p;++o}t[n]=256*t[n]+i,++r,2!==r&&4!==r||++n}if(4!==r)return p;break}if(e[o]===l(":")){if(++o,void 0===e[o])return p}else if(void 0!==e[o])return p;t[n]=i,++n}if(null!==r){let e=n-r;for(n=7;0!==n&&e>0;){const o=t[r+e-1];t[r+e-1]=t[n],t[n]=o,--n,--e}}else if(null===r&&8!==n)return p;return t}(e.substring(1,e.length-1));if(r)return function(e){if(A(e))return p;return o(e,i)}(e);const u=function(e,t=!1){const n=Hr.toASCII(e,{checkHyphens:t,checkBidi:!0,checkJoiners:!0,useSTD3ASCIIRules:t,transitionalProcessing:!1,verifyDNSLength:t,ignoreInvalidPunycode:!1});if(null===n)return p;if(!t){if(""===n)return p;if(A(r=n)||-1!==r.search(/[\u0000-\u001F]|%|\u007F/u))return p}var r;return n}(t(n(e)));return u===p?p:function(e){const t=e.split(".");if(""===t[t.length-1]){if(1===t.length)return!1;t.pop()}const n=t[t.length-1];if(w(n)!==p)return!0;if(/^[0-9]+$/u.test(n))return!0;return!1}(u)?function(e){const t=e.split(".");if(""===t[t.length-1]&&t.length>1&&t.pop(),t.length>4)return p;const n=[];for(const e of t){const t=w(e);if(t===p)return p;n.push(t)}for(let e=0;e<n.length-1;++e)if(n[e]>255)return p;if(n[n.length-1]>=256**(5-n.length))return p;let r=n.pop(),o=0;for(const e of n)r+=e*256**(3-o),++o;return r}(u):u}function D(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?r:t}(e);let r=!1;for(let o=0;o<=7;++o)if(!r||0!==e[o]){if(r&&(r=!1),n===o){t+=0===o?"::":":",r=!0;continue}t+=e[o].toString(16),7!==o&&(t+=":")}return t}(e)}]`:e}function B(e){const{path:t}=e;var n;0!==t.length&&("file"===e.scheme&&1===t.length&&(n=t[0],/^[A-Za-z]:$/u.test(n))||t.pop())}function I(e){return""!==e.username||""!==e.password}function S(e){return"string"==typeof e.path}function R(e,t,n,r,o){if(this.pointer=0,this.input=e,this.base=t||null,this.encodingOverride=n||"utf-8",this.stateOverride=o,this.url=r,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null};const e=function(e){let t=0,n=e.length;for(;t<n&&!(e.charCodeAt(t)>32);++t);for(;n>t&&!(e.charCodeAt(n-1)>32);--n);return e.substring(t,n)}(this.input);e!==this.input&&(this.parseError=!0),this.input=e}const i=function(e){return e.replace(/\u0009|\u000A|\u000D/gu,"")}(this.input);for(i!==this.input&&(this.parseError=!0),this.input=i,this.state=o||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=Array.from(this.input,e=>e.codePointAt(0));this.pointer<=this.input.length;++this.pointer){const e=this.input[this.pointer],t=isNaN(e)?void 0:String.fromCodePoint(e),n=this[`parse ${this.state}`](e,t);if(!n)break;if(n===p){this.failure=!0;break}}}R.prototype["parse scheme start"]=function(e,t){if(Kr.isASCIIAlpha(e))this.buffer+=t.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,p;this.state="no scheme",--this.pointer}return!0},R.prototype["parse scheme"]=function(e,t){if(Kr.isASCIIAlphanumeric(e)||e===l("+")||e===l("-")||e===l("."))this.buffer+=t.toLowerCase();else if(e===l(":")){if(this.stateOverride){if(y(this.url)&&!b(this.buffer))return!1;if(!y(this.url)&&b(this.buffer))return!1;if((I(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&""===this.url.host)return!1}if(this.url.scheme=this.buffer,this.stateOverride)return this.url.port===C(this.url.scheme)&&(this.url.port=null),!1;this.buffer="","file"===this.url.scheme?(this.input[this.pointer+1]===l("/")&&this.input[this.pointer+2]===l("/")||(this.parseError=!0),this.state="file"):y(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":y(this.url)?this.state="special authority slashes":this.input[this.pointer+1]===l("/")?(this.state="path or authority",++this.pointer):(this.url.path="",this.state="opaque path")}else{if(this.stateOverride)return this.parseError=!0,p;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},R.prototype["parse no scheme"]=function(e){return null===this.base||S(this.base)&&e!==l("#")?p:(S(this.base)&&e===l("#")?(this.url.scheme=this.base.scheme,this.url.path=this.base.path,this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},R.prototype["parse special relative or authority"]=function(e){return e===l("/")&&this.input[this.pointer+1]===l("/")?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},R.prototype["parse path or authority"]=function(e){return e===l("/")?this.state="authority":(this.state="path",--this.pointer),!0},R.prototype["parse relative"]=function(e){return this.url.scheme=this.base.scheme,e===l("/")?this.state="relative slash":y(this.url)&&e===l("\\")?(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(),this.url.query=this.base.query,e===l("?")?(this.url.query="",this.state="query"):e===l("#")?(this.url.fragment="",this.state="fragment"):isNaN(e)||(this.url.query=null,this.url.path.pop(),this.state="path",--this.pointer)),!0},R.prototype["parse relative slash"]=function(e){return!y(this.url)||e!==l("/")&&e!==l("\\")?e===l("/")?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):(e===l("\\")&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},R.prototype["parse special authority slashes"]=function(e){return e===l("/")&&this.input[this.pointer+1]===l("/")?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},R.prototype["parse special authority ignore slashes"]=function(e){return e!==l("/")&&e!==l("\\")?(this.state="authority",--this.pointer):this.parseError=!0,!0},R.prototype["parse authority"]=function(e,t){if(e===l("@")){this.parseError=!0,this.atFlag&&(this.buffer=`%40${this.buffer}`),this.atFlag=!0;const e=f(this.buffer);for(let t=0;t<e;++t){const e=this.buffer.codePointAt(t);if(e===l(":")&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const n=r(e,d);this.passwordTokenSeenFlag?this.url.password+=n:this.url.username+=n}this.buffer=""}else if(isNaN(e)||e===l("/")||e===l("?")||e===l("#")||y(this.url)&&e===l("\\")){if(this.atFlag&&""===this.buffer)return this.parseError=!0,p;this.pointer-=f(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=t;return!0},R.prototype["parse hostname"]=R.prototype["parse host"]=function(e,t){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(e!==l(":")||this.arrFlag)if(isNaN(e)||e===l("/")||e===l("?")||e===l("#")||y(this.url)&&e===l("\\")){if(--this.pointer,y(this.url)&&""===this.buffer)return this.parseError=!0,p;if(this.stateOverride&&""===this.buffer&&(I(this.url)||null!==this.url.port))return this.parseError=!0,!1;const e=F(this.buffer,g(this.url));if(e===p)return p;if(this.url.host=e,this.buffer="",this.state="path start",this.stateOverride)return!1}else e===l("[")?this.arrFlag=!0:e===l("]")&&(this.arrFlag=!1),this.buffer+=t;else{if(""===this.buffer)return this.parseError=!0,p;if("hostname"===this.stateOverride)return!1;const e=F(this.buffer,g(this.url));if(e===p)return p;this.url.host=e,this.buffer="",this.state="port"}return!0},R.prototype["parse port"]=function(e,t){if(Kr.isASCIIDigit(e))this.buffer+=t;else{if(!(isNaN(e)||e===l("/")||e===l("?")||e===l("#")||y(this.url)&&e===l("\\")||this.stateOverride))return this.parseError=!0,p;if(""!==this.buffer){const e=parseInt(this.buffer);if(e>65535)return this.parseError=!0,p;this.url.port=e===C(this.url.scheme)?null:e,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}return!0};const j=new Set([l("/"),l("\\"),l("?"),l("#")]);function _(e,t){const n=e.length-t;return n>=2&&(r=e[t],o=e[t+1],Kr.isASCIIAlpha(r)&&(o===l(":")||o===l("|")))&&(2===n||j.has(e[t+2]));var r,o}function U(e){if(S(e))return e.path;let t="";for(const n of e.path)t+=`/${n}`;return t}R.prototype["parse file"]=function(e){return this.url.scheme="file",this.url.host="",e===l("/")||e===l("\\")?(e===l("\\")&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,e===l("?")?(this.url.query="",this.state="query"):e===l("#")?(this.url.fragment="",this.state="fragment"):isNaN(e)||(this.url.query=null,_(this.input,this.pointer)?(this.parseError=!0,this.url.path=[]):B(this.url),this.state="path",--this.pointer)):(this.state="path",--this.pointer),!0},R.prototype["parse file slash"]=function(e){var t;return e===l("/")||e===l("\\")?(e===l("\\")&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(!_(this.input,this.pointer)&&(2===(t=this.base.path[0]).length&&Kr.isASCIIAlpha(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},R.prototype["parse file host"]=function(e,t){if(isNaN(e)||e===l("/")||e===l("\\")||e===l("?")||e===l("#"))if(--this.pointer,!this.stateOverride&&E(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=F(this.buffer,g(this.url));if(e===p)return p;if("localhost"===e&&(e=""),this.url.host=e,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=t;return!0},R.prototype["parse path start"]=function(e){return y(this.url)?(e===l("\\")&&(this.parseError=!0),this.state="path",e!==l("/")&&e!==l("\\")&&--this.pointer):this.stateOverride||e!==l("?")?this.stateOverride||e!==l("#")?void 0!==e?(this.state="path",e!==l("/")&&--this.pointer):this.stateOverride&&null===this.url.host&&this.url.path.push(""):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},R.prototype["parse path"]=function(e){return isNaN(e)||e===l("/")||y(this.url)&&e===l("\\")||!this.stateOverride&&(e===l("?")||e===l("#"))?(y(this.url)&&e===l("\\")&&(this.parseError=!0),!function(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e}(this.buffer)?!v(this.buffer)||e===l("/")||y(this.url)&&e===l("\\")?v(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&E(this.buffer)&&(this.buffer=`${this.buffer[0]}:`),this.url.path.push(this.buffer)):this.url.path.push(""):(B(this.url),e===l("/")||y(this.url)&&e===l("\\")||this.url.path.push("")),this.buffer="",e===l("?")&&(this.url.query="",this.state="query"),e===l("#")&&(this.url.fragment="",this.state="fragment")):(e!==l("%")||Kr.isASCIIHex(this.input[this.pointer+1])&&Kr.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=r(e,c)),!0},R.prototype["parse opaque path"]=function(e){if(e===l("?"))this.url.query="",this.state="query";else if(e===l("#"))this.url.fragment="",this.state="fragment";else if(e===l(" ")){const e=this.input[this.pointer+1];e===l("?")||e===l("#")?this.url.path+="%20":this.url.path+=" "}else isNaN(e)||e===l("%")||(this.parseError=!0),e!==l("%")||Kr.isASCIIHex(this.input[this.pointer+1])&&Kr.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),isNaN(e)||(this.url.path+=r(e,i));return!0},R.prototype["parse query"]=function(e,t){if(y(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8"),!this.stateOverride&&e===l("#")||isNaN(e)){const t=y(this.url)?a:s;this.url.query+=o(this.buffer,t),this.buffer="",e===l("#")&&(this.url.fragment="",this.state="fragment")}else isNaN(e)||(e!==l("%")||Kr.isASCIIHex(this.input[this.pointer+1])&&Kr.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=t);return!0},R.prototype["parse fragment"]=function(e){return isNaN(e)||(e!==l("%")||Kr.isASCIIHex(this.input[this.pointer+1])&&Kr.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=r(e,u)),!0},e.exports.serializeURL=function(e,t){let n=`${e.scheme}:`;return null!==e.host&&(n+="//",""===e.username&&""===e.password||(n+=e.username,""!==e.password&&(n+=`:${e.password}`),n+="@"),n+=D(e.host),null!==e.port&&(n+=`:${e.port}`)),null===e.host&&!S(e)&&e.path.length>1&&""===e.path[0]&&(n+="/."),n+=U(e),null!==e.query&&(n+=`?${e.query}`),t||null===e.fragment||(n+=`#${e.fragment}`),n},e.exports.serializePath=U,e.exports.serializeURLOrigin=function(t){switch(t.scheme){case"blob":{const n=e.exports.parseURL(U(t));return null===n||"http"!==n.scheme&&"https"!==n.scheme?"null":e.exports.serializeURLOrigin(n)}case"ftp":case"http":case"https":case"ws":case"wss":return function(e){let t=`${e.scheme}://`;return t+=D(e.host),null!==e.port&&(t+=`:${e.port}`),t}({scheme:t.scheme,host:t.host,port:t.port});default:return"null"}},e.exports.basicURLParse=function(e,t){void 0===t&&(t={});const n=new R(e,t.baseURL,t.encodingOverride,t.url,t.stateOverride);return n.failure?null:n.url},e.exports.setTheUsername=function(e,t){e.username=o(t,d)},e.exports.setThePassword=function(e,t){e.password=o(t,d)},e.exports.serializeHost=D,e.exports.cannotHaveAUsernamePasswordPort=function(e){return null===e.host||""===e.host||"file"===e.scheme},e.exports.hasAnOpaquePath=S,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})}});bo.serializeURL,bo.serializePath,bo.serializeURLOrigin,bo.basicURLParse,bo.setTheUsername,bo.setThePassword,bo.serializeHost,bo.cannotHaveAUsernamePasswordPort,bo.hasAnOpaquePath,bo.serializeInteger,bo.parseURL;const{utf8Encode:yo,utf8DecodeWithoutBOM:go}=eo,{percentDecodeBytes:Co,utf8PercentEncodeString:wo,isURLEncodedPercentEncode:Fo}=Ao;function Do(e){return e.codePointAt(0)}function Bo(e,t,n){let r=e.indexOf(t);for(;r>=0;)e[r]=n,r=e.indexOf(t,r+1);return e}var Io={parseUrlencodedString:function(e){return function(e){const t=function(e,t){const n=[];let r=0,o=e.indexOf(t);for(;o>=0;)n.push(e.slice(r,o)),r=o+1,o=e.indexOf(t,r);return r!==e.length&&n.push(e.slice(r)),n}(e,Do("&")),n=[];for(const e of t){if(0===e.length)continue;let t,r;const o=e.indexOf(Do("="));o>=0?(t=e.slice(0,o),r=e.slice(o+1)):(t=e,r=new Uint8Array(0)),t=Bo(t,43,32),r=Bo(r,43,32);const i=go(Co(t)),u=go(Co(r));n.push([i,u])}return n}(yo(e))},serializeUrlencoded:function(e){let t="";for(const[n,r]of e.entries()){0!==n&&(t+="&"),t+=`${wo(r[0],Fo,!0)}=${wo(r[1],Fo,!0)}`}return t}},So=(e,t,{context:n="The provided value"}={})=>{if("function"!=typeof t)throw new e.TypeError(n+" is not a function");function r(...r){const o=Fr.tryWrapperForImpl(this);let i;for(let e=0;e<r.length;e++)r[e]=Fr.tryWrapperForImpl(r[e]);return i=Reflect.apply(t,o,r),i=wr.any(i,{context:n,globals:e}),i}return r.construct=(...r)=>{for(let e=0;e<r.length;e++)r[e]=Fr.tryWrapperForImpl(r[e]);let o=Reflect.construct(t,r);return o=wr.any(o,{context:n,globals:e}),o},r[Fr.wrapperSymbol]=t,r.objectReference=t,r},Ro=class{constructor(e,t,{doNotStripQMark:n=!1}){let r=t[0];if(this._list=[],this._url=null,n||"string"!=typeof r||"?"!==r[0]||(r=r.slice(1)),Array.isArray(r))for(const e of r){if(2!==e.length)throw new TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element does not contain exactly two elements.");this._list.push([e[0],e[1]])}else if("object"==typeof r&&null===Object.getPrototypeOf(r))for(const e of Object.keys(r)){const t=r[e];this._list.push([e,t])}else this._list=Io.parseUrlencodedString(r)}_updateSteps(){if(null!==this._url){let e=Io.serializeUrlencoded(this._list);""===e&&(e=null),this._url._url.query=e}}get size(){return this._list.length}append(e,t){this._list.push([e,t]),this._updateSteps()}delete(e,t){let n=0;for(;n<this._list.length;)this._list[n][0]!==e||void 0!==t&&this._list[n][1]!==t?n++:this._list.splice(n,1);this._updateSteps()}get(e){for(const t of this._list)if(t[0]===e)return t[1];return null}getAll(e){const t=[];for(const n of this._list)n[0]===e&&t.push(n[1]);return t}has(e,t){for(const n of this._list)if(n[0]===e&&(void 0===t||n[1]===t))return!0;return!1}set(e,t){let n=!1,r=0;for(;r<this._list.length;)this._list[r][0]===e?n?this._list.splice(r,1):(n=!0,this._list[r][1]=t,r++):r++;n||this._list.push([e,t]),this._updateSteps()}sort(){this._list.sort((e,t)=>e[0]<t[0]?-1:e[0]>t[0]?1:0),this._updateSteps()}[Symbol.iterator](){return this._list[Symbol.iterator]()}toString(){return Io.serializeUrlencoded(this._list)}},jo={implementation:Ro},_o=Cr(function(e,t){const n=Fr.newObjectInRealm,r=Fr.implSymbol,o=Fr.ctorRegistrySymbol,i="URLSearchParams";function u(e,t){let n;return void 0!==t&&(n=t.prototype),Fr.isObject(n)||(n=e[o].URLSearchParams.prototype),Object.create(n)}t.is=e=>Fr.isObject(e)&&Fr.hasOwn(e,r)&&e[r]instanceof jo.implementation,t.isImpl=e=>Fr.isObject(e)&&e instanceof jo.implementation,t.convert=(e,n,{context:r="The provided value"}={})=>{if(t.is(n))return Fr.implForWrapper(n);throw new e.TypeError(`${r} is not of type 'URLSearchParams'.`)},t.createDefaultIterator=(e,t,n)=>{const r=e[o]["URLSearchParams Iterator"],i=Object.create(r);return Object.defineProperty(i,Fr.iterInternalSymbol,{value:{target:t,kind:n,index:0},configurable:!0}),i},t.create=(e,n,r)=>{const o=u(e);return t.setup(o,e,n,r)},t.createImpl=(e,n,r)=>{const o=t.create(e,n,r);return Fr.implForWrapper(o)},t._internalSetup=(e,t)=>{},t.setup=(e,n,o=[],i={})=>(i.wrapper=e,t._internalSetup(e,n),Object.defineProperty(e,r,{value:new jo.implementation(n,o,i),configurable:!0}),e[r][Fr.wrapperSymbol]=e,jo.init&&jo.init(e[r]),e),t.new=(e,n)=>{const o=u(e,n);return t._internalSetup(o,e),Object.defineProperty(o,r,{value:Object.create(jo.implementation.prototype),configurable:!0}),o[r][Fr.wrapperSymbol]=o,jo.init&&jo.init(o[r]),o[r]};const s=new Set(["Window","Worker"]);t.install=(e,o)=>{if(!o.some(e=>s.has(e)))return;const u=Fr.initCtorRegistry(e);class a{constructor(){const n=[];{let t=arguments[0];if(void 0!==t)if(Fr.isObject(t))if(void 0!==t[Symbol.iterator]){if(!Fr.isObject(t))throw new e.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence is not an iterable object.");{const n=[],r=t;for(let t of r){if(!Fr.isObject(t))throw new e.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element is not an iterable object.");{const n=[],r=t;for(let t of r)t=wr.USVString(t,{context:"Failed to construct 'URLSearchParams': parameter 1 sequence's element's element",globals:e}),n.push(t);t=n}n.push(t)}t=n}}else{if(!Fr.isObject(t))throw new e.TypeError("Failed to construct 'URLSearchParams': parameter 1 record is not an object.");{const n=Object.create(null);for(const r of Reflect.ownKeys(t)){const o=Object.getOwnPropertyDescriptor(t,r);if(o&&o.enumerable){let o=r;o=wr.USVString(o,{context:"Failed to construct 'URLSearchParams': parameter 1 record's key",globals:e});let i=t[r];i=wr.USVString(i,{context:"Failed to construct 'URLSearchParams': parameter 1 record's value",globals:e}),n[o]=i}}t=n}}else t=wr.USVString(t,{context:"Failed to construct 'URLSearchParams': parameter 1",globals:e});else t="";n.push(t)}return t.setup(Object.create(new.target.prototype),e,n)}append(n,o){const i=null!=this?this:e;if(!t.is(i))throw new e.TypeError("'append' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new e.TypeError(`Failed to execute 'append' on 'URLSearchParams': 2 arguments required, but only ${arguments.length} present.`);const u=[];{let t=arguments[0];t=wr.USVString(t,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 1",globals:e}),u.push(t)}{let t=arguments[1];t=wr.USVString(t,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 2",globals:e}),u.push(t)}return Fr.tryWrapperForImpl(i[r].append(...u))}delete(n){const o=null!=this?this:e;if(!t.is(o))throw new e.TypeError("'delete' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new e.TypeError(`Failed to execute 'delete' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);const i=[];{let t=arguments[0];t=wr.USVString(t,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 1",globals:e}),i.push(t)}{let t=arguments[1];void 0!==t&&(t=wr.USVString(t,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 2",globals:e})),i.push(t)}return Fr.tryWrapperForImpl(o[r].delete(...i))}get(n){const o=null!=this?this:e;if(!t.is(o))throw new e.TypeError("'get' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new e.TypeError(`Failed to execute 'get' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);const i=[];{let t=arguments[0];t=wr.USVString(t,{context:"Failed to execute 'get' on 'URLSearchParams': parameter 1",globals:e}),i.push(t)}return o[r].get(...i)}getAll(n){const o=null!=this?this:e;if(!t.is(o))throw new e.TypeError("'getAll' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new e.TypeError(`Failed to execute 'getAll' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);const i=[];{let t=arguments[0];t=wr.USVString(t,{context:"Failed to execute 'getAll' on 'URLSearchParams': parameter 1",globals:e}),i.push(t)}return Fr.tryWrapperForImpl(o[r].getAll(...i))}has(n){const o=null!=this?this:e;if(!t.is(o))throw new e.TypeError("'has' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new e.TypeError(`Failed to execute 'has' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);const i=[];{let t=arguments[0];t=wr.USVString(t,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 1",globals:e}),i.push(t)}{let t=arguments[1];void 0!==t&&(t=wr.USVString(t,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 2",globals:e})),i.push(t)}return o[r].has(...i)}set(n,o){const i=null!=this?this:e;if(!t.is(i))throw new e.TypeError("'set' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new e.TypeError(`Failed to execute 'set' on 'URLSearchParams': 2 arguments required, but only ${arguments.length} present.`);const u=[];{let t=arguments[0];t=wr.USVString(t,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 1",globals:e}),u.push(t)}{let t=arguments[1];t=wr.USVString(t,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 2",globals:e}),u.push(t)}return Fr.tryWrapperForImpl(i[r].set(...u))}sort(){const n=null!=this?this:e;if(!t.is(n))throw new e.TypeError("'sort' called on an object that is not a valid instance of URLSearchParams.");return Fr.tryWrapperForImpl(n[r].sort())}toString(){const n=null!=this?this:e;if(!t.is(n))throw new e.TypeError("'toString' called on an object that is not a valid instance of URLSearchParams.");return n[r].toString()}keys(){if(!t.is(this))throw new e.TypeError("'keys' called on an object that is not a valid instance of URLSearchParams.");return t.createDefaultIterator(e,this,"key")}values(){if(!t.is(this))throw new e.TypeError("'values' called on an object that is not a valid instance of URLSearchParams.");return t.createDefaultIterator(e,this,"value")}entries(){if(!t.is(this))throw new e.TypeError("'entries' called on an object that is not a valid instance of URLSearchParams.");return t.createDefaultIterator(e,this,"key+value")}forEach(n){if(!t.is(this))throw new e.TypeError("'forEach' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new e.TypeError("Failed to execute 'forEach' on 'iterable': 1 argument required, but only 0 present.");n=So(e,n,{context:"Failed to execute 'forEach' on 'iterable': The callback provided as parameter 1"});const o=arguments[1];let i=Array.from(this[r]),u=0;for(;u<i.length;){const[e,t]=i[u].map(Fr.tryWrapperForImpl);n.call(o,t,e,this),i=Array.from(this[r]),u++}}get size(){const n=null!=this?this:e;if(!t.is(n))throw new e.TypeError("'get size' called on an object that is not a valid instance of URLSearchParams.");return n[r].size}}Object.defineProperties(a.prototype,{append:{enumerable:!0},delete:{enumerable:!0},get:{enumerable:!0},getAll:{enumerable:!0},has:{enumerable:!0},set:{enumerable:!0},sort:{enumerable:!0},toString:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0},forEach:{enumerable:!0},size:{enumerable:!0},[Symbol.toStringTag]:{value:"URLSearchParams",configurable:!0},[Symbol.iterator]:{value:a.prototype.entries,configurable:!0,writable:!0}}),u[i]=a,u["URLSearchParams Iterator"]=Object.create(u["%IteratorPrototype%"],{[Symbol.toStringTag]:{configurable:!0,value:"URLSearchParams Iterator"}}),Fr.define(u["URLSearchParams Iterator"],{next(){const t=this&&this[Fr.iterInternalSymbol];if(!t)throw new e.TypeError("next() called on a value that is not a URLSearchParams iterator object");const{target:o,kind:i,index:u}=t,s=Array.from(o[r]);if(u>=s.length)return n(e,{value:void 0,done:!0});const a=s[u];return t.index=u+1,n(e,Fr.iteratorResult(a.map(Fr.tryWrapperForImpl),i))}}),Object.defineProperty(e,i,{configurable:!0,writable:!0,value:a})}});_o.is,_o.isImpl,_o.convert,_o.createDefaultIterator,_o.create,_o.createImpl,_o._internalSetup,_o.setup,_o.install;var Uo={implementation:class e{constructor(e,[t,n]){let r=null;if(void 0!==n&&(r=bo.basicURLParse(n),null===r))throw new TypeError(`Invalid base URL: ${n}`);const o=bo.basicURLParse(t,{baseURL:r});if(null===o)throw new TypeError(`Invalid URL: ${t}`);const i=null!==o.query?o.query:"";this._url=o,this._query=_o.createImpl(e,[i],{doNotStripQMark:!0}),this._query._url=this}static parse(t,n,r){try{return new e(t,[n,r])}catch{return null}}static canParse(e,t){let n=null;if(void 0!==t&&(n=bo.basicURLParse(t),null===n))return!1;return null!==bo.basicURLParse(e,{baseURL:n})}get href(){return bo.serializeURL(this._url)}set href(e){const t=bo.basicURLParse(e);if(null===t)throw new TypeError(`Invalid URL: ${e}`);this._url=t,this._query._list.splice(0);const{query:n}=t;null!==n&&(this._query._list=Io.parseUrlencodedString(n))}get origin(){return bo.serializeURLOrigin(this._url)}get protocol(){return`${this._url.scheme}:`}set protocol(e){bo.basicURLParse(`${e}:`,{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(e){bo.cannotHaveAUsernamePasswordPort(this._url)||bo.setTheUsername(this._url,e)}get password(){return this._url.password}set password(e){bo.cannotHaveAUsernamePasswordPort(this._url)||bo.setThePassword(this._url,e)}get host(){const e=this._url;return null===e.host?"":null===e.port?bo.serializeHost(e.host):`${bo.serializeHost(e.host)}:${bo.serializeInteger(e.port)}`}set host(e){bo.hasAnOpaquePath(this._url)||bo.basicURLParse(e,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":bo.serializeHost(this._url.host)}set hostname(e){bo.hasAnOpaquePath(this._url)||bo.basicURLParse(e,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":bo.serializeInteger(this._url.port)}set port(e){bo.cannotHaveAUsernamePasswordPort(this._url)||(""===e?this._url.port=null:bo.basicURLParse(e,{url:this._url,stateOverride:"port"}))}get pathname(){return bo.serializePath(this._url)}set pathname(e){bo.hasAnOpaquePath(this._url)||(this._url.path=[],bo.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 t.query=null,void(this._query._list=[]);const n="?"===e[0]?e.substring(1):e;t.query="",bo.basicURLParse(n,{url:t,stateOverride:"query"}),this._query._list=Io.parseUrlencodedString(n)}get searchParams(){return this._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="",bo.basicURLParse(t,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}}},xo=Cr(function(e,t){const n=Fr.implSymbol,r=Fr.ctorRegistrySymbol;function o(e,t){let n;return void 0!==t&&(n=t.prototype),Fr.isObject(n)||(n=e[r].URL.prototype),Object.create(n)}t.is=e=>Fr.isObject(e)&&Fr.hasOwn(e,n)&&e[n]instanceof Uo.implementation,t.isImpl=e=>Fr.isObject(e)&&e instanceof Uo.implementation,t.convert=(e,n,{context:r="The provided value"}={})=>{if(t.is(n))return Fr.implForWrapper(n);throw new e.TypeError(`${r} is not of type 'URL'.`)},t.create=(e,n,r)=>{const i=o(e);return t.setup(i,e,n,r)},t.createImpl=(e,n,r)=>{const o=t.create(e,n,r);return Fr.implForWrapper(o)},t._internalSetup=(e,t)=>{},t.setup=(e,r,o=[],i={})=>(i.wrapper=e,t._internalSetup(e,r),Object.defineProperty(e,n,{value:new Uo.implementation(r,o,i),configurable:!0}),e[n][Fr.wrapperSymbol]=e,Uo.init&&Uo.init(e[n]),e),t.new=(e,r)=>{const i=o(e,r);return t._internalSetup(i,e),Object.defineProperty(i,n,{value:Object.create(Uo.implementation.prototype),configurable:!0}),i[n][Fr.wrapperSymbol]=i,Uo.init&&Uo.init(i[n]),i[n]};const i=new Set(["Window","Worker"]);t.install=(e,r)=>{if(!r.some(e=>i.has(e)))return;const o=Fr.initCtorRegistry(e);class u{constructor(n){if(arguments.length<1)throw new e.TypeError(`Failed to construct 'URL': 1 argument required, but only ${arguments.length} present.`);const r=[];{let t=arguments[0];t=wr.USVString(t,{context:"Failed to construct 'URL': parameter 1",globals:e}),r.push(t)}{let t=arguments[1];void 0!==t&&(t=wr.USVString(t,{context:"Failed to construct 'URL': parameter 2",globals:e})),r.push(t)}return t.setup(Object.create(new.target.prototype),e,r)}toJSON(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'toJSON' called on an object that is not a valid instance of URL.");return r[n].toJSON()}get href(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get href' called on an object that is not a valid instance of URL.");return r[n].href}set href(r){const o=null!=this?this:e;if(!t.is(o))throw new e.TypeError("'set href' called on an object that is not a valid instance of URL.");r=wr.USVString(r,{context:"Failed to set the 'href' property on 'URL': The provided value",globals:e}),o[n].href=r}toString(){if(!t.is(this))throw new e.TypeError("'toString' called on an object that is not a valid instance of URL.");return this[n].href}get origin(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get origin' called on an object that is not a valid instance of URL.");return r[n].origin}get protocol(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get protocol' called on an object that is not a valid instance of URL.");return r[n].protocol}set protocol(r){const o=null!=this?this:e;if(!t.is(o))throw new e.TypeError("'set protocol' called on an object that is not a valid instance of URL.");r=wr.USVString(r,{context:"Failed to set the 'protocol' property on 'URL': The provided value",globals:e}),o[n].protocol=r}get username(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get username' called on an object that is not a valid instance of URL.");return r[n].username}set username(r){const o=null!=this?this:e;if(!t.is(o))throw new e.TypeError("'set username' called on an object that is not a valid instance of URL.");r=wr.USVString(r,{context:"Failed to set the 'username' property on 'URL': The provided value",globals:e}),o[n].username=r}get password(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get password' called on an object that is not a valid instance of URL.");return r[n].password}set password(r){const o=null!=this?this:e;if(!t.is(o))throw new e.TypeError("'set password' called on an object that is not a valid instance of URL.");r=wr.USVString(r,{context:"Failed to set the 'password' property on 'URL': The provided value",globals:e}),o[n].password=r}get host(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get host' called on an object that is not a valid instance of URL.");return r[n].host}set host(r){const o=null!=this?this:e;if(!t.is(o))throw new e.TypeError("'set host' called on an object that is not a valid instance of URL.");r=wr.USVString(r,{context:"Failed to set the 'host' property on 'URL': The provided value",globals:e}),o[n].host=r}get hostname(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get hostname' called on an object that is not a valid instance of URL.");return r[n].hostname}set hostname(r){const o=null!=this?this:e;if(!t.is(o))throw new e.TypeError("'set hostname' called on an object that is not a valid instance of URL.");r=wr.USVString(r,{context:"Failed to set the 'hostname' property on 'URL': The provided value",globals:e}),o[n].hostname=r}get port(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get port' called on an object that is not a valid instance of URL.");return r[n].port}set port(r){const o=null!=this?this:e;if(!t.is(o))throw new e.TypeError("'set port' called on an object that is not a valid instance of URL.");r=wr.USVString(r,{context:"Failed to set the 'port' property on 'URL': The provided value",globals:e}),o[n].port=r}get pathname(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get pathname' called on an object that is not a valid instance of URL.");return r[n].pathname}set pathname(r){const o=null!=this?this:e;if(!t.is(o))throw new e.TypeError("'set pathname' called on an object that is not a valid instance of URL.");r=wr.USVString(r,{context:"Failed to set the 'pathname' property on 'URL': The provided value",globals:e}),o[n].pathname=r}get search(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get search' called on an object that is not a valid instance of URL.");return r[n].search}set search(r){const o=null!=this?this:e;if(!t.is(o))throw new e.TypeError("'set search' called on an object that is not a valid instance of URL.");r=wr.USVString(r,{context:"Failed to set the 'search' property on 'URL': The provided value",globals:e}),o[n].search=r}get searchParams(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get searchParams' called on an object that is not a valid instance of URL.");return Fr.getSameObject(this,"searchParams",()=>Fr.tryWrapperForImpl(r[n].searchParams))}get hash(){const r=null!=this?this:e;if(!t.is(r))throw new e.TypeError("'get hash' called on an object that is not a valid instance of URL.");return r[n].hash}set hash(r){const o=null!=this?this:e;if(!t.is(o))throw new e.TypeError("'set hash' called on an object that is not a valid instance of URL.");r=wr.USVString(r,{context:"Failed to set the 'hash' property on 'URL': The provided value",globals:e}),o[n].hash=r}static parse(t){if(arguments.length<1)throw new e.TypeError(`Failed to execute 'parse' on 'URL': 1 argument required, but only ${arguments.length} present.`);const n=[];{let t=arguments[0];t=wr.USVString(t,{context:"Failed to execute 'parse' on 'URL': parameter 1",globals:e}),n.push(t)}{let t=arguments[1];void 0!==t&&(t=wr.USVString(t,{context:"Failed to execute 'parse' on 'URL': parameter 2",globals:e})),n.push(t)}return Fr.tryWrapperForImpl(Uo.implementation.parse(e,...n))}static canParse(t){if(arguments.length<1)throw new e.TypeError(`Failed to execute 'canParse' on 'URL': 1 argument required, but only ${arguments.length} present.`);const n=[];{let t=arguments[0];t=wr.USVString(t,{context:"Failed to execute 'canParse' on 'URL': parameter 1",globals:e}),n.push(t)}{let t=arguments[1];void 0!==t&&(t=wr.USVString(t,{context:"Failed to execute 'canParse' on 'URL': parameter 2",globals:e})),n.push(t)}return Uo.implementation.canParse(...n)}}Object.defineProperties(u.prototype,{toJSON:{enumerable:!0},href:{enumerable:!0},toString:{enumerable:!0},origin:{enumerable:!0},protocol:{enumerable:!0},username:{enumerable:!0},password:{enumerable:!0},host:{enumerable:!0},hostname:{enumerable:!0},port:{enumerable:!0},pathname:{enumerable:!0},search:{enumerable:!0},searchParams:{enumerable:!0},hash:{enumerable:!0},[Symbol.toStringTag]:{value:"URL",configurable:!0}}),Object.defineProperties(u,{parse:{enumerable:!0},canParse:{enumerable:!0}}),o.URL=u,Object.defineProperty(e,"URL",{configurable:!0,writable:!0,value:u}),r.includes("Window")&&Object.defineProperty(e,"webkitURL",{configurable:!0,writable:!0,value:u})}});xo.is,xo.isImpl,xo.convert,xo.create,xo.createImpl,xo._internalSetup,xo.setup,xo.install;var Po={URL:xo,URLSearchParams:_o};const{URL:Oo,URLSearchParams:ko}=Po,To={Array:Array,Object:Object,Promise:Promise,String:String,TypeError:TypeError};Oo.install(To,["Window"]),ko.install(To,["Window"]);var Lo={URL:To.URL,URLSearchParams:To.URLSearchParams,parseURL:bo.parseURL,basicURLParse:bo.basicURLParse,serializeURL:bo.serializeURL,serializePath:bo.serializePath,serializeHost:bo.serializeHost,serializeInteger:bo.serializeInteger,serializeURLOrigin:bo.serializeURLOrigin,setTheUsername:bo.setTheUsername,setThePassword:bo.setThePassword,cannotHaveAUsernamePasswordPort:bo.cannotHaveAUsernamePasswordPort,hasAnOpaquePath:bo.hasAnOpaquePath,percentDecodeString:Ao.percentDecodeString,percentDecodeBytes:Ao.percentDecodeBytes};const No=B.default.Readable,qo=Symbol("buffer"),Go=Symbol("type");class Mo{constructor(){this[Go]="";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 Mo?o[qo]:Buffer.from("string"==typeof o?o:String(o)),r+=i.length,n.push(i)}}this[qo]=Buffer.concat(n);let o=t&&void 0!==t.type&&String(t.type).toLowerCase();o&&!/[^\u0020-\u007E]/.test(o)&&(this[Go]=o)}get size(){return this[qo].length}get type(){return this[Go]}text(){return Promise.resolve(this[qo].toString())}arrayBuffer(){const e=this[qo],t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return Promise.resolve(t)}stream(){const e=new No;return e._read=function(){},e.push(this[qo]),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),u=this[qo].slice(r,r+i),s=new Mo([],{type:arguments[2]});return s[qo]=u,s}}function zo(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 Jo;Object.defineProperties(Mo.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(Mo.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),zo.prototype=Object.create(Error.prototype),zo.prototype.constructor=zo,zo.prototype.name="FetchError";try{Jo=require("encoding").convert}catch(e){}const $o=Symbol("Body internals"),Wo=B.default.PassThrough;function Vo(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.size;let o=void 0===r?0:r;var i=n.timeout;let u=void 0===i?0:i;null==e?e=null:Zo(e)?e=Buffer.from(e.toString()):Yo(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 B.default||(e=Buffer.from(String(e)))),this[$o]={body:e,disturbed:!1,error:null},this.size=o,this.timeout=u,e instanceof B.default&&e.on("error",function(e){const n="AbortError"===e.name?e:new zo(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[$o].error=n})}function Ho(){var e=this;if(this[$o].disturbed)return Vo.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[$o].disturbed=!0,this[$o].error)return Vo.Promise.reject(this[$o].error);let t=this.body;if(null===t)return Vo.Promise.resolve(Buffer.alloc(0));if(Yo(t)&&(t=t.stream()),Buffer.isBuffer(t))return Vo.Promise.resolve(t);if(!(t instanceof B.default))return Vo.Promise.resolve(Buffer.alloc(0));let n=[],r=0,o=!1;return new Vo.Promise(function(i,u){let s;e.timeout&&(s=setTimeout(function(){o=!0,u(new zo(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))},e.timeout)),t.on("error",function(t){"AbortError"===t.name?(o=!0,u(t)):u(new zo(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))}),t.on("data",function(t){if(!o&&null!==t){if(e.size&&r+t.length>e.size)return o=!0,void u(new zo(`content size at ${e.url} over limit: ${e.size}`,"max-size"));r+=t.length,n.push(t)}}),t.on("end",function(){if(!o){clearTimeout(s);try{i(Buffer.concat(n,r))}catch(t){u(new zo(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}})})}function Zo(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 Yo(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 Ko(e){let t,n,r=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return r instanceof B.default&&"function"!=typeof r.getBoundary&&(t=new Wo,n=new Wo,r.pipe(t),r.pipe(n),e[$o].body=t,r=n),r}function Xo(e){return null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":Zo(e)?"application/x-www-form-urlencoded;charset=UTF-8":Yo(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 B.default?null:"text/plain;charset=UTF-8"}function Qo(e){const t=e.body;return null===t?0:Yo(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}Vo.prototype={get body(){return this[$o].body},get bodyUsed(){return this[$o].disturbed},arrayBuffer(){return Ho.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 Ho.call(this).then(function(t){return Object.assign(new Mo([],{type:e.toLowerCase()}),{[qo]:t})})},json(){var e=this;return Ho.call(this).then(function(t){try{return JSON.parse(t.toString())}catch(t){return Vo.Promise.reject(new zo(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}})},text(){return Ho.call(this).then(function(e){return e.toString()})},buffer(){return Ho.call(this)},textConverted(){var e=this;return Ho.call(this).then(function(t){return function(e,t){if("function"!=typeof Jo)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 Jo(e,"UTF-8",i).toString()}(t,e.headers)})}},Object.defineProperties(Vo.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),Vo.mixIn=function(e){for(const t of Object.getOwnPropertyNames(Vo.prototype))if(!(t in e)){const n=Object.getOwnPropertyDescriptor(Vo.prototype,t);Object.defineProperty(e,t,n)}},Vo.Promise=global.Promise;const ei=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,ti=/[^\t\x20-\x7e\x80-\xff]/;function ni(e){if(e=`${e}`,ei.test(e)||""===e)throw new TypeError(`${e} is not a legal HTTP header name`)}function ri(e){if(e=`${e}`,ti.test(e))throw new TypeError(`${e} is not a legal HTTP header value`)}function oi(e,t){t=t.toLowerCase();for(const n in e)if(n.toLowerCase()===t)return n}const ii=Symbol("map");class ui{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[ii]=Object.create(null),e instanceof ui){const t=e.raw(),n=Object.keys(t);for(const e of n)for(const n of t[e])this.append(e,n);return}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){ni(e=`${e}`);const t=oi(this[ii],e);return void 0===t?null:this[ii][t].join(", ")}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=si(this),r=0;for(;r<n.length;){var o=n[r];const i=o[0],u=o[1];e.call(t,u,i,this),n=si(this),r++}}set(e,t){t=`${t}`,ni(e=`${e}`),ri(t);const n=oi(this[ii],e);this[ii][void 0!==n?n:e]=[t]}append(e,t){t=`${t}`,ni(e=`${e}`),ri(t);const n=oi(this[ii],e);void 0!==n?this[ii][n].push(t):this[ii][e]=[t]}has(e){return ni(e=`${e}`),void 0!==oi(this[ii],e)}delete(e){ni(e=`${e}`);const t=oi(this[ii],e);void 0!==t&&delete this[ii][t]}raw(){return this[ii]}keys(){return ci(this,"key")}values(){return ci(this,"value")}[Symbol.iterator](){return ci(this,"key+value")}}function si(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(e[ii]).sort().map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[ii][t].join(", ")}:function(t){return[t.toLowerCase(),e[ii][t].join(", ")]})}ui.prototype.entries=ui.prototype[Symbol.iterator],Object.defineProperty(ui.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(ui.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 ai=Symbol("internal");function ci(e,t){const n=Object.create(di);return n[ai]={target:e,kind:t,index:0},n}const di=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==di)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[ai];const t=e.target,n=e.kind,r=e.index,o=si(t,n);return r>=o.length?{value:void 0,done:!0}:(this[ai].index=r+1,{value:o[r],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function li(e){const t=Object.assign({__proto__:null},e[ii]),n=oi(e[ii],"Host");return void 0!==n&&(t[n]=t[n][0]),t}Object.defineProperty(di,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const hi=Symbol("Response internals"),pi=S.default.STATUS_CODES;class fi{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Vo.call(this,e,t);const n=t.status||200,r=new ui(t.headers);if(null!=e&&!r.has("Content-Type")){const t=Xo(e);t&&r.append("Content-Type",t)}this[hi]={url:t.url,status:n,statusText:t.statusText||pi[n],headers:r,counter:t.counter}}get url(){return this[hi].url||""}get status(){return this[hi].status}get ok(){return this[hi].status>=200&&this[hi].status<300}get redirected(){return this[hi].counter>0}get statusText(){return this[hi].statusText}get headers(){return this[hi].headers}clone(){return new fi(Ko(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}Vo.mixIn(fi.prototype),Object.defineProperties(fi.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(fi.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const mi=Symbol("Request internals"),vi=R.default.URL||Lo.URL,Ei=R.default.parse,Ai=R.default.format;function bi(e){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(e)&&(e=new vi(e).toString()),Ei(e)}const yi="destroy"in B.default.Readable.prototype;function gi(e){return"object"==typeof e&&"object"==typeof e[mi]}class Ci{constructor(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};gi(e)?t=bi(e.url):(t=e&&e.href?bi(e.href):bi(`${e}`),e={});let r=n.method||e.method||"GET";if(r=r.toUpperCase(),(null!=n.body||gi(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:gi(e)&&null!==e.body?Ko(e):null;Vo.call(this,o,{timeout:n.timeout||e.timeout||0,size:n.size||e.size||0});const i=new ui(n.headers||e.headers||{});if(null!=o&&!i.has("Content-Type")){const e=Xo(o);e&&i.append("Content-Type",e)}let u=gi(e)?e.signal:null;if("signal"in n&&(u=n.signal),null!=u&&!function(e){const t=e&&"object"==typeof e&&Object.getPrototypeOf(e);return!(!t||"AbortSignal"!==t.constructor.name)}(u))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[mi]={method:r,redirect:n.redirect||e.redirect||"follow",headers:i,parsedURL:t,signal:u},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[mi].method}get url(){return Ai(this[mi].parsedURL)}get headers(){return this[mi].headers}get redirect(){return this[mi].redirect}get signal(){return this[mi].signal}clone(){return new Ci(this)}}function wi(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}Vo.mixIn(Ci.prototype),Object.defineProperty(Ci.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Ci.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),wi.prototype=Object.create(Error.prototype),wi.prototype.constructor=wi,wi.prototype.name="AbortError";const Fi=R.default.URL||Lo.URL,Di=B.default.PassThrough;function Bi(e,t){if(!Bi.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return Vo.Promise=Bi.Promise,new Bi.Promise(function(n,r){const o=new Ci(e,t),i=function(e){const t=e[mi].parsedURL,n=new ui(e[mi].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 B.default.Readable&&!yi)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let r=null;if(null==e.body&&/^(POST|PUT)$/i.test(e.method)&&(r="0"),null!=e.body){const t=Qo(e);"number"==typeof t&&(r=String(t))}r&&n.set("Content-Length",r),n.has("User-Agent")||n.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),e.compress&&!n.has("Accept-Encoding")&&n.set("Accept-Encoding","gzip,deflate");let o=e.agent;return"function"==typeof o&&(o=o(t)),n.has("Connection")||o||n.set("Connection","close"),Object.assign({},t,{method:e.method,headers:li(n),agent:o})}(o),u=("https:"===i.protocol?j.default:S.default).request,s=o.signal;let a=null;const c=function(){let e=new wi("The user aborted a request.");r(e),o.body&&o.body instanceof B.default.Readable&&o.body.destroy(e),a&&a.body&&a.body.emit("error",e)};if(s&&s.aborted)return void c();const d=function(){c(),p()},l=u(i);let h;function p(){l.abort(),s&&s.removeEventListener("abort",d),clearTimeout(h)}s&&s.addEventListener("abort",d),o.timeout&&l.once("socket",function(e){h=setTimeout(function(){r(new zo(`network timeout at: ${o.url}`,"request-timeout")),p()},o.timeout)}),l.on("error",function(e){r(new zo(`request to ${o.url} failed, reason: ${e.message}`,"system",e)),p()}),l.on("response",function(e){clearTimeout(h);const t=function(e){const t=new ui;for(const n of Object.keys(e))if(!ei.test(n))if(Array.isArray(e[n]))for(const r of e[n])ti.test(r)||(void 0===t[ii][n]?t[ii][n]=[r]:t[ii][n].push(r));else ti.test(e[n])||(t[ii][n]=[e[n]]);return t}(e.headers);if(Bi.isRedirect(e.statusCode)){const i=t.get("Location");let u=null;try{u=null===i?null:new Fi(i,o.url).toString()}catch(e){if("manual"!==o.redirect)return r(new zo(`uri requested responds with an invalid redirect URL: ${i}`,"invalid-redirect")),void p()}switch(o.redirect){case"error":return r(new zo(`uri requested responds with a redirect, redirect mode is set to error: ${o.url}`,"no-redirect")),void p();case"manual":if(null!==u)try{t.set("Location",u)}catch(e){r(e)}break;case"follow":if(null===u)break;if(o.counter>=o.follow)return r(new zo(`maximum redirect reached at: ${o.url}`,"max-redirect")),void p();const i={headers:new ui(o.headers),follow:o.follow,counter:o.counter+1,agent:o.agent,compress:o.compress,method:o.method,body:o.body,signal:o.signal,timeout:o.timeout,size:o.size};if(!function(e,t){const n=new Fi(t).hostname,r=new Fi(e).hostname;return n===r||"."===n[n.length-r.length-1]&&n.endsWith(r)}(o.url,u))for(const e of["authorization","www-authenticate","cookie","cookie2"])i.headers.delete(e);return 303!==e.statusCode&&o.body&&null===Qo(o)?(r(new zo("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void p()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==o.method)||(i.method="GET",i.body=void 0,i.headers.delete("content-length")),n(Bi(new Ci(u,i))),void p())}}e.once("end",function(){s&&s.removeEventListener("abort",d)});let i=e.pipe(new Di);const u={url:o.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:o.size,timeout:o.timeout,counter:o.counter},c=t.get("Content-Encoding");if(!o.compress||"HEAD"===o.method||null===c||204===e.statusCode||304===e.statusCode)return a=new fi(i,u),void n(a);const l={flush:_.default.Z_SYNC_FLUSH,finishFlush:_.default.Z_SYNC_FLUSH};if("gzip"==c||"x-gzip"==c)return i=i.pipe(_.default.createGunzip(l)),a=new fi(i,u),void n(a);if("deflate"==c||"x-deflate"==c){return void e.pipe(new Di).once("data",function(e){i=8==(15&e[0])?i.pipe(_.default.createInflate()):i.pipe(_.default.createInflateRaw()),a=new fi(i,u),n(a)})}if("br"==c&&"function"==typeof _.default.createBrotliDecompress)return i=i.pipe(_.default.createBrotliDecompress()),a=new fi(i,u),void n(a);a=new fi(i,u),n(a)}),function(e,t){const n=t.body;null===n?e.end():Yo(n)?n.stream().pipe(e):Buffer.isBuffer(n)?(e.write(n),e.end()):n.pipe(e)}(l,o)})}Bi.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},Bi.Promise=global.Promise;var Ii="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,Si=Ii?Bi:window.fetch;var Ri=function(e){return Array.isArray(e)?e:[e]},ji=function(e,t){return Y(void 0,void 0,void 0,function(){var n;return K(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)]})})},_i=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 H(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}(B.default.Writable),Ui=function(){function e(e,t){this.contextProvider=e,this.agent=t}return e.prototype.getServiceDetails=function(e,t){return Y(this,void 0,void 0,function(){return K(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 Y(this,void 0,void 0,function(){return K(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 Y(this,void 0,void 0,function(){var n,r,o,i,u,s=this;return K(this,function(a){switch(a.label){case 0:return n="Error while trying to connect, please try again.",r=br({},{headers:{Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken()),"Content-Type":"application/json"}},Z(Z({},t),{agent:this.agent})),[4,nc(2)(function(){return Y(s,void 0,void 0,function(){return K(this,function(t){return[2,Si(e,r)]})})}).catch(function(){throw new Error(n)})];case 1:return(o=a.sent()).ok?[3,3]:[4,o.text()];case 2:i=a.sent(),u=n;try{u=JSON.parse(i)}catch(e){u=null!=i?i:n}finally{throw new Error(JSON.stringify(u))}case 3:return[4,o.json()];case 4:return[2,a.sent()]}})})},e}(),xi=function(e,t,n){return Y(void 0,void 0,void 0,function(){var r,o,i,u,s;return K(this,function(a){switch(a.label){case 0:if(r=ki(t||"127.0.0.1"),(o=ki(n||"127.255.255.255"))<r)throw new Error("Invalid IP range");"darwin"===x.default.platform()&&(i=function(e){return Y(void 0,void 0,void 0,function(){var t;return K(this,function(n){switch(n.label){case 0:return t="lo0 alias ".concat(e," up"),[4,Oi.apply(void 0,t.split(" "))];case 1:return n.sent(),[2]}})})}),u=r,a.label=1;case 1:return u<=o?(s=Ti(u),[4,Pi(e,s)]):[3,6];case 2:return a.sent()?i?[4,i(s)]:[3,4]:[3,5];case 3:a.sent(),a.label=4;case 4:return[2,s];case 5:return u+=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."))}})})},Pi=function(e,t){return new Promise(function(n){var r=new a.Socket,o=!1;r.on("connect",function(){o=!0,r.destroy()}),r.setTimeout(400),r.on("timeout",function(){o=!1,r.destroy()}),r.on("error",function(){o=!1}),r.on("close",function(){n(!o)}),t?r.connect(e,t):r.connect(e)})},Oi=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Y(void 0,void 0,void 0,function(){return K(this,function(t){switch(t.label){case 0:return[4,Li("/sbin/ifconfig",e).resultPromise];case 1:return[2,t.sent()]}})})},ki=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},Ti=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(".")},Li=function(e,n,r){var o=t.spawn(e,n,Z({windowsHide:!0},r)),i=new Promise(function(t,i){var u="",s="";(null===(null==r?void 0:r.stdio)||void 0===(null==r?void 0:r.stdio))&&(o.stdout&&o.stdout.on("data",function(e){u+=e}),o.stderr&&o.stderr.on("data",function(e){s+=e})),o.on("close",function(r){var o={code:r,stdout:u,stderr:s};if(0!==r){var a="Error during execution of command '".concat(e," ").concat(n.join(" "),"': ").concat(s);i({message:a,result:o})}else t(o)})});return{process:o,resultPromise:i}},Ni=function(e,t,n){return Y(void 0,void 0,void 0,function(){var r,o;return K(this,function(i){switch(i.label){case 0:return r=qi(e,10),[4,k.default.promises.writeFile(r,t,n)];case 1:i.sent(),i.label=2;case 2:return i.trys.push([2,4,,6]),[4,k.default.promises.rename(r,e)];case 3:return i.sent(),[3,6];case 4:return o=i.sent(),[4,k.default.promises.unlink(r).catch(function(){})];case 5:throw i.sent(),o;case 6:return[2]}})})},qi=function(e,t){for(var n,r=function(e){return X([],Array(e),!0).map(function(){return Math.floor(16*Math.random()).toString(16)}).join("")},o=T.default.dirname(e),i=T.default.basename(e),u=0;null===(n=u<t)||void 0===n||n;u+=1){var s=r(16),a=".".concat(s,".").concat(i),c=T.default.join(o,a);if(!k.default.existsSync(c))return c}throw new Error("Could not write file to file '".concat(e,"'."))},Gi="win32"===process.platform?"\r\n":"\n",Mi=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;Zi(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 pr(this.findEntries(e),function(e){return e.hosts.map(function(e){return e.host})})},e.prototype.resolveIps=function(e){return Zi(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 Wi(this.nodes,this.config.eol)},e.prototype.removeEntry=function(e){var t,n="number"==typeof(t=e)||de(t)&&"[object Number]"==ce(t)?e:this.nodes.findIndex(function(t){return t===e});n<0||this.nodes.splice(n,1)},e.prototype.findEntries=function(e){return Zi(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=$i(t),i=this.nodes.findIndex(function(e){return"comment"===e.type&&e.line===o});if(i>=0)this.insertAt(i+1,r);else{var u="blank"!==this.nodes[this.nodes.length-1].type?[zi(),Ji(o),r]:[Ji(o),r];this.insertAt.apply(this,X([this.nodes.length],u,!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,X([e,0],n,!1))},e.prototype.makeEntry=function(e,t){var n=this.config.ipPrefixWhitespace;return Z({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=Zi(t,"eol").map(function(e){return e.line});return null!==(e=Yi(n))&&void 0!==e?e:Gi}(),indent:null!==(o=null==n?void 0:n.indent)&&void 0!==o?o:function(){var e,n=pr(Zi(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=Yi(n))&&void 0!==e?e:17}(),ipPrefixWhitespace:""})},e.parse=function(e,t){return this.fromNodes(Vi(e),t)},e}(),zi=function(){return{type:"blank",line:""}},Ji=function(e){return{type:"comment",line:$i(e)}},$i=function(e){return e.startsWith("#")?e:"# ".concat(e)},Wi=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:Gi)},Vi=function(e){return e.split(/(\r?\n)/).map(function(e){return function(e){return e.match(/^\s*#.*$/)}(e)?{type:"comment",line:e}:function(e){return e.match(/^(\r?\n)$/)}(e)?{type:"eol",line:e}:function(e){return e.match(/^\s*$/)}(e)?{type:"blank",line:e}:Hi(e)})},Hi=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,u=pr(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:u}},Zi=function(e,t){return e.filter(function(e){return e.type===t})},Yi=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=Er(Array.from(t.entries()),function(e){return e[1]});if(n)return n[0]},Ki="win32"===process.platform?"C:/Windows/System32/drivers/etc/hosts":"/etc/hosts",Xi=function(){function e(e){this.ast=Mi.fromNodes([]);var t={writeMode:"atomic",hostsFile:Ki};this.config=Z(Z({},t),e)}return e.prototype.add=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!vr(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach(function(e){if(!vr(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(!vr(e))throw new Error("Expected 'ip' to be a string, but got ".concat(typeof e,"."));return t.forEach(function(e){if(!vr(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(!vr(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(!vr(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 Y(this,void 0,void 0,function(){var e;return K(this,function(t){switch(t.label){case 0:return[4,k.default.promises.readFile(this.config.hostsFile)];case 1:return e=t.sent(),this.ast=Mi.parse(e.toString(),this.config),[2,this]}})})},e.prototype.write=function(e){return Y(this,void 0,void 0,function(){var t,n,r,o;return K(this,function(i){switch(i.label){case 0:switch(t=Z(Z({},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,Ni(n,o)];case 2:case 4:return i.sent(),[3,6];case 3:return[4,k.default.promises.writeFile(n,o)];case 5:return[3,6];case 6:return[2,this]}})})},e.prototype.backup=function(e){return Y(this,void 0,void 0,function(){var t,n,r,o;return K(this,function(i){switch(i.label){case 0:return k.default.existsSync(this.config.hostsFile)?(t=T.default.dirname(this.config.hostsFile),n=T.default.basename(this.config.hostsFile),r="".concat(n).concat(e.suffix),o=T.default.resolve(t,r),k.default.existsSync(o)&&!e.rewrite?[3,2]:[4,k.default.promises.copyFile(this.config.hostsFile,o)]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}})})},e.load=function(t){return Y(this,void 0,void 0,function(){return K(this,function(n){switch(n.label){case 0:return[4,new e(t).read()];case 1:return[2,n.sent()]}})})},e}(),Qi=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 Y(this,void 0,void 0,function(){var t,n=this;return K(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}(),eu=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 tu=eu(ru),nu=eu(ou);function ru(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function ou(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}ru.proto=ru(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return ru(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return ou(this)},configurable:!0})}),tu.strict=nu;var iu,uu=function(){},su=yr.Bare?queueMicrotask:process.nextTick.bind(process),au=function(e,t,n){if("function"==typeof t)return au(e,null,t);t||(t={}),n=tu(n||uu);var r=e._writableState,o=e._readableState,i=t.readable||!1!==t.readable&&e.readable,u=t.writable||!1!==t.writable&&e.writable,s=!1,a=function(){e.writable||c()},c=function(){u=!1,i||n.call(e)},d=function(){i=!1,u||n.call(e)},l=function(t){n.call(e,t?new Error("exited with error code: "+t):null)},h=function(t){n.call(e,t)},p=function(){su(f)},f=function(){if(!s)return(!i||o&&o.ended&&!o.destroyed)&&(!u||r&&r.ended&&!r.destroyed)?void 0:n.call(e,new Error("premature close"))},m=function(){e.req.on("finish",c)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?u&&!r&&(e.on("end",a),e.on("close",a)):(e.on("complete",c),e.on("abort",p),e.req?m():e.on("request",m)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",l),e.on("end",d),e.on("finish",c),!1!==t.error&&e.on("error",h),e.on("close",p),function(){s=!0,e.removeListener("complete",c),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",c),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",c),e.removeListener("exit",l),e.removeListener("end",d),e.removeListener("error",h),e.removeListener("close",p)}},cu=au;try{iu=k.default}catch(e){}var du=function(){},lu="undefined"!=typeof process&&/^v?\.0/.test(process.version),hu=function(e){return"function"==typeof e},pu=function(e,t,n,r){r=tu(r);var o=!1;e.on("close",function(){o=!0}),cu(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!!lu&&!!iu&&(e instanceof(iu.ReadStream||du)||e instanceof(iu.WriteStream||du))&&hu(e.close)}(e)?e.close(du):function(e){return e.setHeader&&hu(e.abort)}(e)?e.abort():hu(e.destroy)?e.destroy():void r(t||new Error("stream was destroyed"))}},fu=function(e){e()},mu=function(e,t){return e.pipe(t)},vu=function(){var e,t=Array.prototype.slice.call(arguments),n=hu(t[t.length-1]||du)&&t.pop()||du;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 u=i<t.length-1;return pu(o,u,i>0,function(t){e||(e=t),t&&r.forEach(fu),u||(r.forEach(fu),n(e))})});return t.reduce(mu)};const Eu=["nodebuffer","arraybuffer","fragments"],Au="undefined"!=typeof Blob;Au&&Eu.push("blob");var bu={BINARY_TYPES:Eu,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Au,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}},yu="function"==typeof __webpack_require__?__non_webpack_require__:gr,gu=process.config&&process.config.variables||{},Cu=!!process.env.PREBUILDS_ONLY,wu=process.versions.modules,Fu=!(!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",Du=process.env.npm_config_arch||x.default.arch(),Bu=process.env.npm_config_platform||x.default.platform(),Iu=process.env.LIBC||(function(e){return"linux"===e&&k.default.existsSync("/etc/alpine-release")}(Bu)?"musl":"glibc"),Su=process.env.ARM_VERSION||("arm64"===Du?"8":gu.arm_version)||"",Ru=(process.versions.uv||"").split(".")[0],ju=_u;function _u(e){return yu(_u.resolve(e))}function Uu(e){try{return k.default.readdirSync(e)}catch(e){return[]}}function xu(e,t){var n=Uu(e).filter(t);return n[0]&&T.default.join(e,n[0])}function Pu(e){return/\.node$/.test(e)}function Ou(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 ku(e,t){return function(n){return null!=n&&(n.platform===e&&n.architectures.includes(t))}}function Tu(e,t){return e.architectures.length-t.architectures.length}function Lu(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 Nu(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===Ru)&&((!n.armv||n.armv===Su)&&(!n.libc||n.libc===Iu)))))}}function qu(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}}_u.resolve=_u.path=function(e){e=T.default.resolve(e||".");try{var t=yu(T.default.join(e,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[t+"_PREBUILD"]&&(e=process.env[t+"_PREBUILD"])}catch(e){}if(!Cu){var n=xu(T.default.join(e,"build/Release"),Pu);if(n)return n;var r=xu(T.default.join(e,"build/Debug"),Pu);if(r)return r}var o=s(e);if(o)return o;var i=s(T.default.dirname(process.execPath));if(i)return i;var u=["platform="+Bu,"arch="+Du,"runtime="+Fu,"abi="+wu,"uv="+Ru,Su?"armv="+Su:"","libc="+Iu,"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 "+u+"\n loaded from: "+e+"\n");function s(e){var t=Uu(T.default.join(e,"prebuilds")).map(Ou).filter(ku(Bu,Du)).sort(Tu)[0];if(t){var n=T.default.join(e,"prebuilds",t.name),r=Uu(n).map(Lu).filter(Nu(Fu,wu)).sort(qu(Fu))[0];return r?T.default.join(n,r.file):void 0}}},_u.parseTags=Lu,_u.matchTags=Nu,_u.compareTags=qu,_u.parseTuple=Ou,_u.matchTuple=ku,_u.compareTuples=Tu;var Gu=Cr(function(e){const t="function"==typeof __webpack_require__?__non_webpack_require__:gr;"function"==typeof t.addon?e.exports=t.addon.bind(t):e.exports=ju});var Mu={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]}},zu=Cr(function(e){try{e.exports=Gu(__dirname)}catch(t){e.exports=Mu}}),Ju=Cr(function(e){const{EMPTY_BUFFER:t}=bu,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=zu;e.exports.mask=function(e,n,o,i,u){u<48?r(e,n,o,i,u):t.mask(e,n,o,i,u)},e.exports.unmask=function(e,n){e.length<32?o(e,n):t.unmask(e,n)}}catch(e){}});Ju.concat,Ju.mask,Ju.toArrayBuffer,Ju.toBuffer,Ju.unmask;const $u=Symbol("kDone"),Wu=Symbol("kRun");var Vu=class{constructor(e){this[$u]=()=>{this.pending--,this[Wu]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Wu]()}[Wu](){if(this.pending!==this.concurrency&&this.jobs.length){const e=this.jobs.shift();this.pending++,e(this[$u])}}};const{kStatusCode:Hu}=bu,Zu=Buffer[Symbol.species],Yu=Buffer.from([0,0,255,255]),Ku=Symbol("permessage-deflate"),Xu=Symbol("total-length"),Qu=Symbol("callback"),es=Symbol("buffers"),ts=Symbol("error");let ns;var rs=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,!ns){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;ns=new Vu(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[Qu];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){ns.add(r=>{this._decompress(e,t,(e,t)=>{r(),n(e,t)})})}compress(e,t,n){ns.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]?_.default.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=_.default.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[Ku]=this,this._inflate[Xu]=0,this._inflate[es]=[],this._inflate.on("error",us),this._inflate.on("data",is)}this._inflate[Qu]=n,this._inflate.write(e),t&&this._inflate.write(Yu),this._inflate.flush(()=>{const e=this._inflate[ts];if(e)return this._inflate.close(),this._inflate=null,void n(e);const o=Ju.concat(this._inflate[es],this._inflate[Xu]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Xu]=0,this._inflate[es]=[],t&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),n(null,o)})}_compress(e,t,n){const r=this._isServer?"server":"client";if(!this._deflate){const e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?_.default.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=_.default.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[Xu]=0,this._deflate[es]=[],this._deflate.on("data",os)}this._deflate[Qu]=n,this._deflate.write(e),this._deflate.flush(_.default.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=Ju.concat(this._deflate[es],this._deflate[Xu]);t&&(e=new Zu(e.buffer,e.byteOffset,e.length-4)),this._deflate[Qu]=null,this._deflate[Xu]=0,this._deflate[es]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),n(null,e)})}};function os(e){this[es].push(e),this[Xu]+=e.length}function is(e){this[Xu]+=e.length,this[Ku]._maxPayload<1||this[Xu]<=this[Ku]._maxPayload?this[es].push(e):(this[ts]=new RangeError("Max payload size exceeded"),this[ts].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[ts][Hu]=1009,this.removeListener("data",is),this.reset())}function us(e){this[Ku]._inflate=null,this[ts]?this[Qu](this[ts]):(e[Hu]=1007,this[Qu](e))}var ss=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},as=Cr(function(e){try{e.exports=Gu(__dirname)}catch(t){e.exports=ss}}),cs=Cr(function(e){const{isUtf8:t}=q.default,{hasBlob:n}=bu;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=as;e.exports.isValidUTF8=function(e){return e.length<32?r(e):t(e)}}catch(e){}});cs.isBlob,cs.isValidStatusCode,cs.isValidUTF8,cs.tokenChars;const{Writable:ds}=B.default,{BINARY_TYPES:ls,EMPTY_BUFFER:hs,kStatusCode:ps,kWebSocket:fs}=bu,{concat:ms,toArrayBuffer:vs,unmask:Es}=Ju,{isValidStatusCode:As,isValidUTF8:bs}=cs,ys=Buffer[Symbol.species];var gs=class extends ds{constructor(e={}){super(),this._allowSynchronousEvents=void 0===e.allowSynchronousEvents||e.allowSynchronousEvents,this._binaryType=e.binaryType||ls[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[fs]=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 ys(t.buffer,t.byteOffset+e,t.length-e),new ys(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 ys(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[rs.extensionName]){return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"))}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)}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){return void e(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH"))}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)){return void e(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"))}this._masked?this._state=3:this._state=4}getMask(){this._bufferedBytes<4?this._loop=!1:(this._mask=this.consume(4),this._state=4)}getData(e){let t=hs;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength)return void(this._loop=!1);t=this.consume(this._payloadLength),this._masked&&0!==(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])&&Es(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[rs.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?ms(n,t):"arraybuffer"===this._binaryType?vs(ms(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=ms(n,t);if(!this._skipUTF8Validation&&!bs(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,hs),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 ys(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!bs(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[ps]=r,i}};const{randomFillSync:Cs}=N.default,{EMPTY_BUFFER:ws,kWebSocket:Fs,NOOP:Ds}=bu,{isBlob:Bs,isValidStatusCode:Is}=cs,{mask:Ss,toBuffer:Rs}=Ju,js=Symbol("kByteLength"),_s=Buffer.alloc(4),Us=8192;let xs,Ps=Us;class Os{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=Ds,this[Fs]=void 0}static frame(e,t){let n,r,o=!1,i=2,u=!1;t.mask&&(n=t.maskBuffer||_s,t.generateMask?t.generateMask(n):(Ps===Us&&(void 0===xs&&(xs=Buffer.alloc(Us)),Cs(xs,0,Us),Ps=0),n[0]=xs[Ps++],n[1]=xs[Ps++],n[2]=xs[Ps++],n[3]=xs[Ps++]),u=0===(n[0]|n[1]|n[2]|n[3]),i=6),"string"==typeof e?r=t.mask&&!u||void 0===t[js]?(e=Buffer.from(e)).length:t[js]:(r=e.length,o=t.mask&&t.readOnly&&!u);let s=r;r>=65536?(i+=8,s=127):r>125&&(i+=2,s=126);const a=Buffer.allocUnsafe(o?r+i:i);return a[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(a[0]|=64),a[1]=s,126===s?a.writeUInt16BE(r,2):127===s&&(a[2]=a[3]=0,a.writeUIntBE(r,4,6)),t.mask?(a[1]|=128,a[i-4]=n[0],a[i-3]=n[1],a[i-2]=n[2],a[i-1]=n[3],u?[a,e]:o?(Ss(e,n,a,i,r),[a]):(Ss(e,n,e,0,r),[a,e])):[a,e]}close(e,t,n,r){let o;if(void 0===e)o=ws;else{if("number"!=typeof e||!Is(e))throw new TypeError("First argument must be a valid error code number");if(void 0!==t&&t.length){const n=Buffer.byteLength(t);if(n>123)throw new RangeError("The message must not be greater than 123 bytes");o=Buffer.allocUnsafe(2+n),o.writeUInt16BE(e,0),"string"==typeof t?o.write(t,2):o.set(t,2)}else o=Buffer.allocUnsafe(2),o.writeUInt16BE(e,0)}const i={[js]:o.length,fin:!0,generateMask:this._generateMask,mask:n,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};0!==this._state?this.enqueue([this.dispatch,o,!1,i,r]):this.sendFrame(Os.frame(o,i),r)}ping(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):Bs(e)?(r=e.size,o=!1):(r=(e=Rs(e)).length,o=Rs.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[js]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};Bs(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(Os.frame(e,i),n)}pong(e,t,n){let r,o;if("string"==typeof e?(r=Buffer.byteLength(e),o=!1):Bs(e)?(r=e.size,o=!1):(r=(e=Rs(e)).length,o=Rs.readOnly),r>125)throw new RangeError("The data size must not be greater than 125 bytes");const i={[js]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};Bs(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(Os.frame(e,i),n)}send(e,t,n){const r=this._extensions[rs.extensionName];let o,i,u=t.binary?2:1,s=t.compress;"string"==typeof e?(o=Buffer.byteLength(e),i=!1):Bs(e)?(o=e.size,i=!1):(o=(e=Rs(e)).length,i=Rs.readOnly),this._firstFragment?(this._firstFragment=!1,s&&r&&r.params[r._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(s=o>=r._threshold),this._compress=s):(s=!1,u=0),t.fin&&(this._firstFragment=!0);const a={[js]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:u,readOnly:i,rsv1:s};Bs(e)?0!==this._state?this.enqueue([this.getBlobData,e,this._compress,a,n]):this.getBlobData(e,this._compress,a,n):0!==this._state?this.enqueue([this.dispatch,e,this._compress,a,n]):this.dispatch(e,this._compress,a,n)}getBlobData(e,t,n,r){this._bufferedBytes+=n[js],this._state=2,e.arrayBuffer().then(e=>{if(this._socket.destroyed){const e=new Error("The socket was closed while the blob was being read");return void process.nextTick(Ts,this,e,r)}this._bufferedBytes-=n[js];const o=Rs(e);t?this.dispatch(o,t,n,r):(this._state=0,this.sendFrame(Os.frame(o,n),r),this.dequeue())}).catch(e=>{process.nextTick(Ls,this,e,r)})}dispatch(e,t,n,r){if(!t)return void this.sendFrame(Os.frame(e,n),r);const o=this._extensions[rs.extensionName];this._bufferedBytes+=n[js],this._state=1,o.compress(e,n.fin,(e,t)=>{if(this._socket.destroyed){return void Ts(this,new Error("The socket was closed while data was being compressed"),r)}this._bufferedBytes-=n[js],this._state=0,n.readOnly=!1,this.sendFrame(Os.frame(t,n),r),this.dequeue()})}dequeue(){for(;0===this._state&&this._queue.length;){const e=this._queue.shift();this._bufferedBytes-=e[3][js],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][js],this._queue.push(e)}sendFrame(e,t){2===e.length?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}}var ks=Os;function Ts(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 Ls(e,t,n){Ts(e,t,n),e.onerror(t)}const{kForOnEventAttribute:Ns,kListener:qs}=bu,Gs=Symbol("kCode"),Ms=Symbol("kData"),zs=Symbol("kError"),Js=Symbol("kMessage"),$s=Symbol("kReason"),Ws=Symbol("kTarget"),Vs=Symbol("kType"),Hs=Symbol("kWasClean");class Zs{constructor(e){this[Ws]=null,this[Vs]=e}get target(){return this[Ws]}get type(){return this[Vs]}}Object.defineProperty(Zs.prototype,"target",{enumerable:!0}),Object.defineProperty(Zs.prototype,"type",{enumerable:!0});class Ys extends Zs{constructor(e,t={}){super(e),this[Gs]=void 0===t.code?0:t.code,this[$s]=void 0===t.reason?"":t.reason,this[Hs]=void 0!==t.wasClean&&t.wasClean}get code(){return this[Gs]}get reason(){return this[$s]}get wasClean(){return this[Hs]}}Object.defineProperty(Ys.prototype,"code",{enumerable:!0}),Object.defineProperty(Ys.prototype,"reason",{enumerable:!0}),Object.defineProperty(Ys.prototype,"wasClean",{enumerable:!0});class Ks extends Zs{constructor(e,t={}){super(e),this[zs]=void 0===t.error?null:t.error,this[Js]=void 0===t.message?"":t.message}get error(){return this[zs]}get message(){return this[Js]}}Object.defineProperty(Ks.prototype,"error",{enumerable:!0}),Object.defineProperty(Ks.prototype,"message",{enumerable:!0});class Xs extends Zs{constructor(e,t={}){super(e),this[Ms]=void 0===t.data?null:t.data}get data(){return this[Ms]}}Object.defineProperty(Xs.prototype,"data",{enumerable:!0});const Qs={addEventListener(e,t,n={}){for(const r of this.listeners(e))if(!n[Ns]&&r[qs]===t&&!r[Ns])return;let r;if("message"===e)r=function(e,n){const r=new Xs("message",{data:n?e:e.toString()});r[Ws]=this,ta(t,this,r)};else if("close"===e)r=function(e,n){const r=new Ys("close",{code:e,reason:n.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[Ws]=this,ta(t,this,r)};else if("error"===e)r=function(e){const n=new Ks("error",{error:e,message:e.message});n[Ws]=this,ta(t,this,n)};else{if("open"!==e)return;r=function(){const e=new Zs("open");e[Ws]=this,ta(t,this,e)}}r[Ns]=!!n[Ns],r[qs]=t,n.once?this.once(e,r):this.on(e,r)},removeEventListener(e,t){for(const n of this.listeners(e))if(n[qs]===t&&!n[Ns]){this.removeListener(e,n);break}}};var ea={CloseEvent:Ys,ErrorEvent:Ks,Event:Zs,EventTarget:Qs,MessageEvent:Xs};function ta(e,t,n){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,n):e.call(t,n)}const{tokenChars:na}=cs;function ra(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var oa={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,u=!1,s=!1,a=-1,c=-1,d=-1,l=0;for(;l<e.length;l++)if(c=e.charCodeAt(l),void 0===n)if(-1===d&&1===na[c])-1===a&&(a=l);else if(0===l||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===a)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);const r=e.slice(a,d);44===c?(ra(t,r,o),o=Object.create(null)):n=r,a=d=-1}}else-1===d&&-1!==a&&(d=l);else if(void 0===r)if(-1===d&&1===na[c])-1===a&&(a=l);else if(32===c||9===c)-1===d&&-1!==a&&(d=l);else if(59===c||44===c){if(-1===a)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l),ra(o,e.slice(a,d),!0),44===c&&(ra(t,n,o),o=Object.create(null),n=void 0),a=d=-1}else{if(61!==c||-1===a||-1!==d)throw new SyntaxError(`Unexpected character at index ${l}`);r=e.slice(a,l),a=d=-1}else if(u){if(1!==na[c])throw new SyntaxError(`Unexpected character at index ${l}`);-1===a?a=l:i||(i=!0),u=!1}else if(s)if(1===na[c])-1===a&&(a=l);else if(34===c&&-1!==a)s=!1,d=l;else{if(92!==c)throw new SyntaxError(`Unexpected character at index ${l}`);u=!0}else if(34===c&&61===e.charCodeAt(l-1))s=!0;else if(-1===d&&1===na[c])-1===a&&(a=l);else if(-1===a||32!==c&&9!==c){if(59!==c&&44!==c)throw new SyntaxError(`Unexpected character at index ${l}`);{if(-1===a)throw new SyntaxError(`Unexpected character at index ${l}`);-1===d&&(d=l);let u=e.slice(a,d);i&&(u=u.replace(/\\/g,""),i=!1),ra(o,r,u),44===c&&(ra(t,n,o),o=Object.create(null),n=void 0),r=void 0,a=d=-1}}else-1===d&&(d=l);if(-1===a||s||32===c||9===c)throw new SyntaxError("Unexpected end of input");-1===d&&(d=l);const h=e.slice(a,d);return void 0===n?ra(t,h,o):(void 0===r?ra(o,h,!0):ra(o,r,i?h.replace(/\\/g,""):h),ra(t,n,o)),t}};const{randomBytes:ia,createHash:ua}=N.default,{URL:sa}=R.default,{isBlob:aa}=cs,{BINARY_TYPES:ca,EMPTY_BUFFER:da,GUID:la,kForOnEventAttribute:ha,kListener:pa,kStatusCode:fa,kWebSocket:ma,NOOP:va}=bu,{EventTarget:{addEventListener:Ea,removeEventListener:Aa}}=ea,{format:ba,parse:ya}=oa,{toBuffer:ga}=Ju,Ca=Symbol("kAborted"),wa=[8,13],Fa=["CONNECTING","OPEN","CLOSING","CLOSED"],Da=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class Ba extends D.default{constructor(e,t,n){super(),this._binaryType=ca[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=da,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=Ba.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]),Sa(this,e,t,n)):(this._autoPong=n.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){ca.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 gs({allowSynchronousEvents:n.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation}),o=new ks(e,this._extensions,n.generateMask);this._receiver=r,this._sender=o,this._socket=e,r[ma]=this,o[ma]=this,e[ma]=this,r.on("conclude",Pa),r.on("drain",Oa),r.on("error",ka),r.on("message",La),r.on("ping",Na),r.on("pong",qa),o.onerror=Ma,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",Ja),e.on("data",$a),e.on("end",Wa),e.on("error",Va),this._readyState=Ba.OPEN,this.emit("open")}emitClose(){if(!this._socket)return this._readyState=Ba.CLOSED,void this.emit("close",this._closeCode,this._closeMessage);this._extensions[rs.extensionName]&&this._extensions[rs.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=Ba.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==Ba.CLOSED){if(this.readyState===Ba.CONNECTING){const e="WebSocket was closed before the connection was established";return void Ua(this,this._req,e)}this.readyState!==Ba.CLOSING?(this._readyState=Ba.CLOSING,this._sender.close(e,t,!this._isServer,e=>{e||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),za(this)):this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end()}}pause(){this.readyState!==Ba.CONNECTING&&this.readyState!==Ba.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,n){if(this.readyState===Ba.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===Ba.OPEN?(void 0===t&&(t=!this._isServer),this._sender.ping(e||da,t,n)):xa(this,e,n)}pong(e,t,n){if(this.readyState===Ba.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===Ba.OPEN?(void 0===t&&(t=!this._isServer),this._sender.pong(e||da,t,n)):xa(this,e,n)}resume(){this.readyState!==Ba.CONNECTING&&this.readyState!==Ba.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,n){if(this.readyState===Ba.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!==Ba.OPEN)return void xa(this,e,n);const r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[rs.extensionName]||(r.compress=!1),this._sender.send(e||da,r,n)}terminate(){if(this.readyState!==Ba.CLOSED){if(this.readyState===Ba.CONNECTING){const e="WebSocket was closed before the connection was established";return void Ua(this,this._req,e)}this._socket&&(this._readyState=Ba.CLOSING,this._socket.destroy())}}}Object.defineProperty(Ba,"CONNECTING",{enumerable:!0,value:Fa.indexOf("CONNECTING")}),Object.defineProperty(Ba.prototype,"CONNECTING",{enumerable:!0,value:Fa.indexOf("CONNECTING")}),Object.defineProperty(Ba,"OPEN",{enumerable:!0,value:Fa.indexOf("OPEN")}),Object.defineProperty(Ba.prototype,"OPEN",{enumerable:!0,value:Fa.indexOf("OPEN")}),Object.defineProperty(Ba,"CLOSING",{enumerable:!0,value:Fa.indexOf("CLOSING")}),Object.defineProperty(Ba.prototype,"CLOSING",{enumerable:!0,value:Fa.indexOf("CLOSING")}),Object.defineProperty(Ba,"CLOSED",{enumerable:!0,value:Fa.indexOf("CLOSED")}),Object.defineProperty(Ba.prototype,"CLOSED",{enumerable:!0,value:Fa.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(e=>{Object.defineProperty(Ba.prototype,e,{enumerable:!0})}),["open","error","close","message"].forEach(e=>{Object.defineProperty(Ba.prototype,`on${e}`,{enumerable:!0,get(){for(const t of this.listeners(e))if(t[ha])return t[pa];return null},set(t){for(const t of this.listeners(e))if(t[ha]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[ha]:!0})}})}),Ba.prototype.addEventListener=Ea,Ba.prototype.removeEventListener=Aa;var Ia=Ba;function Sa(e,t,n,r){const o={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:wa[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,!wa.includes(o.protocolVersion))throw new RangeError(`Unsupported protocol version: ${o.protocolVersion} (supported versions: ${wa.join(", ")})`);let i;if(t instanceof sa)i=t;else try{i=new sa(t)}catch(e){throw new SyntaxError(`Invalid URL: ${t}`)}"http:"===i.protocol?i.protocol="ws:":"https:"===i.protocol&&(i.protocol="wss:"),e._url=i.href;const u="wss:"===i.protocol,s="ws+unix:"===i.protocol;let a;if("ws:"===i.protocol||u||s?s&&!i.pathname?a="The URL's pathname is empty":i.hash&&(a="The URL contains a fragment identifier"):a='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"',a){const t=new SyntaxError(a);if(0===e._redirects)throw t;return void Ra(e,t)}const c=u?443:80,d=ia(16).toString("base64"),l=u?j.default.request:S.default.request,h=new Set;let p,f;if(o.createConnection=o.createConnection||(u?_a:ja),o.defaultPort=o.defaultPort||c,o.port=i.port||c,o.host=i.hostname.startsWith("[")?i.hostname.slice(1,-1):i.hostname,o.headers={...o.headers,"Sec-WebSocket-Version":o.protocolVersion,"Sec-WebSocket-Key":d,Connection:"Upgrade",Upgrade:"websocket"},o.path=i.pathname+i.search,o.timeout=o.handshakeTimeout,o.perMessageDeflate&&(p=new rs(!0!==o.perMessageDeflate?o.perMessageDeflate:{},!1,o.maxPayload),o.headers["Sec-WebSocket-Extensions"]=ba({[rs.extensionName]:p.offer()})),n.length){for(const e of n){if("string"!=typeof e||!Da.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),(i.username||i.password)&&(o.auth=`${i.username}:${i.password}`),s){const e=o.path.split(":");o.socketPath=e[0],o.path=e[1]}if(o.followRedirects){if(0===e._redirects){e._originalIpc=s,e._originalSecure=u,e._originalHostOrSocketPath=s?o.socketPath:i.host;const t=r&&r.headers;if(r={...r,headers:{}},t)for(const[e,n]of Object.entries(t))r.headers[e.toLowerCase()]=n}else if(0===e.listenerCount("redirect")){const t=s?!!e._originalIpc&&o.socketPath===e._originalHostOrSocketPath:!e._originalIpc&&i.host===e._originalHostOrSocketPath;(!t||e._originalSecure&&!u)&&(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")),f=e._req=l(o),e._redirects&&e.emit("redirect",e.url,f)}else f=e._req=l(o);o.timeout&&f.on("timeout",()=>{Ua(e,f,"Opening handshake has timed out")}),f.on("error",t=>{null===f||f[Ca]||(f=e._req=null,Ra(e,t))}),f.on("response",i=>{const u=i.headers.location,s=i.statusCode;if(u&&o.followRedirects&&s>=300&&s<400){if(++e._redirects>o.maxRedirects)return void Ua(e,f,"Maximum redirects exceeded");let i;f.abort();try{i=new sa(u,t)}catch(t){const n=new SyntaxError(`Invalid URL: ${u}`);return void Ra(e,n)}Sa(e,i,n,r)}else e.emit("unexpected-response",f,i)||Ua(e,f,`Unexpected server response: ${i.statusCode}`)}),f.on("upgrade",(t,n,r)=>{if(e.emit("upgrade",t),e.readyState!==Ba.CONNECTING)return;f=e._req=null;const i=t.headers.upgrade;if(void 0===i||"websocket"!==i.toLowerCase())return void Ua(e,n,"Invalid Upgrade header");const u=ua("sha1").update(d+la).digest("base64");if(t.headers["sec-websocket-accept"]!==u)return void Ua(e,n,"Invalid Sec-WebSocket-Accept header");const s=t.headers["sec-websocket-protocol"];let a;if(void 0!==s?h.size?h.has(s)||(a="Server sent an invalid subprotocol"):a="Server sent a subprotocol but none was requested":h.size&&(a="Server sent no subprotocol"),a)return void Ua(e,n,a);s&&(e._protocol=s);const c=t.headers["sec-websocket-extensions"];if(void 0!==c){if(!p){return void Ua(e,n,"Server sent a Sec-WebSocket-Extensions header but no extension was requested")}let t;try{t=ya(c)}catch(t){return void Ua(e,n,"Invalid Sec-WebSocket-Extensions header")}const r=Object.keys(t);if(1!==r.length||r[0]!==rs.extensionName){return void Ua(e,n,"Server indicated an extension that was not requested")}try{p.accept(t[rs.extensionName])}catch(t){return void Ua(e,n,"Invalid Sec-WebSocket-Extensions header")}e._extensions[rs.extensionName]=p}e.setSocket(n,r,{allowSynchronousEvents:o.allowSynchronousEvents,generateMask:o.generateMask,maxPayload:o.maxPayload,skipUTF8Validation:o.skipUTF8Validation})}),o.finishRequest?o.finishRequest(f,e):f.end()}function Ra(e,t){e._readyState=Ba.CLOSING,e._errorEmitted=!0,e.emit("error",t),e.emitClose()}function ja(e){return e.path=e.socketPath,P.default.connect(e)}function _a(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=P.default.isIP(e.host)?"":e.host),L.default.connect(e)}function Ua(e,t,n){e._readyState=Ba.CLOSING;const r=new Error(n);Error.captureStackTrace(r,Ua),t.setHeader?(t[Ca]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(Ra,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function xa(e,t,n){if(t){const n=aa(t)?t.size:ga(t).length;e._socket?e._sender._bufferedBytes+=n:e._bufferedAmount+=n}if(n){const t=new Error(`WebSocket is not open: readyState ${e.readyState} (${Fa[e.readyState]})`);process.nextTick(n,t)}}function Pa(e,t){const n=this[ma];n._closeFrameReceived=!0,n._closeMessage=t,n._closeCode=e,void 0!==n._socket[ma]&&(n._socket.removeListener("data",$a),process.nextTick(Ga,n._socket),1005===e?n.close():n.close(e,t))}function Oa(){const e=this[ma];e.isPaused||e._socket.resume()}function ka(e){const t=this[ma];void 0!==t._socket[ma]&&(t._socket.removeListener("data",$a),process.nextTick(Ga,t._socket),t.close(e[fa])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e))}function Ta(){this[ma].emitClose()}function La(e,t){this[ma].emit("message",e,t)}function Na(e){const t=this[ma];t._autoPong&&t.pong(e,!this._isServer,va),t.emit("ping",e)}function qa(e){this[ma].emit("pong",e)}function Ga(e){e.resume()}function Ma(e){const t=this[ma];t.readyState!==Ba.CLOSED&&(t.readyState===Ba.OPEN&&(t._readyState=Ba.CLOSING,za(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e)))}function za(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),3e4)}function Ja(){const e=this[ma];let t;this.removeListener("close",Ja),this.removeListener("data",$a),this.removeListener("end",Wa),e._readyState=Ba.CLOSING,this._readableState.endEmitted||e._closeFrameReceived||e._receiver._writableState.errorEmitted||null===(t=e._socket.read())||e._receiver.write(t),e._receiver.end(),this[ma]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",Ta),e._receiver.on("finish",Ta))}function $a(e){this[ma]._receiver.write(e)||this.pause()}function Wa(){const e=this[ma];e._readyState=Ba.CLOSING,e._receiver.end(),this.end()}function Va(){const e=this[ma];this.removeListener("error",Va),this.on("error",va),e&&(e._readyState=Ba.CLOSING,this.destroy())}const{Duplex:Ha}=B.default;function Za(e){e.emit("close")}function Ya(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Ka(e){this.removeListener("error",Ka),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}var Xa=function(e,t){let n=!0;const r=new Ha({...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(Za,r);let i=!1;e.once("error",function(e){i=!0,o(e)}),e.once("close",function(){i||o(t),process.nextTick(Za,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",Ya),r.on("error",Ka),r},Qa=function(e){function t(t,n,r,o,i,u){void 0===u&&(u=5e3);var s=e.call(this)||this;s.endpoint=t,s.headers=n,s.rewriteHostHeader=r,s.bindToAssign=o,s.agent=i,s.closeTimeout=u,s.protocol="TCP",s.openConnections=new Set,s.tcpServer=O.createServer(s.handleConnection.bind(s));var a=null==r?void 0:r.altHostnames.map(function(e){return(t=Wt(t=e))&&lr.test(t)?t.replace(dr,"\\$&"):t;var t}).join("|");return s.hostRegex=new RegExp("Host: (?:".concat(a,")(:.*$|$)"),"im"),s}return H(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 Y(this,void 0,void 0,function(){var e=this;return K(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 Y(this,void 0,void 0,function(){var e,t=this;return K(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=this.endpoint.replace("https:","wss:"),r=new Ia(n,{headers:this.headers,agent:this.agent}),o=Xa(r),i=this.getHeaderTransform();this.rewriteHostHeader&&i?vu(e,i,o):vu(e,o),vu(o,e),r.on("close",function(e,n,r){t.emit("connection-close",e,n,r)}),o.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(){var e=function(e,t,n){var r=Buffer.from(n),o=Buffer.from(e);return t.forEach(function(e){o=function(e,t,n){var r=Buffer.from(t),o=e.indexOf(r);if(-1===o)return e;var i=e.subarray(0,o),u=e.subarray(o+r.length);return Buffer.concat([i,n,u])}(o,e,r)}),o};if(this.rewriteHostHeader){var t=this.rewriteHostHeader,r=t.targetHostname,o=t.altHostnames,i=this.hostRegex;return new n.Transform({transform:function(t,n,u){var s=t.toString();if(s.split("\n",1)[0].includes("HTTP")&&i.test(s)){var a=o.map(function(e){return"Host: ".concat(e)});u(null,e(t,a,"Host: ".concat(r)))}else u(null,t)}})}},t}(e.EventEmitter),ec=function(e){function t(t,n,r,o){var i=e.call(this)||this;return i.endpoint=t,i.headers=n,i.bindToAssign=r,i.agent=o,i.protocol="UDP",i.udpSocket=G.default.createSocket("udp4"),i.handleConnection(),i}return H(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 Y(this,void 0,void 0,function(){var e=this;return K(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 Y(this,void 0,void 0,function(){var e=this;return K(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=this.endpoint.replace("https:","wss:"),r=new Ia(n,{headers:this.headers,agent:this.agent}),o=Xa(r);this.udpSocket.on("message",function(t,n){e=n,o.write(t)}),o.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)}),o.on("error",function(e){t.emit("connection-error",e)}),r.on("connection-close",function(e,n,r){t.emit("connection-close",e,n,r)}),r.on("connection-error",function(e){t.emit("connection-error",e)}),this.emit("connection-accept")},t}(e.EventEmitter),tc=function(e){function n(n,r,o,i){var u=e.call(this)||this;return u.contextProvider=n,u.listServices=r,u.listAddons=o,u.agent=i,u.connections=[],u.hostsFileMutex=new Qi,u.ipAllocationMutex=new Qi,u.stopForwarding=function(e){return Y(u,void 0,void 0,function(){var t,n,r,o,i,u,s;return K(this,function(a){switch(a.label){case 0:return[4,e.tunnel.close()];case 1:return a.sent(),t=e.forwardingContext,n=t.projectId,r=t.type,o=t.id,i=t.hostnames,u=t.ipOnly,i.length>0&&!u?[4,this.unregisterHostnames(null===(s=e.tunnel.bindTo)||void 0===s?void 0:s.address,i)]:[3,3];case 2:a.sent(),a.label=3;case 3:return this.connections.splice(this.connections.findIndex(function(e){var t=e.forwardingContext,i=t.type,u=t.id,s=t.projectId;return u===o&&s===n&&i===r}),1),[2]}})})},u.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 t.execSync("fsutil dirty query %systemdrive%"),!0}catch(e){if("ENOENT"===e.code)try{return t.execSync("fltmc"),!0}catch(e){return!1}return!1}}()?{error:!1,type:"windows-admin"}:{error:!0,message:"You are not running this command as administrator. Please start command line with admin rights."};var e},u.assertStartedWithNodejs=function(){if(!Ii)throw new Error("Port forwarding only possible when started with nodejs")},u.proxyApiClient=new Ui(n,i),u}return H(n,e),n.prototype.withProjectForwarding=function(e,t,n){return void 0===n&&(n=!0),Y(this,void 0,void 0,function(){var r;return K(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]}})})},n.prototype.forwardProject=function(e,t){return void 0===t&&(t=!0),Y(this,void 0,void 0,function(){var n,r,o,i,u,s=this;return K(this,function(a){switch(a.label){case 0:return this.assertStartedWithNodejs(),n=e.projectId,[4,this.listServices.all({parameters:{projectId:n}})];case 1:return r=a.sent(),[4,this.listAddons.all({parameters:{projectId:n}})];case 2:return o=a.sent(),[4,Promise.all(r.data.services.map(function(e){return Y(s,void 0,void 0,function(){return K(this,function(r){return[2,this.forwardService({projectId:n,serviceId:e.id},t)]})})}))];case 3:return i=a.sent(),[4,Promise.all(o.data.addons.map(function(e){return Y(s,void 0,void 0,function(){return K(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 u=a.sent(),[2,{services:i,addons:u}]}})})},n.prototype.withServiceForwarding=function(e,t,n){return void 0===n&&(n=!0),Y(this,void 0,void 0,function(){var r;return K(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]}})})},n.prototype.forwardService=function(e,t){return void 0===t&&(t=!0),Y(this,void 0,void 0,function(){var n,r,o,i,u,s,a,c=this;return K(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,u=o.targetDomain,s=o.instances,a=o.ports,0===s.length?[2,[]]:[4,ji(a,function(e){var o,a="https://".concat(u,"/tunnel/projects/").concat(n,"/services/").concat(r,"/instance/").concat(s[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 h=X([d],l,!0);return c.forwardPort(a,e,h,"service",r,n,t,o)})];case 2:return[2,d.sent()]}})})},n.prototype.withAddonForwarding=function(e,t,n){return void 0===n&&(n=!0),Y(this,void 0,void 0,function(){var r;return K(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]}})})},n.prototype.forwardAddon=function(e,t){return void 0===t&&(t=!0),Y(this,void 0,void 0,function(){var n,r,o,i,u=this;return K(this,function(s){switch(s.label){case 0:return this.assertStartedWithNodejs(),n=e.addonId,r=e.projectId,[4,this.proxyApiClient.getAddonDetails(r,n)];case 1:return o=s.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,ji((a=i,null!=a&&a.length?Qt(a,fr):[]),function(e){var i=e.podName,s=e.internalHostname,a=e.port;return Y(u,void 0,void 0,function(){var e;return K(this,function(u){return e="https://".concat(o.targetDomain,"/tunnel/projects/").concat(r,"/addons/").concat(n,"/instance/").concat(i,"/port/").concat(a.internalPort),[2,this.forwardPort(e,a,[s],"addon",n,r,t)]})})})];case 2:return[2,s.sent()]}var a})})},n.prototype.allocateIpAddress=function(e){return Y(this,void 0,void 0,function(){var t=this;return K(this,function(n){return[2,this.ipAllocationMutex.enter(function(){return Y(t,void 0,void 0,function(){var t,n,r,o,i;return K(this,function(u){switch(u.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,xi(e,r,n)];case 1:return o=u.sent(),this.nextIpAddress=Ti(ki(o)+1),ki(this.nextIpAddress)>ki(n)&&(this.nextIpAddress=t),[2,o]}})})})]})})},n.prototype.forwardPort=function(e,t,n,r,o,i,u,s){var a;return void 0===u&&(u=!0),Y(this,void 0,void 0,function(){var c,d,l,h,p,f,m=this;return K(this,function(v){switch(v.label){case 0:if(c={Authorization:"Bearer ".concat(this.contextProvider.getCurrentToken())},!u&&(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,u)];case 1:return l=v.sent(),h="UDP"===t.protocol?new ec(e,c,l,this.agent):new Qa(e,c,s,l,this.agent),u?[3,3]:[4,this.registerHostnames(null===(a=h.bindTo)||void 0===a?void 0:a.address,n)];case 2:v.sent(),v.label=3;case 3:return h.on("connection-accept",function(){return m.emit("connection-accept",h)}),h.on("connection-close",function(){return Y(m,void 0,void 0,function(){return K(this,function(e){return[2,this.emit("connection-close",h)]})})}),[4,h.open()];case 4:return p=v.sent(),f={projectId:i,id:o,type:r,hostnames:n,ipOnly:u,port:p.port,address:p.address,protocol:t.protocol,portName:t.name},this.emit("tunnel-open",h,f),h.on("connection-error",function(e){return m.emit("connection-error",h,f,e)}),h.on("tunnel-close",function(){return m.emit("tunnel-close",h,f)}),this.connections.push({tunnel:h,forwardingContext:f}),[2,{data:f}]}})})},n.prototype.determineSocketAddress=function(e,t,n,r,o,i){return Y(this,void 0,void 0,function(){var u,s,a;return K(this,function(c){switch(c.label){case 0:return i&&"darwin"===x.default.platform()?[2,void 0]:(u=this.connections.filter(function(n){return n.forwardingContext.projectId===e&&n.forwardingContext.id===t&&n.forwardingContext.type===r}),(s=null==u?void 0:u.find(function(e){return n.find(function(t){return e.forwardingContext.hostnames.includes(t)})}))?[2,{address:null==s?void 0:s.forwardingContext.address,port:o.internalPort}]:(a={},[4,this.allocateIpAddress(o.internalPort)]));case 1:return[2,(a.address=c.sent(),a.port=o.internalPort,a)]}})})},n.prototype.registerHostnames=function(e,t){return Y(this,void 0,void 0,function(){return K(this,function(n){switch(n.label){case 0:return[4,this.modifyHostsFile(function(n){n.removeHosts.apply(n,t),n.add.apply(n,X([e],t,!1))})];case 1:return n.sent(),[2]}})})},n.prototype.unregisterHostnames=function(e,t){return Y(this,void 0,void 0,function(){return K(this,function(n){switch(n.label){case 0:return[4,this.modifyHostsFile(function(n){n.remove.apply(n,X([e],t,!1))})];case 1:return n.sent(),[2]}})})},n.prototype.modifyHostsFile=function(e){return Y(this,void 0,void 0,function(){var t=this;return K(this,function(n){switch(n.label){case 0:return[4,this.hostsFileMutex.enter(function(){return Y(t,void 0,void 0,function(){var t,n=this;return K(this,function(r){switch(r.label){case 0:return[4,Xi.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,nc(5)(function(){return Y(n,void 0,void 0,function(){return K(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,nc(5)(function(){return Y(n,void 0,void 0,function(){return K(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]}})})},n.prototype.stopProjectForwarding=function(e){return Y(this,void 0,void 0,function(){var t=this;return K(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]}})})},n.prototype.stopServiceForwarding=function(e){return Y(this,void 0,void 0,function(){var t=this;return K(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]}})})},n.prototype.stopAddonForwarding=function(e){return Y(this,void 0,void 0,function(){var t=this;return K(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]}})})},n.prototype.stop=function(){return Y(this,void 0,void 0,function(){var e=this;return K(this,function(t){switch(t.label){case 0:return[4,Promise.all(this.connections.map(function(t){return Y(e,void 0,void 0,function(){return K(this,function(e){return[2,this.stopForwarding(t)]})})}))];case 1:return t.sent(),[2]}})})},n}(e.EventEmitter),nc=function(e,t){return void 0===t&&(t=50),function(n){var r=e,o=function(){return Y(void 0,void 0,void 0,function(){var e;return K(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()}},rc=function(e){function t(t,n,r,o,i,u,s){void 0===i&&(i=new I.PassThrough),void 0===u&&(u=new I.PassThrough),void 0===s&&(s=new I.PassThrough);var a=e.call(this)||this;return a.baseUrl=t,a.execConfig=n,a.token=r,a.agent=o,a.stdOut=i,a.stdErr=u,a.stdIn=s,a.waitForCommandResult=function(){return Y(a,void 0,void 0,function(){return K(this,function(e){switch(e.label){case 0:if(void 0===this.currentCommand)throw new Error("No command is running");return[4,this.currentCommand];case 1:return[2,e.sent()]}})})},a.sendInputToCurrentCommand=function(e){return Y(a,void 0,void 0,function(){var t;return K(this,function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running");return null===(t=this.duplex)||void 0===t||t.write(this.constructPayloadPacket(e)),[2]})})},a.resizeTerminal=function(e){return Y(a,void 0,void 0,function(){var t;return K(this,function(n){if(void 0===this.currentCommand||void 0===this.duplex)throw new Error("No command is running, can't resize terminal");return null===(t=this.duplex)||void 0===t||t.write(JSON.stringify({type:"resize",data:{ttyRows:null==e?void 0:e.rows,ttyColumns:null==e?void 0:e.columns}})),[2]})})},a.constructPayloadPacket=function(e){return JSON.stringify({type:"payload",data:e.toString()})},a.stdInEndPacket=JSON.stringify({type:"stdInEnd"}),a}return H(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 Y(this,void 0,void 0,function(){var e=this;return K(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 u,s=e.execEndpoint.replace("https:","wss:").replace("http:","ws:");e.remote=new Ia(s,{agent:e.agent});try{e.duplex=Xa(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)))}),e.stdIn.on("end",function(){var t,n;(null===(t=e.duplex)||void 0===t?void 0:t.writable)&&(null===(n=e.duplex)||void 0===n||n.write(e.stdInEndPacket))}),null===(r=e.duplex)||void 0===r||r.on("data",function(t){var n,r,o,i,s,c=JSON.parse(t.toString());switch(null==c?void 0:c.type){case"init":var d=c.data;"successful"!==d.auth?a("Command initialization failed: ".concat(null!==(n=null==d?void 0:d.message)&&void 0!==n?n:"Reason unknown")):e.emit("auth-success",d);break;case"completion":u=c.data,e.emit("command-result",u),null===(r=e.duplex)||void 0===r||r.end();break;case"stdOut":e.emit("std-out-data",c.data),e.stdOut.write(c.data,null===(o=e.execConfig)||void 0===o?void 0:o.encoding);break;case"stdErr":e.emit("std-err-data",c.data),e.stdErr.write(c.data,null===(i=e.execConfig)||void 0===i?void 0:i.encoding);break;case"error":a(null===(s=c.data)||void 0===s?void 0:s.message);break;default:var l="unable to parse message: ".concat(JSON.stringify(c));a(l)}}),null===(o=e.duplex)||void 0===o||o.on("end",function(){e.emit("command-completed"),e.reset(),t(u)}),null===(i=e.duplex)||void 0===i||i.on("error",function(n){e.emit("error",n),e.emit("command-completed"),e.reset(),t(u)});var a=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.instanceName,i=t.shell,u=t.user,s=this.execConfig,a=s.group,c=s.encoding,d=s.tty,l=s.ttyColumns,h=s.ttyRows,p={type:"init",data:{auth:{type:"apiToken",apiToken:this.token},context:{instanceName:o,containerName:r,command:n,shell:i,user:u,group:a,encoding:c,tty:d,ttyColumns:l,ttyRows:h}}};null===(e=this.duplex)||void 0===e||e.write(JSON.stringify(p))},t.prototype.reset=function(){var e;this.remote=void 0,this.currentCommand=void 0,null===(e=this.duplex)||void 0===e||e.destroy(),this.duplex=void 0},t}(e.EventEmitter),oc=function(){function e(e,t){this.contextProvider=e,this.agent=t,this.assertStartedWithNodejs=function(){if(!Ii)throw new Error("Command exec only possible when started with nodejs")}}return e.prototype.execServiceCommand=function(e,t){return Y(this,void 0,void 0,function(){var n,r,o;return K(this,function(i){return n=e.serviceId,r=e.projectId,o=Z({projectId:r,entityId:n,entityType:"service"},t),[2,this.execCommand(o)]})})},e.prototype.execServiceSession=function(e,t,n){return Y(this,void 0,void 0,function(){var r,o,i;return K(this,function(u){switch(u.label){case 0:return r=e.serviceId,o=e.projectId,i=Z({projectId:o,entityId:r,entityType:"service"},t),[4,this.shellSession(i,n)];case 1:return[2,u.sent()]}})})},e.prototype.execJobCommand=function(e,t){return Y(this,void 0,void 0,function(){var n,r,o;return K(this,function(i){return n=e.jobId,r=e.projectId,o=Z({projectId:r,entityId:n,entityType:"job"},t),[2,this.execCommand(o)]})})},e.prototype.execJobSession=function(e,t,n){return Y(this,void 0,void 0,function(){var r,o,i;return K(this,function(u){switch(u.label){case 0:return r=e.jobId,o=e.projectId,i=Z({projectId:o,entityId:r,entityType:"job"},t),[4,this.shellSession(i,n)];case 1:return[2,u.sent()]}})})},e.prototype.execAddonCommand=function(e,t){return Y(this,void 0,void 0,function(){var n,r,o;return K(this,function(i){return n=e.addonId,r=e.projectId,o=Z({projectId:r,entityId:n,entityType:"addon"},t),[2,this.execCommand(o)]})})},e.prototype.execAddonSession=function(e,t,n){return Y(this,void 0,void 0,function(){var r,o,i;return K(this,function(u){switch(u.label){case 0:return r=e.addonId,o=e.projectId,i=Z({projectId:o,entityId:r,entityType:"addon"},t),[4,this.shellSession(i,n)];case 1:return[2,u.sent()]}})})},e.prototype.execCommand=function(e){return Y(this,void 0,void 0,function(){var t,n,r;return K(this,function(o){switch(o.label){case 0:return this.assertStartedWithNodejs(),t=this.getCommandRunner(Z({shell:"none"},e)),n=new _i,r=new _i,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,t){return Y(this,void 0,void 0,function(){var n,r;return K(this,function(o){switch(o.label){case 0:return this.assertStartedWithNodejs(),n=this.getCommandRunner(e),r=new Promise(function(e){n.on("auth-success",function(n){null==t||t(null==n?void 0:n.context),e()})}),n.start(),[4,r];case 1:return o.sent(),[2,n]}})})},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 rc(t,e,n,this.agent)},e}();const ic="object"==typeof process&&process?process:{stdout:null,stderr:null},uc=e=>!!e&&"object"==typeof e&&(e instanceof Jc||e instanceof M.default||sc(e)||ac(e)),sc=e=>!!e&&"object"==typeof e&&e instanceof m.EventEmitter&&"function"==typeof e.pipe&&e.pipe!==M.default.Writable.prototype.pipe,ac=e=>!!e&&"object"==typeof e&&e instanceof m.EventEmitter&&"function"==typeof e.write&&"function"==typeof e.end,cc=Symbol("EOF"),dc=Symbol("maybeEmitEnd"),lc=Symbol("emittedEnd"),hc=Symbol("emittingEnd"),pc=Symbol("emittedError"),fc=Symbol("closed"),mc=Symbol("read"),vc=Symbol("flush"),Ec=Symbol("flushChunk"),Ac=Symbol("encoding"),bc=Symbol("decoder"),yc=Symbol("flowing"),gc=Symbol("paused"),Cc=Symbol("resume"),wc=Symbol("buffer"),Fc=Symbol("pipes"),Dc=Symbol("bufferLength"),Bc=Symbol("bufferPush"),Ic=Symbol("bufferShift"),Sc=Symbol("objectMode"),Rc=Symbol("destroyed"),jc=Symbol("error"),_c=Symbol("emitData"),Uc=Symbol("emitEnd"),xc=Symbol("emitEnd2"),Pc=Symbol("async"),Oc=Symbol("abort"),kc=Symbol("aborted"),Tc=Symbol("signal"),Lc=Symbol("dataListeners"),Nc=Symbol("discarded"),qc=e=>Promise.resolve().then(e),Gc=e=>e();class Mc{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[Cc](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class zc extends Mc{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>t.emit("error",e),e.on("error",this.proxyErrors)}}class Jc extends m.EventEmitter{[yc]=!1;[gc]=!1;[Fc]=[];[wc]=[];[Sc];[Ac];[Pc];[bc];[cc]=!1;[lc]=!1;[hc]=!1;[fc]=!1;[pc]=null;[Dc]=0;[Rc]=!1;[Tc];[kc]=!1;[Lc]=0;[Nc]=!1;writable=!0;readable=!0;constructor(...e){const t=e[0]||{};if(super(),t.objectMode&&"string"==typeof t.encoding)throw new TypeError("Encoding and objectMode may not be used together");t.objectMode?(this[Sc]=!0,this[Ac]=null):(e=>!e.objectMode&&!!e.encoding&&"buffer"!==e.encoding)(t)?(this[Ac]=t.encoding,this[Sc]=!1):(this[Sc]=!1,this[Ac]=null),this[Pc]=!!t.async,this[bc]=this[Ac]?new E.StringDecoder(this[Ac]):null,t&&!0===t.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[wc]}),t&&!0===t.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[Fc]});const{signal:n}=t;n&&(this[Tc]=n,n.aborted?this[Oc]():n.addEventListener("abort",()=>this[Oc]()))}get bufferLength(){return this[Dc]}get encoding(){return this[Ac]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Sc]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[Pc]}set async(e){this[Pc]=this[Pc]||!!e}[Oc](){this[kc]=!0,this.emit("abort",this[Tc]?.reason),this.destroy(this[Tc]?.reason)}get aborted(){return this[kc]}set aborted(e){}write(e,t,n){if(this[kc])return!1;if(this[cc])throw new Error("write after end");if(this[Rc])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof t&&(n=t,t="utf8"),t||(t="utf8");const r=this[Pc]?qc:Gc;if(!this[Sc]&&!Buffer.isBuffer(e))if(o=e,!Buffer.isBuffer(o)&&ArrayBuffer.isView(o))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if((e=>e instanceof ArrayBuffer||!!e&&"object"==typeof e&&e.constructor&&"ArrayBuffer"===e.constructor.name&&e.byteLength>=0)(e))e=Buffer.from(e);else if("string"!=typeof e)throw new Error("Non-contiguous data written to non-objectMode stream");var o;return this[Sc]?(this[yc]&&0!==this[Dc]&&this[vc](!0),this[yc]?this.emit("data",e):this[Bc](e),0!==this[Dc]&&this.emit("readable"),n&&r(n),this[yc]):e.length?("string"!=typeof e||t===this[Ac]&&!this[bc]?.lastNeed||(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Ac]&&(e=this[bc].write(e)),this[yc]&&0!==this[Dc]&&this[vc](!0),this[yc]?this.emit("data",e):this[Bc](e),0!==this[Dc]&&this.emit("readable"),n&&r(n),this[yc]):(0!==this[Dc]&&this.emit("readable"),n&&r(n),this[yc])}read(e){if(this[Rc])return null;if(this[Nc]=!1,0===this[Dc]||0===e||e&&e>this[Dc])return this[dc](),null;this[Sc]&&(e=null),this[wc].length>1&&!this[Sc]&&(this[wc]=[this[Ac]?this[wc].join(""):Buffer.concat(this[wc],this[Dc])]);const t=this[mc](e||null,this[wc][0]);return this[dc](),t}[mc](e,t){if(this[Sc])this[Ic]();else{const n=t;e===n.length||null===e?this[Ic]():"string"==typeof n?(this[wc][0]=n.slice(e),t=n.slice(0,e),this[Dc]-=e):(this[wc][0]=n.subarray(e),t=n.subarray(0,e),this[Dc]-=e)}return this.emit("data",t),this[wc].length||this[cc]||this.emit("drain"),t}end(e,t,n){return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t="utf8"),void 0!==e&&this.write(e,t),n&&this.once("end",n),this[cc]=!0,this.writable=!1,!this[yc]&&this[gc]||this[dc](),this}[Cc](){this[Rc]||(this[Lc]||this[Fc].length||(this[Nc]=!0),this[gc]=!1,this[yc]=!0,this.emit("resume"),this[wc].length?this[vc]():this[cc]?this[dc]():this.emit("drain"))}resume(){return this[Cc]()}pause(){this[yc]=!1,this[gc]=!0,this[Nc]=!1}get destroyed(){return this[Rc]}get flowing(){return this[yc]}get paused(){return this[gc]}[Bc](e){this[Sc]?this[Dc]+=1:this[Dc]+=e.length,this[wc].push(e)}[Ic](){return this[Sc]?this[Dc]-=1:this[Dc]-=this[wc][0].length,this[wc].shift()}[vc](e=!1){do{}while(this[Ec](this[Ic]())&&this[wc].length);e||this[wc].length||this[cc]||this.emit("drain")}[Ec](e){return this.emit("data",e),this[yc]}pipe(e,t){if(this[Rc])return e;this[Nc]=!1;const n=this[lc];return t=t||{},e===ic.stdout||e===ic.stderr?t.end=!1:t.end=!1!==t.end,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[Fc].push(t.proxyErrors?new zc(this,e,t):new Mc(this,e,t)),this[Pc]?qc(()=>this[Cc]()):this[Cc]()),e}unpipe(e){const t=this[Fc].find(t=>t.dest===e);t&&(1===this[Fc].length?(this[yc]&&0===this[Lc]&&(this[yc]=!1),this[Fc]=[]):this[Fc].splice(this[Fc].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){const n=super.on(e,t);if("data"===e)this[Nc]=!1,this[Lc]++,this[Fc].length||this[yc]||this[Cc]();else if("readable"===e&&0!==this[Dc])super.emit("readable");else if((e=>"end"===e||"finish"===e||"prefinish"===e)(e)&&this[lc])super.emit(e),this.removeAllListeners(e);else if("error"===e&&this[pc]){const e=t;this[Pc]?qc(()=>e.call(this,this[pc])):e.call(this,this[pc])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){const n=super.off(e,t);return"data"===e&&(this[Lc]=this.listeners("data").length,0!==this[Lc]||this[Nc]||this[Fc].length||(this[yc]=!1)),n}removeAllListeners(e){const t=super.removeAllListeners(e);return"data"!==e&&void 0!==e||(this[Lc]=0,this[Nc]||this[Fc].length||(this[yc]=!1)),t}get emittedEnd(){return this[lc]}[dc](){this[hc]||this[lc]||this[Rc]||0!==this[wc].length||!this[cc]||(this[hc]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[fc]&&this.emit("close"),this[hc]=!1)}emit(e,...t){const n=t[0];if("error"!==e&&"close"!==e&&e!==Rc&&this[Rc])return!1;if("data"===e)return!(!this[Sc]&&!n)&&(this[Pc]?(qc(()=>this[_c](n)),!0):this[_c](n));if("end"===e)return this[Uc]();if("close"===e){if(this[fc]=!0,!this[lc]&&!this[Rc])return!1;const e=super.emit("close");return this.removeAllListeners("close"),e}if("error"===e){this[pc]=n,super.emit(jc,n);const e=!(this[Tc]&&!this.listeners("error").length)&&super.emit("error",n);return this[dc](),e}if("resume"===e){const e=super.emit("resume");return this[dc](),e}if("finish"===e||"prefinish"===e){const t=super.emit(e);return this.removeAllListeners(e),t}const r=super.emit(e,...t);return this[dc](),r}[_c](e){for(const t of this[Fc])!1===t.dest.write(e)&&this.pause();const t=!this[Nc]&&super.emit("data",e);return this[dc](),t}[Uc](){return!this[lc]&&(this[lc]=!0,this.readable=!1,this[Pc]?(qc(()=>this[xc]()),!0):this[xc]())}[xc](){if(this[bc]){const e=this[bc].end();if(e){for(const t of this[Fc])t.dest.write(e);this[Nc]||super.emit("data",e)}}for(const e of this[Fc])e.end();const e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){const e=Object.assign([],{dataLength:0});this[Sc]||(e.dataLength=0);const t=this.promise();return this.on("data",t=>{e.push(t),this[Sc]||(e.dataLength+=t.length)}),await t,e}async concat(){if(this[Sc])throw new Error("cannot concat in objectMode");const e=await this.collect();return this[Ac]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(Rc,()=>t(new Error("stream destroyed"))),this.on("error",e=>t(e)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Nc]=!1;let e=!1;const t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();const n=this.read();if(null!==n)return Promise.resolve({done:!1,value:n});if(this[cc])return t();let r,o;const i=e=>{this.off("data",u),this.off("end",s),this.off(Rc,a),t(),o(e)},u=e=>{this.off("error",i),this.off("end",s),this.off(Rc,a),this.pause(),r({value:e,done:!!this[cc]})},s=()=>{this.off("error",i),this.off("data",u),this.off(Rc,a),t(),r({done:!0,value:void 0})},a=()=>i(new Error("stream destroyed"));return new Promise((e,t)=>{o=t,r=e,this.once(Rc,a),this.once("error",i),this.once("end",s),this.once("data",u)})},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Nc]=!1;let e=!1;const t=()=>(this.pause(),this.off(jc,t),this.off(Rc,t),this.off("end",t),e=!0,{done:!0,value:void 0});return this.once("end",t),this.once(jc,t),this.once(Rc,t),{next:()=>{if(e)return t();const n=this.read();return null===n?t():{done:!1,value:n}},throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[Rc])return e?this.emit("error",e):this.emit(Rc),this;this[Rc]=!0,this[Nc]=!0,this[wc].length=0,this[Dc]=0;return"function"!=typeof this.close||this[fc]||this.close(),e?this.emit("error",e):this.emit(Rc),this}static get isStream(){return uc}}const $c=k.default.writev,Wc=Symbol("_autoClose"),Vc=Symbol("_close"),Hc=Symbol("_ended"),Zc=Symbol("_fd"),Yc=Symbol("_finished"),Kc=Symbol("_flags"),Xc=Symbol("_flush"),Qc=Symbol("_handleChunk"),ed=Symbol("_makeBuf"),td=Symbol("_mode"),nd=Symbol("_needDrain"),rd=Symbol("_onerror"),od=Symbol("_onopen"),id=Symbol("_onread"),ud=Symbol("_onwrite"),sd=Symbol("_open"),ad=Symbol("_path"),cd=Symbol("_pos"),dd=Symbol("_queue"),ld=Symbol("_read"),hd=Symbol("_readSize"),pd=Symbol("_reading"),fd=Symbol("_remain"),md=Symbol("_size"),vd=Symbol("_write"),Ed=Symbol("_writing"),Ad=Symbol("_defaultFlag"),bd=Symbol("_errored");class yd extends Jc{[bd]=!1;[Zc];[ad];[hd];[pd]=!1;[md];[fd];[Wc];constructor(e,t){if(super(t=t||{}),this.readable=!0,this.writable=!1,"string"!=typeof e)throw new TypeError("path must be a string");this[bd]=!1,this[Zc]="number"==typeof t.fd?t.fd:void 0,this[ad]=e,this[hd]=t.readSize||16777216,this[pd]=!1,this[md]="number"==typeof t.size?t.size:1/0,this[fd]=this[md],this[Wc]="boolean"!=typeof t.autoClose||t.autoClose,"number"==typeof this[Zc]?this[ld]():this[sd]()}get fd(){return this[Zc]}get path(){return this[ad]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[sd](){k.default.open(this[ad],"r",(e,t)=>this[od](e,t))}[od](e,t){e?this[rd](e):(this[Zc]=t,this.emit("open",t),this[ld]())}[ed](){return Buffer.allocUnsafe(Math.min(this[hd],this[fd]))}[ld](){if(!this[pd]){this[pd]=!0;const e=this[ed]();if(0===e.length)return process.nextTick(()=>this[id](null,0,e));k.default.read(this[Zc],e,0,e.length,null,(e,t,n)=>this[id](e,t,n))}}[id](e,t,n){this[pd]=!1,e?this[rd](e):this[Qc](t,n)&&this[ld]()}[Vc](){if(this[Wc]&&"number"==typeof this[Zc]){const e=this[Zc];this[Zc]=void 0,k.default.close(e,e=>e?this.emit("error",e):this.emit("close"))}}[rd](e){this[pd]=!0,this[Vc](),this.emit("error",e)}[Qc](e,t){let n=!1;return this[fd]-=e,e>0&&(n=super.write(e<t.length?t.subarray(0,e):t)),(0===e||this[fd]<=0)&&(n=!1,this[Vc](),super.end()),n}emit(e,...t){switch(e){case"prefinish":case"finish":return!1;case"drain":return"number"==typeof this[Zc]&&this[ld](),!1;case"error":return!this[bd]&&(this[bd]=!0,super.emit(e,...t));default:return super.emit(e,...t)}}}class gd extends yd{[sd](){let e=!0;try{this[od](null,k.default.openSync(this[ad],"r")),e=!1}finally{e&&this[Vc]()}}[ld](){let e=!0;try{if(!this[pd]){for(this[pd]=!0;;){const e=this[ed](),t=0===e.length?0:k.default.readSync(this[Zc],e,0,e.length,null);if(!this[Qc](t,e))break}this[pd]=!1}e=!1}finally{e&&this[Vc]()}}[Vc](){if(this[Wc]&&"number"==typeof this[Zc]){const e=this[Zc];this[Zc]=void 0,k.default.closeSync(e),this.emit("close")}}}class Cd extends D.default{readable=!1;writable=!0;[bd]=!1;[Ed]=!1;[Hc]=!1;[dd]=[];[nd]=!1;[ad];[td];[Wc];[Zc];[Ad];[Kc];[Yc]=!1;[cd];constructor(e,t){super(t=t||{}),this[ad]=e,this[Zc]="number"==typeof t.fd?t.fd:void 0,this[td]=void 0===t.mode?438:t.mode,this[cd]="number"==typeof t.start?t.start:void 0,this[Wc]="boolean"!=typeof t.autoClose||t.autoClose;const n=void 0!==this[cd]?"r+":"w";this[Ad]=void 0===t.flags,this[Kc]=void 0===t.flags?n:t.flags,void 0===this[Zc]&&this[sd]()}emit(e,...t){if("error"===e){if(this[bd])return!1;this[bd]=!0}return super.emit(e,...t)}get fd(){return this[Zc]}get path(){return this[ad]}[rd](e){this[Vc](),this[Ed]=!0,this.emit("error",e)}[sd](){k.default.open(this[ad],this[Kc],this[td],(e,t)=>this[od](e,t))}[od](e,t){this[Ad]&&"r+"===this[Kc]&&e&&"ENOENT"===e.code?(this[Kc]="w",this[sd]()):e?this[rd](e):(this[Zc]=t,this.emit("open",t),this[Ed]||this[Xc]())}end(e,t){return e&&this.write(e,t),this[Hc]=!0,this[Ed]||this[dd].length||"number"!=typeof this[Zc]||this[ud](null,0),this}write(e,t){return"string"==typeof e&&(e=Buffer.from(e,t)),this[Hc]?(this.emit("error",new Error("write() after end()")),!1):void 0===this[Zc]||this[Ed]||this[dd].length?(this[dd].push(e),this[nd]=!0,!1):(this[Ed]=!0,this[vd](e),!0)}[vd](e){k.default.write(this[Zc],e,0,e.length,this[cd],(e,t)=>this[ud](e,t))}[ud](e,t){e?this[rd](e):(void 0!==this[cd]&&"number"==typeof t&&(this[cd]+=t),this[dd].length?this[Xc]():(this[Ed]=!1,this[Hc]&&!this[Yc]?(this[Yc]=!0,this[Vc](),this.emit("finish")):this[nd]&&(this[nd]=!1,this.emit("drain"))))}[Xc](){if(0===this[dd].length)this[Hc]&&this[ud](null,0);else if(1===this[dd].length)this[vd](this[dd].pop());else{const e=this[dd];this[dd]=[],$c(this[Zc],e,this[cd],(e,t)=>this[ud](e,t))}}[Vc](){if(this[Wc]&&"number"==typeof this[Zc]){const e=this[Zc];this[Zc]=void 0,k.default.close(e,e=>e?this.emit("error",e):this.emit("close"))}}}class wd extends Cd{[sd](){let e;if(this[Ad]&&"r+"===this[Kc])try{e=k.default.openSync(this[ad],this[Kc],this[td])}catch(e){if("ENOENT"===e?.code)return this[Kc]="w",this[sd]();throw e}else e=k.default.openSync(this[ad],this[Kc],this[td]);this[od](null,e)}[Vc](){if(this[Wc]&&"number"==typeof this[Zc]){const e=this[Zc];this[Zc]=void 0,k.default.closeSync(e),this.emit("close")}}[vd](e){let t=!0;try{this[ud](null,k.default.writeSync(this[Zc],e,0,e.length,this[cd])),t=!1}finally{if(t)try{this[Vc]()}catch{}}}}const Fd=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]),Dd=e=>{const t=Fd.get(e);return t||e},Bd=(e={})=>{if(!e)return{};const t={};for(const[n,r]of Object.entries(e)){t[Dd(n)]=r}return void 0===t.chmod&&!1===t.noChmod&&(t.chmod=!0),delete t.noChmod,t},Id=(e,t,n,r,o)=>Object.assign((i=[],u,s)=>{Array.isArray(i)&&(u=i,i={}),"function"==typeof u&&(s=u,u=void 0),u=u?Array.from(u):[];const a=Bd(i);if(o?.(a,u),(c=a).sync&&c.file){if("function"==typeof s)throw new TypeError("callback not supported for sync tar functions");return e(a,u)}if((e=>!e.sync&&!!e.file)(a)){const e=t(a,u),n=s||void 0;return n?e.then(()=>n(),n):e}if((e=>!!e.sync&&!e.file)(a)){if("function"==typeof s)throw new TypeError("callback not supported for sync tar functions");return n(a,u)}if((e=>!e.sync&&!e.file)(a)){if("function"==typeof s)throw new TypeError("callback only supported with file option");return r(a,u)}throw new Error("impossible options??");var c},{syncFile:e,asyncFile:t,syncNoFile:n,asyncNoFile:r,validate:o}),Sd="object"==typeof process&&process?process:{stdout:null,stderr:null},Rd=e=>!!e&&"object"==typeof e&&(e instanceof pl||e instanceof M.default||jd(e)||_d(e)),jd=e=>!!e&&"object"==typeof e&&e instanceof m.EventEmitter&&"function"==typeof e.pipe&&e.pipe!==M.default.Writable.prototype.pipe,_d=e=>!!e&&"object"==typeof e&&e instanceof m.EventEmitter&&"function"==typeof e.write&&"function"==typeof e.end,Ud=Symbol("EOF"),xd=Symbol("maybeEmitEnd"),Pd=Symbol("emittedEnd"),Od=Symbol("emittingEnd"),kd=Symbol("emittedError"),Td=Symbol("closed"),Ld=Symbol("read"),Nd=Symbol("flush"),qd=Symbol("flushChunk"),Gd=Symbol("encoding"),Md=Symbol("decoder"),zd=Symbol("flowing"),Jd=Symbol("paused"),$d=Symbol("resume"),Wd=Symbol("buffer"),Vd=Symbol("pipes"),Hd=Symbol("bufferLength"),Zd=Symbol("bufferPush"),Yd=Symbol("bufferShift"),Kd=Symbol("objectMode"),Xd=Symbol("destroyed"),Qd=Symbol("error"),el=Symbol("emitData"),tl=Symbol("emitEnd"),nl=Symbol("emitEnd2"),rl=Symbol("async"),ol=Symbol("abort"),il=Symbol("aborted"),ul=Symbol("signal"),sl=Symbol("dataListeners"),al=Symbol("discarded"),cl=e=>Promise.resolve().then(e),dl=e=>e();class ll{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[$d](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class hl extends ll{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>t.emit("error",e),e.on("error",this.proxyErrors)}}class pl extends m.EventEmitter{[zd]=!1;[Jd]=!1;[Vd]=[];[Wd]=[];[Kd];[Gd];[rl];[Md];[Ud]=!1;[Pd]=!1;[Od]=!1;[Td]=!1;[kd]=null;[Hd]=0;[Xd]=!1;[ul];[il]=!1;[sl]=0;[al]=!1;writable=!0;readable=!0;constructor(...e){const t=e[0]||{};if(super(),t.objectMode&&"string"==typeof t.encoding)throw new TypeError("Encoding and objectMode may not be used together");t.objectMode?(this[Kd]=!0,this[Gd]=null):(e=>!e.objectMode&&!!e.encoding&&"buffer"!==e.encoding)(t)?(this[Gd]=t.encoding,this[Kd]=!1):(this[Kd]=!1,this[Gd]=null),this[rl]=!!t.async,this[Md]=this[Gd]?new E.StringDecoder(this[Gd]):null,t&&!0===t.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[Wd]}),t&&!0===t.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[Vd]});const{signal:n}=t;n&&(this[ul]=n,n.aborted?this[ol]():n.addEventListener("abort",()=>this[ol]()))}get bufferLength(){return this[Hd]}get encoding(){return this[Gd]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Kd]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[rl]}set async(e){this[rl]=this[rl]||!!e}[ol](){this[il]=!0,this.emit("abort",this[ul]?.reason),this.destroy(this[ul]?.reason)}get aborted(){return this[il]}set aborted(e){}write(e,t,n){if(this[il])return!1;if(this[Ud])throw new Error("write after end");if(this[Xd])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof t&&(n=t,t="utf8"),t||(t="utf8");const r=this[rl]?cl:dl;if(!this[Kd]&&!Buffer.isBuffer(e))if(o=e,!Buffer.isBuffer(o)&&ArrayBuffer.isView(o))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if((e=>e instanceof ArrayBuffer||!!e&&"object"==typeof e&&e.constructor&&"ArrayBuffer"===e.constructor.name&&e.byteLength>=0)(e))e=Buffer.from(e);else if("string"!=typeof e)throw new Error("Non-contiguous data written to non-objectMode stream");var o;return this[Kd]?(this[zd]&&0!==this[Hd]&&this[Nd](!0),this[zd]?this.emit("data",e):this[Zd](e),0!==this[Hd]&&this.emit("readable"),n&&r(n),this[zd]):e.length?("string"!=typeof e||t===this[Gd]&&!this[Md]?.lastNeed||(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Gd]&&(e=this[Md].write(e)),this[zd]&&0!==this[Hd]&&this[Nd](!0),this[zd]?this.emit("data",e):this[Zd](e),0!==this[Hd]&&this.emit("readable"),n&&r(n),this[zd]):(0!==this[Hd]&&this.emit("readable"),n&&r(n),this[zd])}read(e){if(this[Xd])return null;if(this[al]=!1,0===this[Hd]||0===e||e&&e>this[Hd])return this[xd](),null;this[Kd]&&(e=null),this[Wd].length>1&&!this[Kd]&&(this[Wd]=[this[Gd]?this[Wd].join(""):Buffer.concat(this[Wd],this[Hd])]);const t=this[Ld](e||null,this[Wd][0]);return this[xd](),t}[Ld](e,t){if(this[Kd])this[Yd]();else{const n=t;e===n.length||null===e?this[Yd]():"string"==typeof n?(this[Wd][0]=n.slice(e),t=n.slice(0,e),this[Hd]-=e):(this[Wd][0]=n.subarray(e),t=n.subarray(0,e),this[Hd]-=e)}return this.emit("data",t),this[Wd].length||this[Ud]||this.emit("drain"),t}end(e,t,n){return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t="utf8"),void 0!==e&&this.write(e,t),n&&this.once("end",n),this[Ud]=!0,this.writable=!1,!this[zd]&&this[Jd]||this[xd](),this}[$d](){this[Xd]||(this[sl]||this[Vd].length||(this[al]=!0),this[Jd]=!1,this[zd]=!0,this.emit("resume"),this[Wd].length?this[Nd]():this[Ud]?this[xd]():this.emit("drain"))}resume(){return this[$d]()}pause(){this[zd]=!1,this[Jd]=!0,this[al]=!1}get destroyed(){return this[Xd]}get flowing(){return this[zd]}get paused(){return this[Jd]}[Zd](e){this[Kd]?this[Hd]+=1:this[Hd]+=e.length,this[Wd].push(e)}[Yd](){return this[Kd]?this[Hd]-=1:this[Hd]-=this[Wd][0].length,this[Wd].shift()}[Nd](e=!1){do{}while(this[qd](this[Yd]())&&this[Wd].length);e||this[Wd].length||this[Ud]||this.emit("drain")}[qd](e){return this.emit("data",e),this[zd]}pipe(e,t){if(this[Xd])return e;this[al]=!1;const n=this[Pd];return t=t||{},e===Sd.stdout||e===Sd.stderr?t.end=!1:t.end=!1!==t.end,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[Vd].push(t.proxyErrors?new hl(this,e,t):new ll(this,e,t)),this[rl]?cl(()=>this[$d]()):this[$d]()),e}unpipe(e){const t=this[Vd].find(t=>t.dest===e);t&&(1===this[Vd].length?(this[zd]&&0===this[sl]&&(this[zd]=!1),this[Vd]=[]):this[Vd].splice(this[Vd].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){const n=super.on(e,t);if("data"===e)this[al]=!1,this[sl]++,this[Vd].length||this[zd]||this[$d]();else if("readable"===e&&0!==this[Hd])super.emit("readable");else if((e=>"end"===e||"finish"===e||"prefinish"===e)(e)&&this[Pd])super.emit(e),this.removeAllListeners(e);else if("error"===e&&this[kd]){const e=t;this[rl]?cl(()=>e.call(this,this[kd])):e.call(this,this[kd])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){const n=super.off(e,t);return"data"===e&&(this[sl]=this.listeners("data").length,0!==this[sl]||this[al]||this[Vd].length||(this[zd]=!1)),n}removeAllListeners(e){const t=super.removeAllListeners(e);return"data"!==e&&void 0!==e||(this[sl]=0,this[al]||this[Vd].length||(this[zd]=!1)),t}get emittedEnd(){return this[Pd]}[xd](){this[Od]||this[Pd]||this[Xd]||0!==this[Wd].length||!this[Ud]||(this[Od]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Td]&&this.emit("close"),this[Od]=!1)}emit(e,...t){const n=t[0];if("error"!==e&&"close"!==e&&e!==Xd&&this[Xd])return!1;if("data"===e)return!(!this[Kd]&&!n)&&(this[rl]?(cl(()=>this[el](n)),!0):this[el](n));if("end"===e)return this[tl]();if("close"===e){if(this[Td]=!0,!this[Pd]&&!this[Xd])return!1;const e=super.emit("close");return this.removeAllListeners("close"),e}if("error"===e){this[kd]=n,super.emit(Qd,n);const e=!(this[ul]&&!this.listeners("error").length)&&super.emit("error",n);return this[xd](),e}if("resume"===e){const e=super.emit("resume");return this[xd](),e}if("finish"===e||"prefinish"===e){const t=super.emit(e);return this.removeAllListeners(e),t}const r=super.emit(e,...t);return this[xd](),r}[el](e){for(const t of this[Vd])!1===t.dest.write(e)&&this.pause();const t=!this[al]&&super.emit("data",e);return this[xd](),t}[tl](){return!this[Pd]&&(this[Pd]=!0,this.readable=!1,this[rl]?(cl(()=>this[nl]()),!0):this[nl]())}[nl](){if(this[Md]){const e=this[Md].end();if(e){for(const t of this[Vd])t.dest.write(e);this[al]||super.emit("data",e)}}for(const e of this[Vd])e.end();const e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){const e=Object.assign([],{dataLength:0});this[Kd]||(e.dataLength=0);const t=this.promise();return this.on("data",t=>{e.push(t),this[Kd]||(e.dataLength+=t.length)}),await t,e}async concat(){if(this[Kd])throw new Error("cannot concat in objectMode");const e=await this.collect();return this[Gd]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(Xd,()=>t(new Error("stream destroyed"))),this.on("error",e=>t(e)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[al]=!1;let e=!1;const t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();const n=this.read();if(null!==n)return Promise.resolve({done:!1,value:n});if(this[Ud])return t();let r,o;const i=e=>{this.off("data",u),this.off("end",s),this.off(Xd,a),t(),o(e)},u=e=>{this.off("error",i),this.off("end",s),this.off(Xd,a),this.pause(),r({value:e,done:!!this[Ud]})},s=()=>{this.off("error",i),this.off("data",u),this.off(Xd,a),t(),r({done:!0,value:void 0})},a=()=>i(new Error("stream destroyed"));return new Promise((e,t)=>{o=t,r=e,this.once(Xd,a),this.once("error",i),this.once("end",s),this.once("data",u)})},throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[al]=!1;let e=!1;const t=()=>(this.pause(),this.off(Qd,t),this.off(Xd,t),this.off("end",t),e=!0,{done:!0,value:void 0});return this.once("end",t),this.once(Qd,t),this.once(Xd,t),{next:()=>{if(e)return t();const n=this.read();return null===n?t():{done:!1,value:n}},throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[Xd])return e?this.emit("error",e):this.emit(Xd),this;this[Xd]=!0,this[al]=!0,this[Wd].length=0,this[Hd]=0;return"function"!=typeof this.close||this[Td]||this.close(),e?this.emit("error",e):this.emit(Xd),this}static get isStream(){return Rd}}const fl=_.default.constants||{ZLIB_VERNUM:4736},ml=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},fl)),vl=p.Buffer.concat,El=Object.getOwnPropertyDescriptor(p.Buffer,"concat"),Al=e=>e,bl=!0===El?.writable||void 0!==El?.set?e=>{p.Buffer.concat=e?Al:vl}:e=>{},yl=Symbol("_superWrite");class gl extends Error{code;errno;constructor(e){super("zlib: "+e.message),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}const Cl=Symbol("flushFlag");class wl extends pl{#e=!1;#t=!1;#n;#r;#o;#i;#u;get sawError(){return this.#e}get handle(){return this.#i}get flushFlag(){return this.#n}constructor(e,t){if(!e||"object"!=typeof e)throw new TypeError("invalid options for ZlibBase constructor");super(e),this.#n=e.flush??0,this.#r=e.finishFlush??0,this.#o=e.fullFlushFlag??0;try{this.#i=new U[t](e)}catch(e){throw new gl(e)}this.#u=e=>{this.#e||(this.#e=!0,this.close(),this.emit("error",e))},this.#i?.on("error",e=>this.#u(new gl(e))),this.once("end",()=>this.close)}close(){this.#i&&(this.#i.close(),this.#i=void 0,this.emit("close"))}reset(){if(!this.#e)return $.default(this.#i,"zlib binding closed"),this.#i.reset?.()}flush(e){this.ended||("number"!=typeof e&&(e=this.#o),this.write(Object.assign(p.Buffer.alloc(0),{[Cl]:e})))}end(e,t,n){return"function"==typeof e&&(n=e,t=void 0,e=void 0),"function"==typeof t&&(n=t,t=void 0),e&&(t?this.write(e,t):this.write(e)),this.flush(this.#r),this.#t=!0,super.end(n)}get ended(){return this.#t}[yl](e){return super.write(e)}write(e,t,n){if("function"==typeof t&&(n=t,t="utf8"),"string"==typeof e&&(e=p.Buffer.from(e,t)),this.#e)return;$.default(this.#i,"zlib binding closed");const r=this.#i._handle,o=r.close;r.close=()=>{};const i=this.#i.close;let u,s;this.#i.close=()=>{},bl(!0);try{const t="number"==typeof e[Cl]?e[Cl]:this.#n;u=this.#i._processChunk(e,t),bl(!1)}catch(e){bl(!1),this.#u(new gl(e))}finally{this.#i&&(this.#i._handle=r,r.close=o,this.#i.close=i,this.#i.removeAllListeners("error"))}if(this.#i&&this.#i.on("error",e=>this.#u(new gl(e))),u)if(Array.isArray(u)&&u.length>0){const e=u[0];s=this[yl](p.Buffer.from(e));for(let e=1;e<u.length;e++)s=this[yl](u[e])}else s=this[yl](p.Buffer.from(u));return n&&n(),s}}class Fl extends wl{#s;#a;constructor(e,t){(e=e||{}).flush=e.flush||ml.Z_NO_FLUSH,e.finishFlush=e.finishFlush||ml.Z_FINISH,e.fullFlushFlag=ml.Z_FULL_FLUSH,super(e,t),this.#s=e.level,this.#a=e.strategy}params(e,t){if(!this.sawError){if(!this.handle)throw new Error("cannot switch params when binding is closed");if(!this.handle.params)throw new Error("not supported in this implementation");if(this.#s!==e||this.#a!==t){this.flush(ml.Z_SYNC_FLUSH),$.default(this.handle,"zlib binding closed");const n=this.handle.flush;this.handle.flush=(e,t)=>{"function"==typeof e&&(t=e,e=this.flushFlag),this.flush(e),t?.()};try{this.handle.params(e,t)}finally{this.handle.flush=n}this.handle&&(this.#s=e,this.#a=t)}}}}class Dl extends Fl{#c;constructor(e){super(e,"Gzip"),this.#c=e&&!!e.portable}[yl](e){return this.#c?(this.#c=!1,e[9]=255,super[yl](e)):super[yl](e)}}class Bl extends Fl{constructor(e){super(e,"Unzip")}}class Il extends wl{constructor(e,t){(e=e||{}).flush=e.flush||ml.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||ml.BROTLI_OPERATION_FINISH,e.fullFlushFlag=ml.BROTLI_OPERATION_FLUSH,super(e,t)}}class Sl extends Il{constructor(e){super(e,"BrotliCompress")}}class Rl extends Il{constructor(e){super(e,"BrotliDecompress")}}class jl{tail;head;length=0;static create(e=[]){return new jl(e)}constructor(e=[]){for(const t of e)this.push(t)}*[Symbol.iterator](){for(let e=this.head;e;e=e.next)yield e.value}removeNode(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");const t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),this.length--,e.next=void 0,e.prev=void 0,e.list=void 0,t}unshiftNode(e){if(e===this.head)return;e.list&&e.list.removeNode(e);const t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}pushNode(e){if(e===this.tail)return;e.list&&e.list.removeNode(e);const t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}push(...e){for(let t=0,n=e.length;t<n;t++)Ul(this,e[t]);return this.length}unshift(...e){for(var t=0,n=e.length;t<n;t++)xl(this,e[t]);return this.length}pop(){if(!this.tail)return;const e=this.tail.value,t=this.tail;return this.tail=this.tail.prev,this.tail?this.tail.next=void 0:this.head=void 0,t.list=void 0,this.length--,e}shift(){if(!this.head)return;const e=this.head.value,t=this.head;return this.head=this.head.next,this.head?this.head.prev=void 0:this.tail=void 0,t.list=void 0,this.length--,e}forEach(e,t){t=t||this;for(let n=this.head,r=0;n;r++)e.call(t,n.value,r,this),n=n.next}forEachReverse(e,t){t=t||this;for(let n=this.tail,r=this.length-1;n;r--)e.call(t,n.value,r,this),n=n.prev}get(e){let t=0,n=this.head;for(;n&&t<e;t++)n=n.next;if(t===e&&n)return n.value}getReverse(e){let t=0,n=this.tail;for(;n&&t<e;t++)n=n.prev;if(t===e&&n)return n.value}map(e,t){t=t||this;const n=new jl;for(let r=this.head;r;)n.push(e.call(t,r.value,this)),r=r.next;return n}mapReverse(e,t){t=t||this;var n=new jl;for(let r=this.tail;r;)n.push(e.call(t,r.value,this)),r=r.prev;return n}reduce(e,t){let n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;r;o++)n=e(n,r.value,o),r=r.next;return n}reduceReverse(e,t){let n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(let t=this.length-1;r;t--)n=e(n,r.value,t),r=r.prev;return n}toArray(){const e=new Array(this.length);for(let t=0,n=this.head;n;t++)e[t]=n.value,n=n.next;return e}toArrayReverse(){const e=new Array(this.length);for(let t=0,n=this.tail;n;t++)e[t]=n.value,n=n.prev;return e}slice(e=0,t=this.length){t<0&&(t+=this.length),e<0&&(e+=this.length);const n=new jl;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);let r=this.head,o=0;for(o=0;r&&o<e;o++)r=r.next;for(;r&&o<t;o++,r=r.next)n.push(r.value);return n}sliceReverse(e=0,t=this.length){t<0&&(t+=this.length),e<0&&(e+=this.length);const n=new jl;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);let r=this.length,o=this.tail;for(;o&&r>t;r--)o=o.prev;for(;o&&r>e;r--,o=o.prev)n.push(o.value);return n}splice(e,t=0,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);let r=this.head;for(let t=0;r&&t<e;t++)r=r.next;const o=[];for(let e=0;r&&e<t;e++)o.push(r.value),r=this.removeNode(r);r?r!==this.tail&&(r=r.prev):r=this.tail;for(const e of n)r=_l(this,r,e);return o}reverse(){const e=this.head,t=this.tail;for(let t=e;t;t=t.prev){const e=t.prev;t.prev=t.next,t.next=e}return this.head=t,this.tail=e,this}}function _l(e,t,n){const r=t,o=t?t.next:e.head,i=new Pl(n,r,o,e);return void 0===i.next&&(e.tail=i),void 0===i.prev&&(e.head=i),e.length++,i}function Ul(e,t){e.tail=new Pl(t,e.tail,void 0,e),e.head||(e.head=e.tail),e.length++}function xl(e,t){e.head=new Pl(t,void 0,e.head,e),e.tail||(e.tail=e.head),e.length++}class Pl{list;next;prev;value;constructor(e,t,n,r){this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=void 0,n?(n.prev=this,this.next=n):this.next=void 0}}const Ol=(e,t)=>{t[0]=128;for(var n=t.length;n>1;n--)t[n-1]=255&e,e=Math.floor(e/256)},kl=(e,t)=>{t[0]=255;var n=!1;e*=-1;for(var r=t.length;r>1;r--){var o=255&e;e=Math.floor(e/256),n?t[r-1]=Nl(o):0===o?t[r-1]=0:(n=!0,t[r-1]=ql(o))}},Tl=e=>{for(var t=e.length,n=0,r=!1,o=t-1;o>-1;o--){var i,u=Number(e[o]);r?i=Nl(u):0===u?i=u:(r=!0,i=ql(u)),0!==i&&(n-=i*Math.pow(256,t-o-1))}return n},Ll=e=>{for(var t=e.length,n=0,r=t-1;r>-1;r--){var o=Number(e[r]);0!==o&&(n+=o*Math.pow(256,t-r-1))}return n},Nl=e=>255&(255^e),ql=e=>1+(255^e)&255,Gl=e=>Ml.has(e),Ml=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),zl=new Map(Array.from(Ml).map(e=>[e[1],e[0]]));class Jl{cksumValid=!1;needPax=!1;nullBlock=!1;block;path;mode;uid;gid;size;cksum;#d="Unsupported";linkpath;uname;gname;devmaj=0;devmin=0;atime;ctime;mtime;charset;comment;constructor(e,t=0,n,r){Buffer.isBuffer(e)?this.decode(e,t||0,n,r):e&&this.#l(e)}decode(e,t,n,r){if(t||(t=0),!(e&&e.length>=t+512))throw new Error("need 512 bytes for header");this.path=Wl(e,t,100),this.mode=Zl(e,t+100,8),this.uid=Zl(e,t+108,8),this.gid=Zl(e,t+116,8),this.size=Zl(e,t+124,12),this.mtime=Vl(e,t+136,12),this.cksum=Zl(e,t+148,12),r&&this.#l(r,!0),n&&this.#l(n);const o=Wl(e,t+156,1);if(Gl(o)&&(this.#d=o||"0"),"0"===this.#d&&"/"===this.path.slice(-1)&&(this.#d="5"),"5"===this.#d&&(this.size=0),this.linkpath=Wl(e,t+157,100),"ustar\x0000"===e.subarray(t+257,t+265).toString())if(this.uname=Wl(e,t+265,32),this.gname=Wl(e,t+297,32),this.devmaj=Zl(e,t+329,8)??0,this.devmin=Zl(e,t+337,8)??0,0!==e[t+475]){const n=Wl(e,t+345,155);this.path=n+"/"+this.path}else{const n=Wl(e,t+345,130);n&&(this.path=n+"/"+this.path),this.atime=Vl(e,t+476,12),this.ctime=Vl(e,t+488,12)}let i=256;for(let n=t;n<t+148;n++)i+=e[n];for(let n=t+156;n<t+512;n++)i+=e[n];this.cksumValid=i===this.cksum,void 0===this.cksum&&256===i&&(this.nullBlock=!0)}#l(e,t=!1){Object.assign(this,Object.fromEntries(Object.entries(e).filter(([e,n])=>!(null==n||"path"===e&&t||"linkpath"===e&&t||"global"===e))))}encode(e,t=0){if(e||(e=this.block=Buffer.alloc(512)),"Unsupported"===this.#d&&(this.#d="0"),!(e.length>=t+512))throw new Error("need 512 bytes for header");const n=this.ctime||this.atime?130:155,r=$l(this.path||"",n),o=r[0],i=r[1];this.needPax=!!r[2],this.needPax=oh(e,t,100,o)||this.needPax,this.needPax=Xl(e,t+100,8,this.mode)||this.needPax,this.needPax=Xl(e,t+108,8,this.uid)||this.needPax,this.needPax=Xl(e,t+116,8,this.gid)||this.needPax,this.needPax=Xl(e,t+124,12,this.size)||this.needPax,this.needPax=nh(e,t+136,12,this.mtime)||this.needPax,e[t+156]=this.#d.charCodeAt(0),this.needPax=oh(e,t+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",t+257,8),this.needPax=oh(e,t+265,32,this.uname)||this.needPax,this.needPax=oh(e,t+297,32,this.gname)||this.needPax,this.needPax=Xl(e,t+329,8,this.devmaj)||this.needPax,this.needPax=Xl(e,t+337,8,this.devmin)||this.needPax,this.needPax=oh(e,t+345,n,i)||this.needPax,0!==e[t+475]?this.needPax=oh(e,t+345,155,i)||this.needPax:(this.needPax=oh(e,t+345,130,i)||this.needPax,this.needPax=nh(e,t+476,12,this.atime)||this.needPax,this.needPax=nh(e,t+488,12,this.ctime)||this.needPax);let u=256;for(let n=t;n<t+148;n++)u+=e[n];for(let n=t+156;n<t+512;n++)u+=e[n];return this.cksum=u,Xl(e,t+148,8,this.cksum),this.cksumValid=!0,this.needPax}get type(){return"Unsupported"===this.#d?this.#d:Ml.get(this.#d)}get typeKey(){return this.#d}set type(e){const t=String(zl.get(e));if(Gl(t)||"Unsupported"===t)this.#d=t;else{if(!Gl(e))throw new TypeError("invalid entry type: "+e);this.#d=e}}}const $l=(e,t)=>{const n=100;let r,o=e,i="";const u=A.posix.parse(e).root||".";if(Buffer.byteLength(o)<n)r=[o,i,!1];else{i=A.posix.dirname(o),o=A.posix.basename(o);do{Buffer.byteLength(o)<=n&&Buffer.byteLength(i)<=t?r=[o,i,!1]:Buffer.byteLength(o)>n&&Buffer.byteLength(i)<=t?r=[o.slice(0,99),i,!0]:(o=A.posix.join(A.posix.basename(i),o),i=A.posix.dirname(i))}while(i!==u&&void 0===r);r||(r=[e.slice(0,99),"",!0])}return r},Wl=(e,t,n)=>e.subarray(t,t+n).toString("utf8").replace(/\0.*/,""),Vl=(e,t,n)=>Hl(Zl(e,t,n)),Hl=e=>void 0===e?void 0:new Date(1e3*e),Zl=(e,t,n)=>128&Number(e[t])?(e=>{const t=e[0],n=128===t?Ll(e.subarray(1,e.length)):255===t?Tl(e):null;if(null===n)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(n))throw Error("parsed number outside of javascript safe integer range");return n})(e.subarray(t,t+n)):Yl(e,t,n),Yl=(e,t,n)=>{return r=parseInt(e.subarray(t,t+n).toString("utf8").replace(/\0.*$/,"").trim(),8),isNaN(r)?void 0:r;var r},Kl={12:8589934591,8:2097151},Xl=(e,t,n,r)=>void 0!==r&&(r>Kl[n]||r<0?(((e,t)=>{if(!Number.isSafeInteger(e))throw Error("cannot encode number outside of javascript safe integer range");e<0?kl(e,t):Ol(e,t)})(r,e.subarray(t,t+n)),!0):(Ql(e,t,n,r),!1)),Ql=(e,t,n,r)=>e.write(eh(r,n),t,n,"ascii"),eh=(e,t)=>th(Math.floor(e).toString(8),t),th=(e,t)=>(e.length===t-1?e:new Array(t-e.length-1).join("0")+e+" ")+"\0",nh=(e,t,n,r)=>void 0!==r&&Xl(e,t,n,r.getTime()/1e3),rh=new Array(156).join("\0"),oh=(e,t,n,r)=>void 0!==r&&(e.write(r+rh,t,n,"utf8"),r.length!==Buffer.byteLength(r)||r.length>n);class ih{atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(e,t=!1){this.atime=e.atime,this.charset=e.charset,this.comment=e.comment,this.ctime=e.ctime,this.dev=e.dev,this.gid=e.gid,this.global=t,this.gname=e.gname,this.ino=e.ino,this.linkpath=e.linkpath,this.mtime=e.mtime,this.nlink=e.nlink,this.path=e.path,this.size=e.size,this.uid=e.uid,this.uname=e.uname}encode(){const e=this.encodeBody();if(""===e)return Buffer.allocUnsafe(0);const t=Buffer.byteLength(e),n=512*Math.ceil(1+t/512),r=Buffer.allocUnsafe(n);for(let e=0;e<512;e++)r[e]=0;new Jl({path:("PaxHeader/"+A.basename(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:t,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(r),r.write(e,512,t,"utf8");for(let e=t+512;e<r.length;e++)r[e]=0;return r}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(e){if(void 0===this[e])return"";const t=this[e],n=" "+("dev"===e||"ino"===e||"nlink"===e?"SCHILY.":"")+e+"="+(t instanceof Date?t.getTime()/1e3:t)+"\n",r=Buffer.byteLength(n);let o=Math.floor(Math.log(r)/Math.log(10))+1;r+o>=Math.pow(10,o)&&(o+=1);return o+r+n}static parse(e,t,n=!1){return new ih(uh(sh(e),t),n)}}const uh=(e,t)=>t?Object.assign({},t,e):e,sh=e=>e.replace(/\n$/,"").split("\n").reduce(ah,Object.create(null)),ah=(e,t)=>{const n=parseInt(t,10);if(n!==Buffer.byteLength(t)+1)return e;const r=(t=t.slice((n+" ").length)).split("="),o=r.shift();if(!o)return e;const i=o.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),u=r.join("=");return e[i]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(i)?new Date(1e3*Number(u)):/^[0-9]+$/.test(u)?+u:u,e},ch="win32"!==(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform)?e=>e:e=>e&&e.replace(/\\/g,"/");class dh extends pl{extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(e,t,n){switch(super({}),this.pause(),this.extended=t,this.globalExtended=n,this.header=e,this.remain=e.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=e.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!e.path)throw new Error("no path provided for tar.ReadEntry");this.path=ch(e.path),this.mode=e.mode,this.mode&&(this.mode=4095&this.mode),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=this.remain,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=e.linkpath?ch(e.linkpath):void 0,this.uname=e.uname,this.gname=e.gname,t&&this.#l(t),n&&this.#l(n,!0)}write(e){const t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");const n=this.remain,r=this.blockRemain;return this.remain=Math.max(0,n-t),this.blockRemain=Math.max(0,r-t),!!this.ignore||(n>=t?super.write(e):super.write(e.subarray(0,n)))}#l(e,t=!1){e.path&&(e.path=ch(e.path)),e.linkpath&&(e.linkpath=ch(e.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(e).filter(([e,n])=>!(null==n||"path"===e&&t))))}}const lh=(e,t,n,r={})=>{e.file&&(r.file=e.file),e.cwd&&(r.cwd=e.cwd),r.code=n instanceof Error&&n.code||t,r.tarCode=t,e.strict||!1===r.recoverable?n instanceof Error?e.emit("error",Object.assign(n,r)):e.emit("error",Object.assign(new Error(`${t}: ${n}`),r)):(n instanceof Error&&(r=Object.assign(n,r),n=n.message),e.emit("warn",t,n,r))},hh=Buffer.from([31,139]),ph=Symbol("state"),fh=Symbol("writeEntry"),mh=Symbol("readEntry"),vh=Symbol("nextEntry"),Eh=Symbol("processEntry"),Ah=Symbol("extendedHeader"),bh=Symbol("globalExtendedHeader"),yh=Symbol("meta"),gh=Symbol("emitMeta"),Ch=Symbol("buffer"),wh=Symbol("queue"),Fh=Symbol("ended"),Dh=Symbol("emittedEnd"),Bh=Symbol("emit"),Ih=Symbol("unzip"),Sh=Symbol("consumeChunk"),Rh=Symbol("consumeChunkSub"),jh=Symbol("consumeBody"),_h=Symbol("consumeMeta"),Uh=Symbol("consumeHeader"),xh=Symbol("consuming"),Ph=Symbol("bufferConcat"),Oh=Symbol("maybeEnd"),kh=Symbol("writing"),Th=Symbol("aborted"),Lh=Symbol("onDone"),Nh=Symbol("sawValidEntry"),qh=Symbol("sawNullBlock"),Gh=Symbol("sawEOF"),Mh=Symbol("closeStream"),zh=()=>!0;class Jh extends e.EventEmitter{file;strict;maxMetaEntrySize;filter;brotli;writable=!0;readable=!1;[wh]=new jl;[Ch];[mh];[fh];[ph]="begin";[yh]="";[Ah];[bh];[Fh]=!1;[Ih];[Th]=!1;[Nh];[qh]=!1;[Gh]=!1;[kh]=!1;[xh]=!1;[Dh]=!1;constructor(e={}){super(),this.file=e.file||"",this.on(Lh,()=>{"begin"!==this[ph]&&!1!==this[Nh]||this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(Lh,e.ondone):this.on(Lh,()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||1048576,this.filter="function"==typeof e.filter?e.filter:zh;const t=e.file&&(e.file.endsWith(".tar.br")||e.file.endsWith(".tbr"));this.brotli=e.gzip||void 0===e.brotli?!!t&&void 0:e.brotli,this.on("end",()=>this[Mh]()),"function"==typeof e.onwarn&&this.on("warn",e.onwarn),"function"==typeof e.onReadEntry&&this.on("entry",e.onReadEntry)}warn(e,t,n={}){lh(this,e,t,n)}[Uh](e,t){let n;void 0===this[Nh]&&(this[Nh]=!1);try{n=new Jl(e,t,this[Ah],this[bh])}catch(e){return this.warn("TAR_ENTRY_INVALID",e)}if(n.nullBlock)this[qh]?(this[Gh]=!0,"begin"===this[ph]&&(this[ph]="header"),this[Bh]("eof")):(this[qh]=!0,this[Bh]("nullBlock"));else if(this[qh]=!1,n.cksumValid)if(n.path){const e=n.type;if(/^(Symbolic)?Link$/.test(e)&&!n.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:n});else if(/^(Symbolic)?Link$/.test(e)||/^(Global)?ExtendedHeader$/.test(e)||!n.linkpath){const e=this[fh]=new dh(n,this[Ah],this[bh]);if(!this[Nh])if(e.remain){const t=()=>{e.invalid||(this[Nh]=!0)};e.on("end",t)}else this[Nh]=!0;e.meta?e.size>this.maxMetaEntrySize?(e.ignore=!0,this[Bh]("ignoredEntry",e),this[ph]="ignore",e.resume()):e.size>0&&(this[yh]="",e.on("data",e=>this[yh]+=e),this[ph]="meta"):(this[Ah]=void 0,e.ignore=e.ignore||!this.filter(e.path,e),e.ignore?(this[Bh]("ignoredEntry",e),this[ph]=e.remain?"ignore":"header",e.resume()):(e.remain?this[ph]="body":(this[ph]="header",e.end()),this[mh]?this[wh].push(e):(this[wh].push(e),this[vh]())))}else this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:n})}else this.warn("TAR_ENTRY_INVALID","path is required",{header:n});else this.warn("TAR_ENTRY_INVALID","checksum failure",{header:n})}[Mh](){queueMicrotask(()=>this.emit("close"))}[Eh](e){let t=!0;if(e)if(Array.isArray(e)){const[t,...n]=e;this.emit(t,...n)}else this[mh]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",()=>this[vh]()),t=!1);else this[mh]=void 0,t=!1;return t}[vh](){do{}while(this[Eh](this[wh].shift()));if(!this[wh].length){const e=this[mh];!e||e.flowing||e.size===e.remain?this[kh]||this.emit("drain"):e.once("drain",()=>this.emit("drain"))}}[jh](e,t){const n=this[fh];if(!n)throw new Error("attempt to consume body without entry??");const r=n.blockRemain??0,o=r>=e.length&&0===t?e:e.subarray(t,t+r);return n.write(o),n.blockRemain||(this[ph]="header",this[fh]=void 0,n.end()),o.length}[_h](e,t){const n=this[fh],r=this[jh](e,t);return!this[fh]&&n&&this[gh](n),r}[Bh](e,t,n){this[wh].length||this[mh]?this[wh].push([e,t,n]):this.emit(e,t,n)}[gh](e){switch(this[Bh]("meta",this[yh]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[Ah]=ih.parse(this[yh],this[Ah],!1);break;case"GlobalExtendedHeader":this[bh]=ih.parse(this[yh],this[bh],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":{const e=this[Ah]??Object.create(null);this[Ah]=e,e.path=this[yh].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{const e=this[Ah]||Object.create(null);this[Ah]=e,e.linkpath=this[yh].replace(/\0.*/,"");break}default:throw new Error("unknown meta: "+e.type)}}abort(e){this[Th]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e,t,n){if("function"==typeof t&&(n=t,t=void 0),"string"==typeof e&&(e=Buffer.from(e,"string"==typeof t?t:"utf8")),this[Th])return n?.(),!1;if((void 0===this[Ih]||void 0===this.brotli&&!1===this[Ih])&&e){if(this[Ch]&&(e=Buffer.concat([this[Ch],e]),this[Ch]=void 0),e.length<hh.length)return this[Ch]=e,n?.(),!0;for(let t=0;void 0===this[Ih]&&t<hh.length;t++)e[t]!==hh[t]&&(this[Ih]=!1);const t=void 0===this.brotli;if(!1===this[Ih]&&t)if(e.length<512){if(!this[Fh])return this[Ch]=e,n?.(),!0;this.brotli=!0}else try{new Jl(e.subarray(0,512)),this.brotli=!1}catch(e){this.brotli=!0}if(void 0===this[Ih]||!1===this[Ih]&&this.brotli){const t=this[Fh];this[Fh]=!1,this[Ih]=void 0===this[Ih]?new Bl({}):new Rl({}),this[Ih].on("data",e=>this[Sh](e)),this[Ih].on("error",e=>this.abort(e)),this[Ih].on("end",()=>{this[Fh]=!0,this[Sh]()}),this[kh]=!0;const r=!!this[Ih][t?"end":"write"](e);return this[kh]=!1,n?.(),r}}this[kh]=!0,this[Ih]?this[Ih].write(e):this[Sh](e),this[kh]=!1;const r=!this[wh].length&&(!this[mh]||this[mh].flowing);return r||this[wh].length||this[mh]?.once("drain",()=>this.emit("drain")),n?.(),r}[Ph](e){e&&!this[Th]&&(this[Ch]=this[Ch]?Buffer.concat([this[Ch],e]):e)}[Oh](){if(this[Fh]&&!this[Dh]&&!this[Th]&&!this[xh]){this[Dh]=!0;const e=this[fh];if(e&&e.blockRemain){const t=this[Ch]?this[Ch].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e}),this[Ch]&&e.write(this[Ch]),e.end()}this[Bh](Lh)}}[Sh](e){if(this[xh]&&e)this[Ph](e);else if(e||this[Ch]){if(e){if(this[xh]=!0,this[Ch]){this[Ph](e);const t=this[Ch];this[Ch]=void 0,this[Rh](t)}else this[Rh](e);for(;this[Ch]&&this[Ch]?.length>=512&&!this[Th]&&!this[Gh];){const e=this[Ch];this[Ch]=void 0,this[Rh](e)}this[xh]=!1}}else this[Oh]();this[Ch]&&!this[Fh]||this[Oh]()}[Rh](e){let t=0;const n=e.length;for(;t+512<=n&&!this[Th]&&!this[Gh];)switch(this[ph]){case"begin":case"header":this[Uh](e,t),t+=512;break;case"ignore":case"body":t+=this[jh](e,t);break;case"meta":t+=this[_h](e,t);break;default:throw new Error("invalid state: "+this[ph])}t<n&&(this[Ch]?this[Ch]=Buffer.concat([e.subarray(t),this[Ch]]):this[Ch]=e.subarray(t))}end(e,t,n){return"function"==typeof e&&(n=e,t=void 0,e=void 0),"function"==typeof t&&(n=t,t=void 0),"string"==typeof e&&(e=Buffer.from(e,t)),n&&this.once("finish",n),this[Th]||(this[Ih]?(e&&this[Ih].write(e),this[Ih].end()):(this[Fh]=!0,void 0===this.brotli&&(e=e||Buffer.alloc(0)),e&&this.write(e),this[Oh]())),this}}const $h=e=>{let t=e.length-1,n=-1;for(;t>-1&&"/"===e.charAt(t);)n=t,t--;return-1===n?e:e.slice(0,n)},Wh=(e,t)=>{const n=new Map(t.map(e=>[$h(e),!0])),r=e.filter,o=(e,t="")=>{const r=t||d.parse(e).root||".";let i;if(e===r)i=!1;else{const t=n.get(e);i=void 0!==t?t:o(d.dirname(e),r)}return n.set(e,i),i};e.filter=r?(e,t)=>r(e,t)&&o($h(e)):e=>o($h(e))},Vh=Id(e=>{const t=new Jh(e),n=e.file;let r;try{const o=J.default.statSync(n),i=e.maxReadSize||16777216;if(o.size<i)t.end(J.default.readFileSync(n));else{let e=0;const u=Buffer.allocUnsafe(i);for(r=J.default.openSync(n,"r");e<o.size;){const n=J.default.readSync(r,u,0,i,e);e+=n,t.write(u.subarray(0,n))}t.end()}}finally{if("number"==typeof r)try{J.default.closeSync(r)}catch(e){}}},(e,t)=>{const n=new Jh(e),r=e.maxReadSize||16777216,o=e.file,i=new Promise((e,t)=>{n.on("error",t),n.on("end",e),J.default.stat(o,(e,i)=>{if(e)t(e);else{const e=new yd(o,{readSize:r,size:i.size});e.on("error",t),e.pipe(n)}})});return i},e=>new Jh(e),e=>new Jh(e),(e,t)=>{t?.length&&Wh(e,t),e.noResume||(e=>{const t=e.onReadEntry;e.onReadEntry=t?e=>{t(e),e.resume()}:e=>e.resume()})(e)}),Hh=(e,t,n)=>(e&=4095,n&&(e=-19&e|384),t&&(256&e&&(e|=64),32&e&&(e|=8),4&e&&(e|=1)),e),{isAbsolute:Zh,parse:Yh}=A.win32,Kh=e=>{let t="",n=Yh(e);for(;Zh(e)||n.root;){const r="/"===e.charAt(0)&&"//?/"!==e.slice(0,4)?"/":n.root;e=e.slice(r.length),t+=r,n=Yh(e)}return[t,e]},Xh=["|","<",">","?",":"],Qh=Xh.map(e=>String.fromCharCode(61440+e.charCodeAt(0))),ep=new Map(Xh.map((e,t)=>[e,Qh[t]])),tp=new Map(Qh.map((e,t)=>[e,Xh[t]])),np=e=>Xh.reduce((e,t)=>e.split(t).join(ep.get(t)),e),rp=(e,t)=>t?(e=ch(e).replace(/^\.(\/|$)/,""),$h(t)+"/"+e):ch(e),op=Symbol("process"),ip=Symbol("file"),up=Symbol("directory"),sp=Symbol("symlink"),ap=Symbol("hardlink"),cp=Symbol("header"),dp=Symbol("read"),lp=Symbol("lstat"),hp=Symbol("onlstat"),pp=Symbol("onread"),fp=Symbol("onreadlink"),mp=Symbol("openfile"),vp=Symbol("onopenfile"),Ep=Symbol("close"),Ap=Symbol("mode"),bp=Symbol("awaitDrain"),yp=Symbol("ondrain"),gp=Symbol("prefix");class Cp extends pl{path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#h=!1;constructor(e,t={}){const n=Bd(t);super(),this.path=ch(e),this.portable=!!n.portable,this.maxReadSize=n.maxReadSize||16777216,this.linkCache=n.linkCache||new Map,this.statCache=n.statCache||new Map,this.preservePaths=!!n.preservePaths,this.cwd=ch(n.cwd||process.cwd()),this.strict=!!n.strict,this.noPax=!!n.noPax,this.noMtime=!!n.noMtime,this.mtime=n.mtime,this.prefix=n.prefix?ch(n.prefix):void 0,this.onWriteEntry=n.onWriteEntry,"function"==typeof n.onwarn&&this.on("warn",n.onwarn);let r=!1;if(!this.preservePaths){const[e,t]=Kh(this.path);e&&"string"==typeof t&&(this.path=t,r=e)}var o;this.win32=!!n.win32||"win32"===process.platform,this.win32&&(this.path=(o=this.path.replace(/\\/g,"/"),Qh.reduce((e,t)=>e.split(t).join(tp.get(t)),o)),e=e.replace(/\\/g,"/")),this.absolute=ch(n.absolute||T.default.resolve(this.cwd,e)),""===this.path&&(this.path="./"),r&&this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:this,path:r+this.path});const i=this.statCache.get(this.absolute);i?this[hp](i):this[lp]()}warn(e,t,n={}){return lh(this,e,t,n)}emit(e,...t){return"error"===e&&(this.#h=!0),super.emit(e,...t)}[lp](){k.default.lstat(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[hp](t)})}[hp](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=Dp(e),this.emit("stat",e),this[op]()}[op](){switch(this.type){case"File":return this[ip]();case"Directory":return this[up]();case"SymbolicLink":return this[sp]();default:return this.end()}}[Ap](e){return Hh(e,"Directory"===this.type,this.portable)}[gp](e){return rp(e,this.prefix)}[cp](){if(!this.stat)throw new Error("cannot write header before stat");"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.onWriteEntry?.(this),this.header=new Jl({path:this[gp](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[gp](this.linkpath):this.linkpath,mode:this[Ap](this.stat.mode),uid:this.portable?void 0:this.stat.uid,gid:this.portable?void 0:this.stat.gid,size:this.stat.size,mtime:this.noMtime?void 0:this.mtime||this.stat.mtime,type:"Unsupported"===this.type?void 0:this.type,uname:this.portable?void 0:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?void 0:this.stat.atime,ctime:this.portable?void 0:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new ih({atime:this.portable?void 0:this.header.atime,ctime:this.portable?void 0:this.header.ctime,gid:this.portable?void 0:this.header.gid,mtime:this.noMtime?void 0:this.mtime||this.header.mtime,path:this[gp](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[gp](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?void 0:this.header.uid,uname:this.portable?void 0:this.header.uname,dev:this.portable?void 0:this.stat.dev,ino:this.portable?void 0:this.stat.ino,nlink:this.portable?void 0:this.stat.nlink}).encode());const e=this.header?.block;if(!e)throw new Error("failed to encode header");super.write(e)}[up](){if(!this.stat)throw new Error("cannot create directory entry without stat");"/"!==this.path.slice(-1)&&(this.path+="/"),this.stat.size=0,this[cp](),this.end()}[sp](){k.default.readlink(this.absolute,(e,t)=>{if(e)return this.emit("error",e);this[fp](t)})}[fp](e){this.linkpath=ch(e),this[cp](),this.end()}[ap](e){if(!this.stat)throw new Error("cannot create link entry without stat");this.type="Link",this.linkpath=ch(T.default.relative(this.cwd,e)),this.stat.size=0,this[cp](),this.end()}[ip](){if(!this.stat)throw new Error("cannot create file entry without stat");if(this.stat.nlink>1){const e=`${this.stat.dev}:${this.stat.ino}`,t=this.linkCache.get(e);if(0===t?.indexOf(this.cwd))return this[ap](t);this.linkCache.set(e,this.absolute)}if(this[cp](),0===this.stat.size)return this.end();this[mp]()}[mp](){k.default.open(this.absolute,"r",(e,t)=>{if(e)return this.emit("error",e);this[vp](t)})}[vp](e){if(this.fd=e,this.#h)return this[Ep]();if(!this.stat)throw new Error("should stat before calling onopenfile");this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;const t=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(t),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[dp]()}[dp](){const{fd:e,buf:t,offset:n,length:r,pos:o}=this;if(void 0===e||void 0===t)throw new Error("cannot read file without first opening");k.default.read(e,t,n,r,o,(e,t)=>{if(e)return this[Ep](()=>this.emit("error",e));this[pp](t)})}[Ep](e=()=>{}){void 0!==this.fd&&k.default.close(this.fd,e)}[pp](e){if(e<=0&&this.remain>0){const e=Object.assign(new Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[Ep](()=>this.emit("error",e))}if(e>this.remain){const e=Object.assign(new Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[Ep](()=>this.emit("error",e))}if(!this.buf)throw new Error("should have created buffer prior to reading");if(e===this.remain)for(let t=e;t<this.length&&e<this.blockRemain;t++)this.buf[t+this.offset]=0,e++,this.remain++;const t=0===this.offset&&e===this.buf.length?this.buf:this.buf.subarray(this.offset,this.offset+e);this.write(t)?this[yp]():this[bp](()=>this[yp]())}[bp](e){this.once("drain",e)}write(e,t,n){if("function"==typeof t&&(n=t,t=void 0),"string"==typeof e&&(e=Buffer.from(e,"string"==typeof t?t:"utf8")),this.blockRemain<e.length){const e=Object.assign(new Error("writing more data than expected"),{path:this.absolute});return this.emit("error",e)}return this.remain-=e.length,this.blockRemain-=e.length,this.pos+=e.length,this.offset+=e.length,super.write(e,null,n)}[yp](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[Ep](e=>e?this.emit("error",e):this.end());if(!this.buf)throw new Error("buffer lost somehow in ONDRAIN");this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[dp]()}}class wp extends Cp{sync=!0;[lp](){this[hp](k.default.lstatSync(this.absolute))}[sp](){this[fp](k.default.readlinkSync(this.absolute))}[mp](){this[vp](k.default.openSync(this.absolute,"r"))}[dp](){let e=!0;try{const{fd:t,buf:n,offset:r,length:o,pos:i}=this;if(void 0===t||void 0===n)throw new Error("fd and buf must be set in READ method");const u=k.default.readSync(t,n,r,o,i);this[pp](u),e=!1}finally{if(e)try{this[Ep](()=>{})}catch(e){}}}[bp](e){e()}[Ep](e=()=>{}){void 0!==this.fd&&k.default.closeSync(this.fd),e()}}class Fp extends pl{blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(e,t,n={}){return lh(this,e,t,n)}constructor(e,t={}){const n=Bd(t);super(),this.preservePaths=!!n.preservePaths,this.portable=!!n.portable,this.strict=!!n.strict,this.noPax=!!n.noPax,this.noMtime=!!n.noMtime,this.onWriteEntry=n.onWriteEntry,this.readEntry=e;const{type:r}=e;if("Unsupported"===r)throw new Error("writing entry that should be ignored");this.type=r,"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.prefix=n.prefix,this.path=ch(e.path),this.mode=void 0!==e.mode?this[Ap](e.mode):void 0,this.uid=this.portable?void 0:e.uid,this.gid=this.portable?void 0:e.gid,this.uname=this.portable?void 0:e.uname,this.gname=this.portable?void 0:e.gname,this.size=e.size,this.mtime=this.noMtime?void 0:n.mtime||e.mtime,this.atime=this.portable?void 0:e.atime,this.ctime=this.portable?void 0:e.ctime,this.linkpath=void 0!==e.linkpath?ch(e.linkpath):void 0,"function"==typeof n.onwarn&&this.on("warn",n.onwarn);let o=!1;if(!this.preservePaths){const[e,t]=Kh(this.path);e&&"string"==typeof t&&(this.path=t,o=e)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.onWriteEntry?.(this),this.header=new Jl({path:this[gp](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[gp](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?void 0:this.uid,gid:this.portable?void 0:this.gid,size:this.size,mtime:this.noMtime?void 0:this.mtime,type:this.type,uname:this.portable?void 0:this.uname,atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime}),o&&this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:this,path:o+this.path}),this.header.encode()&&!this.noPax&&super.write(new ih({atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime,gid:this.portable?void 0:this.gid,mtime:this.noMtime?void 0:this.mtime,path:this[gp](this.path),linkpath:"Link"===this.type&&void 0!==this.linkpath?this[gp](this.linkpath):this.linkpath,size:this.size,uid:this.portable?void 0:this.uid,uname:this.portable?void 0:this.uname,dev:this.portable?void 0:this.readEntry.dev,ino:this.portable?void 0:this.readEntry.ino,nlink:this.portable?void 0:this.readEntry.nlink}).encode());const i=this.header?.block;if(!i)throw new Error("failed to encode header");super.write(i),e.pipe(this)}[gp](e){return rp(e,this.prefix)}[Ap](e){return Hh(e,"Directory"===this.type,this.portable)}write(e,t,n){"function"==typeof t&&(n=t,t=void 0),"string"==typeof e&&(e=Buffer.from(e,"string"==typeof t?t:"utf8"));const r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(e,n)}end(e,t,n){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),"function"==typeof e&&(n=e,t=void 0,e=void 0),"function"==typeof t&&(n=t,t=void 0),"string"==typeof e&&(e=Buffer.from(e,t??"utf8")),n&&this.once("finish",n),e?super.end(e,n):super.end(n),this}}const Dp=e=>e.isFile()?"File":e.isDirectory()?"Directory":e.isSymbolicLink()?"SymbolicLink":"Unsupported";class Bp{path;absolute;entry;stat;readdir;pending=!1;ignore=!1;piped=!1;constructor(e,t){this.path=e||"./",this.absolute=t}}const Ip=Buffer.alloc(1024),Sp=Symbol("onStat"),Rp=Symbol("ended"),jp=Symbol("queue"),_p=Symbol("current"),Up=Symbol("process"),xp=Symbol("processing"),Pp=Symbol("processJob"),Op=Symbol("jobs"),kp=Symbol("jobDone"),Tp=Symbol("addFSEntry"),Lp=Symbol("addTarEntry"),Np=Symbol("stat"),qp=Symbol("readdir"),Gp=Symbol("onreaddir"),Mp=Symbol("pipe"),zp=Symbol("entry"),Jp=Symbol("entryOpt"),$p=Symbol("writeEntryClass"),Wp=Symbol("write"),Vp=Symbol("ondrain");class Hp extends pl{opt;cwd;maxReadSize;preservePaths;strict;noPax;prefix;linkCache;statCache;file;portable;zip;readdirCache;noDirRecurse;follow;noMtime;mtime;filter;jobs;[$p];onWriteEntry;[jp];[Op]=0;[xp]=!1;[Rp]=!1;constructor(e={}){if(super(),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=ch(e.prefix||""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this.onWriteEntry=e.onWriteEntry,this[$p]=Cp,"function"==typeof e.onwarn&&this.on("warn",e.onwarn),this.portable=!!e.portable,e.gzip||e.brotli){if(e.gzip&&e.brotli)throw new TypeError("gzip and brotli are mutually exclusive");if(e.gzip&&("object"!=typeof e.gzip&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new Dl(e.gzip)),e.brotli&&("object"!=typeof e.brotli&&(e.brotli={}),this.zip=new Sl(e.brotli)),!this.zip)throw new Error("impossible");const t=this.zip;t.on("data",e=>super.write(e)),t.on("end",()=>super.end()),t.on("drain",()=>this[Vp]()),this.on("resume",()=>t.resume())}else this.on("drain",this[Vp]);this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,e.mtime&&(this.mtime=e.mtime),this.filter="function"==typeof e.filter?e.filter:()=>!0,this[jp]=new jl,this[Op]=0,this.jobs=Number(e.jobs)||4,this[xp]=!1,this[Rp]=!1}[Wp](e){return super.write(e)}add(e){return this.write(e),this}end(e,t,n){return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e&&this.add(e),this[Rp]=!0,this[Up](),n&&n(),this}write(e){if(this[Rp])throw new Error("write after end");return e instanceof dh?this[Lp](e):this[Tp](e),this.flowing}[Lp](e){const t=ch(T.default.resolve(this.cwd,e.path));if(this.filter(e.path,e)){const n=new Bp(e.path,t);n.entry=new Fp(e,this[Jp](n)),n.entry.on("end",()=>this[kp](n)),this[Op]+=1,this[jp].push(n)}else e.resume();this[Up]()}[Tp](e){const t=ch(T.default.resolve(this.cwd,e));this[jp].push(new Bp(e,t)),this[Up]()}[Np](e){e.pending=!0,this[Op]+=1;const t=this.follow?"stat":"lstat";k.default[t](e.absolute,(t,n)=>{e.pending=!1,this[Op]-=1,t?this.emit("error",t):this[Sp](e,n)})}[Sp](e,t){this.statCache.set(e.absolute,t),e.stat=t,this.filter(e.path,t)||(e.ignore=!0),this[Up]()}[qp](e){e.pending=!0,this[Op]+=1,k.default.readdir(e.absolute,(t,n)=>{if(e.pending=!1,this[Op]-=1,t)return this.emit("error",t);this[Gp](e,n)})}[Gp](e,t){this.readdirCache.set(e.absolute,t),e.readdir=t,this[Up]()}[Up](){if(!this[xp]){this[xp]=!0;for(let e=this[jp].head;e&&this[Op]<this.jobs;e=e.next)if(this[Pp](e.value),e.value.ignore){const t=e.next;this[jp].removeNode(e),e.next=t}this[xp]=!1,this[Rp]&&!this[jp].length&&0===this[Op]&&(this.zip?this.zip.end(Ip):(super.write(Ip),super.end()))}}get[_p](){return this[jp]&&this[jp].head&&this[jp].head.value}[kp](e){this[jp].shift(),this[Op]-=1,this[Up]()}[Pp](e){if(!e.pending)if(e.entry)e!==this[_p]||e.piped||this[Mp](e);else{if(!e.stat){const t=this.statCache.get(e.absolute);t?this[Sp](e,t):this[Np](e)}if(e.stat&&!e.ignore){if(!this.noDirRecurse&&e.stat.isDirectory()&&!e.readdir){const t=this.readdirCache.get(e.absolute);if(t?this[Gp](e,t):this[qp](e),!e.readdir)return}e.entry=this[zp](e),e.entry?e!==this[_p]||e.piped||this[Mp](e):e.ignore=!0}}}[Jp](e){return{onwarn:(e,t,n)=>this.warn(e,t,n),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[zp](e){this[Op]+=1;try{return new this[$p](e.path,this[Jp](e)).on("end",()=>this[kp](e)).on("error",e=>this.emit("error",e))}catch(e){this.emit("error",e)}}[Vp](){this[_p]&&this[_p].entry&&this[_p].entry.resume()}[Mp](e){e.piped=!0,e.readdir&&e.readdir.forEach(t=>{const n=e.path,r="./"===n?"":n.replace(/\/*$/,"/");this[Tp](r+t)});const t=e.entry,n=this.zip;if(!t)throw new Error("cannot pipe without source");n?t.on("data",e=>{n.write(e)||t.pause()}):t.on("data",e=>{super.write(e)||t.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}warn(e,t,n={}){lh(this,e,t,n)}}class Zp extends Hp{sync=!0;constructor(e){super(e),this[$p]=wp}pause(){}resume(){}[Np](e){const t=this.follow?"statSync":"lstatSync";this[Sp](e,k.default[t](e.absolute))}[qp](e){this[Gp](e,k.default.readdirSync(e.absolute))}[Mp](e){const t=e.entry,n=this.zip;if(e.readdir&&e.readdir.forEach(t=>{const n=e.path,r="./"===n?"":n.replace(/\/*$/,"/");this[Tp](r+t)}),!t)throw new Error("Cannot pipe without source");n?t.on("data",e=>{n.write(e)}):t.on("data",e=>{super[Wp](e)})}}const Yp=(e,t)=>{t.forEach(t=>{"@"===t.charAt(0)?Vh({file:z.default.resolve(e.cwd,t.slice(1)),sync:!0,noResume:!0,onReadEntry:t=>e.add(t)}):e.add(t)}),e.end()},Kp=async(e,t)=>{for(let n=0;n<t.length;n++){const r=String(t[n]);"@"===r.charAt(0)?await Vh({file:z.default.resolve(String(e.cwd),r.slice(1)),noResume:!0,onReadEntry:t=>{e.add(t)}}):e.add(r)}e.end()},Xp=Id((e,t)=>{const n=new Zp(e),r=new wd(e.file,{mode:e.mode||438});n.pipe(r),Yp(n,t)},(e,t)=>{const n=new Hp(e),r=new Cd(e.file,{mode:e.mode||438});n.pipe(r);const o=new Promise((e,t)=>{r.on("error",t),r.on("close",e),n.on("error",t)});return Kp(n,t),o},(e,t)=>{const n=new Zp(e);return Yp(n,t),n},(e,t)=>{const n=new Hp(e);return Kp(n,t),n},(e,t)=>{if(!t?.length)throw new TypeError("no paths specified to add to archive")}),Qp="win32"===(process.env.__FAKE_PLATFORM__||process.platform),{O_CREAT:ef,O_TRUNC:tf,O_WRONLY:nf}=k.default.constants,rf=Number(process.env.__FAKE_FS_O_FILENAME__)||k.default.constants.UV_FS_O_FILEMAP||0,of=rf|tf|ef|nf,uf=Qp&&!!rf?e=>e<524288?of:"w":()=>"w",sf=(e,t,n)=>{try{return J.default.lchownSync(e,t,n)}catch(e){if("ENOENT"!==e?.code)throw e}},af=(e,t,n,r)=>{J.default.lchown(e,t,n,e=>{r(e&&"ENOENT"!==e?.code?e:null)})},cf=(e,t,n,r,o)=>{if(t.isDirectory())df(z.default.resolve(e,t.name),n,r,i=>{if(i)return o(i);const u=z.default.resolve(e,t.name);af(u,n,r,o)});else{const i=z.default.resolve(e,t.name);af(i,n,r,o)}},df=(e,t,n,r)=>{J.default.readdir(e,{withFileTypes:!0},(o,i)=>{if(o){if("ENOENT"===o.code)return r();if("ENOTDIR"!==o.code&&"ENOTSUP"!==o.code)return r(o)}if(o||!i.length)return af(e,t,n,r);let u=i.length,s=null;const a=o=>{if(!s)return o?r(s=o):0===--u?af(e,t,n,r):void 0};for(const r of i)cf(e,r,t,n,a)})},lf=(e,t,n,r)=>{t.isDirectory()&&hf(z.default.resolve(e,t.name),n,r),sf(z.default.resolve(e,t.name),n,r)},hf=(e,t,n)=>{let r;try{r=J.default.readdirSync(e,{withFileTypes:!0})}catch(r){const o=r;if("ENOENT"===o?.code)return;if("ENOTDIR"===o?.code||"ENOTSUP"===o?.code)return sf(e,t,n);throw o}for(const o of r)lf(e,o,t,n);return sf(e,t,n)},pf=e=>{if(e)if("object"==typeof e)e={mode:511,...e};else if("number"==typeof e)e={mode:e};else{if("string"!=typeof e)throw new TypeError("invalid options argument");e={mode:parseInt(e,8)}}else e={mode:511};const t=e,n=e.fs||{};return e.mkdir=e.mkdir||n.mkdir||c.mkdir,e.mkdirAsync=e.mkdirAsync?e.mkdirAsync:async(e,n)=>new Promise((r,o)=>t.mkdir(e,n,(e,t)=>e?o(e):r(t))),e.stat=e.stat||n.stat||c.stat,e.statAsync=e.statAsync?e.statAsync:async e=>new Promise((n,r)=>t.stat(e,(e,t)=>e?r(e):n(t))),e.statSync=e.statSync||n.statSync||c.statSync,e.mkdirSync=e.mkdirSync||n.mkdirSync||c.mkdirSync,t},ff=(e,t,n)=>{const r=d.dirname(e),o={...pf(t),recursive:!1};if(r===e)try{return o.mkdirSync(e,o)}catch(e){if(e&&"EISDIR"!==e.code)throw e;return}try{return o.mkdirSync(e,o),n||e}catch(t){const i=t;if(i&&"ENOENT"===i.code)return ff(e,o,ff(r,o,n));if(i&&"EEXIST"!==i.code&&i&&"EROFS"!==i.code)throw t;try{if(!o.statSync(e).isDirectory())throw t}catch(e){throw t}}},mf=Object.assign(async(e,t,n)=>{const r=pf(t);r.recursive=!1;const o=d.dirname(e);return o===e?r.mkdirAsync(e,r).catch(e=>{if(e&&"EISDIR"!==e.code)throw e}):r.mkdirAsync(e,r).then(()=>n||e,async t=>{const i=t;if(i&&"ENOENT"===i.code)return mf(o,r).then(t=>mf(e,r,t));if(i&&"EEXIST"!==i.code&&"EROFS"!==i.code)throw t;return r.statAsync(e).then(e=>{if(e.isDirectory())return n;throw t},()=>{throw t})})},{sync:ff}),vf=async(e,t,n)=>{if(n!==t)return e.statAsync(t).then(e=>e.isDirectory()?n:void 0,n=>n&&"ENOENT"===n.code?vf(e,d.dirname(t),t):void 0)},Ef=(e,t,n)=>{if(n!==t)try{return e.statSync(t).isDirectory()?n:void 0}catch(n){return n&&"ENOENT"===n.code?Ef(e,d.dirname(t),t):void 0}},Af=(e,t)=>{const n=pf(t);n.recursive=!0;if(d.dirname(e)===e)return n.mkdirSync(e,n);const r=Ef(n,e);try{return n.mkdirSync(e,n),r}catch(t){if(t&&"ENOENT"===t.code)return ff(e,n);throw t}},bf=Object.assign(async(e,t)=>{const n={...pf(t),recursive:!0};return d.dirname(e)===e?await n.mkdirAsync(e,n):vf(n,e).then(t=>n.mkdirAsync(e,n).then(e=>t||e).catch(t=>{if(t&&"ENOENT"===t.code)return mf(e,n);throw t}))},{sync:Af}),yf=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,gf=e=>{if(/\0/.test(e))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"});if(e=d.resolve(e),"win32"===yf){const t=/[*|"<>?:]/,{root:n}=d.parse(e);if(t.test(e.substring(n.length)))throw Object.assign(new Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e},Cf=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),wf=+Cf[0]>10||10===+Cf[0]&&+Cf[1]>=12,Ff=wf?e=>pf(e).mkdirSync===c.mkdirSync:()=>!1,Df=Object.assign(wf?e=>pf(e).mkdir===c.mkdir:()=>!1,{sync:Ff}),Bf=(e,t)=>{e=gf(e);const n=pf(t);return Ff(n)?Af(e,n):ff(e,n)},If=Object.assign(async(e,t)=>{e=gf(e);const n=pf(t);return Df(n)?bf(e,n):mf(e,n)},{mkdirpSync:Bf,mkdirpNative:bf,mkdirpNativeSync:Af,mkdirpManual:mf,mkdirpManualSync:ff,sync:Bf,native:bf,nativeSync:Af,manual:mf,manualSync:ff,useNative:Df,useNativeSync:Ff});class Sf extends Error{path;code;syscall="chdir";constructor(e,t){super(`${t}: Cannot cd into '${e}'`),this.path=e,this.code=t}get name(){return"CwdError"}}class Rf extends Error{path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(e,t){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"),this.symlink=e,this.path=t}get name(){return"SymlinkError"}}const jf=(e,t)=>e.get(ch(t)),_f=(e,t,n)=>e.set(ch(t),n),Uf=(e,t,n)=>{e=ch(e);const r=t.umask??18,o=448|t.mode,i=0!==(o&r),u=t.uid,s=t.gid,a="number"==typeof u&&"number"==typeof s&&(u!==t.processUid||s!==t.processGid),c=t.preserve,d=t.unlink,l=t.cache,h=ch(t.cwd),p=(t,r)=>{t?n(t):(_f(l,e,!0),r&&a?df(r,u,s,e=>p(e)):i?k.default.chmod(e,o,n):n())};if(l&&!0===jf(l,e))return p();if(e===h)return((e,t)=>{k.default.stat(e,(n,r)=>{!n&&r.isDirectory()||(n=new Sf(e,n?.code||"ENOTDIR")),t(n)})})(e,p);if(c)return If(e,{mode:o}).then(e=>p(null,e??void 0),p);const f=ch(z.default.relative(h,e)).split("/");xf(h,f,o,l,d,h,void 0,p)},xf=(e,t,n,r,o,i,u,s)=>{if(!t.length)return s(null,u);const a=t.shift(),c=ch(z.default.resolve(e+"/"+a));if(jf(r,c))return xf(c,t,n,r,o,i,u,s);k.default.mkdir(c,n,Pf(c,t,n,r,o,i,u,s))},Pf=(e,t,n,r,o,i,u,s)=>a=>{a?k.default.lstat(e,(c,d)=>{if(c)c.path=c.path&&ch(c.path),s(c);else if(d.isDirectory())xf(e,t,n,r,o,i,u,s);else if(o)k.default.unlink(e,a=>{if(a)return s(a);k.default.mkdir(e,n,Pf(e,t,n,r,o,i,u,s))});else{if(d.isSymbolicLink())return s(new Rf(e,e+"/"+t.join("/")));s(a)}}):xf(e,t,n,r,o,i,u=u||e,s)},Of=(e,t)=>{e=ch(e);const n=t.umask??18,r=448|t.mode,o=0!==(r&n),i=t.uid,u=t.gid,s="number"==typeof i&&"number"==typeof u&&(i!==t.processUid||u!==t.processGid),a=t.preserve,c=t.unlink,d=t.cache,l=ch(t.cwd),h=t=>{_f(d,e,!0),t&&s&&hf(t,i,u),o&&k.default.chmodSync(e,r)};if(d&&!0===jf(d,e))return h();if(e===l)return(e=>{let t,n=!1;try{n=k.default.statSync(e).isDirectory()}catch(e){t=e?.code}finally{if(!n)throw new Sf(e,t??"ENOTDIR")}})(l),h();if(a)return h(Bf(e,r)??void 0);const p=ch(z.default.relative(l,e)).split("/");let f;for(let e=p.shift(),t=l;e&&(t+="/"+e);e=p.shift())if(t=ch(z.default.resolve(t)),!jf(d,t))try{k.default.mkdirSync(t,r),f=f||t,_f(d,t,!0)}catch(e){const n=k.default.lstatSync(t);if(n.isDirectory()){_f(d,t,!0);continue}if(c){k.default.unlinkSync(t),k.default.mkdirSync(t,r),f=f||t,_f(d,t,!0);continue}if(n.isSymbolicLink())return new Rf(t,t+"/"+p.join("/"))}return h(f)},kf=Object.create(null),{hasOwnProperty:Tf}=Object.prototype,Lf=e=>(Tf.call(kf,e)||(kf[e]=e.normalize("NFD")),kf[e]),Nf="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform);class qf{#p=new Map;#f=new Map;#m=new Set;reserve(e,t){e=Nf?["win32 parallelization disabled"]:e.map(e=>$h(A.join(Lf(e))).toLowerCase());const n=new Set(e.map(e=>(e=>{const t=e.split("/").slice(0,-1).reduce((e,t)=>{const n=e[e.length-1];return void 0!==n&&(t=A.join(n,t)),e.push(t||"/"),e},[]);return t})(e)).reduce((e,t)=>e.concat(t)));this.#f.set(t,{dirs:n,paths:e});for(const n of e){const e=this.#p.get(n);e?e.push(t):this.#p.set(n,[t])}for(const e of n){const n=this.#p.get(e);if(n){const e=n[n.length-1];e instanceof Set?e.add(t):n.push(new Set([t]))}else this.#p.set(e,[new Set([t])])}return this.#v(t)}#E(e){const t=this.#f.get(e);if(!t)throw new Error("function does not have any path reservations");return{paths:t.paths.map(e=>this.#p.get(e)),dirs:[...t.dirs].map(e=>this.#p.get(e))}}check(e){const{paths:t,dirs:n}=this.#E(e);return t.every(t=>t&&t[0]===e)&&n.every(t=>t&&t[0]instanceof Set&&t[0].has(e))}#v(e){return!(this.#m.has(e)||!this.check(e))&&(this.#m.add(e),e(()=>this.#A(e)),!0)}#A(e){if(!this.#m.has(e))return!1;const t=this.#f.get(e);if(!t)throw new Error("invalid reservation");const{paths:n,dirs:r}=t,o=new Set;for(const t of n){const n=this.#p.get(t);if(!n||n?.[0]!==e)continue;const r=n[1];if(r)if(n.shift(),"function"==typeof r)o.add(r);else for(const e of r)o.add(e);else this.#p.delete(t)}for(const t of r){const n=this.#p.get(t),r=n?.[0];if(n&&r instanceof Set)if(1!==r.size||1!==n.length)if(1===r.size){n.shift();const e=n[0];"function"==typeof e&&o.add(e)}else r.delete(e);else this.#p.delete(t)}return this.#m.delete(e),o.forEach(e=>this.#v(e)),!0}}const Gf=Symbol("onEntry"),Mf=Symbol("checkFs"),zf=Symbol("checkFs2"),Jf=Symbol("pruneCache"),$f=Symbol("isReusable"),Wf=Symbol("makeFs"),Vf=Symbol("file"),Hf=Symbol("directory"),Zf=Symbol("link"),Yf=Symbol("symlink"),Kf=Symbol("hardlink"),Xf=Symbol("unsupported"),Qf=Symbol("checkPath"),em=Symbol("mkdir"),tm=Symbol("onError"),nm=Symbol("pending"),rm=Symbol("pend"),om=Symbol("unpend"),im=Symbol("ended"),um=Symbol("maybeClose"),sm=Symbol("skip"),am=Symbol("doChown"),cm=Symbol("uid"),dm=Symbol("gid"),lm=Symbol("checkedCwd"),hm="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform),pm=(e,t,n)=>void 0!==e&&e===e>>>0?e:void 0!==t&&t===t>>>0?t:n,fm=e=>$h(ch(Lf(e))).toLowerCase();class mm extends Jh{[im]=!1;[lm]=!1;[nm]=0;reservations=new qf;transform;writable=!0;readable=!1;dirCache;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(e={}){if(e.ondone=()=>{this[im]=!0,this[um]()},super(e),this.transform=e.transform,this.dirCache=e.dirCache||new Map,this.chmod=!!e.chmod,"number"==typeof e.uid||"number"==typeof e.gid){if("number"!=typeof e.uid||"number"!=typeof e.gid)throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=void 0,this.gid=void 0,this.setOwner=!1;void 0===e.preserveOwner&&"number"!=typeof e.uid?this.preserveOwner=!(!process.getuid||0!==process.getuid()):this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():void 0,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():void 0,this.maxDepth="number"==typeof e.maxDepth?e.maxDepth:1024,this.forceChown=!0===e.forceChown,this.win32=!!e.win32||hm,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=ch(z.default.resolve(e.cwd||process.cwd())),this.strip=Number(e.strip)||0,this.processUmask=this.chmod?"number"==typeof e.processUmask?e.processUmask:process.umask():0,this.umask="number"==typeof e.umask?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",e=>this[Gf](e))}warn(e,t,n={}){return"TAR_BAD_ARCHIVE"!==e&&"TAR_ABORT"!==e||(n.recoverable=!1),super.warn(e,t,n)}[um](){this[im]&&0===this[nm]&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[Qf](e){const t=ch(e.path),n=t.split("/");if(this.strip){if(n.length<this.strip)return!1;if("Link"===e.type){const t=ch(String(e.linkpath)).split("/");if(!(t.length>=this.strip))return!1;e.linkpath=t.slice(this.strip).join("/")}n.splice(0,this.strip),e.path=n.join("/")}if(isFinite(this.maxDepth)&&n.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:e,path:t,depth:n.length,maxDepth:this.maxDepth}),!1;if(!this.preservePaths){if(n.includes("..")||hm&&/^[a-z]:\.\.$/i.test(n[0]??""))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:t}),!1;const[r,o]=Kh(t);r&&(e.path=String(o),this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:e,path:t}))}if(z.default.isAbsolute(e.path)?e.absolute=ch(z.default.resolve(e.path)):e.absolute=ch(z.default.resolve(this.cwd,e.path)),!this.preservePaths&&"string"==typeof e.absolute&&0!==e.absolute.indexOf(this.cwd+"/")&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:ch(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&"Directory"!==e.type&&"GNUDumpDir"!==e.type)return!1;if(this.win32){const{root:t}=z.default.win32.parse(String(e.absolute));e.absolute=t+np(String(e.absolute).slice(t.length));const{root:n}=z.default.win32.parse(e.path);e.path=n+np(e.path.slice(n.length))}return!0}[Gf](e){if(!this[Qf](e))return e.resume();switch(W.default.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=448|e.mode);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[Mf](e);default:return this[Xf](e)}}[tm](e,t){"CwdError"===e.name?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:t}),this[om](),t.resume())}[em](e,t,n){Uf(ch(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t},n)}[am](e){return this.forceChown||this.preserveOwner&&("number"==typeof e.uid&&e.uid!==this.processUid||"number"==typeof e.gid&&e.gid!==this.processGid)||"number"==typeof this.uid&&this.uid!==this.processUid||"number"==typeof this.gid&&this.gid!==this.processGid}[cm](e){return pm(this.uid,e.uid,this.processUid)}[dm](e){return pm(this.gid,e.gid,this.processGid)}[Vf](e,t){const n="number"==typeof e.mode?4095&e.mode:this.fmode,r=new Cd(String(e.absolute),{flags:uf(e.size),mode:n,autoClose:!1});r.on("error",n=>{r.fd&&J.default.close(r.fd,()=>{}),r.write=()=>!0,this[tm](n,e),t()});let o=1;const i=n=>{if(n)return r.fd&&J.default.close(r.fd,()=>{}),this[tm](n,e),void t();0===--o&&void 0!==r.fd&&J.default.close(r.fd,n=>{n?this[tm](n,e):this[om](),t()})};r.on("finish",()=>{const t=String(e.absolute),n=r.fd;if("number"==typeof n&&e.mtime&&!this.noMtime){o++;const r=e.atime||new Date,u=e.mtime;J.default.futimes(n,r,u,e=>e?J.default.utimes(t,r,u,t=>i(t&&e)):i())}if("number"==typeof n&&this[am](e)){o++;const r=this[cm](e),u=this[dm](e);"number"==typeof r&&"number"==typeof u&&J.default.fchown(n,r,u,e=>e?J.default.chown(t,r,u,t=>i(t&&e)):i())}i()});const u=this.transform&&this.transform(e)||e;u!==e&&(u.on("error",n=>{this[tm](n,e),t()}),e.pipe(u)),u.pipe(r)}[Hf](e,t){const n="number"==typeof e.mode?4095&e.mode:this.dmode;this[em](String(e.absolute),n,n=>{if(n)return this[tm](n,e),void t();let r=1;const o=()=>{0===--r&&(t(),this[om](),e.resume())};e.mtime&&!this.noMtime&&(r++,J.default.utimes(String(e.absolute),e.atime||new Date,e.mtime,o)),this[am](e)&&(r++,J.default.chown(String(e.absolute),Number(this[cm](e)),Number(this[dm](e)),o)),o()})}[Xf](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[Yf](e,t){this[Zf](e,String(e.linkpath),"symlink",t)}[Kf](e,t){const n=ch(z.default.resolve(this.cwd,String(e.linkpath)));this[Zf](e,n,"link",t)}[rm](){this[nm]++}[om](){this[nm]--,this[um]()}[sm](e){this[om](),e.resume()}[$f](e,t){return"File"===e.type&&!this.unlink&&t.isFile()&&t.nlink<=1&&!hm}[Mf](e){this[rm]();const t=[e.path];e.linkpath&&t.push(e.linkpath),this.reservations.reserve(t,t=>this[zf](e,t))}[Jf](e){"SymbolicLink"===e.type?(e=>{for(const t of e.keys())e.delete(t)})(this.dirCache):"Directory"!==e.type&&((e,t)=>{t=fm(t);for(const n of e.keys()){const r=fm(n);r!==t&&0!==r.indexOf(t+"/")||e.delete(n)}})(this.dirCache,String(e.absolute))}[zf](e,t){this[Jf](e);const n=n=>{this[Jf](e),t(n)},r=()=>{this[em](this.cwd,this.dmode,t=>{if(t)return this[tm](t,e),void n();this[lm]=!0,o()})},o=()=>{if(e.absolute!==this.cwd){const t=ch(z.default.dirname(String(e.absolute)));if(t!==this.cwd)return this[em](t,this.dmode,t=>{if(t)return this[tm](t,e),void n();i()})}i()},i=()=>{J.default.lstat(String(e.absolute),(t,r)=>{if(r&&(this.keep||this.newer&&r.mtime>(e.mtime??r.mtime)))return this[sm](e),void n();if(t||this[$f](e,r))return this[Wf](null,e,n);if(r.isDirectory()){if("Directory"===e.type){const t=t=>this[Wf](t??null,e,n);return this.chmod&&e.mode&&(4095&r.mode)!==e.mode?J.default.chmod(String(e.absolute),Number(e.mode),t):t()}if(e.absolute!==this.cwd)return J.default.rmdir(String(e.absolute),t=>this[Wf](t??null,e,n))}if(e.absolute===this.cwd)return this[Wf](null,e,n);((e,t)=>{if(!hm)return J.default.unlink(e,t);const n=e+".DELETE."+C.randomBytes(16).toString("hex");J.default.rename(e,n,e=>{if(e)return t(e);J.default.unlink(n,t)})})(String(e.absolute),t=>this[Wf](t??null,e,n))})};this[lm]?o():r()}[Wf](e,t,n){if(e)return this[tm](e,t),void n();switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[Vf](t,n);case"Link":return this[Kf](t,n);case"SymbolicLink":return this[Yf](t,n);case"Directory":case"GNUDumpDir":return this[Hf](t,n)}}[Zf](e,t,n,r){J.default[n](t,String(e.absolute),t=>{t?this[tm](t,e):(this[om](),e.resume()),r()})}}const vm=e=>{try{return[null,e()]}catch(e){return[e,null]}};class Em extends mm{sync=!0;[Wf](e,t){return super[Wf](e,t,()=>{})}[Mf](e){if(this[Jf](e),!this[lm]){const t=this[em](this.cwd,this.dmode);if(t)return this[tm](t,e);this[lm]=!0}if(e.absolute!==this.cwd){const t=ch(z.default.dirname(String(e.absolute)));if(t!==this.cwd){const n=this[em](t,this.dmode);if(n)return this[tm](n,e)}}const[t,n]=vm(()=>J.default.lstatSync(String(e.absolute)));if(n&&(this.keep||this.newer&&n.mtime>(e.mtime??n.mtime)))return this[sm](e);if(t||this[$f](e,n))return this[Wf](null,e);if(n.isDirectory()){if("Directory"===e.type){const t=this.chmod&&e.mode&&(4095&n.mode)!==e.mode,[r]=t?vm(()=>{J.default.chmodSync(String(e.absolute),Number(e.mode))}):[];return this[Wf](r,e)}const[t]=vm(()=>J.default.rmdirSync(String(e.absolute)));this[Wf](t,e)}const[r]=e.absolute===this.cwd?[]:vm(()=>(e=>{if(!hm)return J.default.unlinkSync(e);const t=e+".DELETE."+C.randomBytes(16).toString("hex");J.default.renameSync(e,t),J.default.unlinkSync(t)})(String(e.absolute)));this[Wf](r,e)}[Vf](e,t){const n="number"==typeof e.mode?4095&e.mode:this.fmode,r=n=>{let r;try{J.default.closeSync(o)}catch(e){r=e}(n||r)&&this[tm](n||r,e),t()};let o;try{o=J.default.openSync(String(e.absolute),uf(e.size),n)}catch(e){return r(e)}const i=this.transform&&this.transform(e)||e;i!==e&&(i.on("error",t=>this[tm](t,e)),e.pipe(i)),i.on("data",e=>{try{J.default.writeSync(o,e,0,e.length)}catch(e){r(e)}}),i.on("end",()=>{let t=null;if(e.mtime&&!this.noMtime){const n=e.atime||new Date,r=e.mtime;try{J.default.futimesSync(o,n,r)}catch(o){try{J.default.utimesSync(String(e.absolute),n,r)}catch(e){t=o}}}if(this[am](e)){const n=this[cm](e),r=this[dm](e);try{J.default.fchownSync(o,Number(n),Number(r))}catch(o){try{J.default.chownSync(String(e.absolute),Number(n),Number(r))}catch(e){t=t||o}}}r(t)})}[Hf](e,t){const n="number"==typeof e.mode?4095&e.mode:this.dmode,r=this[em](String(e.absolute),n);if(r)return this[tm](r,e),void t();if(e.mtime&&!this.noMtime)try{J.default.utimesSync(String(e.absolute),e.atime||new Date,e.mtime)}catch(r){}if(this[am](e))try{J.default.chownSync(String(e.absolute),Number(this[cm](e)),Number(this[dm](e)))}catch(r){}t(),e.resume()}[em](e,t){try{return Of(ch(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t})}catch(e){return e}}[Zf](e,t,n,r){const o=`${n}Sync`;try{J.default[o](t,String(e.absolute)),r(),e.resume()}catch(t){return this[tm](t,e)}}}const Am=Id(e=>{const t=new Em(e),n=e.file,r=J.default.statSync(n),o=e.maxReadSize||16777216;new gd(n,{readSize:o,size:r.size}).pipe(t)},(e,t)=>{const n=new mm(e),r=e.maxReadSize||16777216,o=e.file,i=new Promise((e,t)=>{n.on("error",t),n.on("close",e),J.default.stat(o,(e,i)=>{if(e)t(e);else{const e=new yd(o,{readSize:r,size:i.size});e.on("error",t),e.pipe(n)}})});return i},e=>new Em(e),e=>new mm(e),(e,t)=>{t?.length&&Wh(e,t)}),bm=(e,t,n,r,o)=>{const i=new wd(e.file,{fd:r,start:n});t.pipe(i),ym(t,o)},ym=(e,t)=>{t.forEach(t=>{"@"===t.charAt(0)?Vh({file:z.default.resolve(e.cwd,t.slice(1)),sync:!0,noResume:!0,onReadEntry:t=>e.add(t)}):e.add(t)}),e.end()},gm=async(e,t)=>{for(let n=0;n<t.length;n++){const r=String(t[n]);"@"===r.charAt(0)?await Vh({file:z.default.resolve(String(e.cwd),r.slice(1)),noResume:!0,onReadEntry:t=>e.add(t)}):e.add(r)}e.end()},Cm=Id((e,t)=>{const n=new Zp(e);let r,o,i=!0;try{try{r=J.default.openSync(e.file,"r+")}catch(t){if("ENOENT"!==t?.code)throw t;r=J.default.openSync(e.file,"w+")}const u=J.default.fstatSync(r),s=Buffer.alloc(512);e:for(o=0;o<u.size;o+=512){for(let e=0,t=0;e<512;e+=t){if(t=J.default.readSync(r,s,e,s.length-e,o+e),0===o&&31===s[0]&&139===s[1])throw new Error("cannot append to compressed archives");if(!t)break e}const t=new Jl(s);if(!t.cksumValid)break;const n=512*Math.ceil((t.size||0)/512);if(o+n+512>u.size)break;o+=n,e.mtimeCache&&t.mtime&&e.mtimeCache.set(String(t.path),t.mtime)}i=!1,bm(e,n,o,r,t)}finally{if(i)try{J.default.closeSync(r)}catch(e){}}},(e,t)=>{t=Array.from(t);const n=new Hp(e),r=new Promise((r,o)=>{n.on("error",o);let i="r+";const u=(s,a)=>s&&"ENOENT"===s.code&&"r+"===i?(i="w+",J.default.open(e.file,i,u)):s||!a?o(s):void J.default.fstat(a,(i,u)=>{if(i)return J.default.close(a,()=>o(i));((t,n,r)=>{const o=(e,n)=>{e?J.default.close(t,t=>r(e)):r(null,n)};let i=0;if(0===n)return o(null,0);let u=0;const s=Buffer.alloc(512),a=(r,c)=>{if(r||void 0===c)return o(r);if(u+=c,u<512&&c)return J.default.read(t,s,u,s.length-u,i+u,a);if(0===i&&31===s[0]&&139===s[1])return o(new Error("cannot append to compressed archives"));if(u<512)return o(null,i);const d=new Jl(s);if(!d.cksumValid)return o(null,i);const l=512*Math.ceil((d.size??0)/512);return i+l+512>n?o(null,i):(i+=l+512,i>=n?o(null,i):(e.mtimeCache&&d.mtime&&e.mtimeCache.set(String(d.path),d.mtime),u=0,void J.default.read(t,s,0,512,i,a)))};J.default.read(t,s,0,512,i,a)})(a,u.size,(i,u)=>{if(i)return o(i);const s=new Cd(e.file,{fd:a,start:u});n.pipe(s),s.on("error",o),s.on("close",r),gm(n,t)})});J.default.open(e.file,i,u)});return r},()=>{throw new TypeError("file is required")},()=>{throw new TypeError("file is required")},(e,t)=>{if(!e.file)throw new TypeError("file is required");if(e.gzip||e.brotli||e.file.endsWith(".br")||e.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!t?.length)throw new TypeError("no paths specified to add/replace")});Id(Cm.syncFile,Cm.asyncFile,Cm.syncNoFile,Cm.asyncNoFile,(e,t=[])=>{Cm.validate?.(e,t),wm(e)});const wm=e=>{const t=e.filter;e.mtimeCache||(e.mtimeCache=new Map),e.filter=t?(n,r)=>t(n,r)&&!((e.mtimeCache?.get(n)??r.mtime??0)>(r.mtime??0)):(t,n)=>!((e.mtimeCache?.get(t)??n.mtime??0)>(n.mtime??0))};function Fm(e){return Array.isArray(e)?e:[e]}const Dm=/^\s+$/,Bm=/(?:[^\\]|^)\\$/,Im=/^\\!/,Sm=/^\\#/,Rm=/\r?\n/g,jm=/^\.*\/|^\.+$/;let _m="node-ignore";"undefined"!=typeof Symbol&&(_m=Symbol.for("node-ignore"));const Um=_m,xm=/([0-z])-([0-z])/g,Pm=()=>!1,Om=[[/^\uFEFF/,()=>""],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(0===n.indexOf("\\")?" ":"")],[/(\\+?)\s/g,(e,t)=>{const{length:n}=t;return t.slice(0,n-n%2)+" "}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,o)=>"\\"===t?`\\[${n}${(e=>{const{length:t}=e;return e.slice(0,t-t%2)})(r)}${o}`:"]"===o&&r.length%2==0?`[${(e=>e.replace(xm,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:""))(n)}${r}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],km=Object.create(null),Tm=e=>"string"==typeof e;class Lm{constructor(e,t,n,r){this.origin=e,this.pattern=t,this.negative=n,this.regex=r}}const Nm=(e,t)=>{const n=e;let r=!1;0===e.indexOf("!")&&(r=!0,e=e.substr(1));const o=((e,t)=>{let n=km[e];return n||(n=Om.reduce((t,[n,r])=>t.replace(n,r.bind(e)),e),km[e]=n),t?new RegExp(n,"i"):new RegExp(n)})(e=e.replace(Im,"!").replace(Sm,"#"),t);return new Lm(n,e,r,o)},qm=(e,t)=>{throw new t(e)},Gm=(e,t,n)=>{if(!Tm(e))return n(`path must be a string, but got \`${t}\``,TypeError);if(!e)return n("path must not be empty",TypeError);if(Gm.isNotRelative(e)){return n(`path should be a ${"`path.relative()`d"} string, but got "${t}"`,RangeError)}return!0},Mm=e=>jm.test(e);Gm.isNotRelative=Mm,Gm.convert=e=>e;class zm{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){var r,o,i;r=this,o=Um,i=!0,Object.defineProperty(r,o,{value:i}),this._rules=[],this._ignoreCase=t,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[Um])return this._rules=this._rules.concat(e._rules),void(this._added=!0);if((e=>e&&Tm(e)&&!Dm.test(e)&&!Bm.test(e)&&0!==e.indexOf("#"))(e)){const t=Nm(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,Fm(Tm(e)?(e=>e.split(Rm))(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,t){let n=!1,r=!1;return this._rules.forEach(o=>{const{negative:i}=o;if(r===i&&n!==r||i&&!n&&!r&&!t)return;o.regex.test(e)&&(n=!i,r=i)}),{ignored:n,unignored:r}}_test(e,t,n,r){const o=e&&Gm.convert(e);return Gm(o,e,this._allowRelativePaths?Pm:qm),this._t(o,t,n,r)}_t(e,t,n,r){if(e in t)return t[e];if(r||(r=e.split("/")),r.pop(),!r.length)return t[e]=this._testOne(e,n);const o=this._t(r.join("/")+"/",t,n,r);return t[e]=o.ignored?o:this._testOne(e,n)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return Fm(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}}const Jm=e=>new zm(e);Jm.isPathValid=e=>Gm(e&&Gm.convert(e),e,Pm),Jm.default=Jm;var $m=Jm;if("undefined"!=typeof process&&(process.env&&process.env.IGNORE_TEST_WIN32||"win32"===process.platform)){const e=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,"/");Gm.convert=e;const t=/^[a-z]:\//i;Gm.isNotRelative=e=>t.test(e)||Mm(e)}var Wm,Vm=function(){function e(e,t){var n=this;if(this.exec=e,this.parameters=t,this.defaultEncoding="base64",this.getFileIgnoreFilter=function(e){if(void 0!==e){var t=$m({allowRelativePaths:!0}).add(e);return function(e){return!t.ignores(e)}}},this.getTarTransformFn=function(e,t){return function(n){n.path=n.path.replace(e,t)}},this.ensureDirRemote=function(e){return Y(n,void 0,void 0,function(){var t,n,r;return K(this,function(o){switch(o.label){case 0:return t=["mkdir","-p",e],[4,this.runCommand(t)];case 1:if(n=o.sent(),"Success"!==(null===(r=null==n?void 0:n.commandResult)||void 0===r?void 0:r.status))throw new Error("Failed creating remote directory.");return[2]}})})},this.ensureTarCmd=function(){return Y(n,void 0,void 0,function(){var e,t,n;return K(this,function(r){switch(r.label){case 0:return e=["tar","--version"],[4,this.runCommand(e)];case 1:if(t=r.sent(),"Success"!==(null===(n=null==t?void 0:t.commandResult)||void 0===n?void 0:n.status))throw new Error("Tar command not found on remote container. Required for file copy.");return[2]}})})},this.pathExistsRemote=function(e){return Y(n,void 0,void 0,function(){var t;return K(this,function(n){switch(n.label){case 0:return t=["test","-e",e],[4,this.runCommand(t)];case 1:return[2,0===n.sent().commandResult.exitCode]}})})},this.checkIsDirRemote=function(e){return Y(n,void 0,void 0,function(){var t;return K(this,function(n){switch(n.label){case 0:return t=["test","-d",e],[4,this.runCommand(t)];case 1:return[2,0===n.sent().commandResult.exitCode]}})})},this.runCommand=function(e){return Y(n,void 0,void 0,function(){var t,n,r,o,i,u,s,a,c;return K(this,function(d){switch(d.label){case 0:return n=(t=this).exec,r=t.parameters,o=r.projectId,i=r.resourceId,u=r.resourceType,s=r.containerName,a={command:e,shell:"none",containerName:s},"service"!==u?[3,2]:[4,n.execServiceCommand({projectId:o,serviceId:i},a)];case 1:return c=d.sent(),[3,4];case 2:return[4,n.execJobCommand({projectId:o,jobId:i},a)];case 3:c=d.sent(),d.label=4;case 4:return[2,c]}})})},this.runSession=function(e){return Y(n,void 0,void 0,function(){var t,n,r,o,i,u,s,a,c;return K(this,function(d){switch(d.label){case 0:return n=(t=this).exec,r=t.parameters,o=r.projectId,i=r.resourceId,u=r.resourceType,s=r.containerName,a={command:e,shell:"none",tty:!1,encoding:this.defaultEncoding,containerName:s},"service"!==u?[3,2]:[4,n.execServiceSession({projectId:o,serviceId:i},a)];case 1:return c=d.sent(),[3,4];case 2:return[4,n.execJobSession({projectId:o,jobId:i},a)];case 3:c=d.sent(),d.label=4;case 4:return[2,c]}})})},!["service","job"].includes(t.resourceType))throw new Error("Invalid resource type: ".concat(t.resourceType,", only 'service' and 'job' supported"))}return e.prototype.uploadFiles=function(e,t,n){return Y(this,void 0,void 0,function(){var r,o,i,u,s,a,c,d,l,h,p,f;return K(this,function(m){switch(m.label){case 0:if(void 0===e||!k.default.existsSync(e))throw new Error("Local path '".concat(e,"' does not exists but is required for uploads."));return r=k.default.lstatSync(e).isFile(),o=r?T.default.dirname(e):e,i=r?T.default.basename(e):".",u=r&&void 0!==t&&""!==T.default.extname(t),s=u?T.default.dirname(t):null!=t?t:o,a=void 0!==t?T.default.basename(t):i,c=Xp({gzip:{encoding:this.defaultEncoding},cwd:o,filter:this.getFileIgnoreFilter(n),preservePaths:!0,onWriteEntry:u?this.getTarTransformFn(i,a):void 0},Ri(i)),[4,this.ensureTarCmd()];case 1:return m.sent(),[4,this.ensureDirRemote(s)];case 2:return m.sent(),d=X(X(["tar","-xzvf","-"],["--no-same-owner"],!0),["-C",s],!1),[4,this.runSession(d)];case 3:return l=m.sent(),h=new _i,p=new _i,l.stdErr.pipe(h),l.stdOut.pipe(p),c.pipe(l.stdIn),[4,l.waitForCommandResult()];case 4:if("Success"!==(null==(f=m.sent())?void 0:f.status))throw new Error("Failed to upload file to container: ".concat(null==f?void 0:f.message,", error details: ").concat(h.getContentsAsString(),"; ").concat(p.getContentsAsString()));return r?[2,{type:exports.CopyType.FILE_UPLOAD,sourceDirectory:o,sourceFile:i,targetDirectory:s,targetFile:a}]:[2,{type:exports.CopyType.DIRECTORY_UPLOAD,sourceDirectory:o,targetDirectory:s}]}})})},e.prototype.downloadFiles=function(e,t,n){return Y(this,void 0,void 0,function(){var r,o,i,u,s,a,c,d,l,h,p,f,m,v;return K(this,function(E){switch(E.label){case 0:return(r=void 0===e)?[3,2]:[4,this.pathExistsRemote(e)];case 1:r=!E.sent(),E.label=2;case 2:if(r)throw new Error("Remote path '".concat(e,"' does not exists but is required for downloads."));return[4,this.checkIsDirRemote(e)];case 3:return o=E.sent(),i=o?e:T.default.dirname(e),u=o?".":T.default.basename(e),s=void 0!==t&&""!==T.default.extname(t),a=!o&&s?T.default.basename(t):u,(c=void 0!==t?s?T.default.dirname(t):t:".")&&k.default.mkdirSync(c,{recursive:!0}),d=Ri(null!=n?n:[]).map(function(e){return"--exclude=".concat(e)}),l=X(X(["tar","-zcf","-"],["--no-same-owner"],!0),d,!0),h=X(X([],l,!0),["-C",i,u],!1),[4,this.runSession(h)];case 4:return p=E.sent(),f=Am({cwd:c,gzip:{encoding:this.defaultEncoding},onReadEntry:a?this.getTarTransformFn(u,a):void 0}),m=new _i,p.stdErr.pipe(m),p.stdOut.pipe(f),[4,p.waitForCommandResult()];case 5:if("Success"!==(null==(v=E.sent())?void 0:v.status))throw new Error("Failed to download file from container: ".concat(null==v?void 0:v.message,", error details: ").concat(m.getContentsAsString()));return o?[2,{type:exports.CopyType.DIRECTORY_DOWNLOAD,sourceDirectory:i,targetDirectory:c}]:[2,{type:exports.CopyType.FILE_DOWNLOAD,sourceDirectory:i,sourceFile:u,targetDirectory:c,targetFile:a}]}})})},e}();exports.CopyType=void 0,(Wm=exports.CopyType||(exports.CopyType={})).DIRECTORY_UPLOAD="directory-upload",Wm.FILE_UPLOAD="file-upload",Wm.DIRECTORY_DOWNLOAD="directory-download",Wm.FILE_DOWNLOAD="file-download";var Hm,Zm=function(){function e(e,t){this.exec=e,this.stdIgnoreList=["*.*~"],t&&(this.stdIgnoreList=t)}return e.prototype.downloadServiceFiles=function(e,t){return Y(this,void 0,void 0,function(){var n,r,o;return K(this,function(i){switch(i.label){case 0:return n=e.serviceId,r=e.projectId,o={projectId:r,resourceId:n,resourceType:"service"},[4,this.copy(o,t,"download")];case 1:return[2,i.sent()]}})})},e.prototype.uploadServiceFiles=function(e,t){return Y(this,void 0,void 0,function(){var n,r,o;return K(this,function(i){switch(i.label){case 0:return n=e.serviceId,r=e.projectId,o={projectId:r,resourceId:n,resourceType:"service"},[4,this.copy(o,t,"upload")];case 1:return[2,i.sent()]}})})},e.prototype.downloadJobFiles=function(e,t){return Y(this,void 0,void 0,function(){var n,r,o;return K(this,function(i){switch(i.label){case 0:return n=e.jobId,r=e.projectId,o={projectId:r,resourceId:n,resourceType:"job"},[4,this.copy(o,t,"download")];case 1:return[2,i.sent()]}})})},e.prototype.uploadJobFiles=function(e,t){return Y(this,void 0,void 0,function(){var n,r,o;return K(this,function(i){switch(i.label){case 0:return n=e.jobId,r=e.projectId,o={projectId:r,resourceId:n,resourceType:"job"},[4,this.copy(o,t,"upload")];case 1:return[2,i.sent()]}})})},e.prototype.copy=function(e,t,n){var r;return Y(this,void 0,void 0,function(){var o,i;return K(this,function(u){switch(u.label){case 0:switch(o=new Vm(this.exec,Z(Z({},e),{containerName:t.containerName})),i=X(X([],null!==(r=t.ignoreList)&&void 0!==r?r:[],!0),this.stdIgnoreList,!0),n){case"download":return[3,1];case"upload":return[3,3]}return[3,5];case 1:return[4,o.downloadFiles(t.remotePath,t.localPath,i)];case 2:case 4:return[2,u.sent()];case 3:return[4,o.uploadFiles(t.localPath,t.remotePath,i)];case 5:return[2]}})})},e}(),Ym=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 H(t,e),t}(Error),Km=function(e){function t(t,n,r,o){var i=e.call(this)||this;return i.baseUrl=t,i.logsConfig=n,i.token=r,i.agent=o,i.stop=function(){return Y(i,void 0,void 0,function(){var e;return K(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]})})},i}return H(t,e),t.getLogsEndpoint=function(e){var t=e.containerName,n=e.types,r=e.entityId,o=e.entityType,i=e.buildId,u=e.runId,s=e.backupId,a=e.restoreId,c=e.deploymentId,d=e.isBuild,l=e.lineLimit,h=e.projectId,p=e.queryType,f=e.startTime,m=e.endTime,v=e.duration,E=e.direction,A=e.textIncludes,b=e.textNotIncludes,y=e.regexIncludes,g=e.regexNotIncludes,C="/v1/projects/".concat(h,"/"),w=new URLSearchParams;return w.append("queryType",p),void 0!==f&&w.append("startTime",f.toISOString()),void 0!==m&&w.append("endTime",m.toISOString()),void 0!==l&&w.append("lineLimit",l.toString()),void 0!==t&&w.append("containerName",t),void 0!==c&&w.append("deploymentId",c),void 0!==u&&w.append("runId",u),void 0!==i&&w.append("buildId",i),void 0!==A&&w.append("textIncludes",A),void 0!==b&&w.append("textNotIncludes",b),void 0!==y&&w.append("regexIncludes",y),void 0!==g&&w.append("regexNotIncludes",g),void 0!==E&&w.append("direction",E),void 0!==v&&w.append("duration",v.toString()),void 0!==n&&n.forEach(function(e){return w.append("type",e)}),"".concat(C).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(s).concat(e);case"addonRestore":return"addons/".concat(r,"/backups/").concat(s,"/restores/").concat(a).concat(e);default:throw new Error("Unexpected Northflank entity type received in logs endpoint generation: ".concat(o))}}(),"?").concat(w.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 Y(this,void 0,void 0,function(){var e=this;return K(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,u;void 0!==e.remote&&n(Error("Command is already running"));var s=e.logsEndpoint.replace("https:","wss:").replace("http:","ws:");e.remote=new Ia(s,{agent:e.agent}),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&&a("Log tail initialization failed: ".concat(null!==(n=null==i?void 0:i.message)&&void 0!==n?n:"Reason unknown"));break;case"log-lines":var u=o.data;e.emit("logs-received",u.map(dv));break;case"error":a(null===(r=o.data)||void 0===r?void 0:r.message);break;default:var s="unable to parse message: ".concat(JSON.stringify(o));a(s)}}),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===(u=e.remote)||void 0===u||u.on("error",function(n){e.emit("error",n),e.reset(),t()});var a=function(t){e.emit("error",{message:t}),e.reset(),n(new Error(t))}}),[4,new Promise(function(t){var n;e.remote.on("open",function(){return t()}),null===(n=e.remote)||void 0===n||n.on("error",function(){t()})})];case 1:return t.sent(),this.initialAuth(),[2,this.logSession]}})})},t.prototype.initialAuth=function(){var e,t={type:"init",data:{auth:{type:"apiToken",apiToken:this.token}}};null===(e=this.remote)||void 0===e||e.send(JSON.stringify(t))},t.prototype.reset=function(){this.remote=void 0,this.logSession=void 0},t}(e.EventEmitter),Xm=function(){if(Ii)try{return JSON.parse(k.default.readFileSync(T.default.join(T.default.dirname(o.fileURLToPath("undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&"SCRIPT"===document.currentScript.tagName.toUpperCase()&&document.currentScript.src||new URL("api-client.js",document.baseURI).href)),"../../package.json")).toString())}catch(e){return{}}return{}},Qm=function(){function e(e,t){var n=this;this.opts=t,this.call=function(e){return Y(n,void 0,void 0,function(){return K(this,function(t){return[2,this.executeCall(e)]})})},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=Xm())||void 0===t?void 0:t.version).concat(r)}},e.prototype.executeCall=function(e){var t;return Y(this,void 0,void 0,function(){var n,r,o,i,u,s,a,c,d,l,h,p,f=this;return K(this,function(m){switch(m.label){case 0:if(n=this.method,r=this.opts.agent,o={method:n,headers:this.getDefaultHeaders(),agent:r},!(i=null===(t=this.contextProvider)||void 0===t?void 0:t.getCurrentBaseUrl()))throw new Error("Api client context not correctly initialized, please provide a url to the context.");return u="".concat(i).concat(this.endpointUrl(e)),s=this.body(e),a=Z(Z({url:u},o),{body:s}),[4,sv(u,Z(Z({},o),{body:s}))];case 1:return[4,(c=m.sent()).text()];case 2:return d=m.sent(),l=function(){if(200!==c.status){var e=null==h?void 0:h.error,t=(null==e?void 0:e.message)||"",n={status:c.status,message:t,id:null==e?void 0:e.id,details:null==e?void 0:e.details};if(f.opts.throwErrorOnHttpErrorCode)throw new Ym(n);return n}},h=function(){try{return JSON.parse(d)}catch(e){throw Error("Failed reading api request result: \n\tStatus: ".concat(c.statusText," (").concat(c.status,")\n\tMessage: ").concat(d))}}(),p=l(),[2,{data:null==h?void 0:h.data,rawResponse:c,request:a,error:p,pagination:null==h?void 0:h.pagination}]}})})},e}(),ev=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="get",t.body=function(){},t}return H(t,e),t}(Qm),tv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.all=function(e){return Y(t,void 0,void 0,function(){return K(this,function(t){return[2,new uv(this,e).getAll()]})})},t.call=function(n){return Y(t,void 0,void 0,function(){var t,r=this;return K(this,function(o){switch(o.label){case 0:return[4,e.prototype.executeCall.call(this,n)];case 1:return t=o.sent(),[2,Z(Z({},t),{pagination:Z(Z({},t.pagination),{getNextPage:function(){return Y(r,void 0,void 0,function(){var e,r,o,i,u,s,a,c=this;return K(this,function(d){return void 0===(null===(s=t.pagination)||void 0===s?void 0:s.cursor)?(e=Object.keys(t.data),r=1===e.length?((u={})[e[0]]=[],u):{},o=Z(Z({},t),{pagination:Z(Z({},t.pagination),{count:0}),data:r}),[2,(i=function(e){return Z(Z({},e),{pagination:Z(Z({},e.pagination),{getNextPage:function(){return Y(c,void 0,void 0,function(){return K(this,function(t){return[2,i(e)]})})}})})})(o)]):[2,new uv(this,n,null===(a=t.pagination)||void 0===a?void 0:a.cursor).getNext()]})})}})})]}})})},t}return H(t,e),t}(ev),nv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="post",t}return H(t,e),t}(Qm),rv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="delete",t.body=function(){},t}return H(t,e),t}(Qm),ov=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="put",t}return H(t,e),t}(Qm),iv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.method="patch",t}return H(t,e),t}(Qm),uv=function(){function e(e,t,n){void 0===n&&(n=null);var r=this;this.endpoint=e,this.opts=t,this._currentOffset=0,this.hasNext=function(){return void 0!==r.cursor},this.cursor=n}return Object.defineProperty(e.prototype,"currentOffset",{get:function(){return this._currentOffset},enumerable:!1,configurable:!0}),e.prototype.getNext=function(){var e,t,n;return Y(this,void 0,void 0,function(){var r,o,i,u,s,a;return K(this,function(c){switch(c.label){case 0:return[4,this.endpoint.call(Z(Z({},this.opts),{options:Z(Z({},null===(e=this.opts)||void 0===e?void 0:e.options),{cursor:null!==(t=this.cursor)&&void 0!==t?t:void 0})}))];case 1:return r=c.sent(),o=r.data,i=r.request,u=r.error,s=r.pagination,a=r.rawResponse,this.cursor=null==s?void 0:s.cursor,this._currentOffset+=null!==(n=null==s?void 0:s.count)&&void 0!==n?n:0,[2,{data:o,request:i,error:u,pagination:s,rawResponse:a}]}})})},e.prototype.getAll=function(){var e,t;return Y(this,void 0,void 0,function(){var n,r,o,i,u;return K(this,function(s){switch(s.label){case 0:n=[],s.label=1;case 1:return this.hasNext()?[4,this.getNext()]:[3,3];case 2:return(r=s.sent()).error?[2,r]:(n.push(r),[3,1]);case 3:return i=n.flatMap(function(e){var t=Object.keys(e.data);return 1===t.length?(o=t[0],e.data[t[0]]):e.data}),[2,{data:void 0===o?i:(u={},u[o]=i,u),request:null===(e=n[0])||void 0===e?void 0:e.request,rawResponse:null===(t=n[0])||void 0===t?void 0:t.rawResponse}]}})})},e}(),sv=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 u=function(n){return Si(e,t).then(function(e){o(e)}).catch(function(e){return Y(void 0,void 0,void 0,function(){return K(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,u(n-1)];case 2:return[2,i(e)]}var o})})})};return u(n)})},av=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 Km.getLogsEndpoint(e)},t.body=function(){},t}return H(t,e),t}(ev);exports.LogType=void 0,(Hm=exports.LogType||(exports.LogType={})).CDN="cdn",Hm.Mesh="mesh",Hm.Ingress="ingress",Hm.Runtime="runtime";var cv,dv=function(e){return{containerId:e.containerId,log:e.log,ts:new Date(e.ts)}},lv=function(e,t){void 0===t&&(t={});var n=this;this.contextProvider=e,this.clientOpts=t,this.getServiceLogs=function(e){return Y(n,void 0,void 0,function(){var t,n,r;return K(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 Y(n,void 0,void 0,function(){var t,n,r,o,i;return K(this,function(u){return t=e.parameters,n=e.options,r=t.projectId,o=t.serviceId,i={entityId:o,projectId:r},[2,this.logRange(i,Z(Z({},n),{isBuild:!0}),"service")]})})},this.getJobLogs=function(e){return Y(n,void 0,void 0,function(){var t,n,r;return K(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 Y(n,void 0,void 0,function(){var t,n,r,o,i;return K(this,function(u){return t=e.parameters,n=e.options,r=t.projectId,o=t.jobId,i={entityId:o,projectId:r},[2,this.logRange(i,Z(Z({},n),{isBuild:!0}),"job")]})})},this.getAddonLogs=function(e){return Y(n,void 0,void 0,function(){var t,n,r;return K(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 Y(n,void 0,void 0,function(){var t,n,r;return K(this,function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logRange(r,Z(Z({},n),{backupId:t.backupId}),"addonBackup")]})})},this.getAddonRestoresLogs=function(e){return Y(n,void 0,void 0,function(){var t,n,r,o;return K(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,Z(Z({},n),o),"addonRestore")]})})},this.logRange=function(e,t,r){return Y(n,void 0,void 0,function(){var n,o,i,u,s;return K(this,function(a){switch(a.label){case 0:return n=e.entityId,o=e.projectId,i=Z(Z({projectId:o,entityId:n,entityType:r},t),{queryType:"range"}),[4,new av(this.contextProvider,this.clientOpts).call(i)];case 1:return(u=a.sent()).error?[2,u]:[2,Z(Z({},u),{data:null===(s=null==u?void 0:u.data)||void 0===s?void 0:s.map(dv)})]}})})},this.tailServiceLogs=function(e){return Y(n,void 0,void 0,function(){var t,n,r;return K(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 Y(n,void 0,void 0,function(){var t,n,r,o,i;return K(this,function(u){return t=e.parameters,n=e.options,r=t.serviceId,o=t.projectId,i={entityId:r,projectId:o},[2,this.logTail(i,Z(Z({},n),{isBuild:!0}),"service")]})})},this.tailJobLogs=function(e){return Y(n,void 0,void 0,function(){var t,n,r;return K(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 Y(n,void 0,void 0,function(){var t,n,r,o,i;return K(this,function(u){return t=e.parameters,n=e.options,r=t.projectId,o=t.jobId,i={entityId:o,projectId:r},[2,this.logTail(i,Z(Z({},n),{isBuild:!0}),"job")]})})},this.tailAddonLogs=function(e){return Y(n,void 0,void 0,function(){var t,n,r;return K(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 Y(n,void 0,void 0,function(){var t,n,r;return K(this,function(o){return t=e.parameters,n=e.options,r={entityId:t.addonId,projectId:t.projectId},[2,this.logTail(r,Z(Z({},n),{backupId:t.backupId}),"addonBackup")]})})},this.tailAddonRestoresLogs=function(e){return Y(n,void 0,void 0,function(){var t,n,r,o;return K(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,Z(Z({},n),o),"addonRestore")]})})},this.logTail=function(e,t,r){return Y(n,void 0,void 0,function(){var n,o,i,u,s;return K(this,function(a){if(n=e.entityId,o=e.projectId,i=Z({queryType:"tail",projectId:o,entityId:n,entityType:r},t),this.assertStartedWithNodejs(),u=this.contextProvider.getCurrentBaseUrl(!0),!(s=this.contextProvider.getCurrentToken()))throw new Error("API token not found");return[2,new Km(u,i,s,this.clientOpts.agent)]})})},this.assertStartedWithNodejs=function(){if(!Ii)throw new Error("Command exec only possible when started with nodejs")}},hv=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,u=e.buildId,s=e.isBuild,a=e.queryType,c=e.metricTypes,d=e.startTime,l=e.endTime,h=e.duration,p=e.containerName,f=e.timestamp,m="/v1/projects/".concat(t,"/");var v=new URLSearchParams;return v.append("queryType",a),void 0!==d&&v.append("startTime",d.toISOString()),void 0!==l&&v.append("endTime",l.toISOString()),void 0!==p&&v.append("containerName",p),void 0!==o&&v.append("deploymentId",o),void 0!==i&&v.append("runId",i),void 0!==u&&v.append("buildId",u),void 0!==f&&v.append("timestamp",f.toISOString()),void 0!==h&&v.append("duration",h.toString()),void 0!==c&&c.forEach(function(e){return v.append("metricTypes",e)}),"".concat(m).concat(function(){var e=s?"/build-metrics":"/metrics";switch(r){case"service":return"services/".concat(n).concat(e);case"job":return"jobs/".concat(n).concat(e);case"addon":return"addons/".concat(n).concat(e);default:throw new Error("Unexpected Northflank entity type received in metrics endpoint generation: ".concat(r))}}(),"?").concat(v.toString())},t.body=function(){},t}return H(t,e),t}(ev),pv=function(e){return{metadata:e.metadata,data:e.data.map(function(e){return{value:e.value,ts:new Date(e.ts)}})}};exports.MetricType=void 0,(cv=exports.MetricType||(exports.MetricType={})).Cpu="cpu",cv.Memory="memory",cv.NetworkIngress="networkIngress",cv.NetworkEgress="networkEgress",cv.TcpConnectionOpen="tcpConnectionsOpen",cv.PvcUsage="diskUsage",cv.Requests="requests",cv.Http4xxResponses="http4xxResponses",cv.Http5xxResponses="http5xxResponses",cv.Bandwidth="bandwidth",cv.BandwidthVolume="bandwidthVolume";var fv=function(e){var t=this;this.contextProvider=e,this.getServiceMetrics=function(e){return Y(t,void 0,void 0,function(){var t,n,r;return K(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 Y(t,void 0,void 0,function(){var t,n,r,o,i;return K(this,function(u){return t=e.parameters,n=e.options,r=t.serviceId,o=t.projectId,i={entityId:r,projectId:o},[2,this.metricsSingle(i,Z(Z({},n),{isBuild:!0}),"service")]})})},this.getJobMetrics=function(e){return Y(t,void 0,void 0,function(){var t,n,r;return K(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 Y(t,void 0,void 0,function(){var t,n,r,o,i;return K(this,function(u){return t=e.parameters,n=e.options,r=t.jobId,o=t.projectId,i={entityId:r,projectId:o},[2,this.metricsSingle(i,Z(Z({},n),{isBuild:!0}),"job")]})})},this.getAddonMetrics=function(e){return Y(t,void 0,void 0,function(){var t,n,r;return K(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 Y(t,void 0,void 0,function(){var t,o,i;return K(this,function(u){return t=e.entityId,o=e.projectId,i=Z(Z({projectId:o,entityId:t,entityType:r},n),{queryType:"single"}),[2,this.getMetrics(i)]})})},this.getServiceMetricsRange=function(e){return Y(t,void 0,void 0,function(){var t,n,r;return K(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 Y(t,void 0,void 0,function(){var t,n,r,o,i;return K(this,function(u){return t=e.parameters,n=e.options,r=t.projectId,o=t.serviceId,i={entityId:o,projectId:r},[2,this.metricsRange(i,Z(Z({},n),{isBuild:!0}),"service")]})})},this.getJobMetricsRange=function(e){return Y(t,void 0,void 0,function(){var t,n,r;return K(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 Y(t,void 0,void 0,function(){var t,n,r,o,i;return K(this,function(u){return t=e.parameters,n=e.options,r=t.projectId,o=t.jobId,i={entityId:o,projectId:r},[2,this.metricsRange(i,Z(Z({},n),{isBuild:!0}),"job")]})})},this.getAddonMetricsRange=function(e){return Y(t,void 0,void 0,function(){var t,n,r;return K(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 Y(t,void 0,void 0,function(){var t,o,i;return K(this,function(u){return t=e.entityId,o=e.projectId,i=Z(Z({projectId:o,entityId:t,entityType:r},n),{queryType:"range"}),[2,this.getMetrics(i)]})})},this.getMetrics=function(e){return Y(t,void 0,void 0,function(){var t;return K(this,function(n){switch(n.label){case 0:return[4,new hv(this.contextProvider,{}).call(e)];case 1:return(t=n.sent()).error?[2,t]:[2,Z(Z({},t),{data:Object.fromEntries(Object.entries(t.data).map(function(e){var t=e[0],n=e[1];return[t,Z(Z({},n),{values:n.values.map(pv)})]}))})]}})})}},mv=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 H(t,e),t}(ev),vv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the backup destinations saved to this account. Does not display secrets.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > 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/backup-destinations".concat(r)},t.body=function(){},t}return H(t,e),t}(tv),Ev=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Adds a new backup destination to this account.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Create",t.endpointUrl=function(e){return"/v1/backup-destinations"},t.body=function(e){return JSON.stringify(e.data)},t}return H(t,e),t}(nv),Av=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="View a backup destination, including secrets.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Read",t.endpointUrl=function(e){return["backupDestinationId"].forEach(function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}),"/v1/backup-destinations/".concat(encodeURIComponent(e.parameters.backupDestinationId))},t.body=function(){},t}return H(t,e),t}(ev),bv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a backup destination.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Update",t.endpointUrl=function(e){return["backupDestinationId"].forEach(function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}),"/v1/backup-destinations/".concat(encodeURIComponent(e.parameters.backupDestinationId))},t.body=function(e){return JSON.stringify(e.data)},t}return H(t,e),t}(iv),yv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Delete a backup destination.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Delete",t.endpointUrl=function(e){return["backupDestinationId"].forEach(function(t){var n;if(void 0===(null===(n=null==e?void 0:e.parameters)||void 0===n?void 0:n[t]))throw new Error("Required argument not set: '".concat(t,"'"))}),"/v1/backup-destinations/".concat(encodeURIComponent(e.parameters.backupDestinationId))},t.body=function(){},t}return H(t,e),t}(rv),gv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Lists the backups associated with a backup destinations.",t.withAuth=!0,t.requiredPermissions="Account > BackupDestinations > General > Read",t.endpointUrl=function(e){var t;["backupDestinationId"].forEach(function(t){var n;if(void 0===(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/backup-destinations/".concat(encodeURIComponent(e.parameters.backupDestinationId),"/backups").concat(r)},t.body=function(){},t}return H(t,e),t}(tv),Cv=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 H(t,e),t}(tv),wv=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 H(t,e),t}(ev),Fv=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 H(t,e),t}(ev),Dv=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 H(t,e),t}(tv),Bv=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 H(t,e),t}(nv),Iv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or update a 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 H(t,e),t}(ov),Sv=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 H(t,e),t}(ev),Rv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a 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 H(t,e),t}(iv),jv=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 H(t,e),t}(rv),_v=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 H(t,e),t}(tv),Uv=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 H(t,e),t}(nv),xv=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 H(t,e),t}(nv),Pv=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 H(t,e),t}(nv),Ov=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 H(t,e),t}(tv),kv=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 H(t,e),t}(nv),Tv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Creates or updates a integration.",t.withAuth=!0,t.requiredPermissions="Account > Cloud > Integrations > Create",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"},t.body=function(e){return JSON.stringify(e.data)},t}return H(t,e),t}(ov),Lv=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 H(t,e),t}(ev),Nv=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.description="Updates a 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 H(t,e),t}(iv),qv=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 H(t,e),t}(rv),Gv=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 H(t,e),t}(tv),Mv=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 H(t,e),t}(tv),zv=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 H(t,e),t}(ev),Jv=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 H(t,e),t}(tv),$v=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 H(t,e),t}(nv),Wv=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 H(t,e),t}(ev),Vv=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 H(t,e),t}(rv),Hv=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 H(t,e),t}(ev),Zv=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 H(t,e),t}(nv),Yv=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 H(t,e),t}(nv),Kv=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 H(t,e),t}(ev),Xv=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 H(t,e),t}(rv),Qv=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 H(t,e),t}(nv),eE=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 H(t,e),t}(rv),tE=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 H(t,e),t}(nv),nE=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 H(t,e),t}(nv),rE=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 H(t,e),t}(nv),oE=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 H(t,e),t}(ev),iE=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 H(t,e),t}(ev),uE=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 H(t,e),t}(rv),sE=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 H(t,e),t}(nv),aE=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 H(t,e),t}(nv),cE=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 H(t,e),t}(rv),dE=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 H(t,e),t}(nv),lE=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 H(t,e),t}(nv),hE=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 H(t,e),t}(tv),pE=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 H(t,e),t}(nv),fE=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 H(t,e),t}(ev),mE=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 H(t,e),t}(rv),vE=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 H(t,e),t}(nv),EE=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 H(t,e),t}(nv),AE=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 H(t,e),t}(nv),bE=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 H(t,e),t}(tv),yE=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 H(t,e),t}(nv),gE=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 H(t,e),t}(ev),CE=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 H(t,e),t}(nv),wE=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 H(t,e),t}(rv),FE=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 H(t,e),t}(tv),DE=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 H(t,e),t}(nv),BE=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 H(t,e),t}(ev),IE=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))},t.body=function(e){return JSON.stringify(e.data)},t}return H(t,e),t}(iv),SE=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 H(t,e),t}(rv),RE=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 H(t,e),t}(ev),jE=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 H(t,e),t}(nv),_E=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 H(t,e),t}(tv),UE=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 H(t,e),t}(tv),xE=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 H(t,e),t}(ev),PE=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 H(t,e),t}(tv),OE=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 H(t,e),t}(nv),kE=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 H(t,e),t}(ov),TE=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 H(t,e),t}(iv),LE=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 H(t,e),t}(ev),NE=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 H(t,e),t}(rv),qE=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 H(t,e),t}(tv),GE=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 H(t,e),t}(nv),ME=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 H(t,e),t}(ov),zE=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 H(t,e),t}(ev),JE=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 H(t,e),t}(iv),$E=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 H(t,e),t}(rv),WE=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 H(t,e),t}(tv),VE=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 H(t,e),t}(nv),HE=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 H(t,e),t}(rv),ZE=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 H(t,e),t}(tv),YE=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 H(t,e),t}(nv),KE=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 H(t,e),t}(ev),XE=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 H(t,e),t}(rv),QE=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 H(t,e),t}(nv),eA=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 H(t,e),t}(nv),tA=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 H(t,e),t}(ev),nA=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 H(t,e),t}(nv),rA=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 H(t,e),t}(tv),oA=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 H(t,e),t}(nv),iA=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 H(t,e),t}(tv),uA=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 H(t,e),t}(ev),sA=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 H(t,e),t}(nv),aA=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 H(t,e),t}(nv),cA=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 H(t,e),t}(nv),dA=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 H(t,e),t}(nv),lA=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 H(t,e),t}(nv),hA=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 H(t,e),t}(tv),pA=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 H(t,e),t}(nv),fA=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 H(t,e),t}(nv),mA=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 H(t,e),t}(nv),vA=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 H(t,e),t}(ev),EA=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 H(t,e),t}(nv),AA=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 H(t,e),t}(tv),bA=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 H(t,e),t}(nv),yA=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 H(t,e),t}(ov),gA=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 H(t,e),t}(iv),CA=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 H(t,e),t}(nv),wA=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 H(t,e),t}(ov),FA=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 H(t,e),t}(iv),DA=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 H(t,e),t}(ev),BA=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 H(t,e),t}(rv),IA=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 H(t,e),t}(tv),SA=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 H(t,e),t}(tv),RA=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 H(t,e),t}(nv),jA=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 H(t,e),t}(ev),_A=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 H(t,e),t}(nv),UA=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 H(t,e),t}(ev),xA=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 H(t,e),t}(nv),PA=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 H(t,e),t}(nv),OA=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 H(t,e),t}(ev),kA=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 H(t,e),t}(rv),TA=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 H(t,e),t}(tv),LA=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 H(t,e),t}(ev),NA=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 H(t,e),t}(nv),qA=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 H(t,e),t}(ev),GA=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 H(t,e),t}(nv),MA=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 H(t,e),t}(nv),zA=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 H(t,e),t}(tv),JA=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 H(t,e),t}(nv),$A=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 H(t,e),t}(tv),WA=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 H(t,e),t}(nv),VA=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 H(t,e),t}(ev),HA=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 H(t,e),t}(rv),ZA=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 H(t,e),t}(ev),YA=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 H(t,e),t}(nv),KA=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 H(t,e),t}(ev),XA=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 H(t,e),t}(nv),QA=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 H(t,e),t}(nv),eb=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 H(t,e),t}(nv),tb=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 H(t,e),t}(tv),nb=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 H(t,e),t}(ev),rb=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 H(t,e),t}(tv),ob=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 H(t,e),t}(nv),ib=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 H(t,e),t}(tv),ub=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 H(t,e),t}(rv),sb=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 H(t,e),t}(tv),ab=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 H(t,e),t}(ev),cb=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 H(t,e),t}(ev),db=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 H(t,e),t}(nv),lb=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 H(t,e),t}(nv),hb=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 H(t,e),t}(tv),pb=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 H(t,e),t}(ev),fb=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 H(t,e),t}(nv),mb=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 H(t,e),t}(tv),vb=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 H(t,e),t}(nv),Eb=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 H(t,e),t}(ov),Ab=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 H(t,e),t}(iv),bb=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 H(t,e),t}(ev),yb=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 H(t,e),t}(rv),gb=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 H(t,e),t}(nv),Cb=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 H(t,e),t}(nv),wb=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 H(t,e),t}(ev),Fb=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 H(t,e),t}(rv),Db=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 H(t,e),t}(ev),Bb=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 H(t,e),t}(tv),Ib=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 H(t,e),t}(nv),Sb=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 H(t,e),t}(ov),Rb=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 H(t,e),t}(iv),jb=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 H(t,e),t}(nv),_b=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 H(t,e),t}(ov),Ub=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 H(t,e),t}(iv),xb=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 H(t,e),t}(nv),Pb=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 H(t,e),t}(ov),Ob=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 H(t,e),t}(iv),kb=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 H(t,e),t}(ev),Tb=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 H(t,e),t}(rv),Lb=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 H(t,e),t}(tv),Nb=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 H(t,e),t}(tv),qb=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 H(t,e),t}(nv),Gb=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 H(t,e),t}(ev),Mb=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 H(t,e),t}(nv),zb=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 H(t,e),t}(ev),Jb=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 H(t,e),t}(nv),$b=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 H(t,e),t}(nv),Wb=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 H(t,e),t}(ev),Vb=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 H(t,e),t}(rv),Hb=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 H(t,e),t}(tv),Zb=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 H(t,e),t}(ev),Yb=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 H(t,e),t}(nv),Kb=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 H(t,e),t}(ev),Xb=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 H(t,e),t}(nv),Qb=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 H(t,e),t}(nv),ey=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 H(t,e),t}(ev),ty=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 H(t,e),t}(nv),ny=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 H(t,e),t}(tv),ry=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 H(t,e),t}(nv),oy=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 H(t,e),t}(nv),iy=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 H(t,e),t}(ev),uy=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 H(t,e),t}(nv),sy=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 H(t,e),t}(ev),ay=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 H(t,e),t}(nv),cy=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 H(t,e),t}(ev),dy=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 H(t,e),t}(nv),ly=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 H(t,e),t}(ev),hy=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 H(t,e),t}(nv),py=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 H(t,e),t}(rv),fy=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 H(t,e),t}(nv),my=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 H(t,e),t}(nv),vy=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 H(t,e),t}(ev),Ey=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 H(t,e),t}(tv),Ay=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 H(t,e),t}(nv),by=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 H(t,e),t}(ov),yy=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 H(t,e),t}(ev),gy=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 H(t,e),t}(iv),Cy=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 H(t,e),t}(rv),wy=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 H(t,e),t}(tv),Fy=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 H(t,e),t}(nv),Dy=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 H(t,e),t}(tv),By=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 H(t,e),t}(nv),Iy=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 H(t,e),t}(rv),Sy=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 H(t,e),t}(nv),Ry=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 H(t,e),t}(tv),jy=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 H(t,e),t}(ev),_y=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 H(t,e),t}(nv),Uy=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 Y(this,void 0,void 0,function(){return K(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),Y(this,void 0,void 0,function(){var n,r,o;return K(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=Z({host:"https://api.northflank.com"},e),r=this.contextWrapper,o={current:n.name,contexts:X(X([],r.contexts,!0),[n],!1),lastUpdateCheck:r.lastUpdateCheck},[4,this.storeContext(o)];case 4:return i.sent(),[2]}})})},e.prototype.removeContext=function(e){return Y(this,void 0,void 0,function(){var t,n,r,o;return K(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:X([],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 Y(this,void 0,void 0,function(){var t,n;return K(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=Z(Z({},t),{current:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}})})},e.prototype.updateToken=function(e,t){return Y(this,void 0,void 0,function(){var n,r,o,i,u;return K(this,function(s){switch(s.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?Z(Z({},r),{token:e}):t}),u=Z(Z({},o),{contexts:i}),[4,this.storeContext(u)];case 1:return s.sent(),[2]}})})},e.prototype.useProjectId=function(e){return Y(this,void 0,void 0,function(){var t,n;return K(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=Z(Z({},t),{project:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}})})},e.prototype.useServiceId=function(e){return Y(this,void 0,void 0,function(){var t,n;return K(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=Z(Z({},t),{service:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}})})},e.prototype.useJobId=function(e){return Y(this,void 0,void 0,function(){var t,n;return K(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=Z(Z({},t),{job:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}})})},e.prototype.usePlanId=function(e){return Y(this,void 0,void 0,function(){var t,n;return K(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=Z(Z({},t),{plan:e}),[4,this.addContext(n)];case 1:return r.sent(),[2]}})})},e.prototype.useRegion=function(e){return Y(this,void 0,void 0,function(){var t,n;return K(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=Z(Z({},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 Y(this,void 0,void 0,function(){var t,n;return K(this,function(r){switch(r.label){case 0:return t=this.contextWrapper,n=Z(Z({},t),{lastUpdateCheck:e}),[4,this.storeContext(n)];case 1:return r.sent(),[2]}})})},e}(),xy=function(e){function t(t){var n=e.call(this)||this;return n.assertDir=function(e){return Y(n,void 0,void 0,function(){var t;return K(this,function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),k.default.existsSync(e)?[3,2]:[4,k.default.promises.mkdir(e,{recursive:!0})];case 1:n.sent(),n.label=2;case 2:return[3,4];case 3:throw t=n.sent(),console.log("Failed to login, local files could not be created: ".concat(e,", error: ").concat(t.message)),t;case 4:return[2]}})})},n.configPath=t||"".concat(x.default.homedir(),"/.northflank"),n.configFile="".concat(n.configPath,"/config.json"),n.loadContext(),n}return H(t,e),t.prototype.loadContextWrapper=function(){try{return JSON.parse(k.default.readFileSync(this.configFile,"utf8"))}catch(e){return{contexts:[],lastUpdateCheck:new Date(0)}}},t.prototype.writeContext=function(e){return Y(this,void 0,void 0,function(){var t;return K(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,k.default.promises.writeFile(this.configFile,JSON.stringify(e,null,"\t"),{mode:416})];case 3:return n.sent(),[3,5];case 4:throw t=n.sent(),console.log("Failed to persist api context, local files could not be created, error: ".concat(t.message)),t;case 5:return[2]}})})},t.prototype.assertConfigDir=function(){return Y(this,void 0,void 0,function(){return K(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}(Uy),Py=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)},t}return H(t,e),t.prototype.loadContextWrapper=function(){return this.inMemoryContextWrapper||(this.inMemoryContextWrapper={contexts:[],lastUpdateCheck:new Date(0)}),this.inMemoryContextWrapper},t.prototype.writeContext=function(e){return Y(this,void 0,void 0,function(){return K(this,function(t){return this.inMemoryContextWrapper=e,[2]})})},t}(Uy),Oy=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 tc(e,new Bb(e,t),new qE(e,t),t.agent),this.exec=new oc(e,t.agent),this.logs=new lv(e,t),this.metrics=new fv(e),this.fileCopy=new Zm(this.exec),this.endpoints={get:(o={},o.addon=((r=new zE(e,t)).types=new mv(e,t),r.backupSchedules=new WE(e,t),r.backups=new ZE(e,t),r.backup=((n=new KE(e,t)).download=new tA(e,t),n.restores=new rA(e,t),n),r.containers=new iA(e,t),r.credentials=new uA(e,t),r.restores=new hA(e,t),r.version=new vA(e,t),r),o.backupDestination=new Av(e,t),o.invoice=function(){var n={};return n.details=new wv(e,t),n}(),o.cloud=function(){var n={};return n.cluster=new Sv(e,t),n.integration=new Lv(e,t),n}(),o.dnsId=new zv(e,t),o.domain=new Wv(e,t),o.domainCertificate=new Hv(e,t),o.subdomain=function(){var n=new Kv(e,t);return n.path=new iE(e,t),n}(),o.logSink=new fE(e,t),o.notification=new gE(e,t),o.registryCredentials=new BE(e,t),o.project=new LE(e,t),o.job=function(){var n=new DA(e,t);return n.branches=new IA(e,t),n.builds=new SA(e,t),n.buildArguments=new jA(e,t),n.buildArgumentDetails=new UA(e,t),n.build=new OA(e,t),n.containers=new TA(e,t),n.deployment=new LA(e,t),n.healthChecks=new qA(e,t),n.pullRequests=new zA(e,t),n.runs=new $A(e,t),n.run=new VA(e,t),n.runtimeEnvironment=new ZA(e,t),n.runtimeEnvironmentDetails=new KA(e,t),n}(),o.pipeline=new nb(e,t),o.previewTemplate=new rb(e,t),o.previewTemplateRun=new ab(e,t),o.releaseFlow=new cb(e,t),o.releaseFlowRun=new pb(e,t),o.secret=new bb(e,t),o.secretLink=new wb(e,t),o.secretDetails=new Db(e,t),o.service=function(){var n=new kb(e,t);return n.branches=new Lb(e,t),n.builds=new Nb(e,t),n.buildArguments=new Gb(e,t),n.buildArgumentDetails=new zb(e,t),n.build=new Wb(e,t),n.containers=new Hb(e,t),n.deployment=new Zb(e,t),n.healthChecks=new Kb(e,t),n.ports=new ey(e,t),n.pullRequests=new ny(e,t),n.runtimeEnvironment=new iy(e,t),n.runtimeEnvironmentDetails=new sy(e,t),n}(),o.volume=new ly(e,t),o.tag=new yy(e,t),o.template=new Dy(e,t),o.templateRun=new jy(e,t),o),list:function(){var n={};return n.backupDestinations=new vv(e,t),n.backupDestinationsBackups=new gv(e,t),n.invoices=new Cv(e,t),n.cloud=function(){var n={};return n.providers=new Fv(e,t),n.clusters=new Dv(e,t),n.cluster=function(){var n={};return n.nodes=new _v(e,t),n}(),n.integrations=new Ov(e,t),n.nodeTypes=new Gv(e,t),n.regions=new Mv(e,t),n}(),n.domains=new Jv(e,t),n.subdomain=function(){var n={};return n.path=new oE(e,t),n}(),n.logSinks=new hE(e,t),n.notifications=new bE(e,t),n.registryCredentials=new FE(e,t),n.vcs=new RE(e,t),n.repos=new _E(e,t),n.branches=new UE(e,t),n.plans=new xE(e,t),n.projects=new PE(e,t),n.addons=new qE(e,t),n.jobs=new AA(e,t),n.pipelines=new tb(e,t),n.previewTemplatePreviews=new ib(e,t),n.previewTemplateRuns=new sb(e,t),n.releaseFlowRuns=new hb(e,t),n.secrets=new mb(e,t),n.services=new Bb(e,t),n.volumes=new cy(e,t),n.regions=new vy(e,t),n.tags=new Ey(e,t),n.templates=new wy(e,t),n.templateRuns=new Ry(e,t),n}(),add:function(){var n={};return n.backupDestination=new Ev(e,t),n.domain=function(){var n={};return n.subdomain=new Yv(e,t),n}(),n.subdomain=function(){var n={};return n.path=new rE(e,t),n}(),n.registryCredentials=new DE(e,t),n.tag=new Ay(e,t),n}(),patch:function(){var n={};return n.backupDestination=new bv(e,t),n.cloud=function(){var n={};return n.cluster=new Rv(e,t),n.integration=new Nv(e,t),n}(),n.project=new TE(e,t),n.addon=new JE(e,t),n.job=function(){var n={};return n.cron=new gA(e,t),n.manual=new FA(e,t),n}(),n.secret=new Ab(e,t),n.service=function(){var n={};return n.build=new Rb(e,t),n.combined=new Ub(e,t),n.deployment=new Ob(e,t),n}(),n.tag=new gy(e,t),n}(),delete:function(){var n={};return n.backupDestination=new yv(e,t),n.cloud=function(){var n={};return n.cluster=new jv(e,t),n.integration=new qv(e,t),n}(),n.domain=new Vv(e,t),n.subdomain=function(){var n=new Xv(e,t);return n.path=new uE(e,t),n}(),n.logSink=new mE(e,t),n.notification=new wE(e,t),n.registryCredentials=new SE(e,t),n.project=new NE(e,t),n.addon=function(){var n=new $E(e,t);return n.backupSchedule=new HE(e,t),n}(),n.backup=new XE(e,t),n.job=new BA(e,t),n.previewTemplatePreview=new ub(e,t),n.secret=new yb(e,t),n.secretLink=new Fb(e,t),n.service=new Tb(e,t),n.volume=new py(e,t),n.tag=new Cy(e,t),n.template=new Iy(e,t),n}(),create:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Bv(e,t),n.integration=new kv(e,t),n}(),n.domain=new $v(e,t),n.logSink=new pE(e,t),n.notification=new yE(e,t),n.customVcs=function(){var n={};return n.token=new jE(e,t),n}(),n.project=new OE(e,t),n.addon=function(){var n=new GE(e,t);return n.backupSchedule=new VE(e,t),n}(),n.job=function(){var n={};return n.cron=new bA(e,t),n.manual=new CA(e,t),n}(),n.secret=new vb(e,t),n.service=function(){var n={};return n.build=new Ib(e,t),n.combined=new jb(e,t),n.deployment=new xb(e,t),n}(),n.volume=new dy(e,t),n.template=new Fy(e,t),n}(),put:function(){var n={};return n.cloud=function(){var n={};return n.cluster=new Iv(e,t),n.integration=new Tv(e,t),n}(),n.project=new kE(e,t),n.addon=new ME(e,t),n.job=function(){var n={};return n.cron=new yA(e,t),n.manual=new wA(e,t),n}(),n.secret=new Eb(e,t),n.service=function(){var n={};return n.build=new Sb(e,t),n.combined=new _b(e,t),n.deployment=new Pb(e,t),n}(),n.tag=new by(e,t),n}(),cordon:function(){var n={};return n.cloud=function(){var n={};return n.cluster=function(){var n={};return n.node=new Uv(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 xv(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 Pv(e,t),n}(),n}(),n}(),import:function(){var n={};return n.domainCertificate=new Zv(e,t),n.addon=function(){var n={};return n.backup=new sA(e,t),n}(),n}(),assign:function(){var n={};return n.subdomain=function(){var n={};return n.service=new Qv(e,t),n.path=new aE(e,t),n}(),n}(),unassign:function(){var n={};return n.subdomain=function(){var n=new eE(e,t);return n.path=new cE(e,t),n}(),n}(),disable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new tE(e,t),n}(),n}(),enable:function(){var n={};return n.subdomain=function(){var n={};return n.cdn=new nE(e,t),n}(),n}(),update:function(){var n={};return n.subdomain=function(){var n={};return n.path=new sE(e,t),n}(),n.logSink=new AE(e,t),n.notification=new CE(e,t),n.registryCredentials=new IE(e,t),n.addon=function(){var n={};return n.networkSettings=new aA(e,t),n.security=new mA(e,t),n.version=new EA(e,t),n}(),n.job=function(){var n={};return n.buildArguments=new _A(e,t),n.buildOptions=new xA(e,t),n.buildSource=new PA(e,t),n.deployment=new NA(e,t),n.healthChecks=new GA(e,t),n.runtimeEnvironment=new YA(e,t),n.settings=new QA(e,t),n}(),n.previewTemplate=new ob(e,t),n.releaseFlow=new db(e,t),n.secret=new gb(e,t),n.secretLink=new Cb(e,t),n.service=function(){var n={};return n.buildArguments=new Mb(e,t),n.buildOptions=new Jb(e,t),n.buildSource=new $b(e,t),n.deployment=new Yb(e,t),n.healthChecks=new Xb(e,t),n.ports=new ty(e,t),n.runtimeEnvironment=new uy(e,t),n}(),n.volume=new hy(e,t),n.template=new By(e,t),n}(),verify:function(){var n={};return n.subdomain=new dE(e,t),n.domain=new lE(e,t),n}(),pause:function(){var n={};return n.logSink=new vE(e,t),n.addon=new cA(e,t),n.job=new MA(e,t),n.service=new Qb(e,t),n}(),resume:function(){var n={};return n.logSink=new EE(e,t),n.addon=new pA(e,t),n.job=new JA(e,t),n.service=new oy(e,t),n}(),backup:function(){var n={};return n.addon=new YE(e,t),n}(),abort:function(){var n={};return n.addon=function(){var n={};return n.backup=new QE(e,t),n.restore=new eA(e,t),n}(),n.job=function(){var n={};return n.build=new kA(e,t),n.run=new HA(e,t),n}(),n.releaseFlowRun=new fb(e,t),n.service=function(){var n={};return n.build=new Vb(e,t),n}(),n.templateRun=new _y(e,t),n}(),restore:function(){var n={};return n.addon=function(){var n={};return n.backup=new nA(e,t),n}(),n}(),retain:function(){var n={};return n.addon=function(){var n={};return n.backup=new oA(e,t),n}(),n}(),reset:function(){var n={};return n.addon=new dA(e,t),n}(),restart:function(){var n={};return n.addon=new lA(e,t),n.service=new ry(e,t),n}(),scale:function(){var n={};return n.addon=new fA(e,t),n.job=new XA(e,t),n.service=new ay(e,t),n}(),start:function(){var n={};return n.job=function(){var n={};return n.build=new RA(e,t),n.run=new WA(e,t),n}(),n.service=function(){var n={};return n.build=new qb(e,t),n}(),n}(),suspend:function(){var n={};return n.job=new eb(e,t),n}(),run:function(){var n={};return n.releaseFlow=new lb(e,t),n.template=new Sy(e,t),n}(),attach:function(){var n={};return n.volume=new fy(e,t),n}(),detach:function(){var n={};return n.volume=new my(e,t),n}(),download:function(){var e={};return e.service=function(){var e={};return e.files=i.fileCopy.downloadServiceFiles.bind(i.fileCopy),e}(),e.job=function(){var e={};return e.files=i.fileCopy.downloadJobFiles.bind(i.fileCopy),e}(),e}(),upload:function(){var e={};return e.service=function(){var e={};return e.files=i.fileCopy.uploadServiceFiles.bind(i.fileCopy),e}(),e.job=function(){var e={};return e.files=i.fileCopy.uploadJobFiles.bind(i.fileCopy),e}(),e}()},this.download=function(){var e={};return e.service=function(){var e={};return e.files=i.endpoints.download.service.files,e}(),e.job=function(){var e={};return e.files=i.endpoints.download.job.files,e}(),e}(),this.upload=function(){var e={};return e.service=function(){var e={};return e.files=i.endpoints.upload.service.files,e}(),e.job=function(){var e={};return e.files=i.endpoints.upload.job.files,e}(),e}(),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=function(){var e=i.endpoints.get.addon.backupSchedules.call;return e.all=i.endpoints.get.addon.backupSchedules.all,e}(),e.backups=function(){var e=i.endpoints.get.addon.backups.call;return e.all=i.endpoints.get.addon.backups.all,e}(),e.backup=function(){var e=i.endpoints.get.addon.backup.call;return e.download=i.endpoints.get.addon.backup.download.call,e.restores=function(){var e=i.endpoints.get.addon.backup.restores.call;return e.all=i.endpoints.get.addon.backup.restores.all,e}(),e.logs=i.logs.getAddonBackupLogs,e.logTail=i.logs.tailAddonBackupLogs,e}(),e.containers=function(){var e=i.endpoints.get.addon.containers.call;return e.all=i.endpoints.get.addon.containers.all,e}(),e.credentials=i.endpoints.get.addon.credentials.call,e.restores=function(){var e=function(){var e=i.endpoints.get.addon.restores.call;return e.all=i.endpoints.get.addon.restores.all,e}();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.backupDestination=i.endpoints.get.backupDestination.call,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.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=function(){var e=i.endpoints.get.job.branches.call;return e.all=i.endpoints.get.job.branches.all,e}(),e.builds=function(){var e=i.endpoints.get.job.builds.call;return e.all=i.endpoints.get.job.builds.all,e}(),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=function(){var e=i.endpoints.get.job.containers.call;return e.all=i.endpoints.get.job.containers.all,e}(),e.deployment=i.endpoints.get.job.deployment.call,e.healthChecks=i.endpoints.get.job.healthChecks.call,e.pullRequests=function(){var e=i.endpoints.get.job.pullRequests.call;return e.all=i.endpoints.get.job.pullRequests.all,e}(),e.runs=function(){var e=i.endpoints.get.job.runs.call;return e.all=i.endpoints.get.job.runs.all,e}(),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=function(){var e=i.endpoints.get.previewTemplate.call;return e.all=i.endpoints.get.previewTemplate.all,e}(),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=function(){var e=i.endpoints.get.service.branches.call;return e.all=i.endpoints.get.service.branches.all,e}(),e.builds=function(){var e=i.endpoints.get.service.builds.call;return e.all=i.endpoints.get.service.builds.all,e}(),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=function(){var e=i.endpoints.get.service.containers.call;return e.all=i.endpoints.get.service.containers.all,e}(),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=function(){var e=i.endpoints.get.service.pullRequests.call;return e.all=i.endpoints.get.service.pullRequests.all,e}(),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=function(){var e=i.endpoints.get.template.call;return e.all=i.endpoints.get.template.all,e}(),e.templateRun=i.endpoints.get.templateRun.call,e}(),this.list=function(){var e={};return e.backupDestinations=function(){var e=i.endpoints.list.backupDestinations.call;return e.all=i.endpoints.list.backupDestinations.all,e}(),e.backupDestinationsBackups=function(){var e=i.endpoints.list.backupDestinationsBackups.call;return e.all=i.endpoints.list.backupDestinationsBackups.all,e}(),e.invoices=function(){var e=i.endpoints.list.invoices.call;return e.all=i.endpoints.list.invoices.all,e}(),e.cloud=function(){var e={};return e.providers=i.endpoints.list.cloud.providers.call,e.clusters=function(){var e=i.endpoints.list.cloud.clusters.call;return e.all=i.endpoints.list.cloud.clusters.all,e}(),e.cluster=function(){var e={};return e.nodes=function(){var e=i.endpoints.list.cloud.cluster.nodes.call;return e.all=i.endpoints.list.cloud.cluster.nodes.all,e}(),e}(),e.integrations=function(){var e=i.endpoints.list.cloud.integrations.call;return e.all=i.endpoints.list.cloud.integrations.all,e}(),e.nodeTypes=function(){var e=i.endpoints.list.cloud.nodeTypes.call;return e.all=i.endpoints.list.cloud.nodeTypes.all,e}(),e.regions=function(){var e=i.endpoints.list.cloud.regions.call;return e.all=i.endpoints.list.cloud.regions.all,e}(),e}(),e.domains=function(){var e=i.endpoints.list.domains.call;return e.all=i.endpoints.list.domains.all,e}(),e.subdomain=function(){var e={};return e.path=i.endpoints.list.subdomain.path.call,e}(),e.logSinks=function(){var e=i.endpoints.list.logSinks.call;return e.all=i.endpoints.list.logSinks.all,e}(),e.notifications=function(){var e=i.endpoints.list.notifications.call;return e.all=i.endpoints.list.notifications.all,e}(),e.registryCredentials=function(){var e=i.endpoints.list.registryCredentials.call;return e.all=i.endpoints.list.registryCredentials.all,e}(),e.vcs=i.endpoints.list.vcs.call,e.repos=function(){var e=i.endpoints.list.repos.call;return e.all=i.endpoints.list.repos.all,e}(),e.branches=function(){var e=i.endpoints.list.branches.call;return e.all=i.endpoints.list.branches.all,e}(),e.plans=i.endpoints.list.plans.call,e.projects=function(){var e=i.endpoints.list.projects.call;return e.all=i.endpoints.list.projects.all,e}(),e.addons=function(){var e=i.endpoints.list.addons.call;return e.all=i.endpoints.list.addons.all,e}(),e.jobs=function(){var e=i.endpoints.list.jobs.call;return e.all=i.endpoints.list.jobs.all,e}(),e.pipelines=function(){var e=i.endpoints.list.pipelines.call;return e.all=i.endpoints.list.pipelines.all,e}(),e.previewTemplatePreviews=function(){var e=i.endpoints.list.previewTemplatePreviews.call;return e.all=i.endpoints.list.previewTemplatePreviews.all,e}(),e.previewTemplateRuns=function(){var e=i.endpoints.list.previewTemplateRuns.call;return e.all=i.endpoints.list.previewTemplateRuns.all,e}(),e.releaseFlowRuns=function(){var e=i.endpoints.list.releaseFlowRuns.call;return e.all=i.endpoints.list.releaseFlowRuns.all,e}(),e.secrets=function(){var e=i.endpoints.list.secrets.call;return e.all=i.endpoints.list.secrets.all,e}(),e.services=function(){var e=i.endpoints.list.services.call;return e.all=i.endpoints.list.services.all,e}(),e.volumes=i.endpoints.list.volumes.call,e.regions=i.endpoints.list.regions.call,e.tags=function(){var e=i.endpoints.list.tags.call;return e.all=i.endpoints.list.tags.all,e}(),e.templates=function(){var e=i.endpoints.list.templates.call;return e.all=i.endpoints.list.templates.all,e}(),e.templateRuns=function(){var e=i.endpoints.list.templateRuns.call;return e.all=i.endpoints.list.templateRuns.all,e}(),e}(),this.add=function(){var e={};return e.backupDestination=i.endpoints.add.backupDestination.call,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.patch=function(){var e={};return e.backupDestination=i.endpoints.patch.backupDestination.call,e.cloud=function(){var e={};return e.cluster=i.endpoints.patch.cloud.cluster.call,e.integration=i.endpoints.patch.cloud.integration.call,e}(),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.delete=function(){var e={};return e.backupDestination=i.endpoints.delete.backupDestination.call,e.cloud=function(){var e={};return e.cluster=i.endpoints.delete.cloud.cluster.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.create=function(){var e={};return e.cloud=function(){var e={};return e.cluster=i.endpoints.create.cloud.cluster.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.put=function(){var e={};return e.cloud=function(){var e={};return e.cluster=i.endpoints.put.cloud.cluster.call,e.integration=i.endpoints.put.cloud.integration.call,e}(),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.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.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.update=function(){var e={};return 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.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.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.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.start=function(){var e={};return 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.suspend=function(){var e={};return e.job=i.endpoints.suspend.job.call,e}(),this.run=function(){var e={};return e.releaseFlow=i.endpoints.run.releaseFlow.call,e.template=i.endpoints.run.template.call,e}(),this.attach=function(){var e={};return e.volume=i.endpoints.attach.volume.call,e}(),this.detach=function(){var e={};return e.volume=i.endpoints.detach.volume.call,e}()};exports.AbortAddonBackupEndpoint=QE,exports.AbortAddonRestoreEndpoint=eA,exports.AbortJobBuildEndpoint=kA,exports.AbortJobRunEndpoint=HA,exports.AbortReleaseflowrunEndpoint=fb,exports.AbortServiceBuildEndpoint=Vb,exports.AbortTemplaterunEndpoint=_y,exports.AddBackupdestinationEndpoint=Ev,exports.AddDomainSubdomainEndpoint=Yv,exports.AddRegistrycredentialsEndpoint=DE,exports.AddSubdomainPathEndpoint=rE,exports.AddTagEndpoint=Ay,exports.ApiClient=Oy,exports.ApiClientContextProvider=Uy,exports.ApiClientFileContextProvider=xy,exports.ApiClientInMemoryContextProvider=Py,exports.ApiEndpoint=Qm,exports.AssignSubdomainPathEndpoint=aE,exports.AssignSubdomainServiceEndpoint=Qv,exports.AttachVolumeEndpoint=fy,exports.BackupAddonEndpoint=YE,exports.CordonCloudClusterNodeEndpoint=Uv,exports.CreateAddonBackupscheduleEndpoint=VE,exports.CreateAddonEndpoint=GE,exports.CreateCloudClusterEndpoint=Bv,exports.CreateCloudIntegrationEndpoint=kv,exports.CreateCustomvcsTokenEndpoint=jE,exports.CreateDomainEndpoint=$v,exports.CreateJobCronEndpoint=bA,exports.CreateJobManualEndpoint=CA,exports.CreateLogsinkEndpoint=pE,exports.CreateNotificationEndpoint=yE,exports.CreateProjectEndpoint=OE,exports.CreateSecretEndpoint=vb,exports.CreateServiceBuildEndpoint=Ib,exports.CreateServiceCombinedEndpoint=jb,exports.CreateServiceDeploymentEndpoint=xb,exports.CreateTemplateEndpoint=Fy,exports.CreateVolumeEndpoint=dy,exports.DeleteAddonBackupscheduleEndpoint=HE,exports.DeleteAddonEndpoint=$E,exports.DeleteApiEndpoint=rv,exports.DeleteBackupEndpoint=XE,exports.DeleteBackupdestinationEndpoint=yv,exports.DeleteCloudClusterEndpoint=jv,exports.DeleteCloudIntegrationEndpoint=qv,exports.DeleteDomainEndpoint=Vv,exports.DeleteJobEndpoint=BA,exports.DeleteLogsinkEndpoint=mE,exports.DeleteNotificationEndpoint=wE,exports.DeletePreviewtemplatepreviewEndpoint=ub,exports.DeleteProjectEndpoint=NE,exports.DeleteRegistrycredentialsEndpoint=SE,exports.DeleteSecretEndpoint=yb,exports.DeleteSecretlinkEndpoint=Fb,exports.DeleteServiceEndpoint=Tb,exports.DeleteSubdomainEndpoint=Xv,exports.DeleteSubdomainPathEndpoint=uE,exports.DeleteTagEndpoint=Cy,exports.DeleteTemplateEndpoint=Iy,exports.DeleteVolumeEndpoint=py,exports.DetachVolumeEndpoint=my,exports.DisableSubdomainCdnEndpoint=tE,exports.DrainCloudClusterNodeEndpoint=xv,exports.EnableSubdomainCdnEndpoint=nE,exports.ExecCommandStandard=rc,exports.GetAddonBackupDownloadEndpoint=tA,exports.GetAddonBackupEndpoint=KE,exports.GetAddonBackupRestoresEndpoint=rA,exports.GetAddonBackupsEndpoint=ZE,exports.GetAddonBackupschedulesEndpoint=WE,exports.GetAddonContainersEndpoint=iA,exports.GetAddonCredentialsEndpoint=uA,exports.GetAddonEndpoint=zE,exports.GetAddonRestoresEndpoint=hA,exports.GetAddonTypesEndpoint=mv,exports.GetAddonVersionEndpoint=vA,exports.GetApiEndpoint=ev,exports.GetApiEndpointPaginated=tv,exports.GetBackupdestinationEndpoint=Av,exports.GetCloudClusterEndpoint=Sv,exports.GetCloudIntegrationEndpoint=Lv,exports.GetDnsidEndpoint=zv,exports.GetDomainEndpoint=Wv,exports.GetDomaincertificateEndpoint=Hv,exports.GetInvoiceDetailsEndpoint=wv,exports.GetJobBranchesEndpoint=IA,exports.GetJobBuildEndpoint=OA,exports.GetJobBuildargumentdetailsEndpoint=UA,exports.GetJobBuildargumentsEndpoint=jA,exports.GetJobBuildsEndpoint=SA,exports.GetJobContainersEndpoint=TA,exports.GetJobDeploymentEndpoint=LA,exports.GetJobEndpoint=DA,exports.GetJobHealthchecksEndpoint=qA,exports.GetJobPullrequestsEndpoint=zA,exports.GetJobRunEndpoint=VA,exports.GetJobRunsEndpoint=$A,exports.GetJobRuntimeenvironmentEndpoint=ZA,exports.GetJobRuntimeenvironmentdetailsEndpoint=KA,exports.GetLogsinkEndpoint=fE,exports.GetNotificationEndpoint=gE,exports.GetPipelineEndpoint=nb,exports.GetPreviewtemplateEndpoint=rb,exports.GetPreviewtemplaterunEndpoint=ab,exports.GetProjectEndpoint=LE,exports.GetRegistrycredentialsEndpoint=BE,exports.GetReleaseflowEndpoint=cb,exports.GetReleaseflowrunEndpoint=pb,exports.GetSecretEndpoint=bb,exports.GetSecretdetailsEndpoint=Db,exports.GetSecretlinkEndpoint=wb,exports.GetServiceBranchesEndpoint=Lb,exports.GetServiceBuildEndpoint=Wb,exports.GetServiceBuildargumentdetailsEndpoint=zb,exports.GetServiceBuildargumentsEndpoint=Gb,exports.GetServiceBuildsEndpoint=Nb,exports.GetServiceContainersEndpoint=Hb,exports.GetServiceDeploymentEndpoint=Zb,exports.GetServiceEndpoint=kb,exports.GetServiceHealthchecksEndpoint=Kb,exports.GetServicePortsEndpoint=ey,exports.GetServicePullrequestsEndpoint=ny,exports.GetServiceRuntimeenvironmentEndpoint=iy,exports.GetServiceRuntimeenvironmentdetailsEndpoint=sy,exports.GetSubdomainEndpoint=Kv,exports.GetSubdomainPathEndpoint=iE,exports.GetTagEndpoint=yy,exports.GetTemplateEndpoint=Dy,exports.GetTemplaterunEndpoint=jy,exports.GetVolumeEndpoint=ly,exports.ImportAddonBackupEndpoint=sA,exports.ImportDomaincertificateEndpoint=Zv,exports.ListAddonsEndpoint=qE,exports.ListBackupdestinationsEndpoint=vv,exports.ListBackupdestinationsbackupsEndpoint=gv,exports.ListBranchesEndpoint=UE,exports.ListCloudClusterNodesEndpoint=_v,exports.ListCloudClustersEndpoint=Dv,exports.ListCloudIntegrationsEndpoint=Ov,exports.ListCloudNodetypesEndpoint=Gv,exports.ListCloudProvidersEndpoint=Fv,exports.ListCloudRegionsEndpoint=Mv,exports.ListDomainsEndpoint=Jv,exports.ListInvoicesEndpoint=Cv,exports.ListJobsEndpoint=AA,exports.ListLogsinksEndpoint=hE,exports.ListNotificationsEndpoint=bE,exports.ListPipelinesEndpoint=tb,exports.ListPlansEndpoint=xE,exports.ListPreviewtemplatepreviewsEndpoint=ib,exports.ListPreviewtemplaterunsEndpoint=sb,exports.ListProjectsEndpoint=PE,exports.ListRegionsEndpoint=vy,exports.ListRegistrycredentialsEndpoint=FE,exports.ListReleaseflowrunsEndpoint=hb,exports.ListReposEndpoint=_E,exports.ListSecretsEndpoint=mb,exports.ListServicesEndpoint=Bb,exports.ListSubdomainPathEndpoint=oE,exports.ListTagsEndpoint=Ey,exports.ListTemplaterunsEndpoint=Ry,exports.ListTemplatesEndpoint=wy,exports.ListVcsEndpoint=RE,exports.ListVolumesEndpoint=cy,exports.NorthflankApiCallError=Ym,exports.NorthflankExecCommand=oc,exports.NorthflankFileCopy=Zm,exports.NorthflankLogFetch=lv,exports.NorthflankMetricFetch=fv,exports.NorthflankPortForwarder=tc,exports.PatchAddonEndpoint=JE,exports.PatchApiEndpoint=iv,exports.PatchBackupdestinationEndpoint=bv,exports.PatchCloudClusterEndpoint=Rv,exports.PatchCloudIntegrationEndpoint=Nv,exports.PatchJobCronEndpoint=gA,exports.PatchJobManualEndpoint=FA,exports.PatchProjectEndpoint=TE,exports.PatchSecretEndpoint=Ab,exports.PatchServiceBuildEndpoint=Rb,exports.PatchServiceCombinedEndpoint=Ub,exports.PatchServiceDeploymentEndpoint=Ob,exports.PatchTagEndpoint=gy,exports.PauseAddonEndpoint=cA,exports.PauseJobEndpoint=MA,exports.PauseLogsinkEndpoint=vE,exports.PauseServiceEndpoint=Qb,exports.PostApiEndpoint=nv,exports.PutAddonEndpoint=ME,exports.PutApiEndpoint=ov,exports.PutCloudClusterEndpoint=Iv,exports.PutCloudIntegrationEndpoint=Tv,exports.PutJobCronEndpoint=yA,exports.PutJobManualEndpoint=wA,exports.PutProjectEndpoint=kE,exports.PutSecretEndpoint=Eb,exports.PutServiceBuildEndpoint=Sb,exports.PutServiceCombinedEndpoint=_b,exports.PutServiceDeploymentEndpoint=Pb,exports.PutTagEndpoint=by,exports.ResetAddonEndpoint=dA,exports.RestartAddonEndpoint=lA,exports.RestartServiceEndpoint=ry,exports.RestoreAddonBackupEndpoint=nA,exports.ResumeAddonEndpoint=pA,exports.ResumeJobEndpoint=JA,exports.ResumeLogsinkEndpoint=EE,exports.ResumeServiceEndpoint=oy,exports.RetainAddonBackupEndpoint=oA,exports.RunReleaseflowEndpoint=lb,exports.RunTemplateEndpoint=Sy,exports.ScaleAddonEndpoint=fA,exports.ScaleJobEndpoint=XA,exports.ScaleServiceEndpoint=ay,exports.StartJobBuildEndpoint=RA,exports.StartJobRunEndpoint=WA,exports.StartServiceBuildEndpoint=qb,exports.SuspendJobEndpoint=eb,exports.UnassignSubdomainEndpoint=eE,exports.UnassignSubdomainPathEndpoint=cE,exports.UncordonCloudClusterNodeEndpoint=Pv,exports.UpdateAddonNetworksettingsEndpoint=aA,exports.UpdateAddonSecurityEndpoint=mA,exports.UpdateAddonVersionEndpoint=EA,exports.UpdateJobBuildargumentsEndpoint=_A,exports.UpdateJobBuildoptionsEndpoint=xA,exports.UpdateJobBuildsourceEndpoint=PA,exports.UpdateJobDeploymentEndpoint=NA,exports.UpdateJobHealthchecksEndpoint=GA,exports.UpdateJobRuntimeenvironmentEndpoint=YA,exports.UpdateJobSettingsEndpoint=QA,exports.UpdateLogsinkEndpoint=AE,exports.UpdateNotificationEndpoint=CE,exports.UpdatePreviewtemplateEndpoint=ob,exports.UpdateRegistrycredentialsEndpoint=IE,exports.UpdateReleaseflowEndpoint=db,exports.UpdateSecretEndpoint=gb,exports.UpdateSecretlinkEndpoint=Cb,exports.UpdateServiceBuildargumentsEndpoint=Mb,exports.UpdateServiceBuildoptionsEndpoint=Jb,exports.UpdateServiceBuildsourceEndpoint=$b,exports.UpdateServiceDeploymentEndpoint=Yb,exports.UpdateServiceHealthchecksEndpoint=Xb,exports.UpdateServicePortsEndpoint=ty,exports.UpdateServiceRuntimeenvironmentEndpoint=uy,exports.UpdateSubdomainPathEndpoint=sE,exports.UpdateTemplateEndpoint=By,exports.UpdateVolumeEndpoint=hy,exports.VerifyDomainEndpoint=lE,exports.VerifySubdomainEndpoint=dE;