UNPKG

148 kBJavaScriptView Raw
1!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).gitlab={})}(this,(function(e){"use strict";
2/*! *****************************************************************************
3 Copyright (c) Microsoft Corporation. All rights reserved.
4 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
5 this file except in compliance with the License. You may obtain a copy of the
6 License at http://www.apache.org/licenses/LICENSE-2.0
7
8 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
10 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
11 MERCHANTABLITY OR NON-INFRINGEMENT.
12
13 See the Apache Version 2.0 License for specific language governing permissions
14 and limitations under the License.
15 ***************************************************************************** */var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,r)};function r(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return(n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function s(e,t,r,n){return new(r||(r=Promise))((function(o,s){function i(e){try{a(n.next(e))}catch(e){s(e)}}function u(e){try{a(n.throw(e))}catch(e){s(e)}}function a(e){e.done?o(e.value):new r((function(t){t(e.value)})).then(i,u)}a((n=n.apply(e,t||[])).next())}))}function i(e,t){var r,n,o,s,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=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++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).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],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function u(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,s=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return i}function a(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(u(arguments[t]));return e}var p="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};
16/*! MIT License © Sindre Sorhus */const c={},h=e=>"undefined"!=typeof self&&self&&e in self?self:"undefined"!=typeof window&&window&&e in window?window:void 0!==p&&p&&e in p?p:"undefined"!=typeof globalThis&&globalThis?globalThis:void 0,f=["Headers","Request","Response","ReadableStream","fetch","AbortController","FormData"];for(const e of f)Object.defineProperty(c,e,{get(){const t=h(e),r=t&&t[e];return"function"==typeof r?r.bind(t):r}});const l=e=>null!==e&&"object"==typeof e,d="function"==typeof c.AbortController,m="function"==typeof c.ReadableStream,y="function"==typeof c.FormData,g=(...e)=>{let t={};for(const r of e)if(Array.isArray(r))Array.isArray(t)||(t=[]),t=[...t,...r];else if(l(r))for(let[e,n]of Object.entries(r))l(n)&&Reflect.has(t,e)&&(n=g(t[e],n)),t={...t,[e]:n};return t},v=["get","post","put","patch","head","delete"],b={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},w=[413,429,503],R=Symbol("stop");class I extends Error{constructor(e){super(e.statusText),this.name="HTTPError",this.response=e}}class C extends Error{constructor(){super("Request timed out"),this.name="TimeoutError"}}const _=e=>new Promise(t=>setTimeout(t,e)),j=(e,t,r)=>new Promise((n,o)=>{const s=setTimeout(()=>{r&&r.abort(),o(new C)},t);e.then(n).catch(o).then(()=>{clearTimeout(s)})}),U=e=>v.includes(e)?e.toUpperCase():e,k={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:w},E=(e={})=>{if("number"==typeof e)return{...k,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");return{...k,...e,afterStatusCodes:w}},S=2147483647;class A{constructor(e,t={}){if(this._retryCount=0,this._input=e,this._options={credentials:this._input.credentials||"same-origin",...t,hooks:g({beforeRequest:[],beforeRetry:[],afterResponse:[]},t.hooks),method:U(t.method||this._input.method),prefixUrl:String(t.prefixUrl||""),retry:E(t.retry),throwHttpErrors:!1!==t.throwHttpErrors,timeout:void 0===t.timeout?1e4:t.timeout},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof c.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(d&&(this.abortController=new c.AbortController,this._options.signal&&(this._options.signal.addEventListener("abort",()=>{this.abortController.abort()}),this._options.signal=this.abortController.signal)),this.request=new c.Request(this._input,this._options),this._options.searchParams){const e=new URL(this.request.url);e.search=new URLSearchParams(this._options.searchParams),this.request=new c.Request(e,this.request)}if((y&&this._options.body instanceof c.FormData||this._options.body instanceof URLSearchParams)&&this.request.headers.has("content-type"))throw new Error(`The \`content-type\` header cannot be used with a ${this._options.body.constructor.name} body. It will be set automatically.`);this._options.json&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type","application/json"),this.request=new c.Request(this.request,{body:this._options.body}));const r=async()=>{if(this._options.timeout>S)throw new RangeError(`The \`timeout\` option cannot be greater than ${S}`);await _(1);let e=await this._fetch();for(const t of this._options.hooks.afterResponse){const r=await t(this.request,this._options,e.clone());r instanceof c.Response&&(e=r)}if(!e.ok&&this._options.throwHttpErrors)throw new I(e);if(this._options.onDownloadProgress){if("function"!=typeof this._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!m)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return this._stream(e.clone(),this._options.onDownloadProgress)}return e},n=this._options.retry.methods.includes(this.request.method.toLowerCase())?this._retry(r):r();for(const[e,t]of Object.entries(b))n[e]=async()=>{this.request.headers.set("accept",this.request.headers.get("accept")||t);const r=(await n).clone();return"json"===e&&204===r.status?"":r[e]()};return n}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount<this._options.retry.limit&&!(e instanceof C)){if(e instanceof I){if(!this._options.retry.statusCodes.includes(e.response.status))return 0;const t=e.response.headers.get("Retry-After");if(t&&this._options.retry.afterStatusCodes.includes(e.response.status)){let e=Number(t);return Number.isNaN(e)?e=Date.parse(t)-Date.now():e*=1e3,void 0!==this._options.retry.maxRetryAfter&&e>this._options.retry.maxRetryAfter?0:e}if(413===e.response.status)return 0}return.3*2**(this._retryCount-1)*1e3}return 0}async _retry(e){try{return await e()}catch(t){const r=Math.min(this._calculateRetryDelay(t),S);if(0!==r&&this._retryCount>0){await _(r);for(const e of this._options.hooks.beforeRetry){if(await e(this.request,this._options,t,this._retryCount)===R)return}return this._retry(e)}if(this._options.throwHttpErrors)throw t}}async _fetch(){for(const e of this._options.hooks.beforeRequest){const t=await e(this.request,this._options);if(t instanceof Request){this.request=t;break}if(t instanceof Response)return t}return!1===this._options.timeout?c.fetch(this.request):j(c.fetch(this.request),this._options.timeout,this.abortController)}_stream(e,t){const r=Number(e.headers.get("content-length"))||0;let n=0;return new c.Response(new c.ReadableStream({start(o){const s=e.body.getReader();t&&t({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array),async function e(){const{done:i,value:u}=await s.read();if(i)o.close();else{if(t){n+=u.byteLength,t({percent:0===r?0:n/r,transferredBytes:n,totalBytes:r},u)}o.enqueue(u),e()}}()}}))}}const P=(...e)=>{for(const t of e)if((!l(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return g({},...e)},T=e=>{const t=(t,r)=>new A(t,P(e,r));for(const r of v)t[r]=(t,n)=>new A(t,P(e,n,{method:r}));return t.create=e=>T(P(e)),t.extend=t=>T(P(e,t)),t.stop=R,t};var x=T(),L="object"==typeof self?self.FormData:window.FormData,q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function M(e,t){return e(t={exports:{}},t.exports),t.exports}var B,O=M((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function n(e){return e>=97&&e<=122}function o(e){return e>=65&&e<=90}function s(e){return e>=48&&e<=57}function i(e){return n(e)?e-32:e}function u(e){return e+32}function a(e){return e&&"object"==(void 0===e?"undefined":r(e))&&!(e instanceof Date)&&!(e instanceof Function)}function p(e,t,r){var n=void 0;if(e instanceof Array)n=[];else{if(void 0!==e.prototype)return e;n={}}for(var o in e){var s=e[o];"string"==typeof o&&(o=t(o,r&&r.separator)),a(s)?n[o]=p(s,t,r):n[o]=s}return n}function c(e,t,r){for(var n=Object.keys(e),o=0;o<n.length;++o){var s=n[o],i=e[s],u=t(s,r&&r.separator);u!==s&&delete e[s],a(i)?e[u]=p(i,t,r):e[u]=i}return e}function h(e,t){return function(e,t){var r=e.charCodeAt(0);if(s(r)||o(r)||r==t)return e;var n=[],a=!1;o(r)?(a=!0,n.push(u(r))):n.push(r);for(var p=e.length,c=1;c<p;++c){var h=e.charCodeAt(c);if(h===t){if(a=!0,h=e.charCodeAt(++c),isNaN(h))return e;n.push(i(h))}else n.push(h)}return a?String.fromCharCode.apply(void 0,n):e}(e,t&&t.charCodeAt(0)||95)}function f(e,t){return function(e,t){if(!n(e.charCodeAt(0)))return e;for(var r=e.length,s=!1,i=[],a=0;a<r;++a){var p=e.charCodeAt(a);o(p)?(i.push(t),i.push(u(p)),s=!0):i.push(p)}return s?String.fromCharCode.apply(void 0,i):e}(e,t&&t.charCodeAt(0)||95)}function l(e,t){return function(e,t){var r=e.charCodeAt(0);if(s(r)||r==t)return e;for(var o=e.length,u=!1,a=[],p=0;p<o;++p){var c=e.charCodeAt(p);if(c===t){if(u=!0,c=e.charCodeAt(++p),isNaN(c))return e;a.push(i(c))}else 0===p&&n(c)?(u=!0,a.push(c-32)):a.push(c)}return u?String.fromCharCode.apply(void 0,a):e}(e,t&&t.charCodeAt(0)||95)}function d(e,t){return function(e,t){if(!o(e.charCodeAt(0)))return e;for(var r=e.length,n=!1,s=[],i=0;i<r;++i){var a=e.charCodeAt(i);o(a)?(i>0&&s.push(t),s.push(u(a)),n=!0):s.push(a)}return n?String.fromCharCode.apply(void 0,s):e}(e,t&&t.charCodeAt(0)||95)}t.camelize=h,t.decamelize=f,t.pascalize=l,t.depascalize=d,t.camelizeKeys=function(e,t){return t=t||{},a(e)?t.inPlace?c(e,h,t):p(e,h,t):e},t.decamelizeKeys=function(e,t){return t=t||{},a(e)?t.inPlace?c(e,f,t):p(e,f,t):e},t.pascalizeKeys=function(e,t){return t=t||{},a(e)?t.inPlace?c(e,l,t):p(e,l,t):e},t.depascalizeKeys=function(e,t){return t=t||{},a(e)?t.inPlace?c(e,d,t):p(e,d,t):e}}));(B=O)&&B.__esModule&&Object.prototype.hasOwnProperty.call(B,"default")&&B.default;O.camelize,O.decamelize,O.pascalize,O.depascalize;var D=O.camelizeKeys,N=O.decamelizeKeys,z=(O.pascalizeKeys,O.depascalizeKeys,e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`));function G(e,t){return t.encode?t.strict?z(e):encodeURIComponent(e):e}var F=(e,t)=>{if(!e)return"";const r=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const o=r.length;return void 0===n||e.skipNull&&null===n?r:null===n?[...r,[G(t,e),"[",o,"]"].join("")]:[...r,[G(t,e),"[",G(o,e),"]=",G(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n?r:null===n?[...r,[G(t,e),"[]"].join("")]:[...r,[G(t,e),"[]=",G(n,e)].join("")];case"comma":return t=>(r,n)=>null==n||0===n.length?r:0===r.length?[[G(t,e),"=",G(n,e)].join("")]:[[r,G(n,e)].join(",")];default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n?r:null===n?[...r,G(t,e)]:[...r,[G(t,e),"=",G(n,e)].join("")]}}(t=Object.assign({encode:!0,strict:!0,arrayFormat:"none"},t)),n=Object.assign({},e);if(t.skipNull)for(const e of Object.keys(n))void 0!==n[e]&&null!==n[e]||delete n[e];const o=Object.keys(n);return!1!==t.sort&&o.sort(t.sort),o.map(n=>{const o=e[n];return void 0===o?"":null===o?G(n,t):Array.isArray(o)?o.reduce(r(n),[]).join("&"):G(n,t)+"="+G(o,t)}).filter(e=>e.length>0).join("&")},Y=[],H=[],W="undefined"!=typeof Uint8Array?Uint8Array:Array,K=!1;function V(){K=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,r=e.length;t<r;++t)Y[t]=e[t],H[e.charCodeAt(t)]=t;H["-".charCodeAt(0)]=62,H["_".charCodeAt(0)]=63}function J(e,t,r){for(var n,o,s=[],i=t;i<r;i+=3)n=(e[i]<<16)+(e[i+1]<<8)+e[i+2],s.push(Y[(o=n)>>18&63]+Y[o>>12&63]+Y[o>>6&63]+Y[63&o]);return s.join("")}function X(e){var t;K||V();for(var r=e.length,n=r%3,o="",s=[],i=0,u=r-n;i<u;i+=16383)s.push(J(e,i,i+16383>u?u:i+16383));return 1===n?(t=e[r-1],o+=Y[t>>2],o+=Y[t<<4&63],o+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],o+=Y[t>>10],o+=Y[t>>4&63],o+=Y[t<<2&63],o+="="),s.push(o),s.join("")}function $(e,t,r,n,o){var s,i,u=8*o-n-1,a=(1<<u)-1,p=a>>1,c=-7,h=r?o-1:0,f=r?-1:1,l=e[t+h];for(h+=f,s=l&(1<<-c)-1,l>>=-c,c+=u;c>0;s=256*s+e[t+h],h+=f,c-=8);for(i=s&(1<<-c)-1,s>>=-c,c+=n;c>0;i=256*i+e[t+h],h+=f,c-=8);if(0===s)s=1-p;else{if(s===a)return i?NaN:1/0*(l?-1:1);i+=Math.pow(2,n),s-=p}return(l?-1:1)*i*Math.pow(2,s-n)}function Z(e,t,r,n,o,s){var i,u,a,p=8*s-o-1,c=(1<<p)-1,h=c>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:s-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,i=c):(i=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-i))<1&&(i--,a*=2),(t+=i+h>=1?f/a:f*Math.pow(2,1-h))*a>=2&&(i++,a/=2),i+h>=c?(u=0,i=c):i+h>=1?(u=(t*a-1)*Math.pow(2,o),i+=h):(u=t*Math.pow(2,h-1)*Math.pow(2,o),i=0));o>=8;e[r+l]=255&u,l+=d,u/=256,o-=8);for(i=i<<o|u,p+=o;p>0;e[r+l]=255&i,l+=d,i/=256,p-=8);e[r+l-d]|=128*m}var Q={}.toString,ee=Array.isArray||function(e){return"[object Array]"==Q.call(e)};function te(){return ne.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function re(e,t){if(te()<t)throw new RangeError("Invalid typed array length");return ne.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=ne.prototype:(null===e&&(e=new ne(t)),e.length=t),e}function ne(e,t,r){if(!(ne.TYPED_ARRAY_SUPPORT||this instanceof ne))return new ne(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return ie(this,e)}return oe(this,e,t,r)}function oe(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);ne.TYPED_ARRAY_SUPPORT?(e=t).__proto__=ne.prototype:e=ue(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!ne.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|ce(t,r),o=(e=re(e,n)).write(t,r);o!==n&&(e=e.slice(0,o));return e}(e,t,r):function(e,t){if(pe(t)){var r=0|ae(t.length);return 0===(e=re(e,r)).length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?re(e,0):ue(e,t);if("Buffer"===t.type&&ee(t.data))return ue(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function se(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function ie(e,t){if(se(t),e=re(e,t<0?0:0|ae(t)),!ne.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function ue(e,t){var r=t.length<0?0:0|ae(t.length);e=re(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function ae(e){if(e>=te())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+te().toString(16)+" bytes");return 0|e}function pe(e){return!(null==e||!e._isBuffer)}function ce(e,t){if(pe(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return Be(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Oe(e).length;default:if(n)return Be(e).length;t=(""+t).toLowerCase(),n=!0}}function he(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ue(this,t,r);case"utf8":case"utf-8":return Ie(this,t,r);case"ascii":return _e(this,t,r);case"latin1":case"binary":return je(this,t,r);case"base64":return Re(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ke(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function fe(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function le(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=ne.from(t,n)),pe(t))return 0===t.length?-1:de(e,t,r,n,o);if("number"==typeof t)return t&=255,ne.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):de(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function de(e,t,r,n,o){var s,i=1,u=e.length,a=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;i=2,u/=2,a/=2,r/=2}function p(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var c=-1;for(s=r;s<u;s++)if(p(e,s)===p(t,-1===c?0:s-c)){if(-1===c&&(c=s),s-c+1===a)return c*i}else-1!==c&&(s-=s-c),c=-1}else for(r+a>u&&(r=u-a),s=r;s>=0;s--){for(var h=!0,f=0;f<a;f++)if(p(e,s+f)!==p(t,f)){h=!1;break}if(h)return s}return-1}function me(e,t,r,n){r=Number(r)||0;var o=e.length-r;n?(n=Number(n))>o&&(n=o):n=o;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var i=0;i<n;++i){var u=parseInt(t.substr(2*i,2),16);if(isNaN(u))return i;e[r+i]=u}return i}function ye(e,t,r,n){return De(Be(t,e.length-r),e,r,n)}function ge(e,t,r,n){return De(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function ve(e,t,r,n){return ge(e,t,r,n)}function be(e,t,r,n){return De(Oe(t),e,r,n)}function we(e,t,r,n){return De(function(e,t){for(var r,n,o,s=[],i=0;i<e.length&&!((t-=2)<0);++i)r=e.charCodeAt(i),n=r>>8,o=r%256,s.push(o),s.push(n);return s}(t,e.length-r),e,r,n)}function Re(e,t,r){return 0===t&&r===e.length?X(e):X(e.slice(t,r))}function Ie(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o<r;){var s,i,u,a,p=e[o],c=null,h=p>239?4:p>223?3:p>191?2:1;if(o+h<=r)switch(h){case 1:p<128&&(c=p);break;case 2:128==(192&(s=e[o+1]))&&(a=(31&p)<<6|63&s)>127&&(c=a);break;case 3:s=e[o+1],i=e[o+2],128==(192&s)&&128==(192&i)&&(a=(15&p)<<12|(63&s)<<6|63&i)>2047&&(a<55296||a>57343)&&(c=a);break;case 4:s=e[o+1],i=e[o+2],u=e[o+3],128==(192&s)&&128==(192&i)&&128==(192&u)&&(a=(15&p)<<18|(63&s)<<12|(63&i)<<6|63&u)>65535&&a<1114112&&(c=a)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=h}return function(e){var t=e.length;if(t<=Ce)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=Ce));return r}(n)}ne.TYPED_ARRAY_SUPPORT=void 0===p.TYPED_ARRAY_SUPPORT||p.TYPED_ARRAY_SUPPORT,ne.poolSize=8192,ne._augment=function(e){return e.__proto__=ne.prototype,e},ne.from=function(e,t,r){return oe(null,e,t,r)},ne.TYPED_ARRAY_SUPPORT&&(ne.prototype.__proto__=Uint8Array.prototype,ne.__proto__=Uint8Array),ne.alloc=function(e,t,r){return function(e,t,r,n){return se(t),t<=0?re(e,t):void 0!==r?"string"==typeof n?re(e,t).fill(r,n):re(e,t).fill(r):re(e,t)}(null,e,t,r)},ne.allocUnsafe=function(e){return ie(null,e)},ne.allocUnsafeSlow=function(e){return ie(null,e)},ne.isBuffer=Ne,ne.compare=function(e,t){if(!pe(e)||!pe(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,o=0,s=Math.min(r,n);o<s;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},ne.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ne.concat=function(e,t){if(!ee(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return ne.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=ne.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){var s=e[r];if(!pe(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,o),o+=s.length}return n},ne.byteLength=ce,ne.prototype._isBuffer=!0,ne.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)fe(this,t,t+1);return this},ne.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)fe(this,t,t+3),fe(this,t+1,t+2);return this},ne.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)fe(this,t,t+7),fe(this,t+1,t+6),fe(this,t+2,t+5),fe(this,t+3,t+4);return this},ne.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Ie(this,0,e):he.apply(this,arguments)},ne.prototype.equals=function(e){if(!pe(e))throw new TypeError("Argument must be a Buffer");return this===e||0===ne.compare(this,e)},ne.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},ne.prototype.compare=function(e,t,r,n,o){if(!pe(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(this===e)return 0;for(var s=(o>>>=0)-(n>>>=0),i=(r>>>=0)-(t>>>=0),u=Math.min(s,i),a=this.slice(n,o),p=e.slice(t,r),c=0;c<u;++c)if(a[c]!==p[c]){s=a[c],i=p[c];break}return s<i?-1:i<s?1:0},ne.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},ne.prototype.indexOf=function(e,t,r){return le(this,e,t,r,!0)},ne.prototype.lastIndexOf=function(e,t,r){return le(this,e,t,r,!1)},ne.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return me(this,e,t,r);case"utf8":case"utf-8":return ye(this,e,t,r);case"ascii":return ge(this,e,t,r);case"latin1":case"binary":return ve(this,e,t,r);case"base64":return be(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return we(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},ne.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ce=4096;function _e(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}function je(e,t,r){var n="";r=Math.min(e.length,r);for(var o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function Ue(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var o="",s=t;s<r;++s)o+=Me(e[s]);return o}function ke(e,t,r){for(var n=e.slice(t,r),o="",s=0;s<n.length;s+=2)o+=String.fromCharCode(n[s]+256*n[s+1]);return o}function Ee(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function Se(e,t,r,n,o,s){if(!pe(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function Ae(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,s=Math.min(e.length-r,2);o<s;++o)e[r+o]=(t&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function Pe(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,s=Math.min(e.length-r,4);o<s;++o)e[r+o]=t>>>8*(n?o:3-o)&255}function Te(e,t,r,n,o,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function xe(e,t,r,n,o){return o||Te(e,0,r,4),Z(e,t,r,n,23,4),r+4}function Le(e,t,r,n,o){return o||Te(e,0,r,8),Z(e,t,r,n,52,8),r+8}ne.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),ne.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=ne.prototype;else{var o=t-e;r=new ne(o,void 0);for(var s=0;s<o;++s)r[s]=this[s+e]}return r},ne.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||Ee(e,t,this.length);for(var n=this[e],o=1,s=0;++s<t&&(o*=256);)n+=this[e+s]*o;return n},ne.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||Ee(e,t,this.length);for(var n=this[e+--t],o=1;t>0&&(o*=256);)n+=this[e+--t]*o;return n},ne.prototype.readUInt8=function(e,t){return t||Ee(e,1,this.length),this[e]},ne.prototype.readUInt16LE=function(e,t){return t||Ee(e,2,this.length),this[e]|this[e+1]<<8},ne.prototype.readUInt16BE=function(e,t){return t||Ee(e,2,this.length),this[e]<<8|this[e+1]},ne.prototype.readUInt32LE=function(e,t){return t||Ee(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},ne.prototype.readUInt32BE=function(e,t){return t||Ee(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},ne.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||Ee(e,t,this.length);for(var n=this[e],o=1,s=0;++s<t&&(o*=256);)n+=this[e+s]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},ne.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||Ee(e,t,this.length);for(var n=t,o=1,s=this[e+--n];n>0&&(o*=256);)s+=this[e+--n]*o;return s>=(o*=128)&&(s-=Math.pow(2,8*t)),s},ne.prototype.readInt8=function(e,t){return t||Ee(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},ne.prototype.readInt16LE=function(e,t){t||Ee(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},ne.prototype.readInt16BE=function(e,t){t||Ee(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},ne.prototype.readInt32LE=function(e,t){return t||Ee(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},ne.prototype.readInt32BE=function(e,t){return t||Ee(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},ne.prototype.readFloatLE=function(e,t){return t||Ee(e,4,this.length),$(this,e,!0,23,4)},ne.prototype.readFloatBE=function(e,t){return t||Ee(e,4,this.length),$(this,e,!1,23,4)},ne.prototype.readDoubleLE=function(e,t){return t||Ee(e,8,this.length),$(this,e,!0,52,8)},ne.prototype.readDoubleBE=function(e,t){return t||Ee(e,8,this.length),$(this,e,!1,52,8)},ne.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||Se(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,s=0;for(this[t]=255&e;++s<r&&(o*=256);)this[t+s]=e/o&255;return t+r},ne.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||Se(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,s=1;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+r},ne.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||Se(this,e,t,1,255,0),ne.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},ne.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||Se(this,e,t,2,65535,0),ne.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ae(this,e,t,!0),t+2},ne.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||Se(this,e,t,2,65535,0),ne.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ae(this,e,t,!1),t+2},ne.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||Se(this,e,t,4,4294967295,0),ne.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):Pe(this,e,t,!0),t+4},ne.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||Se(this,e,t,4,4294967295,0),ne.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Pe(this,e,t,!1),t+4},ne.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);Se(this,e,t,r,o-1,-o)}var s=0,i=1,u=0;for(this[t]=255&e;++s<r&&(i*=256);)e<0&&0===u&&0!==this[t+s-1]&&(u=1),this[t+s]=(e/i>>0)-u&255;return t+r},ne.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);Se(this,e,t,r,o-1,-o)}var s=r-1,i=1,u=0;for(this[t+s]=255&e;--s>=0&&(i*=256);)e<0&&0===u&&0!==this[t+s+1]&&(u=1),this[t+s]=(e/i>>0)-u&255;return t+r},ne.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||Se(this,e,t,1,127,-128),ne.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},ne.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||Se(this,e,t,2,32767,-32768),ne.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Ae(this,e,t,!0),t+2},ne.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||Se(this,e,t,2,32767,-32768),ne.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Ae(this,e,t,!1),t+2},ne.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||Se(this,e,t,4,2147483647,-2147483648),ne.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Pe(this,e,t,!0),t+4},ne.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||Se(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),ne.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):Pe(this,e,t,!1),t+4},ne.prototype.writeFloatLE=function(e,t,r){return xe(this,e,t,!0,r)},ne.prototype.writeFloatBE=function(e,t,r){return xe(this,e,t,!1,r)},ne.prototype.writeDoubleLE=function(e,t,r){return Le(this,e,t,!0,r)},ne.prototype.writeDoubleBE=function(e,t,r){return Le(this,e,t,!1,r)},ne.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var o,s=n-r;if(this===e&&r<t&&t<n)for(o=s-1;o>=0;--o)e[o+t]=this[o+r];else if(s<1e3||!ne.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+t]=this[o+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+s),t);return s},ne.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!ne.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var s;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{var i=pe(e)?e:Be(new ne(e,n).toString()),u=i.length;for(s=0;s<r-t;++s)this[s+t]=i[s%u]}return this};var qe=/[^+\/0-9A-Za-z-_]/g;function Me(e){return e<16?"0"+e.toString(16):e.toString(16)}function Be(e,t){var r;t=t||1/0;for(var n=e.length,o=null,s=[],i=0;i<n;++i){if((r=e.charCodeAt(i))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(i+1===n){(t-=3)>-1&&s.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&s.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function Oe(e){return function(e){var t,r,n,o,s,i;K||V();var u=e.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");s="="===e[u-2]?2:"="===e[u-1]?1:0,i=new W(3*u/4-s),n=s>0?u-4:u;var a=0;for(t=0,r=0;t<n;t+=4,r+=3)o=H[e.charCodeAt(t)]<<18|H[e.charCodeAt(t+1)]<<12|H[e.charCodeAt(t+2)]<<6|H[e.charCodeAt(t+3)],i[a++]=o>>16&255,i[a++]=o>>8&255,i[a++]=255&o;return 2===s?(o=H[e.charCodeAt(t)]<<2|H[e.charCodeAt(t+1)]>>4,i[a++]=255&o):1===s&&(o=H[e.charCodeAt(t)]<<10|H[e.charCodeAt(t+1)]<<4|H[e.charCodeAt(t+2)]>>2,i[a++]=o>>8&255,i[a++]=255&o),i}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(qe,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function De(e,t,r,n){for(var o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Ne(e){return null!=e&&(!!e._isBuffer||ze(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&ze(e.slice(0,0))}(e))}function ze(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function Ge(){throw new Error("setTimeout has not been defined")}function Fe(){throw new Error("clearTimeout has not been defined")}var Ye=Ge,He=Fe;function We(e){if(Ye===setTimeout)return setTimeout(e,0);if((Ye===Ge||!Ye)&&setTimeout)return Ye=setTimeout,setTimeout(e,0);try{return Ye(e,0)}catch(t){try{return Ye.call(null,e,0)}catch(t){return Ye.call(this,e,0)}}}"function"==typeof p.setTimeout&&(Ye=setTimeout),"function"==typeof p.clearTimeout&&(He=clearTimeout);var Ke,Ve=[],Je=!1,Xe=-1;function $e(){Je&&Ke&&(Je=!1,Ke.length?Ve=Ke.concat(Ve):Xe=-1,Ve.length&&Ze())}function Ze(){if(!Je){var e=We($e);Je=!0;for(var t=Ve.length;t;){for(Ke=Ve,Ve=[];++Xe<t;)Ke&&Ke[Xe].run();Xe=-1,t=Ve.length}Ke=null,Je=!1,function(e){if(He===clearTimeout)return clearTimeout(e);if((He===Fe||!He)&&clearTimeout)return He=clearTimeout,clearTimeout(e);try{He(e)}catch(t){try{return He.call(null,e)}catch(t){return He.call(this,e)}}}(e)}}function Qe(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];Ve.push(new et(e,t)),1!==Ve.length||Je||We(Ze)}function et(e,t){this.fun=e,this.array=t}et.prototype.run=function(){this.fun.apply(null,this.array)};var tt,rt,nt=p.performance||{},ot=(nt.now||nt.mozNow||nt.msNow||nt.oNow||nt.webkitNow,lt(p.fetch)&&lt(p.ReadableStream));function st(e){rt||(rt=new p.XMLHttpRequest).open("GET",p.location.host?"/":"https://example.com");try{return rt.responseType=e,rt.responseType===e}catch(e){return!1}}var it=void 0!==p.ArrayBuffer,ut=it&&lt(p.ArrayBuffer.prototype.slice),at=it&&st("arraybuffer"),pt=!ot&&ut&&st("ms-stream"),ct=!ot&&it&&st("moz-chunked-arraybuffer"),ht=lt(rt.overrideMimeType),ft=lt(p.VBArray);function lt(e){return"function"==typeof e}rt=null;var dt="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e},mt=/%[sdj%]/g;function yt(e){if(!Et(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(wt(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(e).replace(mt,(function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),i=n[r];r<o;i=n[++r])kt(i)||!Pt(i)?s+=" "+i:s+=" "+wt(i);return s}function gt(e,t){if(St(p.process))return function(){return gt(e,t).apply(this,arguments)};var r=!1;return function(){return r||(console.error(t),r=!0),e.apply(this,arguments)}}var vt,bt={};function wt(e,t){var r={seen:[],stylize:It};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Ut(t)?r.showHidden=t:t&&function(e,t){if(!t||!Pt(t))return e;var r=Object.keys(t),n=r.length;for(;n--;)e[r[n]]=t[r[n]]}(r,t),St(r.showHidden)&&(r.showHidden=!1),St(r.depth)&&(r.depth=2),St(r.colors)&&(r.colors=!1),St(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Rt),Ct(r,e,r.depth)}function Rt(e,t){var r=wt.styles[t];return r?"["+wt.colors[r][0]+"m"+e+"["+wt.colors[r][1]+"m":e}function It(e,t){return e}function Ct(e,t,r){if(e.customInspect&&t&&Lt(t.inspect)&&t.inspect!==wt&&(!t.constructor||t.constructor.prototype!==t)){var n=t.inspect(r,e);return Et(n)||(n=Ct(e,n,r)),n}var o=function(e,t){if(St(t))return e.stylize("undefined","undefined");if(Et(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(n=t,"number"==typeof n)return e.stylize(""+t,"number");var n;if(Ut(t))return e.stylize(""+t,"boolean");if(kt(t))return e.stylize("null","null")}(e,t);if(o)return o;var s=Object.keys(t),i=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),xt(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return _t(t);if(0===s.length){if(Lt(t)){var u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(At(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Tt(t))return e.stylize(Date.prototype.toString.call(t),"date");if(xt(t))return _t(t)}var a,p,c="",h=!1,f=["{","}"];(a=t,Array.isArray(a)&&(h=!0,f=["[","]"]),Lt(t))&&(c=" [Function"+(t.name?": "+t.name:"")+"]");return At(t)&&(c=" "+RegExp.prototype.toString.call(t)),Tt(t)&&(c=" "+Date.prototype.toUTCString.call(t)),xt(t)&&(c=" "+_t(t)),0!==s.length||h&&0!=t.length?r<0?At(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),p=h?function(e,t,r,n,o){for(var s=[],i=0,u=t.length;i<u;++i)Mt(t,String(i))?s.push(jt(e,t,r,n,String(i),!0)):s.push("");return o.forEach((function(o){o.match(/^\d+$/)||s.push(jt(e,t,r,n,o,!0))})),s}(e,t,r,i,s):s.map((function(n){return jt(e,t,r,i,n,h)})),e.seen.pop(),function(e,t,r){if(e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(p,c,f)):f[0]+c+f[1]}function _t(e){return"["+Error.prototype.toString.call(e)+"]"}function jt(e,t,r,n,o,s){var i,u,a;if((a=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?u=a.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):a.set&&(u=e.stylize("[Setter]","special")),Mt(n,o)||(i="["+o+"]"),u||(e.seen.indexOf(a.value)<0?(u=kt(r)?Ct(e,a.value,null):Ct(e,a.value,r-1)).indexOf("\n")>-1&&(u=s?u.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+u.split("\n").map((function(e){return" "+e})).join("\n")):u=e.stylize("[Circular]","special")),St(i)){if(s&&o.match(/^\d+$/))return u;(i=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=e.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=e.stylize(i,"string"))}return i+": "+u}function Ut(e){return"boolean"==typeof e}function kt(e){return null===e}function Et(e){return"string"==typeof e}function St(e){return void 0===e}function At(e){return Pt(e)&&"[object RegExp]"===qt(e)}function Pt(e){return"object"==typeof e&&null!==e}function Tt(e){return Pt(e)&&"[object Date]"===qt(e)}function xt(e){return Pt(e)&&("[object Error]"===qt(e)||e instanceof Error)}function Lt(e){return"function"==typeof e}function qt(e){return Object.prototype.toString.call(e)}function Mt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Bt(){}function Ot(){Ot.init.call(this)}function Dt(e){return void 0===e._maxListeners?Ot.defaultMaxListeners:e._maxListeners}function Nt(e,t,r){if(t)e.call(r);else for(var n=e.length,o=Vt(e,n),s=0;s<n;++s)o[s].call(r)}function zt(e,t,r,n){if(t)e.call(r,n);else for(var o=e.length,s=Vt(e,o),i=0;i<o;++i)s[i].call(r,n)}function Gt(e,t,r,n,o){if(t)e.call(r,n,o);else for(var s=e.length,i=Vt(e,s),u=0;u<s;++u)i[u].call(r,n,o)}function Ft(e,t,r,n,o,s){if(t)e.call(r,n,o,s);else for(var i=e.length,u=Vt(e,i),a=0;a<i;++a)u[a].call(r,n,o,s)}function Yt(e,t,r,n){if(t)e.apply(r,n);else for(var o=e.length,s=Vt(e,o),i=0;i<o;++i)s[i].apply(r,n)}function Ht(e,t,r,n){var o,s,i,u;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),i=s[t]):(s=e._events=new Bt,e._eventsCount=0),i){if("function"==typeof i?i=s[t]=n?[r,i]:[i,r]:n?i.unshift(r):i.push(r),!i.warned&&(o=Dt(e))&&o>0&&i.length>o){i.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=i.length,u=a,"function"==typeof console.warn?console.warn(u):console.log(u)}}else i=s[t]=r,++e._eventsCount;return e}function Wt(e,t,r){var n=!1;function o(){e.removeListener(t,o),n||(n=!0,r.apply(e,arguments))}return o.listener=r,o}function Kt(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function Vt(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}function Jt(){this.head=null,this.tail=null,this.length=0}wt.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},wt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},Bt.prototype=Object.create(null),Ot.EventEmitter=Ot,Ot.usingDomains=!1,Ot.prototype.domain=void 0,Ot.prototype._events=void 0,Ot.prototype._maxListeners=void 0,Ot.defaultMaxListeners=10,Ot.init=function(){this.domain=null,Ot.usingDomains&&(void 0).active&&(void 0).Domain,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Bt,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Ot.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},Ot.prototype.getMaxListeners=function(){return Dt(this)},Ot.prototype.emit=function(e){var t,r,n,o,s,i,u,a="error"===e;if(i=this._events)a=a&&null==i.error;else if(!a)return!1;if(u=this.domain,a){if(t=arguments[1],!u){if(t instanceof Error)throw t;var p=new Error('Uncaught, unspecified "error" event. ('+t+")");throw p.context=t,p}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=u,t.domainThrown=!1,u.emit("error",t),!1}if(!(r=i[e]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:Nt(r,c,this);break;case 2:zt(r,c,this,arguments[1]);break;case 3:Gt(r,c,this,arguments[1],arguments[2]);break;case 4:Ft(r,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(n-1),s=1;s<n;s++)o[s-1]=arguments[s];Yt(r,c,this,o)}return!0},Ot.prototype.addListener=function(e,t){return Ht(this,e,t,!1)},Ot.prototype.on=Ot.prototype.addListener,Ot.prototype.prependListener=function(e,t){return Ht(this,e,t,!0)},Ot.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,Wt(this,e,t)),this},Ot.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,Wt(this,e,t)),this},Ot.prototype.removeListener=function(e,t){var r,n,o,s,i;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(r=n[e]))return this;if(r===t||r.listener&&r.listener===t)0==--this._eventsCount?this._events=new Bt:(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,s=r.length;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){i=r[s].listener,o=s;break}if(o<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new Bt,this;delete n[e]}else!function(e,t){for(var r=t,n=r+1,o=e.length;n<o;r+=1,n+=1)e[r]=e[n];e.pop()}(r,o);n.removeListener&&this.emit("removeListener",e,i||t)}return this},Ot.prototype.removeAllListeners=function(e){var t,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new Bt,this._eventsCount=0):r[e]&&(0==--this._eventsCount?this._events=new Bt:delete r[e]),this;if(0===arguments.length){for(var n,o=Object.keys(r),s=0;s<o.length;++s)"removeListener"!==(n=o[s])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=new Bt,this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},Ot.prototype.listeners=function(e){var t,r=this._events;return r&&(t=r[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(t):[]},Ot.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):Kt.call(e,t)},Ot.prototype.listenerCount=Kt,Ot.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]},Jt.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},Jt.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},Jt.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},Jt.prototype.clear=function(){this.head=this.tail=null,this.length=0},Jt.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},Jt.prototype.concat=function(e){if(0===this.length)return ne.alloc(0);if(1===this.length)return this.head.data;for(var t=ne.allocUnsafe(e>>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t};var Xt=ne.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function $t(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!Xt(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Qt;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=er;break;default:return void(this.write=Zt)}this.charBuffer=new ne(6),this.charReceived=0,this.charLength=0}function Zt(e){return e.toString(this.encoding)}function Qt(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function er(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}$t.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";if(e=e.slice(r,e.length),!((o=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&o<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,n),n-=this.charReceived);var o;n=(t+=e.toString(this.encoding,0,n)).length-1;if((o=t.charCodeAt(n))>=55296&&o<=56319){var s=this.surrogateSize;return this.charLength+=s,this.charReceived+=s,this.charBuffer.copy(this.charBuffer,s,0,s),e.copy(this.charBuffer,0,0,s),t.substring(0,n)}return t},$t.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},$t.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,o=this.encoding;t+=n.slice(0,r).toString(o)}return t},nr.ReadableState=rr;var tr=function(e){if(St(vt)&&(vt=""),e=e.toUpperCase(),!bt[e])if(new RegExp("\\b"+e+"\\b","i").test(vt)){bt[e]=function(){var t=yt.apply(null,arguments);console.error("%s %d: %s",e,0,t)}}else bt[e]=function(){};return bt[e]}("stream");function rr(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof Pr&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=~~this.highWaterMark,this.buffer=new Jt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new $t(e.encoding),this.encoding=e.encoding)}function nr(e){if(!(this instanceof nr))return new nr(e);this._readableState=new rr(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),Ot.call(this)}function or(e,t,r,n,o){var s=function(e,t){var r=null;Ne(t)||"string"==typeof t||null==t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(t,r);if(s)e.emit("error",s);else if(null===r)t.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,ur(e)}(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!o){var i=new Error("stream.push() after EOF");e.emit("error",i)}else if(t.endEmitted&&o){var u=new Error("stream.unshift() after end event");e.emit("error",u)}else{var a;!t.decoder||o||n||(r=t.decoder.write(r),a=!t.objectMode&&0===r.length),o||(t.reading=!1),a||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,o?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&ur(e))),function(e,t){t.readingMore||(t.readingMore=!0,Qe(pr,e,t))}(e,t)}else o||(t.reading=!1);return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(t)}dt(nr,Ot),nr.prototype.push=function(e,t){var r=this._readableState;return r.objectMode||"string"!=typeof e||(t=t||r.defaultEncoding)!==r.encoding&&(e=ne.from(e,t),t=""),or(this,r,e,t,!1)},nr.prototype.unshift=function(e){return or(this,this._readableState,e,"",!0)},nr.prototype.isPaused=function(){return!1===this._readableState.flowing},nr.prototype.setEncoding=function(e){return this._readableState.decoder=new $t(e),this._readableState.encoding=e,this};var sr=8388608;function ir(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=sr?e=sr:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function ur(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(tr("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?Qe(ar,e):ar(e))}function ar(e){tr("emit readable"),e.emit("readable"),fr(e)}function pr(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(tr("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function cr(e){tr("readable nexttick read 0"),e.read(0)}function hr(e,t){t.reading||(tr("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),fr(e),t.flowing&&!t.reading&&e.read(0)}function fr(e){var t=e._readableState;for(tr("flow",t.flowing);t.flowing&&null!==e.read(););}function lr(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,o=r.data;e-=o.length;for(;r=r.next;){var s=r.data,i=e>s.length?s.length:e;if(i===s.length?o+=s:o+=s.slice(0,e),0===(e-=i)){i===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(i));break}++n}return t.length-=n,o}(e,t):function(e,t){var r=ne.allocUnsafe(e),n=t.head,o=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var s=n.data,i=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,i),0===(e-=i)){i===s.length?(++o,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(i));break}++o}return t.length-=o,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function dr(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,Qe(mr,t,e))}function mr(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function yr(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function gr(){}function vr(e,t,r){this.chunk=e,this.encoding=t,this.callback=r,this.next=null}function br(e,t){Object.defineProperty(this,"buffer",{get:gt((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof Pr&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?Qe(o,n):o(n);e._writableState.errorEmitted=!0,e.emit("error",n)}(e,r,n,t,o);else{var s=_r(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||Cr(e,r),n?Qe(Ir,e,r,s,o):Ir(e,r,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new kr(this)}function wr(e){if(!(this instanceof wr||this instanceof Pr))return new wr(e);this._writableState=new br(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev)),Ot.call(this)}function Rr(e,t,r,n,o,s,i){t.writelen=n,t.writecb=i,t.writing=!0,t.sync=!0,r?e._writev(o,t.onwrite):e._write(o,s,t.onwrite),t.sync=!1}function Ir(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),Ur(e,t)}function Cr(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var i=0;r;)o[i]=r,r=r.next,i+=1;Rr(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new kr(t)}else{for(;r;){var u=r.chunk,a=r.encoding,p=r.callback;if(Rr(e,t,!1,t.objectMode?1:u.length,u,a,p),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function _r(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function jr(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function Ur(e,t){var r=_r(t);return r&&(0===t.pendingcb?(jr(e,t),t.finished=!0,e.emit("finish")):jr(e,t)),r}function kr(e){var t=this;this.next=null,this.entry=null,this.finish=function(r){var n=t.entry;for(t.entry=null;n;){var o=n.callback;e.pendingcb--,o(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}nr.prototype.read=function(e){tr("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return tr("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?dr(this):ur(this),null;if(0===(e=ir(e,t))&&t.ended)return 0===t.length&&dr(this),null;var n,o=t.needReadable;return tr("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&tr("length less than watermark",o=!0),t.ended||t.reading?tr("reading or ended",o=!1):o&&(tr("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=ir(r,t))),null===(n=e>0?lr(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&dr(this)),null!==n&&this.emit("data",n),n},nr.prototype._read=function(e){this.emit("error",new Error("not implemented"))},nr.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,tr("pipe count=%d opts=%j",n.pipesCount,t);var o=!t||!1!==t.end?i:p;function s(e){tr("onunpipe"),e===r&&p()}function i(){tr("onend"),e.end()}n.endEmitted?Qe(o):r.once("end",o),e.on("unpipe",s);var u=function(e){return function(){var t=e._readableState;tr("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,fr(e))}}(r);e.on("drain",u);var a=!1;function p(){tr("cleanup"),e.removeListener("close",l),e.removeListener("finish",d),e.removeListener("drain",u),e.removeListener("error",f),e.removeListener("unpipe",s),r.removeListener("end",i),r.removeListener("end",p),r.removeListener("data",h),a=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u()}var c=!1;function h(t){tr("ondata"),c=!1,!1!==e.write(t)||c||((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==yr(n.pipes,e))&&!a&&(tr("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,c=!0),r.pause())}function f(t){var r;tr("onerror",t),m(),e.removeListener("error",f),0===(r="error",e.listeners(r).length)&&e.emit("error",t)}function l(){e.removeListener("finish",d),m()}function d(){tr("onfinish"),e.removeListener("close",l),m()}function m(){tr("unpipe"),r.unpipe(e)}return r.on("data",h),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",l),e.once("finish",d),e.emit("pipe",r),n.flowing||(tr("pipe resume"),r.resume()),e},nr.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<n;o++)r[o].emit("unpipe",this);return this}var s=yr(t.pipes,e);return-1===s?this:(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},nr.prototype.on=function(e,t){var r=Ot.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&ur(this):Qe(cr,this))}return r},nr.prototype.addListener=nr.prototype.on,nr.prototype.resume=function(){var e=this._readableState;return e.flowing||(tr("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,Qe(hr,e,t))}(this,e)),this},nr.prototype.pause=function(){return tr("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(tr("pause"),this._readableState.flowing=!1,this.emit("pause")),this},nr.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;for(var o in e.on("end",(function(){if(tr("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(o){(tr("wrapped data"),t.decoder&&(o=t.decoder.write(o)),t.objectMode&&null==o)||(t.objectMode||o&&o.length)&&(n.push(o)||(r=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));return function(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}(["error","close","destroy","pause","resume"],(function(t){e.on(t,n.emit.bind(n,t))})),n._read=function(t){tr("wrapped _read",t),r&&(r=!1,e.resume())},n},nr._fromList=lr,wr.WritableState=br,dt(wr,Ot),br.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},wr.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},wr.prototype.write=function(e,t,r){var n=this._writableState,o=!1;return"function"==typeof t&&(r=t,t=null),ne.isBuffer(e)?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=gr),n.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),Qe(t,r)}(this,r):function(e,t,r,n){var o=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):ne.isBuffer(r)||"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),Qe(n,s),o=!1),o}(this,n,e,r)&&(n.pendingcb++,o=function(e,t,r,n,o){r=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=ne.from(t,r));return t}(t,r,n),ne.isBuffer(r)&&(n="buffer");var s=t.objectMode?1:r.length;t.length+=s;var i=t.length<t.highWaterMark;i||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest=new vr(r,n,o),u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Rr(e,t,!1,s,r,n,o);return i}(this,n,e,t,r)),o},wr.prototype.cork=function(){this._writableState.corked++},wr.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||Cr(this,e))},wr.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},wr.prototype._write=function(e,t,r){r(new Error("not implemented"))},wr.prototype._writev=null,wr.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,Ur(e,t),r&&(t.finished?Qe(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,n,r)},dt(Pr,nr);for(var Er=Object.keys(wr.prototype),Sr=0;Sr<Er.length;Sr++){var Ar=Er[Sr];Pr.prototype[Ar]||(Pr.prototype[Ar]=wr.prototype[Ar])}function Pr(e){if(!(this instanceof Pr))return new Pr(e);nr.call(this,e),wr.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",Tr)}function Tr(){this.allowHalfOpen||this._writableState.ended||Qe(xr,this)}function xr(e){e.end()}function Lr(e){this.afterTransform=function(t,r){return function(e,t,r){var n=e._transformState;n.transforming=!1;var o=n.writecb;if(!o)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!=r&&e.push(r);o(t);var s=e._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&e._read(s.highWaterMark)}(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function qr(e){if(!(this instanceof qr))return new qr(e);Pr.call(this,e),this._transformState=new Lr(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.once("prefinish",(function(){"function"==typeof this._flush?this._flush((function(e){Mr(t,e)})):Mr(t)}))}function Mr(e,t){if(t)return e.emit("error",t);var r=e._writableState,n=e._transformState;if(r.length)throw new Error("Calling transform done when ws.length != 0");if(n.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function Br(e){if(!(this instanceof Br))return new Br(e);qr.call(this,e)}function Or(){Ot.call(this)}dt(qr,Pr),qr.prototype.push=function(e,t){return this._transformState.needTransform=!1,Pr.prototype.push.call(this,e,t)},qr.prototype._transform=function(e,t,r){throw new Error("Not implemented")},qr.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},qr.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},dt(Br,qr),Br.prototype._transform=function(e,t,r){r(null,e)},dt(Or,Ot),Or.Readable=nr,Or.Writable=wr,Or.Duplex=Pr,Or.Transform=qr,Or.PassThrough=Br,Or.Stream=Or,Or.prototype.pipe=function(e,t){var r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",i),r.on("close",u));var s=!1;function i(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function a(e){if(p(),0===Ot.listenerCount(this,"error"))throw e}function p(){r.removeListener("data",n),e.removeListener("drain",o),r.removeListener("end",i),r.removeListener("close",u),r.removeListener("error",a),e.removeListener("error",a),r.removeListener("end",p),r.removeListener("close",p),e.removeListener("close",p)}return r.on("error",a),e.on("error",a),r.on("end",p),r.on("close",p),e.on("close",p),e.emit("pipe",r),e};var Dr=3,Nr=4;function zr(e,t,r){var n,o=this;if(nr.call(o),o._mode=r,o.headers={},o.rawHeaders=[],o.trailers={},o.rawTrailers=[],o.on("end",(function(){Qe((function(){o.emit("close")}))})),"fetch"===r){o._fetchResponse=t,o.url=t.url,o.statusCode=t.status,o.statusMessage=t.statusText;for(var s,i,u=t.headers[Symbol.iterator]();s=(i=u.next()).value,!i.done;)o.headers[s[0].toLowerCase()]=s[1],o.rawHeaders.push(s[0],s[1]);var a=t.body.getReader();(n=function(){a.read().then((function(e){o._destroyed||(e.done?o.push(null):(o.push(new ne(e.value)),n()))}))})()}else{if(o._xhr=e,o._pos=0,o.url=e.responseURL,o.statusCode=e.status,o.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var r=t[1].toLowerCase();"set-cookie"===r?(void 0===o.headers[r]&&(o.headers[r]=[]),o.headers[r].push(t[2])):void 0!==o.headers[r]?o.headers[r]+=", "+t[2]:o.headers[r]=t[2],o.rawHeaders.push(t[1],t[2])}})),o._charset="x-user-defined",!ht){var p=o.rawHeaders["mime-type"];if(p){var c=p.match(/;\s*charset=([^;])(;|$)/);c&&(o._charset=c[1].toLowerCase())}o._charset||(o._charset="utf-8")}}}function Gr(e){var t,r=this;wr.call(r),r._opts=e,r._body=[],r._headers={},e.auth&&r.setHeader("Authorization","Basic "+new ne(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])}));var n=!0;if("disable-fetch"===e.mode)n=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!ht;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}r._mode=function(e,t){return ot&&t?"fetch":ct?"moz-chunked-arraybuffer":pt?"ms-stream":at&&e?"arraybuffer":ft&&e?"text:vbarray":"text"}(t,n),r.on("finish",(function(){r._onFinish()}))}dt(zr,nr),zr.prototype._read=function(){},zr.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==Nr)break;try{r=new p.VBArray(t.responseBody).toArray()}catch(e){}if(null!==r){e.push(new ne(r));break}case"text":try{r=t.responseText}catch(t){e._mode="text:vbarray";break}if(r.length>e._pos){var n=r.substr(e._pos);if("x-user-defined"===e._charset){for(var o=new ne(n.length),s=0;s<n.length;s++)o[s]=255&n.charCodeAt(s);e.push(o)}else e.push(n,e._charset);e._pos=r.length}break;case"arraybuffer":if(t.readyState!==Nr||!t.response)break;r=t.response,e.push(new ne(new Uint8Array(r)));break;case"moz-chunked-arraybuffer":if(r=t.response,t.readyState!==Dr||!r)break;e.push(new ne(new Uint8Array(r)));break;case"ms-stream":if(r=t.response,t.readyState!==Dr)break;var i=new p.MSStreamReader;i.onprogress=function(){i.result.byteLength>e._pos&&(e.push(new ne(new Uint8Array(i.result.slice(e._pos)))),e._pos=i.result.byteLength)},i.onload=function(){e.push(null)},i.readAsArrayBuffer(r)}e._xhr.readyState===Nr&&"ms-stream"!==e._mode&&e.push(null)},dt(Gr,wr);var Fr=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"];function Yr(){}Gr.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===Fr.indexOf(r)&&(this._headers[r]={name:e,value:t})},Gr.prototype.getHeader=function(e){return this._headers[e.toLowerCase()].value},Gr.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},Gr.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t,r=e._opts,n=e._headers;if("POST"!==r.method&&"PUT"!==r.method&&"PATCH"!==r.method||(t=function(){if(void 0!==tt)return tt;try{new p.Blob([new ArrayBuffer(1)]),tt=!0}catch(e){tt=!1}return tt}()?new p.Blob(e._body.map((function(e){return function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(Ne(e)){for(var t=new Uint8Array(e.length),r=e.length,n=0;n<r;n++)t[n]=e[n];return t.buffer}throw new Error("Argument must be a Buffer")}(e)})),{type:(n["content-type"]||{}).value||""}):ne.concat(e._body).toString()),"fetch"===e._mode){var o=Object.keys(n).map((function(e){return[n[e].name,n[e].value]}));p.fetch(e._opts.url,{method:e._opts.method,headers:o,body:t,mode:"cors",credentials:r.withCredentials?"include":"same-origin"}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){e.emit("error",t)}))}else{var s=e._xhr=new p.XMLHttpRequest;try{s.open(e._opts.method,e._opts.url,!0)}catch(t){return void Qe((function(){e.emit("error",t)}))}"responseType"in s&&(s.responseType=e._mode.split(":")[0]),"withCredentials"in s&&(s.withCredentials=!!r.withCredentials),"text"===e._mode&&"overrideMimeType"in s&&s.overrideMimeType("text/plain; charset=x-user-defined"),Object.keys(n).forEach((function(e){s.setRequestHeader(n[e].name,n[e].value)})),e._response=null,s.onreadystatechange=function(){switch(s.readyState){case Dr:case Nr:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(s.onprogress=function(){e._onXHRProgress()}),s.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{s.send(t)}catch(t){return void Qe((function(){e.emit("error",t)}))}}}},Gr.prototype._onXHRProgress=function(){(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},Gr.prototype._connect=function(){this._destroyed||(this._response=new zr(this._xhr,this._fetchResponse,this._mode),this.emit("response",this._response))},Gr.prototype._write=function(e,t,r){this._body.push(e),r()},Gr.prototype.abort=Gr.prototype.destroy=function(){this._destroyed=!0,this._response&&(this._response._destroyed=!0),this._xhr&&this._xhr.abort()},Gr.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),wr.prototype.end.call(this,e,t,r)},Gr.prototype.flushHeaders=function(){},Gr.prototype.setTimeout=function(){},Gr.prototype.setNoDelay=function(){},Gr.prototype.setSocketKeepAlive=function(){},Yr.defaultMaxSockets=4;var Hr={};function Wr(e){return s(this,void 0,void 0,(function(){var t,r,n;return i(this,(function(o){switch(o.label){case 0:switch(t=e.headers.get("content-type")||"",t){case"application/json":return[3,1];case"application/octet-stream":case"binary/octet-stream":case"application/gzip":return[3,3]}return[3,6];case 1:return[4,e.json()];case 2:return[2,o.sent()||{}];case 3:return[4,e.blob()];case 4:return r=o.sent(),[4,new Response(r).arrayBuffer()];case 5:return n=o.sent(),[2,Buffer.from(n)];case 6:return[4,e.text()];case 7:return[2,o.sent()||""]}}))}))}["get","post","put","delete","stream"].forEach((function(e){Hr[e]=function(t,r,o){return s(this,void 0,void 0,(function(){var s,p,c,h,f,l;return i(this,(function(i){switch(i.label){case 0:s=function(e,t){var r,n=t.body,o=t.query,s=t.sudo,i=t.method,u=new Headers(e.headers),a=n;return s&&u.append("sudo",""+s),"object"!=typeof n||n instanceof L||(a=JSON.stringify(N(n)),u.append("content-type","application/json")),e.url.includes("https")&&(r=new Yr({rejectUnauthorized:e.rejectUnauthorized})),{headers:u,agent:r,timeout:e.requestTimeout,method:"stream"===i?"get":i,onProgress:"stream"===i?function(){}:void 0,searchParams:F(N(o||{}),{arrayFormat:"bracket"}),prefixUrl:e.url,body:a}}(t,n(n({},o),{method:e})),i.label=1;case 1:return i.trys.push([1,3,,6]),[4,x(r,s)];case 2:return p=i.sent(),[3,6];case 3:return(c=i.sent()).response?[4,c.response.json()]:[3,5];case 4:h=i.sent(),c.description=h.error||h.message,i.label=5;case 5:throw c;case 6:return f=p.status,l=function(e){var t={};return a(e.headers.entries()).forEach((function(e){var r=u(e,2),n=r[0],o=r[1];t[n]=o})),t}(p),[4,Wr(p)];case 7:return[2,{body:i.sent(),headers:l,status:f}]}}))}))}}));var Kr=function(e){var t=void 0===e?{}:e,r=t.token,n=t.jobToken,o=t.oauthToken,s=t.sudo,i=t.profileToken,u=t.profileMode,a=void 0===u?"execution":u,p=t.host,c=void 0===p?"https://gitlab.com":p,h=t.url,f=void 0===h?"":h,l=t.version,d=void 0===l?4:l,m=t.camelize,y=void 0!==m&&m,g=t.rejectUnauthorized,v=void 0===g||g,b=t.requester,w=void 0===b?Hr:b,R=t.requestTimeout,I=void 0===R?3e5:R;this.url=[c,"api","v"+d,f].join("/"),this.headers={},this.rejectUnauthorized=v,this.camelize=y,this.requester=w,this.requestTimeout=I,o?this.headers.authorization="Bearer "+o:n?this.headers["job-token"]=n:r&&(this.headers["private-token"]=r),i&&(this.headers["X-Profile-Token"]=i,a&&(this.headers["X-Profile-Mode"]=a)),s&&(this.headers.Sudo=""+s)};function Vr(e){return function(t){var r=this;Object.entries(e||{}).forEach((function(e){var n=u(e,2),o=n[0],s=n[1];r[o]=new s(t)}))}}var Jr=M((function(e){var t,r;t=function(){var e=/^;\s*([^"=]+)=(?:"([^"]+)"|([^";,]+)(?:[;,]|$))/,t=/^<([^>]*)>/,r=/^\s*,\s*/;return{parse:function(n,o){for(var s,i,u,a=o&&o.extended||!1,p=[];n&&(n=n.trim(),i=t.exec(n));){for(var c={link:i[1]},h=(n=n.slice(i[0].length)).match(r);n&&(!h||h.index>0)&&(s=e.exec(n));)h=(n=n.slice(s[0].length)).match(r),"rel"===s[1]||"rev"===s[1]?(u=(s[2]||s[3]).split(/\s+/),c[s[1]]=u):c[s[1]]=s[2]||s[3];p.push(c),n=n.replace(r,"")}return a?p:p.reduce((function(e,t){return t.rel&&t.rel.forEach((function(r){e[r]=t.link})),e}),{})},stringify:function(e){var t=Object.keys(e).reduce((function(t,r){return t[e[r]]=t[e[r]]||[],t[e[r]].push(r),t}),{});return Object.keys(t).reduce((function(e,r){return e.concat("<"+r+'>; rel="'+t[r].join(" ")+'"')}),[]).join(", ")}}},r=q,e.exports?e.exports=t():"function"==typeof r.define&&r.define.amd?(void 0)(t):r.li=t()}));var Xr={post:function(e,t,r){return void 0===r&&(r={}),s(this,void 0,void 0,(function(){var n,s,u;return i(this,(function(i){switch(i.label){case 0:return n=r.sudo,s=r.form,u=o(r,["sudo","form"]),[4,e.requester.post(e,t,{body:s||u,sudo:n})];case 1:return[2,i.sent().body]}}))}))},put:function(e,t,r){return void 0===r&&(r={}),s(this,void 0,void 0,(function(){var n,s;return i(this,(function(i){switch(i.label){case 0:return n=r.sudo,s=o(r,["sudo"]),[4,e.requester.put(e,t,{body:s,sudo:n})];case 1:return[2,i.sent().body]}}))}))},get:function e(t,r,n){return void 0===n&&(n={}),s(this,void 0,void 0,(function(){var s,u,p,c,h,f,l,d,m,y,g,v,b;return i(this,(function(i){switch(i.label){case 0:return s=n.showPagination,u=n.maxPages,p=n.sudo,c=o(n,["showPagination","maxPages","sudo"]),[4,t.requester.get(t,r,{query:c||{},sudo:p})];case 1:return h=i.sent(),f=h.headers,l=h.body,d={total:parseInt(f["x-total"],10),next:parseInt(f["x-next-page"],10)||null,current:parseInt(f["x-page"],10)||1,previous:parseInt(f["x-prev-page"],10)||null,perPage:parseInt(f["x-per-page"],10),totalPages:parseInt(f["x-total-pages"],10)},m=!u||d.current<u,t.camelize&&(l=D(l)),!c.page&&m&&d.next?(y=Jr.parse(f.link).next,g=t.url.split("/").pop()||"",v=new RegExp(".+/api/v\\d(/"+g+")?/"),[4,e(t,y.replace(v,""),{maxPages:u,sudo:p,showPagination:!0})]):[3,3];case 2:b=i.sent(),d=b.pagination,l=a(l,b.data),i.label=3;case 3:return[2,(c.page||l.length>0)&&s?{data:l,pagination:d}:l]}}))}))},del:function(e,t,r){return void 0===r&&(r={}),s(this,void 0,void 0,(function(){var n,s;return i(this,(function(i){switch(i.label){case 0:return n=r.sudo,s=o(r,["sudo"]),[4,e.requester.delete(e,t,{query:s,sudo:n})];case 1:return[2,i.sent().body]}}))}))},stream:function(e,t,r){if(void 0===r&&(r={}),"function"!=typeof e.requester.stream)throw new Error("Stream method is not implementated in requester!");return e.requester.stream(e,t,{query:r})}},$r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){return Xr.get(this,"groups",e)},t.prototype.create=function(e){return Xr.post(this,"groups",e)},t.prototype.createLDAPLink=function(e,t,r,o,s){var i=encodeURIComponent(e);return Xr.post(this,"groups/"+i+"/ldap_group_links",n({cn:t,groupAccess:r,provider:o},s))},t.prototype.edit=function(e,t){var r=encodeURIComponent(e);return Xr.put(this,"groups/"+r,t)},t.prototype.projects=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"groups/"+r+"/projects",t)},t.prototype.remove=function(e,t){var r=encodeURIComponent(e);return Xr.del(this,"groups/"+r,t)},t.prototype.removeLDAPLink=function(e,t,r){void 0===r&&(r={});var n=r.provider,s=o(r,["provider"]),i=encodeURIComponent(e),u=n?n+"/"+t:""+t;return Xr.del(this,"groups/"+i+"/ldap_group_links/"+u,s)},t.prototype.search=function(e,t){return Xr.get(this,"groups",n({search:e},t))},t.prototype.show=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"groups/"+r,t)},t.prototype.subgroups=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"groups/"+r+"/subgroups",t)},t.prototype.syncLDAP=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"groups/"+r+"/ldap_sync",t)},t}(Kr),Zr=function(e){function t(t,r){return e.call(this,n({url:t},r))||this}return r(t,e),t.prototype.all=function(e){var t=encodeURIComponent(e);return Xr.get(this,t+"/access_requests")},t.prototype.request=function(e){var t=encodeURIComponent(e);return Xr.post(this,t+"/access_requests")},t.prototype.approve=function(e,t,r){var n=(void 0===r?{}:r).accessLevel,o=u([e,t].map(encodeURIComponent),2),s=o[0],i=o[1];return Xr.post(this,s+"/access_requests/"+i+"/approve",{accessLevel:n})},t.prototype.deny=function(e,t){var r=u([e,t].map(encodeURIComponent),2),n=r[0],o=r[1];return Xr.del(this,n+"/access_requests/"+o)},t}(Kr);function Qr(e,t,r,n,o){var s=u([e,r].map(encodeURIComponent),2),i=[s[0],t,s[1]];return o&&i.push("notes",encodeURIComponent(o)),i.push(encodeURIComponent("award_emoji")),n&&i.push(encodeURIComponent(n)),i.join("/")}var en=function(e){function t(t,r){var o=e.call(this,n({url:"projects"},r))||this;return o.resourceType=t,o}return r(t,e),t.prototype.all=function(e,t,r,n){return Xr.get(this,Qr(e,this.resourceType,t,null,r),n)},t.prototype.award=function(e,t,r,o,s){return Xr.post(this,Qr(e,this.resourceType,t,null,o),n({name:r},s))},t.prototype.remove=function(e,t,r,n,o){return Xr.del(this,Qr(e,this.resourceType,t,r,n),o)},t.prototype.show=function(e,t,r,n,o){return Xr.get(this,Qr(e,this.resourceType,t,r,n),o)},t}(Kr),tn=function(e){function t(t,r){return e.call(this,n({url:t},r))||this}return r(t,e),t.prototype.add=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,r+"/badges",t)},t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,r+"/badges",t)},t.prototype.edit=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,o+"/badges/"+s,r)},t.prototype.preview=function(e,t,r,o){var s=encodeURIComponent(e);return Xr.get(this,s+"/badges/render",n({linkUrl:t,imageUrl:r},o))},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,o+"/badges/"+s,r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,o+"/badges/"+s,r)},t}(Kr),rn=function(e){function t(t,r){return e.call(this,n({url:t},r))||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,r+"/custom_attributes",t)},t.prototype.set=function(e,t,r,o){var s=u([e,t].map(encodeURIComponent),2),i=s[0],a=s[1];return Xr.put(this,i+"/custom_attributes/"+a,n({value:r},o))},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,o+"/custom_attributes/"+s,r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,o+"/custom_attributes/"+s,r)},t}(Kr),nn=function(e){function t(t,r,o){var s=e.call(this,n({url:t},o))||this;return s.resource2Type=r,s}return r(t,e),t.prototype.addNote=function(e,t,r,o,s,i){if(!s)throw new Error("Missing required content argument");var a=u([e,t,r,o].map(encodeURIComponent),4),p=a[0],c=a[1],h=a[2],f=a[3];return Xr.post(this,p+"/"+this.resource2Type+"/"+c+"/discussions/"+h+"/notes",n({body:s,noteId:f},i))},t.prototype.all=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,o+"/"+this.resource2Type+"/"+s+"/discussions",r)},t.prototype.create=function(e,t,r,o){if(!r)throw new Error("Missing required content argument");var s=u([e,t].map(encodeURIComponent),2),i=s[0],a=s[1];return Xr.post(this,i+"/"+this.resource2Type+"/"+a+"/discussions",n({body:r},o))},t.prototype.editNote=function(e,t,r,o,s,i){var a=u([e,t,r,o].map(encodeURIComponent),4),p=a[0],c=a[1],h=a[2],f=a[3];return Xr.put(this,p+"/"+this.resource2Type+"/"+c+"/discussions/"+h+"/notes/"+f,n({body:s},i))},t.prototype.removeNote=function(e,t,r,n,o){var s=u([e,t,r,n].map(encodeURIComponent),4),i=s[0],a=s[1],p=s[2],c=s[3];return Xr.del(this,i+"/"+this.resource2Type+"/"+a+"/discussions/"+p+"/notes/"+c,o)},t.prototype.show=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.get(this,s+"/"+this.resource2Type+"/"+i+"/discussions/"+a,n)},t}(Kr),on=function(e){function t(t,r){return e.call(this,n({url:t},r))||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,r+"/boards",t)},t.prototype.create=function(e,t,r){var o=encodeURIComponent(e);return Xr.post(this,o+"/boards",n({name:t},r))},t.prototype.createList=function(e,t,r,o){var s=u([e,t].map(encodeURIComponent),2),i=s[0],a=s[1];return Xr.post(this,i+"/boards/"+a+"/lists",n({labelId:r},o))},t.prototype.edit=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,o+"/boards/"+s,r)},t.prototype.editList=function(e,t,r,o,s){var i=u([e,t,r].map(encodeURIComponent),3),a=i[0],p=i[1],c=i[2];return Xr.put(this,a+"/boards/"+p+"/lists/"+c,n({position:o},s))},t.prototype.lists=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,o+"/boards/"+s+"/lists",r)},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,o+"/boards/"+s,r)},t.prototype.removeList=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.del(this,s+"/boards/"+i+"/lists/"+a,n)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,o+"/boards/"+s,r)},t.prototype.showList=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.get(this,s+"/boards/"+i+"/lists/"+a,n)},t}(Kr),sn=function(e){function t(t,r){return e.call(this,n({url:t},r))||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,r+"/labels",t)},t.prototype.create=function(e,t,r,o){var s=encodeURIComponent(e);return Xr.post(this,s+"/labels",n({name:t,color:r},o))},t.prototype.edit=function(e,t,r){var o=encodeURIComponent(e);return Xr.put(this,o+"/labels",n({name:t},r))},t.prototype.remove=function(e,t,r){var o=encodeURIComponent(e);return Xr.del(this,o+"/labels",n({name:t},r))},t.prototype.subscribe=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,o+"/issues/"+s+"/subscribe",r)},t.prototype.unsubscribe=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,o+"/issues/"+s+"/unsubscribe",r)},t}(Kr),un=function(e){function t(t,r){return e.call(this,n({url:t},r))||this}return r(t,e),t.prototype.all=function(e,t){void 0===t&&(t={});var r=t.includeInherited,n=o(t,["includeInherited"]),s=[encodeURIComponent(e),"members"];return r&&s.push("all"),Xr.get(this,s.join("/"),n)},t.prototype.add=function(e,t,r,o){var s=u([e,t].map(encodeURIComponent),2),i=s[0],a=s[1];return Xr.post(this,i+"/members",n({userId:a,accessLevel:r},o))},t.prototype.edit=function(e,t,r,o){var s=u([e,t].map(encodeURIComponent),2),i=s[0],a=s[1];return Xr.put(this,i+"/members/"+a,n({accessLevel:r},o))},t.prototype.show=function(e,t,r){void 0===r&&(r={});var n=r.includeInherited,s=o(r,["includeInherited"]),i=u([e,t].map(encodeURIComponent),2),a=i[0],p=i[1],c=[a,"members"];return n&&c.push("all"),c.push(p),Xr.get(this,c.join("/"),s)},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,o+"/members/"+s,r)},t}(Kr),an=function(e){function t(t,r){return e.call(this,n({url:t},r))||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,r+"/milestones",t)},t.prototype.create=function(e,t,r){var o=encodeURIComponent(e);return Xr.post(this,o+"/milestones",n({title:t},r))},t.prototype.edit=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,o+"/milestones/"+s,r)},t.prototype.issues=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,o+"/milestones/"+s+"/issues",r)},t.prototype.mergeRequests=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,o+"/milestones/"+s+"/merge_requests",r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,o+"/milestones/"+s,r)},t}(Kr),pn=function(e){function t(t,r,o){var s=e.call(this,n({url:t},o))||this;return s.resource2Type=r,s}return r(t,e),t.prototype.all=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,o+"/"+this.resource2Type+"/"+s+"/notes",r)},t.prototype.create=function(e,t,r,o){var s=u([e,t].map(encodeURIComponent),2),i=s[0],a=s[1];return Xr.post(this,i+"/"+this.resource2Type+"/"+a+"/notes",n({body:r},o))},t.prototype.edit=function(e,t,r,o,s){var i=u([e,t,r].map(encodeURIComponent),3),a=i[0],p=i[1],c=i[2];return Xr.put(this,a+"/"+this.resource2Type+"/"+p+"/notes/"+c,n({body:o},s))},t.prototype.remove=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.del(this,s+"/"+this.resource2Type+"/"+i+"/notes/"+a,n)},t.prototype.show=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.get(this,s+"/"+this.resource2Type+"/"+i+"/notes/"+a,n)},t}(Kr),cn=function(e){function t(t,r){return e.call(this,n({url:["templates",t].join("/")},r))||this}return r(t,e),t.prototype.all=function(e){return Xr.get(this,"",e)},t.prototype.show=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,""+r,t)},t}(Kr),hn=function(e){function t(t,r){return e.call(this,n({url:t},r))||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,r+"/variables",t)},t.prototype.create=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,r+"/variables",t)},t.prototype.edit=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,o+"/variables/"+s,r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,o+"/variables/"+s,r)},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,o+"/variables/"+s,r)},t}(Kr),fn=function(e){function t(t){return e.call(this,"groups",t)||this}return r(t,e),t}(Zr),ln=function(e){function t(t){return e.call(this,"groups",t)||this}return r(t,e),t}(tn),dn=function(e){function t(t){return e.call(this,"groups",t)||this}return r(t,e),t}(rn),mn=function(e){function t(t){return e.call(this,"groups",t)||this}return r(t,e),t}(on),yn=function(e){function t(t){return e.call(this,"groups",t)||this}return r(t,e),t}(un),gn=function(e){function t(t){return e.call(this,"groups",t)||this}return r(t,e),t}(an),vn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"groups/"+r+"/projects",t)},t.prototype.add=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"groups/"+o+"/projects/"+s,r)},t}(Kr),bn=function(e){function t(t){return e.call(this,"groups",t)||this}return r(t,e),t}(hn),wn=function(e){function t(t){return e.call(this,"groups",t)||this}return r(t,e),t}(sn),Rn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"groups/"+r+"/epics",t)},t.prototype.create=function(e,t,r){var o=encodeURIComponent(e);return Xr.post(this,"groups/"+o+"/epics",n({title:t},r))},t.prototype.edit=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,"groups/"+o+"/epics/"+s,r)},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"groups/"+o+"/epics/"+s,r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"groups/"+o+"/epics/"+s,r)},t}(Kr),In=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"groups/"+o+"/epics/"+s+"/issues",r)},t.prototype.assign=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.post(this,"groups/"+s+"/epics/"+i+"/issues/"+a,n)},t.prototype.edit=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.put(this,"groups/"+s+"/epics/"+i+"/issues/"+a,n)},t.prototype.remove=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.del(this,"groups/"+s+"/epics/"+i+"/issues/"+a,n)},t}(Kr),Cn=function(e){function t(t){return e.call(this,"groups","epics",t)||this}return r(t,e),t}(pn),_n=function(e){function t(t){return e.call(this,"groups","epics",t)||this}return r(t,e),t}(nn),jn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){return Xr.get(this,"users",e)},t.prototype.activities=function(e){return Xr.get(this,"users/activities",e)},t.prototype.projects=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"users/"+r+"/projects",t)},t.prototype.block=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"users/"+r+"/block",t)},t.prototype.create=function(e){return Xr.post(this,"users",e)},t.prototype.current=function(e){return Xr.get(this,"user",e)},t.prototype.edit=function(e,t){var r=encodeURIComponent(e);return Xr.put(this,"users/"+r,t)},t.prototype.events=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"users/"+r+"/events",t)},t.prototype.search=function(e,t){return Xr.get(this,"users",n({search:e},t))},t.prototype.show=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"users/"+r,t)},t.prototype.remove=function(e,t){var r=encodeURIComponent(e);return Xr.del(this,"users/"+r,t)},t.prototype.unblock=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"users/"+r+"/unblock",t)},t}(Kr),Un=function(e){function t(t){return e.call(this,"users",t)||this}return r(t,e),t}(rn),kn=function(e){return e?"users/"+encodeURIComponent(e)+"/emails":"user/emails"},En=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){void 0===e&&(e={});var t=e.userId,r=o(e,["userId"]);return Xr.get(this,kn(t),r)},t.prototype.add=function(e,t){void 0===t&&(t={});var r=t.userId,s=o(t,["userId"]);return Xr.post(this,kn(r),n({email:e},s))},t.prototype.show=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"user/emails/"+r,t)},t.prototype.remove=function(e,t){void 0===t&&(t={});var r=t.userId,n=o(t,["userId"]),s=encodeURIComponent(e);return Xr.del(this,kn(r)+"/"+s,n)},t}(Kr),Sn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"users/"+r+"/impersonation_tokens",t)},t.prototype.add=function(e,t,r,o,s){var i=encodeURIComponent(e);return Xr.post(this,"users/"+i+"/impersonation_tokens",n({name:t,expiresAt:o,scopes:r},s))},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"users/"+o+"/impersonation_tokens/"+s,r)},t.prototype.revoke=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"users/"+o+"/impersonation_tokens/"+s,r)},t}(Kr),An=function(e){return e?"users/"+encodeURIComponent(e)+"/keys":"user/keys"},Pn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){void 0===e&&(e={});var t=e.userId,r=o(e,["userId"]);return Xr.get(this,An(t),r)},t.prototype.create=function(e,t,r){void 0===r&&(r={});var s=r.userId,i=o(r,["userId"]);return Xr.post(this,An(s),n({title:e,key:t},i))},t.prototype.show=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"user/keys/"+r,t)},t.prototype.remove=function(e,t){void 0===t&&(t={});var r=t.userId,n=o(t,["userId"]),s=encodeURIComponent(e);return Xr.del(this,An(r)+"/"+s,n)},t}(Kr),Tn=function(e){return e?"users/"+encodeURIComponent(e)+"/gpg_keys":"users/gpg_keys"},xn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){void 0===e&&(e={});var t=e.userId,r=o(e,["userId"]);return Xr.get(this,Tn(t),r)},t.prototype.add=function(e,t){void 0===t&&(t={});var r=t.userId,s=o(t,["userId"]);return Xr.post(this,Tn(r),n({key:e},s))},t.prototype.show=function(e,t){void 0===t&&(t={});var r=t.userId,n=o(t,["userId"]),s=encodeURIComponent(e);return Xr.get(this,Tn(r)+"/"+s,n)},t.prototype.remove=function(e,t){void 0===t&&(t={});var r=t.userId,n=o(t,["userId"]),s=encodeURIComponent(e);return Xr.del(this,Tn(r)+"/"+s,n)},t}(Kr),Ln=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/repository/branches",t)},t.prototype.create=function(e,t,r,o){var s,i=encodeURIComponent(e),u=this.url.includes("v3")?"branchName":"branch";return Xr.post(this,"projects/"+i+"/repository/branches",n(((s={})[u]=t,s.ref=r,s),o))},t.prototype.protect=function(e,t,r){var o=encodeURIComponent(e);return Xr.post(this,"projects/"+o+"/protected_branches",n({name:t},r))},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/repository/branches/"+s,r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/repository/branches/"+s,r)},t.prototype.unprotect=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,"projects/"+o+"/repository/branches/"+s+"/unprotect",r)},t}(Kr),qn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/repository/commits",t)},t.prototype.cherryPick=function(e,t,r,o){var s=encodeURIComponent(e);return Xr.post(this,"projects/"+s+"/repository/commits/"+t+"/cherry_pick",n({branch:r},o))},t.prototype.comments=function(e,t,r){var n=encodeURIComponent(e);return Xr.get(this,"projects/"+n+"/repository/commits/"+t+"/comments",r)},t.prototype.create=function(e,t,r,o,s){void 0===o&&(o=[]);var i=encodeURIComponent(e);return Xr.post(this,"projects/"+i+"/repository/commits",n({branch:t,commitMessage:r,actions:o},s))},t.prototype.createComment=function(e,t,r,o){var s=encodeURIComponent(e);return Xr.post(this,"projects/"+s+"/repository/commits/"+t+"/comments",n({note:r},o))},t.prototype.diff=function(e,t,r){var n=encodeURIComponent(e);return Xr.get(this,"projects/"+n+"/repository/commits/"+t+"/diff",r)},t.prototype.editStatus=function(e,t,r){var n=encodeURIComponent(e);return Xr.post(this,"projects/"+n+"/statuses/"+t,r)},t.prototype.references=function(e,t,r){var n=encodeURIComponent(e);return Xr.get(this,"projects/"+n+"/repository/commits/"+t+"/refs",r)},t.prototype.show=function(e,t,r){var n=encodeURIComponent(e);return Xr.get(this,"projects/"+n+"/repository/commits/"+t,r)},t.prototype.status=function(e,t,r){var n=encodeURIComponent(e);return Xr.get(this,"projects/"+n+"/repository/commits/"+t+"/statuses",r)},t.prototype.mergeRequests=function(e,t,r){var n=encodeURIComponent(e);return Xr.get(this,"projects/"+n+"/repository/commits/"+t+"/merge_requests",r)},t}(Kr),Mn=function(e){function t(t){return e.call(this,"projects","commits",t)||this}return r(t,e),t}(nn),Bn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.repositories=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/registry/repositories",t)},t.prototype.tags=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/registry/repositories/"+s+"/tags",r)},t.prototype.removeRepository=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/registry/repositories/"+s,r)},t.prototype.removeTag=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.del(this,"projects/"+s+"/registry/repositories/"+i+"/tags/"+a,n)},t.prototype.removeTags=function(e,t,r,o){var s=u([e,t].map(encodeURIComponent),2),i=s[0],a=s[1];return Xr.del(this,"projects/"+i+"/registry/repositories/"+a+"/tags",n({tagNameRegex:r},o))},t.prototype.showTag=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.get(this,"projects/"+s+"/registry/repositories/"+i+"/tags/"+a,n)},t}(Kr),On=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/deployments",t)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/deployments/"+s,r)},t.prototype.mergeRequests=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/deployments/"+s+"/merge_requests",r)},t}(Kr),Dn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.add=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"projects/"+r+"/deploy_keys",t)},t.prototype.all=function(e){var t,r=e.projectId,n=o(e,["projectId"]);return t=r?"projects/"+encodeURIComponent(r)+"/deploy_keys":"deploy_keys",Xr.get(this,t,n)},t.prototype.edit=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,"projects/"+o+"/deploy_keys/"+s,r)},t.prototype.enable=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"projects/"+o+"/deploy_keys/"+s+"/enable",r)},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/deploy_keys/"+s,r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/deploy_keys/"+s,r)},t}(Kr),Nn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/environments",t)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/environments/"+s,r)},t.prototype.create=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"projects/"+r+"/environments",t)},t.prototype.edit=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,"projects/"+o+"/environments/"+s,r)},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/environments/"+s,r)},t.prototype.stop=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"projects/"+o+"/environments/"+s+"/stop",r)},t}(Kr),zn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.addSpentTime=function(e,t,r,o){var s=u([e,t].map(encodeURIComponent),2),i=s[0],a=s[1];return Xr.post(this,"projects/"+i+"/issues/"+a+"/add_spent_time",n({duration:r},o))},t.prototype.addTimeEstimate=function(e,t,r,o){var s=u([e,t].map(encodeURIComponent),2),i=s[0],a=s[1];return Xr.post(this,"projects/"+i+"/issues/"+a+"/time_estimate",n({duration:r},o))},t.prototype.all=function(e){void 0===e&&(e={});var t,r=e.projectId,n=e.groupId,s=o(e,["projectId","groupId"]);return t=r?"projects/"+encodeURIComponent(r)+"/issues":n?"groups/"+encodeURIComponent(n)+"/issues":"issues",Xr.get(this,t,s)},t.prototype.create=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"projects/"+r+"/issues",t)},t.prototype.edit=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,"projects/"+o+"/issues/"+s,r)},t.prototype.link=function(e,t,r,o,s){var i=u([e,t].map(encodeURIComponent),2),a=i[0],p=i[1],c=u([r,o].map(encodeURIComponent),2),h=c[0],f=c[1];return Xr.post(this,"projects/"+a+"/issues/"+p+"/links",n({targetProjectId:h,targetIssueId:f},s))},t.prototype.participants=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/issues/"+s+"/participants",r)},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/issues/"+s,r)},t.prototype.resetSpentTime=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"projects/"+o+"/issues/"+s+"/reset_spent_time",r)},t.prototype.resetTimeEstimate=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"projects/"+o+"/issues/"+s+"/reset_time_estimate",r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/issues/"+s,r)},t.prototype.subscribe=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"projects/"+o+"/issues/"+s+"/subscribe",r)},t.prototype.timeStats=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/issues/"+s+"/time_stats",r)},t.prototype.unsubscribe=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/issues/"+s+"/unsubscribe",r)},t}(Kr),Gn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){void 0===e&&(e={});var t,r=e.projectId,n=e.groupId,s=o(e,["projectId","groupId"]);return t=r?"projects/"+encodeURIComponent(r)+"/issues_statistics":n?"groups/"+encodeURIComponent(n)+"/issues_statistics":"issues_statistics",Xr.get(this,t,s)},t}(Kr),Fn=function(e){function t(t){return e.call(this,"projects","issues",t)||this}return r(t,e),t}(pn),Yn=function(e){function t(t){return e.call(this,"projects","issues",t)||this}return r(t,e),t}(nn),Hn=function(e){function t(t){return e.call(this,"issues",t)||this}return r(t,e),t}(en),Wn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/jobs",t)},t.prototype.cancel=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"projects/"+o+"/jobs/"+s+"/cancel",r)},t.prototype.downloadSingleArtifactFile=function(e,t,r,n){var s=n.stream,i=void 0!==s&&s,a=o(n,["stream"]),p=u([e,t].map(encodeURIComponent),2),c=p[0],h=p[1];return i?Xr.stream(this,"projects/"+c+"/jobs/"+h+"/artifacts/"+r,a):Xr.get(this,"projects/"+c+"/jobs/"+h+"/artifacts/"+r,a)},t.prototype.downloadSingleArtifactFileFromRef=function(e,t,r,n,s){var i=s.stream,a=void 0!==i&&i,p=o(s,["stream"]),c=u([e,t,n].map(encodeURIComponent),3),h=c[0],f=c[1],l=c[2];return a?Xr.stream(this,"projects/"+h+"/jobs/artifacts/"+f+"/raw/"+r+"?job="+l,p):Xr.get(this,"projects/"+h+"/jobs/artifacts/"+f+"/raw/"+r+"?job="+l,p)},t.prototype.downloadLatestArtifactFile=function(e,t,r,n){var s=n.stream,i=void 0!==s&&s,a=o(n,["stream"]),p=u([e,t,r].map(encodeURIComponent),3),c=p[0],h=p[1],f=p[2];return i?Xr.stream(this,"projects/"+c+"/jobs/artifacts/"+h+"/download?job="+f,a):Xr.get(this,"projects/"+c+"/jobs/artifacts/"+h+"/download?job="+f,a)},t.prototype.downloadTraceFile=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/jobs/"+s+"/trace",r)},t.prototype.erase=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"projects/"+o+"/jobs/"+s+"/erase",r)},t.prototype.eraseArtifacts=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/jobs/"+s+"/artifacts",r)},t.prototype.keepArtifacts=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"projects/"+o+"/jobs/"+s+"/artifacts/keep",r)},t.prototype.play=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"projects/"+o+"/jobs/"+s+"/play",r)},t.prototype.retry=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"projects/"+o+"/jobs/"+s+"/retry",r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/jobs/"+s,r)},t.prototype.showPipelineJobs=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/pipelines/"+s+"/jobs",r)},t}(Kr),Kn=function(e){function t(t){return e.call(this,"projects",t)||this}return r(t,e),t}(sn),Vn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.accept=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,"projects/"+o+"/merge_requests/"+s+"/merge",r)},t.prototype.addSpentTime=function(e,t,r,o){var s=u([e,t].map(encodeURIComponent),2),i=s[0],a=s[1];return Xr.post(this,"projects/"+i+"/merge_requests/"+a+"/add_spent_time",n({duration:r},o))},t.prototype.addTimeEstimate=function(e,t,r,o){var s=u([e,t].map(encodeURIComponent),2),i=s[0],a=s[1];return Xr.post(this,"projects/"+i+"/merge_requests/"+a+"/time_estimate",n({duration:r},o))},t.prototype.all=function(e){var t,r=e.projectId,n=e.groupId,s=o(e,["projectId","groupId"]);return t=r?"projects/"+encodeURIComponent(r)+"/merge_requests":n?"groups/"+encodeURIComponent(n)+"/merge_requests":"merge_requests",Xr.get(this,t,s)},t.prototype.approve=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"projects/"+o+"/merge_requests/"+s+"/approve",r)},t.prototype.approvals=function(e,t){void 0===t&&(t={});var r,n=t.mergerequestIId,s=o(t,["mergerequestIId"]),i=encodeURIComponent(e);n?r="projects/"+i+"/merge_requests/"+encodeURIComponent(n)+"/approvals":r="projects/"+i+"/approvals";return Xr.get(this,r,s)},t.prototype.approvalState=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/merge_requests/"+s+"/approval_state",r)},t.prototype.approvers=function(e,t,r,s){void 0===s&&(s={});var i,u=s.mergerequestIId,a=o(s,["mergerequestIId"]),p=encodeURIComponent(e);u?i="projects/"+p+"/merge_requests/"+encodeURIComponent(u)+"/approvers":i="projects/"+p+"/approvers";return Xr.put(this,i,n({approverIds:t,approverGroupIds:r},a))},t.prototype.cancelOnPipelineSucess=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,"projects/"+o+"/merge_requests/"+s+"/cancel_merge_when_pipeline_succeeds",r)},t.prototype.changes=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/merge_requests/"+s+"/changes",r)},t.prototype.closesIssues=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/merge_requests/"+s+"/closes_issues",r)},t.prototype.commits=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/merge_requests/"+s+"/commits",r)},t.prototype.create=function(e,t,r,o,s){var i=encodeURIComponent(e);return Xr.post(this,"projects/"+i+"/merge_requests",n({id:i,sourceBranch:t,targetBranch:r,title:o},s))},t.prototype.edit=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,"projects/"+o+"/merge_requests/"+s,r)},t.prototype.editApprovals=function(e,t){void 0===t&&(t={});var r,n=t.mergerequestIId,s=o(t,["mergerequestIId"]),i=encodeURIComponent(e);n?r="projects/"+i+"/merge_requests/"+encodeURIComponent(n)+"/approvals":r="projects/"+i+"/approvals";return Xr.post(this,r,s)},t.prototype.participants=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/merge_requests/"+s+"/participants",r)},t.prototype.pipelines=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/merge_requests/"+s+"/pipelines",r)},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/merge_requests/"+s,r)},t.prototype.resetSpentTime=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"projects/"+o+"/merge_requests/"+s+"/reset_spent_time",r)},t.prototype.resetTimeEstimate=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"projects/"+o+"/merge_requests/"+s+"/reset_time_estimate",r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/merge_requests/"+s,r)},t.prototype.timeStats=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/merge_requests/"+s+"/time_stats",r)},t.prototype.version=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.get(this,"projects/"+s+"/merge_requests/"+i+"/versions/"+a,n)},t.prototype.versions=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/merge_requests/"+s+"/versions",r)},t.prototype.unapprove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"projects/"+o+"/merge_requests/"+s+"/unapprove",r)},t.prototype.unsubscribe=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/merge_requests/"+s+"/unsubscribe",r)},t}(Kr),Jn=function(e){function t(t){return e.call(this,"merge_requests",t)||this}return r(t,e),t}(en),Xn=function(e){function t(t){return e.call(this,"projects","merge_requests",t)||this}return r(t,e),t}(nn),$n=function(e){function t(t){return e.call(this,"projects","merge_requests",t)||this}return r(t,e),t}(pn),Zn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/packages",t)},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/packages/"+s,r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/packages/"+s,r)},t.prototype.showFiles=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/packages/"+s+"/package_files",r)},t}(Kr),Qn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/pipelines",t)},t.prototype.create=function(e,t,r){var o=encodeURIComponent(e);return Xr.post(this,"projects/"+o+"/pipeline",n({ref:t},r))},t.prototype.delete=function(e,t,r){var n=encodeURIComponent(e);return Xr.del(this,"projects/"+n+"/pipelines/"+t,r)},t.prototype.show=function(e,t,r){var n=encodeURIComponent(e);return Xr.get(this,"projects/"+n+"/pipelines/"+t,r)},t.prototype.retry=function(e,t,r){var n=encodeURIComponent(e);return Xr.post(this,"projects/"+n+"/pipelines/"+t+"/retry",r)},t.prototype.cancel=function(e,t,r){var n=encodeURIComponent(e);return Xr.post(this,"projects/"+n+"/pipelines/"+t+"/cancel",r)},t.prototype.showJobs=function(e,t,r){var n=encodeURIComponent(e);return Xr.get(this,"projects/"+n+"/pipelines/"+t+"/jobs",r)},t.prototype.allVariables=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/pipelines/"+s+"/variables",r)},t}(Kr),eo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/pipeline_schedules",t)},t.prototype.create=function(e,t,r,o,s){var i=encodeURIComponent(e);return Xr.post(this,"projects/"+i+"/pipeline_schedules",n({description:t,ref:r,cron:o},s))},t.prototype.edit=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,"projects/"+o+"/pipeline_schedules/"+s,r)},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/pipeline_schedules/"+s,r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/pipeline_schedules/"+s,r)},t.prototype.takeOwnership=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"projects/"+o+"/pipeline_schedules/"+s+"/take_ownership",r)},t}(Kr),to=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/pipeline_schedules/"+s+"/variables",r)},t.prototype.create=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.post(this,"projects/"+o+"/pipeline_schedules/"+s+"/variables",r)},t.prototype.edit=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.put(this,"projects/"+s+"/pipeline_schedules/"+i+"/variables/"+a,n)},t.prototype.show=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.get(this,"projects/"+s+"/pipeline_schedules/"+i+"/variables/"+a,n)},t.prototype.remove=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.del(this,"projects/"+s+"/pipeline_schedules/"+i+"/variables/"+a,n)},t}(Kr),ro=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){return Xr.get(this,"projects",e)},t.prototype.archive=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"projects/"+r+"/archive",t)},t.prototype.create=function(e){var t=e.userId,r=o(e,["userId"]),n=t?"projects/user/"+encodeURIComponent(t):"projects";return Xr.post(this,n,r)},t.prototype.edit=function(e,t){var r=encodeURIComponent(e);return Xr.put(this,"projects/"+r,t)},t.prototype.events=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/events",t)},t.prototype.fork=function(e,t){void 0===t&&(t={});var r=t.forkedFromId,n=o(t,["forkedFromId"]),s="projects/"+encodeURIComponent(e)+"/fork";return r&&(s+="/"+encodeURIComponent(r)),Xr.post(this,s,n)},t.prototype.forks=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/forks",t)},t.prototype.languages=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/languages",t)},t.prototype.mirrorPull=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"projects/"+r+"/mirror/pull",t)},t.prototype.remove=function(e,t){var r=encodeURIComponent(e);return Xr.del(this,"projects/"+r,t)},t.prototype.removeFork=function(e,t){var r=encodeURIComponent(e);return Xr.del(this,"projects/"+r+"/fork",t)},t.prototype.search=function(e){return Xr.get(this,"projects",{search:e})},t.prototype.share=function(e,t,r,o){var s=encodeURIComponent(e);return Xr.post(this,"projects/"+s+"/share",n({groupId:t,groupAccess:r},o))},t.prototype.show=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r,t)},t.prototype.star=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"projects/"+r+"/star",t)},t.prototype.statuses=function(e,t,r,o){var s=encodeURIComponent(e);return Xr.post(this,"projects/"+s+"/statuses/"+t,n({state:r},o))},t.prototype.transfer=function(e,t){var r=encodeURIComponent(e);return Xr.put(this,"projects/"+r+"/transfer",{namespace:t})},t.prototype.unarchive=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"projects/"+r+"/unarchive",t)},t.prototype.unshare=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/share/"+s,r)},t.prototype.unstar=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"projects/"+r+"/unstar",t)},t.prototype.upload=function(e,t,r){var n=void 0===r?{}:r,o=n.metadata,s=n.sudo,i=encodeURIComponent(e),u=new L,a={filename:Date.now().toString(),contentType:"application/octet-stream"};return u.append("file",t,Object.assign(a,o)),Xr.post(this,"projects/"+i+"/uploads",{sudo:s,form:u})},t}(Kr),no=function(e){function t(t){return e.call(this,"projects",t)||this}return r(t,e),t}(Zr),oo=function(e){function t(t){return e.call(this,"projects",t)||this}return r(t,e),t}(tn),so=function(e){function t(t){return e.call(this,"projects",t)||this}return r(t,e),t}(rn),io=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.download=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/export/download",t)},t.prototype.exportStatus=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/export",t)},t.prototype.import=function(e,t,r){var o=new L,s={filename:Date.now().toString()+".tar.gz",contentType:"application/octet-stream"};return o.append("file",e,s),o.append("path",t),Xr.post(this,"projects/import",n(n({},r),{form:o}))},t.prototype.importStatus=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/import",t)},t.prototype.schedule=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"projects/"+r+"/export",t)},t}(Kr),uo=function(e){function t(t){return e.call(this,"projects",t)||this}return r(t,e),t}(on),ao=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/hooks",t)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/hooks/"+s,r)},t.prototype.add=function(e,t,r){var o=encodeURIComponent(e);return Xr.post(this,"projects/"+o+"/hooks",n({url:t},r))},t.prototype.edit=function(e,t,r,o){var s=u([e,t].map(encodeURIComponent),2),i=s[0],a=s[1];return Xr.put(this,"projects/"+i+"/hooks/"+a,n({url:r},o))},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/hooks/"+s,r)},t}(Kr),po=function(e){function t(t){return e.call(this,"projects",t)||this}return r(t,e),t}(un),co=function(e){function t(t){return e.call(this,"projects",t)||this}return r(t,e),t}(an),ho=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/snippets",t)},t.prototype.content=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/snippets/"+s+"/raw",r)},t.prototype.create=function(e,t,r,o,s,i){var u=encodeURIComponent(e);return Xr.post(this,"projects/"+u+"/snippets",n({title:t,fileName:r,code:o,visibility:s},i))},t.prototype.edit=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,"projects/"+o+"/snippets/"+s,r)},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/snippets/"+s,r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/snippets/"+s,r)},t.prototype.userAgentDetails=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/snippets/"+s+"/user_agent_detail",r)},t}(Kr),fo=function(e){function t(t){return e.call(this,"projects","snippets",t)||this}return r(t,e),t}(pn),lo=function(e){function t(t){return e.call(this,"projects","snippets",t)||this}return r(t,e),t}(nn),mo=function(e){function t(t){return e.call(this,"issues",t)||this}return r(t,e),t}(en),yo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/protected_branches",t)},t.prototype.protect=function(e,t,r){var o=encodeURIComponent(e);return Xr.post(this,"projects/"+o+"/protected_branches",n({name:t},r))},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/protected_branches/"+s,r)},t.prototype.unprotect=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/protected_branches/"+s,r)},t}(Kr),go=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/protected_tags",t)},t.prototype.protect=function(e,t,r){var o=encodeURIComponent(e);return Xr.post(this,"projects/"+o+"/protected_tags",n({name:t},r))},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/protected_tags/"+s,r)},t.prototype.unprotect=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/protected_tags/"+s,r)},t}(Kr),vo=function(e){function t(t){return e.call(this,"projects",t)||this}return r(t,e),t}(hn),bo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.create=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"projects/"+r+"/push_rule",t)},t.prototype.edit=function(e,t){var r=encodeURIComponent(e);try{return Xr.put(this,"projects/"+r+"/push_rule",t)}catch(r){if(r.message.includes("exist"))return this.create(e,t);throw r}},t.prototype.remove=function(e,t){var r=encodeURIComponent(e);return Xr.del(this,"projects/"+r+"/push_rule",t)},t.prototype.show=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/push_rule",t)},t}(Kr),wo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/releases",t)},t.prototype.create=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"projects/"+r+"/releases",t)},t.prototype.edit=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,"projects/"+o+"/releases/"+s,r)},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/releases/"+s,r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/releases/"+s,r)},t}(Kr),Ro=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/releases/"+s+"/assets/links",r)},t.prototype.create=function(e,t,r,o,s){var i=u([e,t].map(encodeURIComponent),2),a=i[0],p=i[1];return Xr.post(this,"projects/"+a+"/releases/"+p+"/assets/links",n({name:r,url:o},s))},t.prototype.edit=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.put(this,"projects/"+s+"/releases/"+i+"/assets/links/"+a,n)},t.prototype.remove=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.del(this,"projects/"+s+"/releases/"+i+"/assets/links/"+a,n)},t.prototype.show=function(e,t,r,n){var o=u([e,t,r].map(encodeURIComponent),3),s=o[0],i=o[1],a=o[2];return Xr.get(this,"projects/"+s+"/releases/"+i+"/assets/links/"+a,n)},t}(Kr),Io=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.compare=function(e,t,r,o){var s=encodeURIComponent(e);return Xr.get(this,"projects/"+s+"/repository/compare",n({from:t,to:r},o))},t.prototype.contributors=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/repository/contributors",t)},t.prototype.mergeBase=function(e,t,r){var o=encodeURIComponent(e);return Xr.get(this,"projects/"+o+"/repository/merge_base",n({refs:t},r))},t.prototype.showArchive=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/repository/archive",t)},t.prototype.showBlob=function(e,t,r){var n=encodeURIComponent(e);return Xr.get(this,"projects/"+n+"/repository/blobs/"+t,r)},t.prototype.showBlobRaw=function(e,t,r){var n=encodeURIComponent(e);return Xr.get(this,"projects/"+n+"/repository/blobs/"+t+"/raw",r)},t.prototype.tree=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/repository/tree",t)},t}(Kr),Co=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.create=function(e,t,r,o,s,i){var a=u([e,t].map(encodeURIComponent),2),p=a[0],c=a[1];return Xr.post(this,"projects/"+p+"/repository/files/"+c,n({branch:r,content:o,commitMessage:s},i))},t.prototype.edit=function(e,t,r,o,s,i){var a=u([e,t].map(encodeURIComponent),2),p=a[0],c=a[1];return Xr.put(this,"projects/"+p+"/repository/files/"+c,n({branch:r,content:o,commitMessage:s},i))},t.prototype.remove=function(e,t,r,o,s){var i=u([e,t].map(encodeURIComponent),2),a=i[0],p=i[1];return Xr.del(this,"projects/"+a+"/repository/files/"+p,n({branch:r,commitMessage:o},s))},t.prototype.show=function(e,t,r,o){var s=u([e,t].map(encodeURIComponent),2),i=s[0],a=s[1];return Xr.get(this,"projects/"+i+"/repository/files/"+a,n({ref:r},o))},t.prototype.showBlame=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/repository/files/"+s+"/blame",r)},t.prototype.showRaw=function(e,t,r,o){var s=u([e,t].map(encodeURIComponent),2),i=s[0],a=s[1];return Xr.get(this,"projects/"+i+"/repository/files/"+a+"/raw",n({ref:r},o))},t}(Kr),_o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){var t=e.projectId,r=o(e,["projectId"]),n=t?"projects/"+encodeURIComponent(t)+"/runners":"runners/all";return Xr.get(this,n,r)},t.prototype.allOwned=function(e){return Xr.get(this,"runners",e)},t.prototype.edit=function(e,t){var r=encodeURIComponent(e);return Xr.put(this,"runners/"+r,t)},t.prototype.enable=function(e,t,r){var o=u([e,t].map(encodeURIComponent),2),s=o[0],i=o[1];return Xr.post(this,"projects/"+s+"/runners",n({runnerId:i},r))},t.prototype.disable=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/runners/"+s,r)},t.prototype.jobs=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"runners/"+r+"/jobs",t)},t.prototype.remove=function(e,t){var r=encodeURIComponent(e);return Xr.del(this,"runners/"+r,t)},t.prototype.show=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"runners/"+r,t)},t}(Kr),jo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.edit=function(e,t,r){var n=encodeURIComponent(e);return Xr.put(this,"projects/"+n+"/services/"+t,r)},t.prototype.remove=function(e,t,r){var n=encodeURIComponent(e);return Xr.del(this,"projects/"+n+"/services/"+t,r)},t.prototype.show=function(e,t,r){var n=encodeURIComponent(e);return Xr.get(this,"projects/"+n+"/services/"+t,r)},t}(Kr),Uo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/repository/tags",t)},t.prototype.create=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"projects/"+r+"/repository/tags",t)},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/repository/tags/"+s,r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/repository/tags/"+s,r)},t}(Kr),ko=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){return Xr.get(this,"todos",e)},t.prototype.create=function(e,t,r){return Xr.post(this,"projects/"+e+"/merge_requests/"+t+"/todo",r)},t.prototype.done=function(e){var t=e.todoId,r=o(e,["todoId"]),n="mark_as_done";return t&&(n=t+"/"+n),Xr.del(this,"todos/"+n,r)},t}(Kr),Eo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.add=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"projects/"+r+"/triggers",t)},t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/triggers",t)},t.prototype.edit=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,"projects/"+o+"/triggers/"+s,r)},t.prototype.pipeline=function(e,t,r,n){void 0===n&&(n={});var s=n.sudo,i=o(n,["sudo"]),a=encodeURIComponent(e),p=new L;return p.append("ref",t),p.append("token",r),Object.entries(i).forEach((function(e){var t=u(e,2),r=t[0],n=t[1];p.append("variables["+r+"]",n)})),Xr.post(this,"projects/"+a+"/trigger/pipeline",{sudo:s,form:p})},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/triggers/"+s,r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/triggers/"+s,r)},t}(Kr),So=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/vulnerability_findings",t)},t}(Kr),Ao=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){return Xr.get(this,"application/settings",e)},t.prototype.edit=function(e){return Xr.put(this,"application/settings",e)},t}(Kr),Po=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){return Xr.get(this,"broadcast_messages",e)},t.prototype.create=function(e){return Xr.post(this,"broadcast_messages",e)},t.prototype.edit=function(e,t){var r=encodeURIComponent(e);return Xr.put(this,"broadcast_messages/"+r,t)},t.prototype.remove=function(e){var t=encodeURIComponent(e);return Xr.del(this,"broadcast_messages/"+t)},t.prototype.show=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"broadcast_messages/"+r,t)},t}(Kr),To=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){return Xr.get(this,"events",e)},t}(Kr),xo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){return Xr.get(this,"features",e)},t.prototype.set=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"features/"+r,t)},t}(Kr),Lo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){return Xr.get(this,"geo_nodes",e)},t.prototype.create=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"geo_nodes/"+r,t)},t.prototype.edit=function(e,t){var r=encodeURIComponent(e);return Xr.put(this,"geo_nodes/"+r,t)},t.prototype.failures=function(e){return Xr.post(this,"geo_nodes/current/failures",e)},t.prototype.repair=function(e,t){var r=encodeURIComponent(e);return Xr.del(this,"geo_nodes/"+r,t)},t.prototype.show=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"geo_nodes/"+r,t)},t.prototype.status=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"geo_nodes/"+r+"/status",t)},t.prototype.statuses=function(e){return Xr.get(this,"geo_nodes/statuses",e)},t}(Kr),qo=function(e){function t(t){return e.call(this,"gitignores",t)||this}return r(t,e),t}(cn),Mo=function(e){function t(t){return e.call(this,"gitlab_ci_ymls",t)||this}return r(t,e),t}(cn),Bo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.show=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"keys/"+r,t)},t}(Kr),Oo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){return Xr.get(this,"licence",e)},t.prototype.create=function(e){return Xr.post(this,"licence",e)},t}(Kr),Do=function(e){function t(t){return e.call(this,"licences",t)||this}return r(t,e),t}(cn),No=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.lint=function(e,t){return Xr.post(this,"ci/lint",n({content:e},t))},t}(Kr),zo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){return Xr.get(this,"namespaces",e)},t.prototype.show=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"namespaces/"+r,t)},t}(Kr),Go=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){var t=e.projectId,r=e.groupId,n=o(e,["projectId","groupId"]),s="";return t?s+="projects/"+encodeURIComponent(t)+"/":r&&(s+="groups/"+encodeURIComponent(r)+"/"),Xr.get(this,s+"notification_settings",n)},t.prototype.edit=function(e){var t=e.projectId,r=e.groupId,n=o(e,["projectId","groupId"]),s="";return t?s+="projects/"+encodeURIComponent(t)+"/":r&&(s+="groups/"+encodeURIComponent(r)+"/"),Xr.put(this,s+"notification_settings",n)},t}(Kr),Fo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(e,t){return Xr.post(this,"markdown",n({text:e},t))},t}(Kr),Yo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){void 0===e&&(e={});var t=e.projectId,r=o(e,["projectId"]),n=t?"projects/"+encodeURIComponent(t)+"/":"";return Xr.get(this,n+"pages/domains",r)},t.prototype.create=function(e,t,r){var o=encodeURIComponent(e);return Xr.post(this,"projects/"+o+"/pages/domains",n({domain:t},r))},t.prototype.edit=function(e,t,r){var n=encodeURIComponent(e);return Xr.put(this,"projects/"+n+"/pages/domains/"+t,r)},t.prototype.show=function(e,t,r){var n=encodeURIComponent(e);return Xr.get(this,"projects/"+n+"/pages/domains/"+t,r)},t.prototype.remove=function(e,t,r){var n=encodeURIComponent(e);return Xr.del(this,"projects/"+n+"/pages/domains/"+t,r)},t}(Kr),Ho=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t,r){var s=r.projectId,i=r.groupId,u=o(r,["projectId","groupId"]),a="";return s?a+="projects/"+encodeURIComponent(s)+"/":i&&(a+="groups/"+encodeURIComponent(i)+"/"),Xr.get(this,a+"search",n({scope:e,search:t},u))},t}(Kr),Wo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.queueMetrics=function(){return Xr.get(this,"sidekiq/queue_metrics")},t.prototype.processMetrics=function(){return Xr.get(this,"sidekiq/process_metrics")},t.prototype.jobStats=function(){return Xr.get(this,"sidekiq/job_stats")},t.prototype.compoundMetrics=function(){return Xr.get(this,"sidekiq/compound_metrics")},t}(Kr),Ko=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e){var t=e.public,r=o(e,["public"]),n=t?"snippets/public":"snippets";return Xr.get(this,n,r)},t.prototype.content=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"snippets/"+r+"/raw",t)},t.prototype.create=function(e,t,r,o,s){return Xr.post(this,"snippets",n({title:e,fileName:t,content:r,visibility:o},s))},t.prototype.edit=function(e,t){var r=encodeURIComponent(e);return Xr.put(this,"snippets/"+r,t)},t.prototype.remove=function(e,t){var r=encodeURIComponent(e);return Xr.del(this,"snippets/"+r,t)},t.prototype.show=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"snippets/"+r,t)},t.prototype.userAgentDetails=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"snippets/"+r+"/user_agent_detail",t)},t}(Kr),Vo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.add=function(e,t){return Xr.post(this,"hooks",n({url:e},t))},t.prototype.all=function(e){return Xr.get(this,"hooks",e)},t.prototype.edit=function(e,t,r){var o=encodeURIComponent(e);return Xr.put(this,"hooks/"+o,n({url:t},r))},t.prototype.remove=function(e,t){var r=encodeURIComponent(e);return Xr.del(this,"hooks/"+r,t)},t}(Kr),Jo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.show=function(e){return Xr.get(this,"version",e)},t}(Kr),Xo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.all=function(e,t){var r=encodeURIComponent(e);return Xr.get(this,"projects/"+r+"/wikis",t)},t.prototype.create=function(e,t){var r=encodeURIComponent(e);return Xr.post(this,"projects/"+r+"/wikis",t)},t.prototype.edit=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.put(this,"projects/"+o+"/wikis/"+s,r)},t.prototype.show=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.get(this,"projects/"+o+"/wikis/"+s,r)},t.prototype.remove=function(e,t,r){var n=u([e,t].map(encodeURIComponent),2),o=n[0],s=n[1];return Xr.del(this,"projects/"+o+"/wikis/"+s,r)},t}(Kr),$o=Object.freeze({__proto__:null,Groups:$r,GroupAccessRequests:fn,GroupBadges:ln,GroupCustomAttributes:dn,GroupIssueBoards:mn,GroupMembers:yn,GroupMilestones:gn,GroupProjects:vn,GroupVariables:bn,GroupLabels:wn,Epics:Rn,EpicIssues:In,EpicNotes:Cn,EpicDiscussions:_n,Users:jn,UserCustomAttributes:Un,UserEmails:En,UserImpersonationTokens:Sn,UserKeys:Pn,UserGPGKeys:xn,Branches:Ln,Commits:qn,CommitDiscussions:Mn,ContainerRegistry:Bn,Deployments:On,DeployKeys:Dn,Environments:Nn,Issues:zn,IssuesStatistics:Gn,IssueNotes:Fn,IssueDiscussions:Yn,IssueAwardEmojis:Hn,Jobs:Wn,Labels:Kn,MergeRequests:Vn,MergeRequestAwardEmojis:Jn,MergeRequestDiscussions:Xn,MergeRequestNotes:$n,Packages:Zn,Pipelines:Qn,PipelineSchedules:eo,PipelineScheduleVariables:to,Projects:ro,ProjectAccessRequests:no,ProjectBadges:oo,ProjectCustomAttributes:so,ProjectImportExport:io,ProjectIssueBoards:uo,ProjectHooks:ao,ProjectMembers:po,ProjectMilestones:co,ProjectSnippets:ho,ProjectSnippetNotes:fo,ProjectSnippetDiscussions:lo,ProjectSnippetAwardEmojis:mo,ProtectedBranches:yo,ProtectedTags:go,ProjectVariables:vo,PushRules:bo,Releases:wo,ReleaseLinks:Ro,Repositories:Io,RepositoryFiles:Co,Runners:_o,Services:jo,Tags:Uo,Todos:ko,Triggers:Eo,VulnerabilityFindings:So,ApplicationSettings:Ao,BroadcastMessages:Po,Events:To,FeatureFlags:xo,GeoNodes:Lo,GitignoreTemplates:qo,GitLabCIYMLTemplates:Mo,Keys:Bo,Licence:Oo,LicenceTemplates:Do,Lint:No,Namespaces:zo,NotificationSettings:Go,Markdown:Fo,PagesDomains:Yo,Search:Ho,SidekiqMetrics:Wo,Snippets:Ko,SystemHooks:Vo,Version:Jo,Wikis:Xo}),Zo=Vr({Groups:$r,GroupAccessRequests:fn,GroupBadges:ln,GroupCustomAttributes:dn,GroupIssueBoards:mn,GroupMembers:yn,GroupMilestones:gn,GroupProjects:vn,GroupVariables:bn,GroupLabels:wn,Epics:Rn,EpicIssues:In,EpicNotes:Cn,EpicDiscussions:_n}),Qo=Vr({Users:jn,UserCustomAttributes:Un,UserEmails:En,UserImpersonationTokens:Sn,UserKeys:Pn,UserGPGKeys:xn}),es=Vr({Branches:Ln,Commits:qn,CommitDiscussions:Mn,ContainerRegistry:Bn,DeployKeys:Dn,Deployments:On,Environments:Nn,Issues:zn,IssuesStatistics:Gn,IssueAwardEmojis:Hn,IssueNotes:Fn,IssueDiscussions:Yn,Jobs:Wn,Labels:Kn,MergeRequests:Vn,MergeRequestAwardEmojis:Jn,MergeRequestDiscussions:Xn,MergeRequestNotes:$n,Packages:Zn,Pipelines:Qn,PipelineSchedules:eo,PipelineScheduleVariables:to,Projects:ro,ProjectAccessRequests:no,ProjectBadges:oo,ProjectCustomAttributes:so,ProjectImportExport:io,ProjectIssueBoards:uo,ProjectHooks:ao,ProjectMembers:po,ProjectMilestones:co,ProjectSnippets:ho,ProjectSnippetNotes:fo,ProjectSnippetDiscussions:lo,ProjectSnippetAwardEmojis:mo,ProtectedBranches:yo,ProtectedTags:go,ProjectVariables:vo,PushRules:bo,Releases:wo,ReleaseLinks:Ro,Repositories:Io,RepositoryFiles:Co,Runners:_o,Services:jo,Tags:Uo,Triggers:Eo,VulnerabilityFindings:So}),ts=Vr($o);e.ApplicationSettings=Ao,e.Branches=Ln,e.BroadcastMessages=Po,e.CommitDiscussions=Mn,e.Commits=qn,e.ContainerRegistry=Bn,e.DeployKeys=Dn,e.Deployments=On,e.Environments=Nn,e.EpicDiscussions=_n,e.EpicIssues=In,e.EpicNotes=Cn,e.Epics=Rn,e.Events=To,e.FeatureFlags=xo,e.GeoNodes=Lo,e.GitLabCIYMLTemplates=Mo,e.GitignoreTemplates=qo,e.Gitlab=ts,e.GroupAccessRequests=fn,e.GroupBadges=ln,e.GroupCustomAttributes=dn,e.GroupIssueBoards=mn,e.GroupLabels=wn,e.GroupMembers=yn,e.GroupMilestones=gn,e.GroupProjects=vn,e.GroupVariables=bn,e.Groups=$r,e.GroupsBundle=Zo,e.IssueAwardEmojis=Hn,e.IssueDiscussions=Yn,e.IssueNotes=Fn,e.Issues=zn,e.IssuesStatistics=Gn,e.Jobs=Wn,e.Keys=Bo,e.Labels=Kn,e.Licence=Oo,e.LicenceTemplates=Do,e.Lint=No,e.Markdown=Fo,e.MergeRequestAwardEmojis=Jn,e.MergeRequestDiscussions=Xn,e.MergeRequestNotes=$n,e.MergeRequests=Vn,e.Namespaces=zo,e.NotificationSettings=Go,e.Packages=Zn,e.PagesDomains=Yo,e.PipelineScheduleVariables=to,e.PipelineSchedules=eo,e.Pipelines=Qn,e.ProjectAccessRequests=no,e.ProjectBadges=oo,e.ProjectCustomAttributes=so,e.ProjectHooks=ao,e.ProjectImportExport=io,e.ProjectIssueBoards=uo,e.ProjectMembers=po,e.ProjectMilestones=co,e.ProjectSnippetAwardEmojis=mo,e.ProjectSnippetDiscussions=lo,e.ProjectSnippetNotes=fo,e.ProjectSnippets=ho,e.ProjectVariables=vo,e.Projects=ro,e.ProjectsBundle=es,e.ProtectedBranches=yo,e.ProtectedTags=go,e.PushRules=bo,e.ReleaseLinks=Ro,e.Releases=wo,e.Repositories=Io,e.RepositoryFiles=Co,e.Runners=_o,e.Search=Ho,e.Services=jo,e.SidekiqMetrics=Wo,e.Snippets=Ko,e.SystemHooks=Vo,e.Tags=Uo,e.Todos=ko,e.Triggers=Eo,e.UserCustomAttributes=Un,e.UserEmails=En,e.UserGPGKeys=xn,e.UserImpersonationTokens=Sn,e.UserKeys=Pn,e.Users=jn,e.UsersBundle=Qo,e.Version=Jo,e.VulnerabilityFindings=So,e.Wikis=Xo,Object.defineProperty(e,"__esModule",{value:!0})}));
17
\No newline at end of file