@ienlab/cloud-functions-library 1.0.0-dev.1 → 1.0.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{__vite-browser-external-C4yfM1ew.mjs → __vite-browser-external-c_Pnnbav.mjs} +1 -1
- package/dist/__vite-browser-external-icTJPY3u.js +1 -0
- package/dist/from-CGKydphu.js +4 -0
- package/dist/{from-BPj5eOuj.mjs → from-D3dnKIVz.mjs} +72 -61
- package/dist/index.d.ts +16 -25
- package/dist/index.js +20 -37
- package/dist/index.mjs +1066 -10859
- package/dist/{multipart-parser-D41wkGe-.js → multipart-parser-Bd_iuhOs.js} +1 -1
- package/dist/{multipart-parser-DOk5BsUv.js → multipart-parser-D-9NRMvP.js} +1 -1
- package/dist/{multipart-parser-D_l0qnsO.mjs → multipart-parser-D5aOiPJs.mjs} +2 -2
- package/dist/{multipart-parser-9TgDfPGH.mjs → multipart-parser-SLKKVZku.mjs} +2 -2
- package/dist/src-465bV1ib.js +3 -0
- package/dist/{src-CYCYovTl.mjs → src-CKwZC3do.mjs} +44 -45
- package/dist/src-DC-TnI7x.js +3 -0
- package/dist/{src-M25oq7Q_.mjs → src-DHa4ViES.mjs} +44 -45
- package/package.json +1 -1
- package/dist/__vite-browser-external-BrdF6Ba4.js +0 -1
- package/dist/dist-B3gFypMh.js +0 -5
- package/dist/dist-BHRQIx5i.mjs +0 -460
- package/dist/dist-CkUzyZvx.js +0 -1
- package/dist/dist-Cum8lv5j.mjs +0 -16
- package/dist/from-jzy6jn2J.js +0 -4
- package/dist/src-C0B8QY6h.js +0 -3
- package/dist/src-CNjb2Vfu.js +0 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./__vite-browser-external-icTJPY3u.js"),t=require("./from-CGKydphu.js");function n(e){let t=e.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!t)return;let n=t[2]||t[3]||``,r=n.slice(n.lastIndexOf(`\\`)+1);return r=r.replace(/%22/g,`"`),r=r.replace(/&#(\d{4});/g,(e,t)=>String.fromCharCode(t)),r}async function r(e,r){if(!/multipart/i.test(r))throw TypeError(`Failed to fetch`);let i=r.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!i)throw TypeError(`no or bad content-type header, no multipart boundary`);let a=new _(i[1]||i[2]),o,s,c,l,u,d,f=[],p=new t.n,m=e=>{c+=y.decode(e,{stream:!0})},h=e=>{f.push(e)},g=()=>{let e=new t.a(f,d,{type:u});p.append(l,e)},v=()=>{p.append(l,c)},y=new TextDecoder(`utf-8`);y.decode(),a.onPartBegin=function(){a.onPartData=m,a.onPartEnd=v,o=``,s=``,c=``,l=``,u=``,d=null,f.length=0},a.onHeaderField=function(e){o+=y.decode(e,{stream:!0})},a.onHeaderValue=function(e){s+=y.decode(e,{stream:!0})},a.onHeaderEnd=function(){if(s+=y.decode(),o=o.toLowerCase(),o===`content-disposition`){let e=s.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);e&&(l=e[2]||e[3]||``),d=n(s),d&&(a.onPartData=h,a.onPartEnd=g)}else o===`content-type`&&(u=s);s=``,o=``};for await(let t of e)a.write(t);return a.end(),p}var i,a,o,s,c,l,u,d,f,p,m,h,g,_;e.r((()=>{t.t(),t.i(),i=0,a={START_BOUNDARY:i++,HEADER_FIELD_START:i++,HEADER_FIELD:i++,HEADER_VALUE_START:i++,HEADER_VALUE:i++,HEADER_VALUE_ALMOST_DONE:i++,HEADERS_ALMOST_DONE:i++,PART_DATA_START:i++,PART_DATA:i++,END:i++},o=1,s={PART_BOUNDARY:o,LAST_BOUNDARY:o*=2},c=10,l=13,u=32,d=45,f=58,p=97,m=122,h=e=>e|32,g=()=>{},_=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=g,this.onHeaderField=g,this.onHeadersEnd=g,this.onHeaderValue=g,this.onPartBegin=g,this.onPartData=g,this.onPartEnd=g,this.boundaryChars={},e=`\r
|
|
2
2
|
--`+e;let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n),this.boundaryChars[t[n]]=!0;this.boundary=t,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=a.START_BOUNDARY}write(e){let t=0,n=e.length,r=this.index,{lookbehind:i,boundary:o,boundaryChars:g,index:_,state:v,flags:y}=this,b=this.boundary.length,x=b-1,S=e.length,C,w,T=e=>{this[e+`Mark`]=t},E=e=>{delete this[e+`Mark`]},D=(e,t,n,r)=>{(t===void 0||t!==n)&&this[e](r&&r.subarray(t,n))},O=(n,r)=>{let i=n+`Mark`;i in this&&(r?(D(n,this[i],t,e),delete this[i]):(D(n,this[i],e.length,e),this[i]=0))};for(t=0;t<n;t++)switch(C=e[t],v){case a.START_BOUNDARY:if(_===o.length-2){if(C===d)y|=s.LAST_BOUNDARY;else if(C!==l)return;_++;break}else if(_-1==o.length-2){if(y&s.LAST_BOUNDARY&&C===d)v=a.END,y=0;else if(!(y&s.LAST_BOUNDARY)&&C===c)_=0,D(`onPartBegin`),v=a.HEADER_FIELD_START;else return;break}C!==o[_+2]&&(_=-2),C===o[_+2]&&_++;break;case a.HEADER_FIELD_START:v=a.HEADER_FIELD,T(`onHeaderField`),_=0;case a.HEADER_FIELD:if(C===l){E(`onHeaderField`),v=a.HEADERS_ALMOST_DONE;break}if(_++,C===d)break;if(C===f){if(_===1)return;O(`onHeaderField`,!0),v=a.HEADER_VALUE_START;break}if(w=h(C),w<p||w>m)return;break;case a.HEADER_VALUE_START:if(C===u)break;T(`onHeaderValue`),v=a.HEADER_VALUE;case a.HEADER_VALUE:C===l&&(O(`onHeaderValue`,!0),D(`onHeaderEnd`),v=a.HEADER_VALUE_ALMOST_DONE);break;case a.HEADER_VALUE_ALMOST_DONE:if(C!==c)return;v=a.HEADER_FIELD_START;break;case a.HEADERS_ALMOST_DONE:if(C!==c)return;D(`onHeadersEnd`),v=a.PART_DATA_START;break;case a.PART_DATA_START:v=a.PART_DATA,T(`onPartData`);case a.PART_DATA:if(r=_,_===0){for(t+=x;t<S&&!(e[t]in g);)t+=b;t-=x,C=e[t]}if(_<o.length)o[_]===C?(_===0&&O(`onPartData`,!0),_++):_=0;else if(_===o.length)_++,C===l?y|=s.PART_BOUNDARY:C===d?y|=s.LAST_BOUNDARY:_=0;else if(_-1===o.length)if(y&s.PART_BOUNDARY){if(_=0,C===c){y&=~s.PART_BOUNDARY,D(`onPartEnd`),D(`onPartBegin`),v=a.HEADER_FIELD_START;break}}else y&s.LAST_BOUNDARY&&C===d?(D(`onPartEnd`),v=a.END,y=0):_=0;if(_>0)i[_-1]=C;else if(r>0){let e=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);D(`onPartData`,0,r,e),r=0,T(`onPartData`),t--}break;case a.END:break;default:throw Error(`Unexpected state entered: ${v}`)}O(`onHeaderField`),O(`onHeaderValue`),O(`onPartData`),this.index=_,this.state=v,this.flags=y}end(){if(this.state===a.HEADER_FIELD_START&&this.index===0||this.state===a.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==a.END)throw Error(`MultipartParser.end(): stream ended unexpectedly`)}}}))(),exports.toFormData=r;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(
|
|
1
|
+
const e=require("./__vite-browser-external-icTJPY3u.js"),t=require("./from-CGKydphu.js");function n(e){let t=e.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!t)return;let n=t[2]||t[3]||``,r=n.slice(n.lastIndexOf(`\\`)+1);return r=r.replace(/%22/g,`"`),r=r.replace(/&#(\d{4});/g,(e,t)=>String.fromCharCode(t)),r}async function r(e,r){if(!/multipart/i.test(r))throw TypeError(`Failed to fetch`);let i=r.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!i)throw TypeError(`no or bad content-type header, no multipart boundary`);let a=new _(i[1]||i[2]),o,s,c,l,u,d,f=[],p=new t.n,m=e=>{c+=y.decode(e,{stream:!0})},h=e=>{f.push(e)},g=()=>{let e=new t.a(f,d,{type:u});p.append(l,e)},v=()=>{p.append(l,c)},y=new TextDecoder(`utf-8`);y.decode(),a.onPartBegin=function(){a.onPartData=m,a.onPartEnd=v,o=``,s=``,c=``,l=``,u=``,d=null,f.length=0},a.onHeaderField=function(e){o+=y.decode(e,{stream:!0})},a.onHeaderValue=function(e){s+=y.decode(e,{stream:!0})},a.onHeaderEnd=function(){if(s+=y.decode(),o=o.toLowerCase(),o===`content-disposition`){let e=s.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);e&&(l=e[2]||e[3]||``),d=n(s),d&&(a.onPartData=h,a.onPartEnd=g)}else o===`content-type`&&(u=s);s=``,o=``};for await(let t of e)a.write(t);return a.end(),p}var i,a,o,s,c,l,u,d,f,p,m,h,g,_;e.r((()=>{t.t(),t.i(),i=0,a={START_BOUNDARY:i++,HEADER_FIELD_START:i++,HEADER_FIELD:i++,HEADER_VALUE_START:i++,HEADER_VALUE:i++,HEADER_VALUE_ALMOST_DONE:i++,HEADERS_ALMOST_DONE:i++,PART_DATA_START:i++,PART_DATA:i++,END:i++},o=1,s={PART_BOUNDARY:o,LAST_BOUNDARY:o*=2},c=10,l=13,u=32,d=45,f=58,p=97,m=122,h=e=>e|32,g=()=>{},_=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=g,this.onHeaderField=g,this.onHeadersEnd=g,this.onHeaderValue=g,this.onPartBegin=g,this.onPartData=g,this.onPartEnd=g,this.boundaryChars={},e=`\r
|
|
2
2
|
--`+e;let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n),this.boundaryChars[t[n]]=!0;this.boundary=t,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=a.START_BOUNDARY}write(e){let t=0,n=e.length,r=this.index,{lookbehind:i,boundary:o,boundaryChars:g,index:_,state:v,flags:y}=this,b=this.boundary.length,x=b-1,S=e.length,C,w,T=e=>{this[e+`Mark`]=t},E=e=>{delete this[e+`Mark`]},D=(e,t,n,r)=>{(t===void 0||t!==n)&&this[e](r&&r.subarray(t,n))},O=(n,r)=>{let i=n+`Mark`;i in this&&(r?(D(n,this[i],t,e),delete this[i]):(D(n,this[i],e.length,e),this[i]=0))};for(t=0;t<n;t++)switch(C=e[t],v){case a.START_BOUNDARY:if(_===o.length-2){if(C===d)y|=s.LAST_BOUNDARY;else if(C!==l)return;_++;break}else if(_-1==o.length-2){if(y&s.LAST_BOUNDARY&&C===d)v=a.END,y=0;else if(!(y&s.LAST_BOUNDARY)&&C===c)_=0,D(`onPartBegin`),v=a.HEADER_FIELD_START;else return;break}C!==o[_+2]&&(_=-2),C===o[_+2]&&_++;break;case a.HEADER_FIELD_START:v=a.HEADER_FIELD,T(`onHeaderField`),_=0;case a.HEADER_FIELD:if(C===l){E(`onHeaderField`),v=a.HEADERS_ALMOST_DONE;break}if(_++,C===d)break;if(C===f){if(_===1)return;O(`onHeaderField`,!0),v=a.HEADER_VALUE_START;break}if(w=h(C),w<p||w>m)return;break;case a.HEADER_VALUE_START:if(C===u)break;T(`onHeaderValue`),v=a.HEADER_VALUE;case a.HEADER_VALUE:C===l&&(O(`onHeaderValue`,!0),D(`onHeaderEnd`),v=a.HEADER_VALUE_ALMOST_DONE);break;case a.HEADER_VALUE_ALMOST_DONE:if(C!==c)return;v=a.HEADER_FIELD_START;break;case a.HEADERS_ALMOST_DONE:if(C!==c)return;D(`onHeadersEnd`),v=a.PART_DATA_START;break;case a.PART_DATA_START:v=a.PART_DATA,T(`onPartData`);case a.PART_DATA:if(r=_,_===0){for(t+=x;t<S&&!(e[t]in g);)t+=b;t-=x,C=e[t]}if(_<o.length)o[_]===C?(_===0&&O(`onPartData`,!0),_++):_=0;else if(_===o.length)_++,C===l?y|=s.PART_BOUNDARY:C===d?y|=s.LAST_BOUNDARY:_=0;else if(_-1===o.length)if(y&s.PART_BOUNDARY){if(_=0,C===c){y&=~s.PART_BOUNDARY,D(`onPartEnd`),D(`onPartBegin`),v=a.HEADER_FIELD_START;break}}else y&s.LAST_BOUNDARY&&C===d?(D(`onPartEnd`),v=a.END,y=0):_=0;if(_>0)i[_-1]=C;else if(r>0){let e=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);D(`onPartData`,0,r,e),r=0,T(`onPartData`),t--}break;case a.END:break;default:throw Error(`Unexpected state entered: ${v}`)}O(`onHeaderField`),O(`onHeaderValue`),O(`onPartData`),this.index=_,this.state=v,this.flags=y}end(){if(this.state===a.HEADER_FIELD_START&&this.index===0||this.state===a.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==a.END)throw Error(`MultipartParser.end(): stream ended unexpectedly`)}}}))(),exports.toFormData=r;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as e } from "./__vite-browser-external-
|
|
2
|
-
import { a as t, i as n, n as r, t as i } from "./from-
|
|
1
|
+
import { r as e } from "./__vite-browser-external-c_Pnnbav.mjs";
|
|
2
|
+
import { a as t, i as n, n as r, t as i } from "./from-D3dnKIVz.mjs";
|
|
3
3
|
//#region node_modules/gcp-metadata/node_modules/node-fetch/src/utils/multipart-parser.js
|
|
4
4
|
function a(e) {
|
|
5
5
|
let t = e.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as e } from "./__vite-browser-external-
|
|
2
|
-
import { a as t, i as n, n as r, t as i } from "./from-
|
|
1
|
+
import { r as e } from "./__vite-browser-external-c_Pnnbav.mjs";
|
|
2
|
+
import { a as t, i as n, n as r, t as i } from "./from-D3dnKIVz.mjs";
|
|
3
3
|
//#region node_modules/google-auth-library/node_modules/node-fetch/src/utils/multipart-parser.js
|
|
4
4
|
function a(e) {
|
|
5
5
|
let t = e.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const e=require("./__vite-browser-external-icTJPY3u.js"),t=require("./from-CGKydphu.js");var n,r=e.r((()=>{n=class extends Error{constructor(e,t){super(e),Error.captureStackTrace(this,this.constructor),this.type=t}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}})),i,a=e.r((()=>{r(),i=class extends n{constructor(e,t,n){super(e,t),n&&(this.code=this.errno=n.code,this.erroredSysCall=n.syscall)}}})),o,s,c,l,u,d,f=e.r((()=>{o=Symbol.toStringTag,s=e=>typeof e==`object`&&typeof e.append==`function`&&typeof e.delete==`function`&&typeof e.get==`function`&&typeof e.getAll==`function`&&typeof e.has==`function`&&typeof e.set==`function`&&typeof e.sort==`function`&&e[o]===`URLSearchParams`,c=e=>e&&typeof e==`object`&&typeof e.arrayBuffer==`function`&&typeof e.type==`string`&&typeof e.stream==`function`&&typeof e.constructor==`function`&&/^(Blob|File)$/.test(e[o]),l=e=>typeof e==`object`&&(e[o]===`AbortSignal`||e[o]===`EventTarget`),u=(e,t)=>{let n=new URL(t).hostname,r=new URL(e).hostname;return n===r||n.endsWith(`.${r}`)},d=(e,t)=>new URL(t).protocol===new URL(e).protocol}));async function p(e){if(e[v].disturbed)throw TypeError(`body used already for: ${e.url}`);if(e[v].disturbed=!0,e[v].error)throw e[v].error;let{body:t}=e;if(t===null||!(t instanceof m.default))return g.Buffer.alloc(0);let r=[],a=0;try{for await(let n of t){if(e.size>0&&a+n.length>e.size){let n=new i(`content size at ${e.url} over limit: ${e.size}`,`max-size`);throw t.destroy(n),n}a+=n.length,r.push(n)}}catch(t){throw t instanceof n?t:new i(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,`system`,t)}if(t.readableEnded===!0||t._readableState.ended===!0)try{return r.every(e=>typeof e==`string`)?g.Buffer.from(r.join(``)):g.Buffer.concat(r,a)}catch(t){throw new i(`Could not create Buffer from response body for ${e.url}: ${t.message}`,`system`,t)}else throw new i(`Premature close of server response while trying to fetch ${e.url}`)}var m,h,g,_,v,y,b,ee,x,te,S,C=e.r((()=>{m=e.o(e.t(),1),h=e.o(e.t(),1),g=e.o(e.t(),1),t.c(),t.i(),a(),r(),f(),_=(0,h.promisify)(m.default.pipeline),v=Symbol(`Body internals`),y=class{constructor(e,{size:r=0}={}){let a=null;e===null?e=null:s(e)?e=g.Buffer.from(e.toString()):c(e)||g.Buffer.isBuffer(e)||(h.types.isAnyArrayBuffer(e)?e=g.Buffer.from(e):ArrayBuffer.isView(e)?e=g.Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof m.default||(e instanceof t.n?(e=t.r(e),a=e.type.split(`=`)[1]):e=g.Buffer.from(String(e))));let o=e;g.Buffer.isBuffer(e)?o=m.default.Readable.from(e):c(e)&&(o=m.default.Readable.from(e.stream())),this[v]={body:e,stream:o,boundary:a,disturbed:!1,error:null},this.size=r,e instanceof m.default&&e.on(`error`,e=>{let t=e instanceof n?e:new i(`Invalid response body while trying to fetch ${this.url}: ${e.message}`,`system`,e);this[v].error=t})}get body(){return this[v].stream}get bodyUsed(){return this[v].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:t,byteLength:n}=await p(this);return e.slice(t,t+n)}async formData(){let e=this.headers.get(`content-type`);if(e.startsWith(`application/x-www-form-urlencoded`)){let e=new t.n,n=new URLSearchParams(await this.text());for(let[t,r]of n)e.append(t,r);return e}let{toFormData:n}=await Promise.resolve().then(()=>require("./multipart-parser-D-9NRMvP.js"));return n(this.body,e)}async blob(){let e=this.headers&&this.headers.get(`content-type`)||this[v].body&&this[v].body.type||``;return new t.s([await this.arrayBuffer()],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await p(this);return new TextDecoder().decode(e)}buffer(){return p(this)}},y.prototype.buffer=(0,h.deprecate)(y.prototype.buffer,`Please use 'response.arrayBuffer()' instead of 'response.buffer()'`,`node-fetch#buffer`),Object.defineProperties(y.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,h.deprecate)(()=>{},`data doesn't exist, use json(), text(), arrayBuffer(), or body instead`,`https://github.com/node-fetch/node-fetch/issues/1000 (response)`)}}),b=(e,t)=>{let n,r,{body:i}=e[v];if(e.bodyUsed)throw Error(`cannot clone body after it is used`);return i instanceof m.default&&typeof i.getBoundary!=`function`&&(n=new m.PassThrough({highWaterMark:t}),r=new m.PassThrough({highWaterMark:t}),i.pipe(n),i.pipe(r),e[v].stream=n,i=r),i},ee=(0,h.deprecate)(e=>e.getBoundary(),`form-data doesn't follow the spec and requires special treatment. Use alternative package`,`https://github.com/node-fetch/node-fetch/issues/1167`),x=(e,n)=>e===null?null:typeof e==`string`?`text/plain;charset=UTF-8`:s(e)?`application/x-www-form-urlencoded;charset=UTF-8`:c(e)?e.type||null:g.Buffer.isBuffer(e)||h.types.isAnyArrayBuffer(e)||ArrayBuffer.isView(e)?null:e instanceof t.n?`multipart/form-data; boundary=${n[v].boundary}`:e&&typeof e.getBoundary==`function`?`multipart/form-data;boundary=${ee(e)}`:e instanceof m.default?null:`text/plain;charset=UTF-8`,te=e=>{let{body:t}=e[v];return t===null?0:c(t)?t.size:g.Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync==`function`&&t.hasKnownLength&&t.hasKnownLength()?t.getLengthSync():null},S=async(e,{body:t})=>{t===null?e.end():await _(t,e)}}));function ne(e=[]){return new O(e.reduce((e,t,n,r)=>(n%2==0&&e.push(r.slice(n,n+2)),e),[]).filter(([e,t])=>{try{return E(e),D(e,String(t)),!0}catch{return!1}}))}var w,T,E,D,O,k=e.r((()=>{w=e.o(e.t(),1),T=e.o(e.t(),1),E=typeof T.default.validateHeaderName==`function`?T.default.validateHeaderName:e=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(e)){let t=TypeError(`Header name must be a valid HTTP token [${e}]`);throw Object.defineProperty(t,"code",{value:`ERR_INVALID_HTTP_TOKEN`}),t}},D=typeof T.default.validateHeaderValue==`function`?T.default.validateHeaderValue:(e,t)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(t)){let t=TypeError(`Invalid character in header content ["${e}"]`);throw Object.defineProperty(t,"code",{value:`ERR_INVALID_CHAR`}),t}},O=class e extends URLSearchParams{constructor(t){let n=[];if(t instanceof e){let e=t.raw();for(let[t,r]of Object.entries(e))n.push(...r.map(e=>[t,e]))}else if(t!=null)if(typeof t==`object`&&!w.types.isBoxedPrimitive(t)){let e=t[Symbol.iterator];if(e==null)n.push(...Object.entries(t));else{if(typeof e!=`function`)throw TypeError(`Header pairs must be iterable`);n=[...t].map(e=>{if(typeof e!=`object`||w.types.isBoxedPrimitive(e))throw TypeError(`Each header pair must be an iterable object`);return[...e]}).map(e=>{if(e.length!==2)throw TypeError(`Each header pair must be a name/value tuple`);return[...e]})}}else throw TypeError(`Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)`);return n=n.length>0?n.map(([e,t])=>(E(e),D(e,String(t)),[String(e).toLowerCase(),String(t)])):void 0,super(n),new Proxy(this,{get(e,t,n){switch(t){case`append`:case`set`:return(n,r)=>(E(n),D(n,String(r)),URLSearchParams.prototype[t].call(e,String(n).toLowerCase(),String(r)));case`delete`:case`has`:case`getAll`:return n=>(E(n),URLSearchParams.prototype[t].call(e,String(n).toLowerCase()));case`keys`:return()=>(e.sort(),new Set(URLSearchParams.prototype.keys.call(e)).keys());default:return Reflect.get(e,t,n)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let t=this.getAll(e);if(t.length===0)return null;let n=t.join(`, `);return/^content-encoding$/i.test(e)&&(n=n.toLowerCase()),n}forEach(e,t=void 0){for(let n of this.keys())Reflect.apply(e,t,[this.get(n),n,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,t)=>(e[t]=this.getAll(t),e),{})}[Symbol.for(`nodejs.util.inspect.custom`)](){return[...this.keys()].reduce((e,t)=>{let n=this.getAll(t);return t===`host`?e[t]=n[0]:e[t]=n.length>1?n:n[0],e},{})}},Object.defineProperties(O.prototype,[`get`,`entries`,`forEach`,`values`].reduce((e,t)=>(e[t]={enumerable:!0},e),{}))})),A,j,M=e.r((()=>{A=new Set([301,302,303,307,308]),j=e=>A.has(e)})),N,P,re=e.r((()=>{k(),C(),M(),N=Symbol(`Response internals`),P=class e extends y{constructor(e=null,t={}){super(e,t);let n=t.status==null?200:t.status,r=new O(t.headers);if(e!==null&&!r.has(`Content-Type`)){let t=x(e,this);t&&r.append(`Content-Type`,t)}this[N]={type:`default`,url:t.url,status:n,statusText:t.statusText||``,headers:r,counter:t.counter,highWaterMark:t.highWaterMark}}get type(){return this[N].type}get url(){return this[N].url||``}get status(){return this[N].status}get ok(){return this[N].status>=200&&this[N].status<300}get redirected(){return this[N].counter>0}get statusText(){return this[N].statusText}get headers(){return this[N].headers}get highWaterMark(){return this[N].highWaterMark}clone(){return new e(b(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(t,n=302){if(!j(n))throw RangeError(`Failed to execute "redirect" on "response": Invalid status code`);return new e(null,{headers:{location:new URL(t).toString()},status:n})}static error(){let t=new e(null,{status:0,statusText:``});return t[N].type=`error`,t}static json(t=void 0,n={}){let r=JSON.stringify(t);if(r===void 0)throw TypeError(`data is not JSON serializable`);let i=new O(n&&n.headers);return i.has(`content-type`)||i.set(`content-type`,`application/json`),new e(r,{...n,headers:i})}get[Symbol.toStringTag](){return`Response`}},Object.defineProperties(P.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}})})),F,ie=e.r((()=>{F=e=>{if(e.search)return e.search;let t=e.href.length-1,n=e.hash||(e.href[t]===`#`?`#`:``);return e.href[t-n.length]===`?`?`?`:``}}));function I(e,t=!1){return e==null||(e=new URL(e),/^(about|blob|data):$/.test(e.protocol))?`no-referrer`:(e.username=``,e.password=``,e.hash=``,t&&(e.pathname=``,e.search=``),e)}function ae(e){if(!z.has(e))throw TypeError(`Invalid referrerPolicy: ${e}`);return e}function oe(e){if(/^(http|ws)s:$/.test(e.protocol))return!0;let t=e.host.replace(/(^\[)|(]$)/g,``),n=(0,R.isIP)(t);return n===4&&/^127\./.test(t)||n===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(t)?!0:e.host===`localhost`||e.host.endsWith(`.localhost`)?!1:e.protocol===`file:`}function L(e){return/^about:(blank|srcdoc)$/.test(e)||e.protocol===`data:`||/^(blob|filesystem):$/.test(e.protocol)?!0:oe(e)}function se(e,{referrerURLCallback:t,referrerOriginCallback:n}={}){if(e.referrer===`no-referrer`||e.referrerPolicy===``)return null;let r=e.referrerPolicy;if(e.referrer===`about:client`)return`no-referrer`;let i=e.referrer,a=I(i),o=I(i,!0);a.toString().length>4096&&(a=o),t&&(a=t(a)),n&&(o=n(o));let s=new URL(e.url);switch(r){case`no-referrer`:return`no-referrer`;case`origin`:return o;case`unsafe-url`:return a;case`strict-origin`:return L(a)&&!L(s)?`no-referrer`:o.toString();case`strict-origin-when-cross-origin`:return a.origin===s.origin?a:L(a)&&!L(s)?`no-referrer`:o;case`same-origin`:return a.origin===s.origin?a:`no-referrer`;case`origin-when-cross-origin`:return a.origin===s.origin?a:o;case`no-referrer-when-downgrade`:return L(a)&&!L(s)?`no-referrer`:a;default:throw TypeError(`Invalid referrerPolicy: ${r}`)}}function ce(e){let t=(e.get(`referrer-policy`)||``).split(/[,\s]+/),n=``;for(let e of t)e&&z.has(e)&&(n=e);return n}var R,z,B,V=e.r((()=>{R=e.o(e.t(),1),z=new Set([``,`no-referrer`,`no-referrer-when-downgrade`,`same-origin`,`origin`,`strict-origin`,`origin-when-cross-origin`,`strict-origin-when-cross-origin`,`unsafe-url`]),B=`strict-origin-when-cross-origin`})),H,U,W,G,K,q,J,le=e.r((()=>{H=e.o(e.t(),1),U=e.o(e.t(),1),k(),C(),f(),ie(),V(),W=Symbol(`Request internals`),G=e=>typeof e==`object`&&typeof e[W]==`object`,K=(0,U.deprecate)(()=>{},`.data is not a valid RequestInit property, use .body instead`,`https://github.com/node-fetch/node-fetch/issues/1000 (request)`),q=class e extends y{constructor(e,t={}){let n;if(G(e)?n=new URL(e.url):(n=new URL(e),e={}),n.username!==``||n.password!==``)throw TypeError(`${n} is an url with embedded credentials.`);let r=t.method||e.method||`GET`;if(/^(delete|get|head|options|post|put)$/i.test(r)&&(r=r.toUpperCase()),!G(t)&&`data`in t&&K(),(t.body!=null||G(e)&&e.body!==null)&&(r===`GET`||r===`HEAD`))throw TypeError(`Request with GET/HEAD method cannot have body`);let i=t.body?t.body:G(e)&&e.body!==null?b(e):null;super(i,{size:t.size||e.size||0});let a=new O(t.headers||e.headers||{});if(i!==null&&!a.has(`Content-Type`)){let e=x(i,this);e&&a.set(`Content-Type`,e)}let o=G(e)?e.signal:null;if(`signal`in t&&(o=t.signal),o!=null&&!l(o))throw TypeError(`Expected signal to be an instanceof AbortSignal or EventTarget`);let s=t.referrer==null?e.referrer:t.referrer;if(s===``)s=`no-referrer`;else if(s){let e=new URL(s);s=/^about:(\/\/)?client$/.test(e)?`client`:e}else s=void 0;this[W]={method:r,redirect:t.redirect||e.redirect||`follow`,headers:a,parsedURL:n,signal:o,referrer:s},this.follow=t.follow===void 0?e.follow===void 0?20:e.follow:t.follow,this.compress=t.compress===void 0?e.compress===void 0?!0:e.compress:t.compress,this.counter=t.counter||e.counter||0,this.agent=t.agent||e.agent,this.highWaterMark=t.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=t.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=t.referrerPolicy||e.referrerPolicy||``}get method(){return this[W].method}get url(){return(0,H.format)(this[W].parsedURL)}get headers(){return this[W].headers}get redirect(){return this[W].redirect}get signal(){return this[W].signal}get referrer(){if(this[W].referrer===`no-referrer`)return``;if(this[W].referrer===`client`)return`about:client`;if(this[W].referrer)return this[W].referrer.toString()}get referrerPolicy(){return this[W].referrerPolicy}set referrerPolicy(e){this[W].referrerPolicy=ae(e)}clone(){return new e(this)}get[Symbol.toStringTag](){return`Request`}},Object.defineProperties(q.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}}),J=e=>{let{parsedURL:t}=e[W],n=new O(e[W].headers);n.has(`Accept`)||n.set(`Accept`,`*/*`);let r=null;if(e.body===null&&/^(post|put)$/i.test(e.method)&&(r=`0`),e.body!==null){let t=te(e);typeof t==`number`&&!Number.isNaN(t)&&(r=String(t))}r&&n.set(`Content-Length`,r),e.referrerPolicy===``&&(e.referrerPolicy=B),e.referrer&&e.referrer!==`no-referrer`?e[W].referrer=se(e):e[W].referrer=`no-referrer`,e[W].referrer instanceof URL&&n.set(`Referer`,e.referrer),n.has(`User-Agent`)||n.set(`User-Agent`,`node-fetch`),e.compress&&!n.has(`Accept-Encoding`)&&n.set(`Accept-Encoding`,`gzip, deflate, br`);let{agent:i}=e;typeof i==`function`&&(i=i(t));let a=F(t);return{parsedURL:t,options:{path:t.pathname+a,method:e.method,headers:n[Symbol.for(`nodejs.util.inspect.custom`)](),insecureHTTPParser:e.insecureHTTPParser,agent:i}}}})),Y,ue=e.r((()=>{r(),Y=class extends n{constructor(e,t=`aborted`){super(e,t)}}}));async function X(e,n){return new Promise((r,a)=>{let o=new q(e,n),{parsedURL:s,options:c}=J(o);if(!me.has(s.protocol))throw TypeError(`node-fetch cannot load ${e}. URL scheme "${s.protocol.replace(/:$/,``)}" is not supported.`);if(s.protocol===`data:`){let e=t.l(o.url);r(new P(e,{headers:{"Content-Type":e.typeFull}}));return}let l=(s.protocol===`https:`?pe.default:fe.default).request,{signal:f}=o,p=null,m=()=>{let e=new Y(`The operation was aborted.`);a(e),o.body&&o.body instanceof Q.default.Readable&&o.body.destroy(e),!(!p||!p.body)&&p.body.emit(`error`,e)};if(f&&f.aborted){m();return}let h=()=>{m(),_()},g=l(s.toString(),c);f&&f.addEventListener(`abort`,h);let _=()=>{g.abort(),f&&f.removeEventListener(`abort`,h)};g.on(`error`,e=>{a(new i(`request to ${o.url} failed, reason: ${e.message}`,`system`,e)),_()}),de(g,e=>{p&&p.body&&p.body.destroy(e)}),process.version<`v14`&&g.on(`socket`,e=>{let t;e.prependListener(`end`,()=>{t=e._eventsCount}),e.prependListener(`close`,n=>{if(p&&t<e._eventsCount&&!n){let e=Error(`Premature close`);e.code=`ERR_STREAM_PREMATURE_CLOSE`,p.body.emit(`error`,e)}})}),g.on(`response`,e=>{g.setTimeout(0);let t=ne(e.rawHeaders);if(j(e.statusCode)){let s=t.get(`Location`),c=null;try{c=s===null?null:new URL(s,o.url)}catch{if(o.redirect!==`manual`){a(new i(`uri requested responds with an invalid redirect URL: ${s}`,`invalid-redirect`)),_();return}}switch(o.redirect){case`error`:a(new i(`uri requested responds with a redirect, redirect mode is set to error: ${o.url}`,`no-redirect`)),_();return;case`manual`:break;case`follow`:{if(c===null)break;if(o.counter>=o.follow){a(new i(`maximum redirect reached at: ${o.url}`,`max-redirect`)),_();return}let s={headers:new O(o.headers),follow:o.follow,counter:o.counter+1,agent:o.agent,compress:o.compress,method:o.method,body:b(o),signal:o.signal,size:o.size,referrer:o.referrer,referrerPolicy:o.referrerPolicy};if(!u(o.url,c)||!d(o.url,c))for(let e of[`authorization`,`www-authenticate`,`cookie`,`cookie2`])s.headers.delete(e);if(e.statusCode!==303&&o.body&&n.body instanceof Q.default.Readable){a(new i(`Cannot follow redirect with body being a readable stream`,`unsupported-redirect`)),_();return}(e.statusCode===303||(e.statusCode===301||e.statusCode===302)&&o.method===`POST`)&&(s.method=`GET`,s.body=void 0,s.headers.delete(`content-length`));let l=ce(t);l&&(s.referrerPolicy=l),r(X(new q(c,s))),_();return}default:return a(TypeError(`Redirect option '${o.redirect}' is not a valid value of RequestRedirect`))}}f&&e.once(`end`,()=>{f.removeEventListener(`abort`,h)});let s=(0,Q.pipeline)(e,new Q.PassThrough,e=>{e&&a(e)});process.version<`v12.10`&&e.on(`aborted`,h);let c={url:o.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:o.size,counter:o.counter,highWaterMark:o.highWaterMark},l=t.get(`Content-Encoding`);if(!o.compress||o.method===`HEAD`||l===null||e.statusCode===204||e.statusCode===304){p=new P(s,c),r(p);return}let m={flush:Z.default.Z_SYNC_FLUSH,finishFlush:Z.default.Z_SYNC_FLUSH};if(l===`gzip`||l===`x-gzip`){s=(0,Q.pipeline)(s,Z.default.createGunzip(m),e=>{e&&a(e)}),p=new P(s,c),r(p);return}if(l===`deflate`||l===`x-deflate`){let t=(0,Q.pipeline)(e,new Q.PassThrough,e=>{e&&a(e)});t.once(`data`,e=>{s=(e[0]&15)==8?(0,Q.pipeline)(s,Z.default.createInflate(),e=>{e&&a(e)}):(0,Q.pipeline)(s,Z.default.createInflateRaw(),e=>{e&&a(e)}),p=new P(s,c),r(p)}),t.once(`end`,()=>{p||(p=new P(s,c),r(p))});return}if(l===`br`){s=(0,Q.pipeline)(s,Z.default.createBrotliDecompress(),e=>{e&&a(e)}),p=new P(s,c),r(p);return}p=new P(s,c),r(p)}),S(g,o).catch(a)})}function de(e,t){let n=$.Buffer.from(`0\r
|
|
2
|
+
\r
|
|
3
|
+
`),r=!1,i=!1,a;e.on(`response`,e=>{let{headers:t}=e;r=t[`transfer-encoding`]===`chunked`&&!t[`content-length`]}),e.on(`socket`,o=>{let s=()=>{if(r&&!i){let e=Error(`Premature close`);e.code=`ERR_STREAM_PREMATURE_CLOSE`,t(e)}},c=e=>{i=$.Buffer.compare(e.slice(-5),n)===0,!i&&a&&(i=$.Buffer.compare(a.slice(-3),n.slice(0,3))===0&&$.Buffer.compare(e.slice(-2),n.slice(3))===0),a=e};o.prependListener(`close`,s),o.on(`data`,c),e.on(`close`,()=>{o.removeListener(`close`,s),o.removeListener(`data`,c)})})}var fe,pe,Z,Q,$,me;e.r((()=>{fe=e.o(e.t(),1),pe=e.o(e.t(),1),Z=e.o(e.t(),1),Q=e.o(e.t(),1),$=e.o(e.t(),1),t.u(),C(),re(),k(),le(),a(),ue(),M(),t.i(),f(),V(),t.t(),me=new Set([`data:`,`http:`,`https:`])}))(),exports.default=X;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { r as e, s as t, t as n } from "./__vite-browser-external-
|
|
2
|
-
import { n as r, t as
|
|
3
|
-
import { i as a, n as o, o as s, r as c, s as l, t as u } from "./from-BPj5eOuj.mjs";
|
|
1
|
+
import { r as e, s as t, t as n } from "./__vite-browser-external-c_Pnnbav.mjs";
|
|
2
|
+
import { c as r, i, l as a, n as o, r as s, s as c, t as l, u } from "./from-D3dnKIVz.mjs";
|
|
4
3
|
//#region node_modules/google-auth-library/node_modules/node-fetch/src/errors/base.js
|
|
5
4
|
var d, f = e((() => {
|
|
6
5
|
d = class extends Error {
|
|
@@ -54,10 +53,10 @@ async function b(e) {
|
|
|
54
53
|
else throw new p(`Premature close of server response while trying to fetch ${e.url}`);
|
|
55
54
|
}
|
|
56
55
|
var x, S, C, ne, w, T, E, D, O, re, ie, k = e((() => {
|
|
57
|
-
x = /* @__PURE__ */ t(n(), 1), S = /* @__PURE__ */ t(n(), 1), C = /* @__PURE__ */ t(n(), 1),
|
|
56
|
+
x = /* @__PURE__ */ t(n(), 1), S = /* @__PURE__ */ t(n(), 1), C = /* @__PURE__ */ t(n(), 1), r(), i(), m(), f(), y(), ne = (0, S.promisify)(x.default.pipeline), w = Symbol("Body internals"), T = class {
|
|
58
57
|
constructor(e, { size: t = 0 } = {}) {
|
|
59
58
|
let n = null;
|
|
60
|
-
e === null ? e = null : g(e) ? e = C.Buffer.from(e.toString()) : _(e) || C.Buffer.isBuffer(e) || (S.types.isAnyArrayBuffer(e) ? e = C.Buffer.from(e) : ArrayBuffer.isView(e) ? e = C.Buffer.from(e.buffer, e.byteOffset, e.byteLength) : e instanceof x.default || (e instanceof o ? (e =
|
|
59
|
+
e === null ? e = null : g(e) ? e = C.Buffer.from(e.toString()) : _(e) || C.Buffer.isBuffer(e) || (S.types.isAnyArrayBuffer(e) ? e = C.Buffer.from(e) : ArrayBuffer.isView(e) ? e = C.Buffer.from(e.buffer, e.byteOffset, e.byteLength) : e instanceof x.default || (e instanceof o ? (e = s(e), n = e.type.split("=")[1]) : e = C.Buffer.from(String(e))));
|
|
61
60
|
let r = e;
|
|
62
61
|
C.Buffer.isBuffer(e) ? r = x.default.Readable.from(e) : _(e) && (r = x.default.Readable.from(e.stream())), this[w] = {
|
|
63
62
|
body: e,
|
|
@@ -87,12 +86,12 @@ var x, S, C, ne, w, T, E, D, O, re, ie, k = e((() => {
|
|
|
87
86
|
for (let [n, r] of t) e.append(n, r);
|
|
88
87
|
return e;
|
|
89
88
|
}
|
|
90
|
-
let { toFormData: t } = await import("./multipart-parser-
|
|
89
|
+
let { toFormData: t } = await import("./multipart-parser-SLKKVZku.mjs");
|
|
91
90
|
return t(this.body, e);
|
|
92
91
|
}
|
|
93
92
|
async blob() {
|
|
94
93
|
let e = this.headers && this.headers.get("content-type") || this[w].body && this[w].body.type || "";
|
|
95
|
-
return new
|
|
94
|
+
return new c([await this.arrayBuffer()], { type: e });
|
|
96
95
|
}
|
|
97
96
|
async json() {
|
|
98
97
|
let e = await this.text();
|
|
@@ -488,16 +487,16 @@ var U, W, G, K = e((() => {
|
|
|
488
487
|
//#region node_modules/google-auth-library/node_modules/node-fetch/src/index.js
|
|
489
488
|
async function ye(e, t) {
|
|
490
489
|
return new Promise((n, r) => {
|
|
491
|
-
let
|
|
490
|
+
let i = new X(e, t), { parsedURL: o, options: s } = he(i);
|
|
492
491
|
if (!Ce.has(o.protocol)) throw TypeError(`node-fetch cannot load ${e}. URL scheme "${o.protocol.replace(/:$/, "")}" is not supported.`);
|
|
493
492
|
if (o.protocol === "data:") {
|
|
494
|
-
let e = i
|
|
493
|
+
let e = a(i.url);
|
|
495
494
|
n(new z(e, { headers: { "Content-Type": e.typeFull } }));
|
|
496
495
|
return;
|
|
497
496
|
}
|
|
498
|
-
let c = (o.protocol === "https:" ? Se.default : xe.default).request, { signal: l } =
|
|
497
|
+
let c = (o.protocol === "https:" ? Se.default : xe.default).request, { signal: l } = i, u = null, d = () => {
|
|
499
498
|
let e = new _e("The operation was aborted.");
|
|
500
|
-
r(e),
|
|
499
|
+
r(e), i.body && i.body instanceof Q.default.Readable && i.body.destroy(e), !(!u || !u.body) && u.body.emit("error", e);
|
|
501
500
|
};
|
|
502
501
|
if (l && l.aborted) {
|
|
503
502
|
d();
|
|
@@ -511,7 +510,7 @@ async function ye(e, t) {
|
|
|
511
510
|
m.abort(), l && l.removeEventListener("abort", f);
|
|
512
511
|
};
|
|
513
512
|
m.on("error", (e) => {
|
|
514
|
-
r(new p(`request to ${
|
|
513
|
+
r(new p(`request to ${i.url} failed, reason: ${e.message}`, "system", e)), h();
|
|
515
514
|
}), be(m, (e) => {
|
|
516
515
|
u && u.body && u.body.destroy(e);
|
|
517
516
|
}), process.version < "v14" && m.on("socket", (e) => {
|
|
@@ -526,57 +525,57 @@ async function ye(e, t) {
|
|
|
526
525
|
});
|
|
527
526
|
}), m.on("response", (e) => {
|
|
528
527
|
m.setTimeout(0);
|
|
529
|
-
let
|
|
528
|
+
let a = ae(e.rawHeaders);
|
|
530
529
|
if (L(e.statusCode)) {
|
|
531
|
-
let o =
|
|
530
|
+
let o = a.get("Location"), s = null;
|
|
532
531
|
try {
|
|
533
|
-
s = o === null ? null : new URL(o,
|
|
532
|
+
s = o === null ? null : new URL(o, i.url);
|
|
534
533
|
} catch {
|
|
535
|
-
if (
|
|
534
|
+
if (i.redirect !== "manual") {
|
|
536
535
|
r(new p(`uri requested responds with an invalid redirect URL: ${o}`, "invalid-redirect")), h();
|
|
537
536
|
return;
|
|
538
537
|
}
|
|
539
538
|
}
|
|
540
|
-
switch (
|
|
539
|
+
switch (i.redirect) {
|
|
541
540
|
case "error":
|
|
542
|
-
r(new p(`uri requested responds with a redirect, redirect mode is set to error: ${
|
|
541
|
+
r(new p(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`, "no-redirect")), h();
|
|
543
542
|
return;
|
|
544
543
|
case "manual": break;
|
|
545
544
|
case "follow": {
|
|
546
545
|
if (s === null) break;
|
|
547
|
-
if (
|
|
548
|
-
r(new p(`maximum redirect reached at: ${
|
|
546
|
+
if (i.counter >= i.follow) {
|
|
547
|
+
r(new p(`maximum redirect reached at: ${i.url}`, "max-redirect")), h();
|
|
549
548
|
return;
|
|
550
549
|
}
|
|
551
550
|
let o = {
|
|
552
|
-
headers: new P(
|
|
553
|
-
follow:
|
|
554
|
-
counter:
|
|
555
|
-
agent:
|
|
556
|
-
compress:
|
|
557
|
-
method:
|
|
558
|
-
body: E(
|
|
559
|
-
signal:
|
|
560
|
-
size:
|
|
561
|
-
referrer:
|
|
562
|
-
referrerPolicy:
|
|
551
|
+
headers: new P(i.headers),
|
|
552
|
+
follow: i.follow,
|
|
553
|
+
counter: i.counter + 1,
|
|
554
|
+
agent: i.agent,
|
|
555
|
+
compress: i.compress,
|
|
556
|
+
method: i.method,
|
|
557
|
+
body: E(i),
|
|
558
|
+
signal: i.signal,
|
|
559
|
+
size: i.size,
|
|
560
|
+
referrer: i.referrer,
|
|
561
|
+
referrerPolicy: i.referrerPolicy
|
|
563
562
|
};
|
|
564
|
-
if (!v(
|
|
563
|
+
if (!v(i.url, s) || !te(i.url, s)) for (let e of [
|
|
565
564
|
"authorization",
|
|
566
565
|
"www-authenticate",
|
|
567
566
|
"cookie",
|
|
568
567
|
"cookie2"
|
|
569
568
|
]) o.headers.delete(e);
|
|
570
|
-
if (e.statusCode !== 303 &&
|
|
569
|
+
if (e.statusCode !== 303 && i.body && t.body instanceof Q.default.Readable) {
|
|
571
570
|
r(new p("Cannot follow redirect with body being a readable stream", "unsupported-redirect")), h();
|
|
572
571
|
return;
|
|
573
572
|
}
|
|
574
|
-
(e.statusCode === 303 || (e.statusCode === 301 || e.statusCode === 302) &&
|
|
575
|
-
let c = fe(
|
|
573
|
+
(e.statusCode === 303 || (e.statusCode === 301 || e.statusCode === 302) && i.method === "POST") && (o.method = "GET", o.body = void 0, o.headers.delete("content-length"));
|
|
574
|
+
let c = fe(a);
|
|
576
575
|
c && (o.referrerPolicy = c), n(ye(new X(s, o))), h();
|
|
577
576
|
return;
|
|
578
577
|
}
|
|
579
|
-
default: return r(/* @__PURE__ */ TypeError(`Redirect option '${
|
|
578
|
+
default: return r(/* @__PURE__ */ TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`));
|
|
580
579
|
}
|
|
581
580
|
}
|
|
582
581
|
l && e.once("end", () => {
|
|
@@ -588,15 +587,15 @@ async function ye(e, t) {
|
|
|
588
587
|
/* c8 ignore next 3 */
|
|
589
588
|
process.version < "v12.10" && e.on("aborted", f);
|
|
590
589
|
let s = {
|
|
591
|
-
url:
|
|
590
|
+
url: i.url,
|
|
592
591
|
status: e.statusCode,
|
|
593
592
|
statusText: e.statusMessage,
|
|
594
|
-
headers:
|
|
595
|
-
size:
|
|
596
|
-
counter:
|
|
597
|
-
highWaterMark:
|
|
598
|
-
}, c =
|
|
599
|
-
if (!
|
|
593
|
+
headers: a,
|
|
594
|
+
size: i.size,
|
|
595
|
+
counter: i.counter,
|
|
596
|
+
highWaterMark: i.highWaterMark
|
|
597
|
+
}, c = a.get("Content-Encoding");
|
|
598
|
+
if (!i.compress || i.method === "HEAD" || c === null || e.statusCode === 204 || e.statusCode === 304) {
|
|
600
599
|
u = new z(o, s), n(u);
|
|
601
600
|
return;
|
|
602
601
|
}
|
|
@@ -632,7 +631,7 @@ async function ye(e, t) {
|
|
|
632
631
|
return;
|
|
633
632
|
}
|
|
634
633
|
u = new z(o, s), n(u);
|
|
635
|
-
}), ie(m,
|
|
634
|
+
}), ie(m, i).catch(r);
|
|
636
635
|
});
|
|
637
636
|
}
|
|
638
637
|
function be(e, t) {
|
|
@@ -657,7 +656,7 @@ function be(e, t) {
|
|
|
657
656
|
var xe, Se, Z, Q, $, Ce;
|
|
658
657
|
//#endregion
|
|
659
658
|
e((() => {
|
|
660
|
-
xe = /* @__PURE__ */ t(n(), 1), Se = /* @__PURE__ */ t(n(), 1), Z = /* @__PURE__ */ t(n(), 1), Q = /* @__PURE__ */ t(n(), 1), $ = /* @__PURE__ */ t(n(), 1),
|
|
659
|
+
xe = /* @__PURE__ */ t(n(), 1), Se = /* @__PURE__ */ t(n(), 1), Z = /* @__PURE__ */ t(n(), 1), Q = /* @__PURE__ */ t(n(), 1), $ = /* @__PURE__ */ t(n(), 1), u(), k(), se(), F(), ge(), m(), ve(), oe(), i(), y(), K(), l(), Ce = new Set([
|
|
661
660
|
"data:",
|
|
662
661
|
"http:",
|
|
663
662
|
"https:"
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const e=require("./__vite-browser-external-icTJPY3u.js"),t=require("./from-CGKydphu.js");var n,r=e.r((()=>{n=class extends Error{constructor(e,t){super(e),Error.captureStackTrace(this,this.constructor),this.type=t}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}})),i,a=e.r((()=>{r(),i=class extends n{constructor(e,t,n){super(e,t),n&&(this.code=this.errno=n.code,this.erroredSysCall=n.syscall)}}})),o,s,c,l,u,d,f=e.r((()=>{o=Symbol.toStringTag,s=e=>typeof e==`object`&&typeof e.append==`function`&&typeof e.delete==`function`&&typeof e.get==`function`&&typeof e.getAll==`function`&&typeof e.has==`function`&&typeof e.set==`function`&&typeof e.sort==`function`&&e[o]===`URLSearchParams`,c=e=>e&&typeof e==`object`&&typeof e.arrayBuffer==`function`&&typeof e.type==`string`&&typeof e.stream==`function`&&typeof e.constructor==`function`&&/^(Blob|File)$/.test(e[o]),l=e=>typeof e==`object`&&(e[o]===`AbortSignal`||e[o]===`EventTarget`),u=(e,t)=>{let n=new URL(t).hostname,r=new URL(e).hostname;return n===r||n.endsWith(`.${r}`)},d=(e,t)=>new URL(t).protocol===new URL(e).protocol}));async function p(e){if(e[v].disturbed)throw TypeError(`body used already for: ${e.url}`);if(e[v].disturbed=!0,e[v].error)throw e[v].error;let{body:t}=e;if(t===null||!(t instanceof m.default))return g.Buffer.alloc(0);let r=[],a=0;try{for await(let n of t){if(e.size>0&&a+n.length>e.size){let n=new i(`content size at ${e.url} over limit: ${e.size}`,`max-size`);throw t.destroy(n),n}a+=n.length,r.push(n)}}catch(t){throw t instanceof n?t:new i(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,`system`,t)}if(t.readableEnded===!0||t._readableState.ended===!0)try{return r.every(e=>typeof e==`string`)?g.Buffer.from(r.join(``)):g.Buffer.concat(r,a)}catch(t){throw new i(`Could not create Buffer from response body for ${e.url}: ${t.message}`,`system`,t)}else throw new i(`Premature close of server response while trying to fetch ${e.url}`)}var m,h,g,_,v,y,b,ee,x,te,S,C=e.r((()=>{m=e.o(e.t(),1),h=e.o(e.t(),1),g=e.o(e.t(),1),t.c(),t.i(),a(),r(),f(),_=(0,h.promisify)(m.default.pipeline),v=Symbol(`Body internals`),y=class{constructor(e,{size:r=0}={}){let a=null;e===null?e=null:s(e)?e=g.Buffer.from(e.toString()):c(e)||g.Buffer.isBuffer(e)||(h.types.isAnyArrayBuffer(e)?e=g.Buffer.from(e):ArrayBuffer.isView(e)?e=g.Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof m.default||(e instanceof t.n?(e=t.r(e),a=e.type.split(`=`)[1]):e=g.Buffer.from(String(e))));let o=e;g.Buffer.isBuffer(e)?o=m.default.Readable.from(e):c(e)&&(o=m.default.Readable.from(e.stream())),this[v]={body:e,stream:o,boundary:a,disturbed:!1,error:null},this.size=r,e instanceof m.default&&e.on(`error`,e=>{let t=e instanceof n?e:new i(`Invalid response body while trying to fetch ${this.url}: ${e.message}`,`system`,e);this[v].error=t})}get body(){return this[v].stream}get bodyUsed(){return this[v].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:t,byteLength:n}=await p(this);return e.slice(t,t+n)}async formData(){let e=this.headers.get(`content-type`);if(e.startsWith(`application/x-www-form-urlencoded`)){let e=new t.n,n=new URLSearchParams(await this.text());for(let[t,r]of n)e.append(t,r);return e}let{toFormData:n}=await Promise.resolve().then(()=>require("./multipart-parser-Bd_iuhOs.js"));return n(this.body,e)}async blob(){let e=this.headers&&this.headers.get(`content-type`)||this[v].body&&this[v].body.type||``;return new t.s([await this.arrayBuffer()],{type:e})}async json(){let e=await this.text();return JSON.parse(e)}async text(){let e=await p(this);return new TextDecoder().decode(e)}buffer(){return p(this)}},y.prototype.buffer=(0,h.deprecate)(y.prototype.buffer,`Please use 'response.arrayBuffer()' instead of 'response.buffer()'`,`node-fetch#buffer`),Object.defineProperties(y.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,h.deprecate)(()=>{},`data doesn't exist, use json(), text(), arrayBuffer(), or body instead`,`https://github.com/node-fetch/node-fetch/issues/1000 (response)`)}}),b=(e,t)=>{let n,r,{body:i}=e[v];if(e.bodyUsed)throw Error(`cannot clone body after it is used`);return i instanceof m.default&&typeof i.getBoundary!=`function`&&(n=new m.PassThrough({highWaterMark:t}),r=new m.PassThrough({highWaterMark:t}),i.pipe(n),i.pipe(r),e[v].stream=n,i=r),i},ee=(0,h.deprecate)(e=>e.getBoundary(),`form-data doesn't follow the spec and requires special treatment. Use alternative package`,`https://github.com/node-fetch/node-fetch/issues/1167`),x=(e,n)=>e===null?null:typeof e==`string`?`text/plain;charset=UTF-8`:s(e)?`application/x-www-form-urlencoded;charset=UTF-8`:c(e)?e.type||null:g.Buffer.isBuffer(e)||h.types.isAnyArrayBuffer(e)||ArrayBuffer.isView(e)?null:e instanceof t.n?`multipart/form-data; boundary=${n[v].boundary}`:e&&typeof e.getBoundary==`function`?`multipart/form-data;boundary=${ee(e)}`:e instanceof m.default?null:`text/plain;charset=UTF-8`,te=e=>{let{body:t}=e[v];return t===null?0:c(t)?t.size:g.Buffer.isBuffer(t)?t.length:t&&typeof t.getLengthSync==`function`&&t.hasKnownLength&&t.hasKnownLength()?t.getLengthSync():null},S=async(e,{body:t})=>{t===null?e.end():await _(t,e)}}));function ne(e=[]){return new O(e.reduce((e,t,n,r)=>(n%2==0&&e.push(r.slice(n,n+2)),e),[]).filter(([e,t])=>{try{return E(e),D(e,String(t)),!0}catch{return!1}}))}var w,T,E,D,O,k=e.r((()=>{w=e.o(e.t(),1),T=e.o(e.t(),1),E=typeof T.default.validateHeaderName==`function`?T.default.validateHeaderName:e=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(e)){let t=TypeError(`Header name must be a valid HTTP token [${e}]`);throw Object.defineProperty(t,"code",{value:`ERR_INVALID_HTTP_TOKEN`}),t}},D=typeof T.default.validateHeaderValue==`function`?T.default.validateHeaderValue:(e,t)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(t)){let t=TypeError(`Invalid character in header content ["${e}"]`);throw Object.defineProperty(t,"code",{value:`ERR_INVALID_CHAR`}),t}},O=class e extends URLSearchParams{constructor(t){let n=[];if(t instanceof e){let e=t.raw();for(let[t,r]of Object.entries(e))n.push(...r.map(e=>[t,e]))}else if(t!=null)if(typeof t==`object`&&!w.types.isBoxedPrimitive(t)){let e=t[Symbol.iterator];if(e==null)n.push(...Object.entries(t));else{if(typeof e!=`function`)throw TypeError(`Header pairs must be iterable`);n=[...t].map(e=>{if(typeof e!=`object`||w.types.isBoxedPrimitive(e))throw TypeError(`Each header pair must be an iterable object`);return[...e]}).map(e=>{if(e.length!==2)throw TypeError(`Each header pair must be a name/value tuple`);return[...e]})}}else throw TypeError(`Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)`);return n=n.length>0?n.map(([e,t])=>(E(e),D(e,String(t)),[String(e).toLowerCase(),String(t)])):void 0,super(n),new Proxy(this,{get(e,t,n){switch(t){case`append`:case`set`:return(n,r)=>(E(n),D(n,String(r)),URLSearchParams.prototype[t].call(e,String(n).toLowerCase(),String(r)));case`delete`:case`has`:case`getAll`:return n=>(E(n),URLSearchParams.prototype[t].call(e,String(n).toLowerCase()));case`keys`:return()=>(e.sort(),new Set(URLSearchParams.prototype.keys.call(e)).keys());default:return Reflect.get(e,t,n)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let t=this.getAll(e);if(t.length===0)return null;let n=t.join(`, `);return/^content-encoding$/i.test(e)&&(n=n.toLowerCase()),n}forEach(e,t=void 0){for(let n of this.keys())Reflect.apply(e,t,[this.get(n),n,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,t)=>(e[t]=this.getAll(t),e),{})}[Symbol.for(`nodejs.util.inspect.custom`)](){return[...this.keys()].reduce((e,t)=>{let n=this.getAll(t);return t===`host`?e[t]=n[0]:e[t]=n.length>1?n:n[0],e},{})}},Object.defineProperties(O.prototype,[`get`,`entries`,`forEach`,`values`].reduce((e,t)=>(e[t]={enumerable:!0},e),{}))})),A,j,M=e.r((()=>{A=new Set([301,302,303,307,308]),j=e=>A.has(e)})),N,P,re=e.r((()=>{k(),C(),M(),N=Symbol(`Response internals`),P=class e extends y{constructor(e=null,t={}){super(e,t);let n=t.status==null?200:t.status,r=new O(t.headers);if(e!==null&&!r.has(`Content-Type`)){let t=x(e,this);t&&r.append(`Content-Type`,t)}this[N]={type:`default`,url:t.url,status:n,statusText:t.statusText||``,headers:r,counter:t.counter,highWaterMark:t.highWaterMark}}get type(){return this[N].type}get url(){return this[N].url||``}get status(){return this[N].status}get ok(){return this[N].status>=200&&this[N].status<300}get redirected(){return this[N].counter>0}get statusText(){return this[N].statusText}get headers(){return this[N].headers}get highWaterMark(){return this[N].highWaterMark}clone(){return new e(b(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(t,n=302){if(!j(n))throw RangeError(`Failed to execute "redirect" on "response": Invalid status code`);return new e(null,{headers:{location:new URL(t).toString()},status:n})}static error(){let t=new e(null,{status:0,statusText:``});return t[N].type=`error`,t}static json(t=void 0,n={}){let r=JSON.stringify(t);if(r===void 0)throw TypeError(`data is not JSON serializable`);let i=new O(n&&n.headers);return i.has(`content-type`)||i.set(`content-type`,`application/json`),new e(r,{...n,headers:i})}get[Symbol.toStringTag](){return`Response`}},Object.defineProperties(P.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}})})),F,ie=e.r((()=>{F=e=>{if(e.search)return e.search;let t=e.href.length-1,n=e.hash||(e.href[t]===`#`?`#`:``);return e.href[t-n.length]===`?`?`?`:``}}));function I(e,t=!1){return e==null||(e=new URL(e),/^(about|blob|data):$/.test(e.protocol))?`no-referrer`:(e.username=``,e.password=``,e.hash=``,t&&(e.pathname=``,e.search=``),e)}function ae(e){if(!z.has(e))throw TypeError(`Invalid referrerPolicy: ${e}`);return e}function oe(e){if(/^(http|ws)s:$/.test(e.protocol))return!0;let t=e.host.replace(/(^\[)|(]$)/g,``),n=(0,R.isIP)(t);return n===4&&/^127\./.test(t)||n===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(t)?!0:e.host===`localhost`||e.host.endsWith(`.localhost`)?!1:e.protocol===`file:`}function L(e){return/^about:(blank|srcdoc)$/.test(e)||e.protocol===`data:`||/^(blob|filesystem):$/.test(e.protocol)?!0:oe(e)}function se(e,{referrerURLCallback:t,referrerOriginCallback:n}={}){if(e.referrer===`no-referrer`||e.referrerPolicy===``)return null;let r=e.referrerPolicy;if(e.referrer===`about:client`)return`no-referrer`;let i=e.referrer,a=I(i),o=I(i,!0);a.toString().length>4096&&(a=o),t&&(a=t(a)),n&&(o=n(o));let s=new URL(e.url);switch(r){case`no-referrer`:return`no-referrer`;case`origin`:return o;case`unsafe-url`:return a;case`strict-origin`:return L(a)&&!L(s)?`no-referrer`:o.toString();case`strict-origin-when-cross-origin`:return a.origin===s.origin?a:L(a)&&!L(s)?`no-referrer`:o;case`same-origin`:return a.origin===s.origin?a:`no-referrer`;case`origin-when-cross-origin`:return a.origin===s.origin?a:o;case`no-referrer-when-downgrade`:return L(a)&&!L(s)?`no-referrer`:a;default:throw TypeError(`Invalid referrerPolicy: ${r}`)}}function ce(e){let t=(e.get(`referrer-policy`)||``).split(/[,\s]+/),n=``;for(let e of t)e&&z.has(e)&&(n=e);return n}var R,z,B,V=e.r((()=>{R=e.o(e.t(),1),z=new Set([``,`no-referrer`,`no-referrer-when-downgrade`,`same-origin`,`origin`,`strict-origin`,`origin-when-cross-origin`,`strict-origin-when-cross-origin`,`unsafe-url`]),B=`strict-origin-when-cross-origin`})),H,U,W,G,K,q,J,le=e.r((()=>{H=e.o(e.t(),1),U=e.o(e.t(),1),k(),C(),f(),ie(),V(),W=Symbol(`Request internals`),G=e=>typeof e==`object`&&typeof e[W]==`object`,K=(0,U.deprecate)(()=>{},`.data is not a valid RequestInit property, use .body instead`,`https://github.com/node-fetch/node-fetch/issues/1000 (request)`),q=class e extends y{constructor(e,t={}){let n;if(G(e)?n=new URL(e.url):(n=new URL(e),e={}),n.username!==``||n.password!==``)throw TypeError(`${n} is an url with embedded credentials.`);let r=t.method||e.method||`GET`;if(/^(delete|get|head|options|post|put)$/i.test(r)&&(r=r.toUpperCase()),!G(t)&&`data`in t&&K(),(t.body!=null||G(e)&&e.body!==null)&&(r===`GET`||r===`HEAD`))throw TypeError(`Request with GET/HEAD method cannot have body`);let i=t.body?t.body:G(e)&&e.body!==null?b(e):null;super(i,{size:t.size||e.size||0});let a=new O(t.headers||e.headers||{});if(i!==null&&!a.has(`Content-Type`)){let e=x(i,this);e&&a.set(`Content-Type`,e)}let o=G(e)?e.signal:null;if(`signal`in t&&(o=t.signal),o!=null&&!l(o))throw TypeError(`Expected signal to be an instanceof AbortSignal or EventTarget`);let s=t.referrer==null?e.referrer:t.referrer;if(s===``)s=`no-referrer`;else if(s){let e=new URL(s);s=/^about:(\/\/)?client$/.test(e)?`client`:e}else s=void 0;this[W]={method:r,redirect:t.redirect||e.redirect||`follow`,headers:a,parsedURL:n,signal:o,referrer:s},this.follow=t.follow===void 0?e.follow===void 0?20:e.follow:t.follow,this.compress=t.compress===void 0?e.compress===void 0?!0:e.compress:t.compress,this.counter=t.counter||e.counter||0,this.agent=t.agent||e.agent,this.highWaterMark=t.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=t.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=t.referrerPolicy||e.referrerPolicy||``}get method(){return this[W].method}get url(){return(0,H.format)(this[W].parsedURL)}get headers(){return this[W].headers}get redirect(){return this[W].redirect}get signal(){return this[W].signal}get referrer(){if(this[W].referrer===`no-referrer`)return``;if(this[W].referrer===`client`)return`about:client`;if(this[W].referrer)return this[W].referrer.toString()}get referrerPolicy(){return this[W].referrerPolicy}set referrerPolicy(e){this[W].referrerPolicy=ae(e)}clone(){return new e(this)}get[Symbol.toStringTag](){return`Request`}},Object.defineProperties(q.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}}),J=e=>{let{parsedURL:t}=e[W],n=new O(e[W].headers);n.has(`Accept`)||n.set(`Accept`,`*/*`);let r=null;if(e.body===null&&/^(post|put)$/i.test(e.method)&&(r=`0`),e.body!==null){let t=te(e);typeof t==`number`&&!Number.isNaN(t)&&(r=String(t))}r&&n.set(`Content-Length`,r),e.referrerPolicy===``&&(e.referrerPolicy=B),e.referrer&&e.referrer!==`no-referrer`?e[W].referrer=se(e):e[W].referrer=`no-referrer`,e[W].referrer instanceof URL&&n.set(`Referer`,e.referrer),n.has(`User-Agent`)||n.set(`User-Agent`,`node-fetch`),e.compress&&!n.has(`Accept-Encoding`)&&n.set(`Accept-Encoding`,`gzip, deflate, br`);let{agent:i}=e;typeof i==`function`&&(i=i(t));let a=F(t);return{parsedURL:t,options:{path:t.pathname+a,method:e.method,headers:n[Symbol.for(`nodejs.util.inspect.custom`)](),insecureHTTPParser:e.insecureHTTPParser,agent:i}}}})),Y,ue=e.r((()=>{r(),Y=class extends n{constructor(e,t=`aborted`){super(e,t)}}}));async function X(e,n){return new Promise((r,a)=>{let o=new q(e,n),{parsedURL:s,options:c}=J(o);if(!me.has(s.protocol))throw TypeError(`node-fetch cannot load ${e}. URL scheme "${s.protocol.replace(/:$/,``)}" is not supported.`);if(s.protocol===`data:`){let e=t.l(o.url);r(new P(e,{headers:{"Content-Type":e.typeFull}}));return}let l=(s.protocol===`https:`?pe.default:fe.default).request,{signal:f}=o,p=null,m=()=>{let e=new Y(`The operation was aborted.`);a(e),o.body&&o.body instanceof Q.default.Readable&&o.body.destroy(e),!(!p||!p.body)&&p.body.emit(`error`,e)};if(f&&f.aborted){m();return}let h=()=>{m(),_()},g=l(s.toString(),c);f&&f.addEventListener(`abort`,h);let _=()=>{g.abort(),f&&f.removeEventListener(`abort`,h)};g.on(`error`,e=>{a(new i(`request to ${o.url} failed, reason: ${e.message}`,`system`,e)),_()}),de(g,e=>{p&&p.body&&p.body.destroy(e)}),process.version<`v14`&&g.on(`socket`,e=>{let t;e.prependListener(`end`,()=>{t=e._eventsCount}),e.prependListener(`close`,n=>{if(p&&t<e._eventsCount&&!n){let e=Error(`Premature close`);e.code=`ERR_STREAM_PREMATURE_CLOSE`,p.body.emit(`error`,e)}})}),g.on(`response`,e=>{g.setTimeout(0);let t=ne(e.rawHeaders);if(j(e.statusCode)){let s=t.get(`Location`),c=null;try{c=s===null?null:new URL(s,o.url)}catch{if(o.redirect!==`manual`){a(new i(`uri requested responds with an invalid redirect URL: ${s}`,`invalid-redirect`)),_();return}}switch(o.redirect){case`error`:a(new i(`uri requested responds with a redirect, redirect mode is set to error: ${o.url}`,`no-redirect`)),_();return;case`manual`:break;case`follow`:{if(c===null)break;if(o.counter>=o.follow){a(new i(`maximum redirect reached at: ${o.url}`,`max-redirect`)),_();return}let s={headers:new O(o.headers),follow:o.follow,counter:o.counter+1,agent:o.agent,compress:o.compress,method:o.method,body:b(o),signal:o.signal,size:o.size,referrer:o.referrer,referrerPolicy:o.referrerPolicy};if(!u(o.url,c)||!d(o.url,c))for(let e of[`authorization`,`www-authenticate`,`cookie`,`cookie2`])s.headers.delete(e);if(e.statusCode!==303&&o.body&&n.body instanceof Q.default.Readable){a(new i(`Cannot follow redirect with body being a readable stream`,`unsupported-redirect`)),_();return}(e.statusCode===303||(e.statusCode===301||e.statusCode===302)&&o.method===`POST`)&&(s.method=`GET`,s.body=void 0,s.headers.delete(`content-length`));let l=ce(t);l&&(s.referrerPolicy=l),r(X(new q(c,s))),_();return}default:return a(TypeError(`Redirect option '${o.redirect}' is not a valid value of RequestRedirect`))}}f&&e.once(`end`,()=>{f.removeEventListener(`abort`,h)});let s=(0,Q.pipeline)(e,new Q.PassThrough,e=>{e&&a(e)});process.version<`v12.10`&&e.on(`aborted`,h);let c={url:o.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:o.size,counter:o.counter,highWaterMark:o.highWaterMark},l=t.get(`Content-Encoding`);if(!o.compress||o.method===`HEAD`||l===null||e.statusCode===204||e.statusCode===304){p=new P(s,c),r(p);return}let m={flush:Z.default.Z_SYNC_FLUSH,finishFlush:Z.default.Z_SYNC_FLUSH};if(l===`gzip`||l===`x-gzip`){s=(0,Q.pipeline)(s,Z.default.createGunzip(m),e=>{e&&a(e)}),p=new P(s,c),r(p);return}if(l===`deflate`||l===`x-deflate`){let t=(0,Q.pipeline)(e,new Q.PassThrough,e=>{e&&a(e)});t.once(`data`,e=>{s=(e[0]&15)==8?(0,Q.pipeline)(s,Z.default.createInflate(),e=>{e&&a(e)}):(0,Q.pipeline)(s,Z.default.createInflateRaw(),e=>{e&&a(e)}),p=new P(s,c),r(p)}),t.once(`end`,()=>{p||(p=new P(s,c),r(p))});return}if(l===`br`){s=(0,Q.pipeline)(s,Z.default.createBrotliDecompress(),e=>{e&&a(e)}),p=new P(s,c),r(p);return}p=new P(s,c),r(p)}),S(g,o).catch(a)})}function de(e,t){let n=$.Buffer.from(`0\r
|
|
2
|
+
\r
|
|
3
|
+
`),r=!1,i=!1,a;e.on(`response`,e=>{let{headers:t}=e;r=t[`transfer-encoding`]===`chunked`&&!t[`content-length`]}),e.on(`socket`,o=>{let s=()=>{if(r&&!i){let e=Error(`Premature close`);e.code=`ERR_STREAM_PREMATURE_CLOSE`,t(e)}},c=e=>{i=$.Buffer.compare(e.slice(-5),n)===0,!i&&a&&(i=$.Buffer.compare(a.slice(-3),n.slice(0,3))===0&&$.Buffer.compare(e.slice(-2),n.slice(3))===0),a=e};o.prependListener(`close`,s),o.on(`data`,c),e.on(`close`,()=>{o.removeListener(`close`,s),o.removeListener(`data`,c)})})}var fe,pe,Z,Q,$,me;e.r((()=>{fe=e.o(e.t(),1),pe=e.o(e.t(),1),Z=e.o(e.t(),1),Q=e.o(e.t(),1),$=e.o(e.t(),1),t.u(),C(),re(),k(),le(),a(),ue(),M(),t.i(),f(),V(),t.t(),me=new Set([`data:`,`http:`,`https:`])}))(),exports.default=X;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { r as e, s as t, t as n } from "./__vite-browser-external-
|
|
2
|
-
import { n as r, t as
|
|
3
|
-
import { i as a, n as o, o as s, r as c, s as l, t as u } from "./from-BPj5eOuj.mjs";
|
|
1
|
+
import { r as e, s as t, t as n } from "./__vite-browser-external-c_Pnnbav.mjs";
|
|
2
|
+
import { c as r, i, l as a, n as o, r as s, s as c, t as l, u } from "./from-D3dnKIVz.mjs";
|
|
4
3
|
//#region node_modules/gcp-metadata/node_modules/node-fetch/src/errors/base.js
|
|
5
4
|
var d, f = e((() => {
|
|
6
5
|
d = class extends Error {
|
|
@@ -54,10 +53,10 @@ async function b(e) {
|
|
|
54
53
|
else throw new p(`Premature close of server response while trying to fetch ${e.url}`);
|
|
55
54
|
}
|
|
56
55
|
var x, S, C, ne, w, T, E, D, O, re, ie, k = e((() => {
|
|
57
|
-
x = /* @__PURE__ */ t(n(), 1), S = /* @__PURE__ */ t(n(), 1), C = /* @__PURE__ */ t(n(), 1),
|
|
56
|
+
x = /* @__PURE__ */ t(n(), 1), S = /* @__PURE__ */ t(n(), 1), C = /* @__PURE__ */ t(n(), 1), r(), i(), m(), f(), y(), ne = (0, S.promisify)(x.default.pipeline), w = Symbol("Body internals"), T = class {
|
|
58
57
|
constructor(e, { size: t = 0 } = {}) {
|
|
59
58
|
let n = null;
|
|
60
|
-
e === null ? e = null : g(e) ? e = C.Buffer.from(e.toString()) : _(e) || C.Buffer.isBuffer(e) || (S.types.isAnyArrayBuffer(e) ? e = C.Buffer.from(e) : ArrayBuffer.isView(e) ? e = C.Buffer.from(e.buffer, e.byteOffset, e.byteLength) : e instanceof x.default || (e instanceof o ? (e =
|
|
59
|
+
e === null ? e = null : g(e) ? e = C.Buffer.from(e.toString()) : _(e) || C.Buffer.isBuffer(e) || (S.types.isAnyArrayBuffer(e) ? e = C.Buffer.from(e) : ArrayBuffer.isView(e) ? e = C.Buffer.from(e.buffer, e.byteOffset, e.byteLength) : e instanceof x.default || (e instanceof o ? (e = s(e), n = e.type.split("=")[1]) : e = C.Buffer.from(String(e))));
|
|
61
60
|
let r = e;
|
|
62
61
|
C.Buffer.isBuffer(e) ? r = x.default.Readable.from(e) : _(e) && (r = x.default.Readable.from(e.stream())), this[w] = {
|
|
63
62
|
body: e,
|
|
@@ -87,12 +86,12 @@ var x, S, C, ne, w, T, E, D, O, re, ie, k = e((() => {
|
|
|
87
86
|
for (let [n, r] of t) e.append(n, r);
|
|
88
87
|
return e;
|
|
89
88
|
}
|
|
90
|
-
let { toFormData: t } = await import("./multipart-parser-
|
|
89
|
+
let { toFormData: t } = await import("./multipart-parser-D5aOiPJs.mjs");
|
|
91
90
|
return t(this.body, e);
|
|
92
91
|
}
|
|
93
92
|
async blob() {
|
|
94
93
|
let e = this.headers && this.headers.get("content-type") || this[w].body && this[w].body.type || "";
|
|
95
|
-
return new
|
|
94
|
+
return new c([await this.arrayBuffer()], { type: e });
|
|
96
95
|
}
|
|
97
96
|
async json() {
|
|
98
97
|
let e = await this.text();
|
|
@@ -488,16 +487,16 @@ var U, W, G, K = e((() => {
|
|
|
488
487
|
//#region node_modules/gcp-metadata/node_modules/node-fetch/src/index.js
|
|
489
488
|
async function ye(e, t) {
|
|
490
489
|
return new Promise((n, r) => {
|
|
491
|
-
let
|
|
490
|
+
let i = new X(e, t), { parsedURL: o, options: s } = he(i);
|
|
492
491
|
if (!Ce.has(o.protocol)) throw TypeError(`node-fetch cannot load ${e}. URL scheme "${o.protocol.replace(/:$/, "")}" is not supported.`);
|
|
493
492
|
if (o.protocol === "data:") {
|
|
494
|
-
let e = i
|
|
493
|
+
let e = a(i.url);
|
|
495
494
|
n(new z(e, { headers: { "Content-Type": e.typeFull } }));
|
|
496
495
|
return;
|
|
497
496
|
}
|
|
498
|
-
let c = (o.protocol === "https:" ? Se.default : xe.default).request, { signal: l } =
|
|
497
|
+
let c = (o.protocol === "https:" ? Se.default : xe.default).request, { signal: l } = i, u = null, d = () => {
|
|
499
498
|
let e = new _e("The operation was aborted.");
|
|
500
|
-
r(e),
|
|
499
|
+
r(e), i.body && i.body instanceof Q.default.Readable && i.body.destroy(e), !(!u || !u.body) && u.body.emit("error", e);
|
|
501
500
|
};
|
|
502
501
|
if (l && l.aborted) {
|
|
503
502
|
d();
|
|
@@ -511,7 +510,7 @@ async function ye(e, t) {
|
|
|
511
510
|
m.abort(), l && l.removeEventListener("abort", f);
|
|
512
511
|
};
|
|
513
512
|
m.on("error", (e) => {
|
|
514
|
-
r(new p(`request to ${
|
|
513
|
+
r(new p(`request to ${i.url} failed, reason: ${e.message}`, "system", e)), h();
|
|
515
514
|
}), be(m, (e) => {
|
|
516
515
|
u && u.body && u.body.destroy(e);
|
|
517
516
|
}), process.version < "v14" && m.on("socket", (e) => {
|
|
@@ -526,57 +525,57 @@ async function ye(e, t) {
|
|
|
526
525
|
});
|
|
527
526
|
}), m.on("response", (e) => {
|
|
528
527
|
m.setTimeout(0);
|
|
529
|
-
let
|
|
528
|
+
let a = ae(e.rawHeaders);
|
|
530
529
|
if (L(e.statusCode)) {
|
|
531
|
-
let o =
|
|
530
|
+
let o = a.get("Location"), s = null;
|
|
532
531
|
try {
|
|
533
|
-
s = o === null ? null : new URL(o,
|
|
532
|
+
s = o === null ? null : new URL(o, i.url);
|
|
534
533
|
} catch {
|
|
535
|
-
if (
|
|
534
|
+
if (i.redirect !== "manual") {
|
|
536
535
|
r(new p(`uri requested responds with an invalid redirect URL: ${o}`, "invalid-redirect")), h();
|
|
537
536
|
return;
|
|
538
537
|
}
|
|
539
538
|
}
|
|
540
|
-
switch (
|
|
539
|
+
switch (i.redirect) {
|
|
541
540
|
case "error":
|
|
542
|
-
r(new p(`uri requested responds with a redirect, redirect mode is set to error: ${
|
|
541
|
+
r(new p(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`, "no-redirect")), h();
|
|
543
542
|
return;
|
|
544
543
|
case "manual": break;
|
|
545
544
|
case "follow": {
|
|
546
545
|
if (s === null) break;
|
|
547
|
-
if (
|
|
548
|
-
r(new p(`maximum redirect reached at: ${
|
|
546
|
+
if (i.counter >= i.follow) {
|
|
547
|
+
r(new p(`maximum redirect reached at: ${i.url}`, "max-redirect")), h();
|
|
549
548
|
return;
|
|
550
549
|
}
|
|
551
550
|
let o = {
|
|
552
|
-
headers: new P(
|
|
553
|
-
follow:
|
|
554
|
-
counter:
|
|
555
|
-
agent:
|
|
556
|
-
compress:
|
|
557
|
-
method:
|
|
558
|
-
body: E(
|
|
559
|
-
signal:
|
|
560
|
-
size:
|
|
561
|
-
referrer:
|
|
562
|
-
referrerPolicy:
|
|
551
|
+
headers: new P(i.headers),
|
|
552
|
+
follow: i.follow,
|
|
553
|
+
counter: i.counter + 1,
|
|
554
|
+
agent: i.agent,
|
|
555
|
+
compress: i.compress,
|
|
556
|
+
method: i.method,
|
|
557
|
+
body: E(i),
|
|
558
|
+
signal: i.signal,
|
|
559
|
+
size: i.size,
|
|
560
|
+
referrer: i.referrer,
|
|
561
|
+
referrerPolicy: i.referrerPolicy
|
|
563
562
|
};
|
|
564
|
-
if (!v(
|
|
563
|
+
if (!v(i.url, s) || !te(i.url, s)) for (let e of [
|
|
565
564
|
"authorization",
|
|
566
565
|
"www-authenticate",
|
|
567
566
|
"cookie",
|
|
568
567
|
"cookie2"
|
|
569
568
|
]) o.headers.delete(e);
|
|
570
|
-
if (e.statusCode !== 303 &&
|
|
569
|
+
if (e.statusCode !== 303 && i.body && t.body instanceof Q.default.Readable) {
|
|
571
570
|
r(new p("Cannot follow redirect with body being a readable stream", "unsupported-redirect")), h();
|
|
572
571
|
return;
|
|
573
572
|
}
|
|
574
|
-
(e.statusCode === 303 || (e.statusCode === 301 || e.statusCode === 302) &&
|
|
575
|
-
let c = fe(
|
|
573
|
+
(e.statusCode === 303 || (e.statusCode === 301 || e.statusCode === 302) && i.method === "POST") && (o.method = "GET", o.body = void 0, o.headers.delete("content-length"));
|
|
574
|
+
let c = fe(a);
|
|
576
575
|
c && (o.referrerPolicy = c), n(ye(new X(s, o))), h();
|
|
577
576
|
return;
|
|
578
577
|
}
|
|
579
|
-
default: return r(/* @__PURE__ */ TypeError(`Redirect option '${
|
|
578
|
+
default: return r(/* @__PURE__ */ TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`));
|
|
580
579
|
}
|
|
581
580
|
}
|
|
582
581
|
l && e.once("end", () => {
|
|
@@ -588,15 +587,15 @@ async function ye(e, t) {
|
|
|
588
587
|
/* c8 ignore next 3 */
|
|
589
588
|
process.version < "v12.10" && e.on("aborted", f);
|
|
590
589
|
let s = {
|
|
591
|
-
url:
|
|
590
|
+
url: i.url,
|
|
592
591
|
status: e.statusCode,
|
|
593
592
|
statusText: e.statusMessage,
|
|
594
|
-
headers:
|
|
595
|
-
size:
|
|
596
|
-
counter:
|
|
597
|
-
highWaterMark:
|
|
598
|
-
}, c =
|
|
599
|
-
if (!
|
|
593
|
+
headers: a,
|
|
594
|
+
size: i.size,
|
|
595
|
+
counter: i.counter,
|
|
596
|
+
highWaterMark: i.highWaterMark
|
|
597
|
+
}, c = a.get("Content-Encoding");
|
|
598
|
+
if (!i.compress || i.method === "HEAD" || c === null || e.statusCode === 204 || e.statusCode === 304) {
|
|
600
599
|
u = new z(o, s), n(u);
|
|
601
600
|
return;
|
|
602
601
|
}
|
|
@@ -632,7 +631,7 @@ async function ye(e, t) {
|
|
|
632
631
|
return;
|
|
633
632
|
}
|
|
634
633
|
u = new z(o, s), n(u);
|
|
635
|
-
}), ie(m,
|
|
634
|
+
}), ie(m, i).catch(r);
|
|
636
635
|
});
|
|
637
636
|
}
|
|
638
637
|
function be(e, t) {
|
|
@@ -657,7 +656,7 @@ function be(e, t) {
|
|
|
657
656
|
var xe, Se, Z, Q, $, Ce;
|
|
658
657
|
//#endregion
|
|
659
658
|
e((() => {
|
|
660
|
-
xe = /* @__PURE__ */ t(n(), 1), Se = /* @__PURE__ */ t(n(), 1), Z = /* @__PURE__ */ t(n(), 1), Q = /* @__PURE__ */ t(n(), 1), $ = /* @__PURE__ */ t(n(), 1),
|
|
659
|
+
xe = /* @__PURE__ */ t(n(), 1), Se = /* @__PURE__ */ t(n(), 1), Z = /* @__PURE__ */ t(n(), 1), Q = /* @__PURE__ */ t(n(), 1), $ = /* @__PURE__ */ t(n(), 1), u(), k(), se(), F(), ge(), m(), ve(), oe(), i(), y(), K(), l(), Ce = new Set([
|
|
661
660
|
"data:",
|
|
662
661
|
"http:",
|
|
663
662
|
"https:"
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e),f=s(((e,t)=>{t.exports={}}));Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
|
package/dist/dist-B3gFypMh.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
const e=require(`./__vite-browser-external-BrdF6Ba4.js`);var t=e.n(((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return c(e);if(n===`number`&&isFinite(e))return t.long?u(e):l(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function c(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function l(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function u(e){var t=Math.abs(e);return t>=a?d(e,t,a,`day`):t>=i?d(e,t,i,`hour`):t>=r?d(e,t,r,`minute`):t>=n?d(e,t,n,`second`):e+` ms`}function d(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}})),n=e.n(((e,n)=>{function r(e){r.debug=r,r.default=r,r.coerce=l,r.disable=s,r.enable=a,r.enabled=c,r.humanize=t(),r.destroy=u,Object.keys(e).forEach(t=>{r[t]=e[t]}),r.names=[],r.skips=[],r.formatters={};function n(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return r.colors[Math.abs(t)%r.colors.length]}r.selectColor=n;function r(e){let t,n=null,a,o;function s(...e){if(!s.enabled)return;let n=s,i=Number(new Date);n.diff=i-(t||i),n.prev=t,n.curr=i,t=i,e[0]=r.coerce(e[0]),typeof e[0]!=`string`&&e.unshift(`%O`);let a=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,i)=>{if(t===`%%`)return`%`;a++;let o=r.formatters[i];if(typeof o==`function`){let r=e[a];t=o.call(n,r),e.splice(a,1),a--}return t}),r.formatArgs.call(n,e),(n.log||r.log).apply(n,e)}return s.namespace=e,s.useColors=r.useColors(),s.color=r.selectColor(e),s.extend=i,s.destroy=r.destroy,Object.defineProperty(s,`enabled`,{enumerable:!0,configurable:!1,get:()=>n===null?(a!==r.namespaces&&(a=r.namespaces,o=r.enabled(e)),o):n,set:e=>{n=e}}),typeof r.init==`function`&&r.init(s),s}function i(e,t){let n=r(this.namespace+(t===void 0?`:`:t)+e);return n.log=this.log,n}function a(e){r.save(e),r.namespaces=e,r.names=[],r.skips=[];let t=(typeof e==`string`?e:``).trim().replace(/\s+/g,`,`).split(`,`).filter(Boolean);for(let e of t)e[0]===`-`?r.skips.push(e.slice(1)):r.names.push(e)}function o(e,t){let n=0,r=0,i=-1,a=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||t[r]===`*`))t[r]===`*`?(i=r,a=n,r++):(n++,r++);else if(i!==-1)r=i+1,a++,n=a;else return!1;for(;r<t.length&&t[r]===`*`;)r++;return r===t.length}function s(){let e=[...r.names,...r.skips.map(e=>`-`+e)].join(`,`);return r.enable(``),e}function c(e){for(let t of r.skips)if(o(e,t))return!1;for(let t of r.names)if(o(e,t))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}n.exports=r})),r=e.n(((e,t)=>{e.formatArgs=i,e.save=a,e.load=o,e.useColors=r,e.storage=s(),e.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=`#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33`.split(`.`);function r(){if(typeof window<`u`&&window.process&&(window.process.type===`renderer`||window.process.__nwjs))return!0;if(typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<`u`&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<`u`&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<`u`&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function i(e){if(e[0]=(this.useColors?`%c`:``)+this.namespace+(this.useColors?` %c`:` `)+e[0]+(this.useColors?`%c `:` `)+`+`+t.exports.humanize(this.diff),!this.useColors)return;let n=`color: `+this.color;e.splice(1,0,n,`color: inherit`);let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{e!==`%%`&&(r++,e===`%c`&&(i=r))}),e.splice(i,0,n)}e.log=console.debug||console.log||(()=>{});function a(t){try{t?e.storage.setItem(`debug`,t):e.storage.removeItem(`debug`)}catch{}}function o(){let t;try{t=e.storage.getItem(`debug`)||e.storage.getItem(`DEBUG`)}catch{}return!t&&typeof process<`u`&&`env`in process&&(t=process.env.DEBUG),t}function s(){try{return localStorage}catch{}}t.exports=n()(e);var{formatters:c}=t.exports;c.j=function(e){try{return JSON.stringify(e)}catch(e){return`[UnexpectedJSONParseError]: `+e.message}}})),i=e.n((t=>{var n=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=t&&t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=t&&t.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t};Object.defineProperty(t,`__esModule`,{value:!0}),t.req=t.json=t.toBuffer=void 0;var a=i(e.t()),o=i(e.t());async function s(e){let t=0,n=[];for await(let r of e)t+=r.length,n.push(r);return Buffer.concat(n,t)}t.toBuffer=s;async function c(e){let t=(await s(e)).toString(`utf8`);try{return JSON.parse(t)}catch(e){let n=e;throw n.message+=` (input: ${t})`,n}}t.json=c;function l(e,t={}){let n=((typeof e==`string`?e:e.href).startsWith(`https:`)?o:a).request(e,t),r=new Promise((e,t)=>{n.once(`response`,e).once(`error`,t).end()});return n.then=r.then.bind(r),n}t.req=l})),a=e.n((t=>{var n=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=t&&t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),a=t&&t.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var i in e)i!==`default`&&Object.prototype.hasOwnProperty.call(e,i)&&n(t,e,i);return r(t,e),t},o=t&&t.__exportStar||function(e,t){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(t,r)&&n(t,e,r)};Object.defineProperty(t,`__esModule`,{value:!0}),t.Agent=void 0;var s=a(e.t()),c=a(e.t()),l=e.t();o(i(),t);var u=Symbol(`AgentBaseInternalState`);t.Agent=class extends c.Agent{constructor(e){super(e),this[u]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint==`boolean`)return e.secureEndpoint;if(typeof e.protocol==`string`)return e.protocol===`https:`}let{stack:t}=Error();return typeof t==`string`?t.split(`
|
|
2
|
-
`).some(e=>e.indexOf(`(https.js:`)!==-1||e.indexOf(`node:https:`)!==-1):!1}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new s.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let n=this.sockets[e],r=n.indexOf(t);r!==-1&&(n.splice(r,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?l.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,n){let r={...t,secureEndpoint:this.isSecureEndpoint(t)},i=this.getName(r),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,r)).then(o=>{if(this.decrementSockets(i,a),o instanceof c.Agent)try{return o.addRequest(e,r)}catch(e){return n(e)}this[u].currentSocket=o,super.createSocket(e,t,n)},e=>{this.decrementSockets(i,a),n(e)})}createConnection(){let e=this[u].currentSocket;if(this[u].currentSocket=void 0,!e)throw Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[u].defaultPort??(this.protocol===`https:`?443:80)}set defaultPort(e){this[u]&&(this[u].defaultPort=e)}get protocol(){return this[u].protocol??(this.isSecureEndpoint()?`https:`:`http:`)}set protocol(e){this[u]&&(this[u].protocol=e)}}})),o=e.n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.parseProxyResponse=void 0;var n=(0,t(r()).default)(`https-proxy-agent:parse-proxy-response`);function i(e){return new Promise((t,r)=>{let i=0,a=[];function o(){let t=e.read();t?u(t):e.once(`readable`,o)}function s(){e.removeListener(`end`,c),e.removeListener(`error`,l),e.removeListener(`readable`,o)}function c(){s(),n(`onend`),r(Error(`Proxy connection ended before receiving CONNECT response`))}function l(e){s(),n(`onerror %o`,e),r(e)}function u(c){a.push(c),i+=c.length;let l=Buffer.concat(a,i),u=l.indexOf(`\r
|
|
3
|
-
\r
|
|
4
|
-
`);if(u===-1){n(`have not received end of HTTP headers yet...`),o();return}let d=l.slice(0,u).toString(`ascii`).split(`\r
|
|
5
|
-
`),f=d.shift();if(!f)return e.destroy(),r(Error(`No header received from proxy CONNECT response`));let p=f.split(` `),m=+p[1],h=p.slice(2).join(` `),g={};for(let t of d){if(!t)continue;let n=t.indexOf(`:`);if(n===-1)return e.destroy(),r(Error(`Invalid header from proxy CONNECT response: "${t}"`));let i=t.slice(0,n).toLowerCase(),a=t.slice(n+1).trimStart(),o=g[i];typeof o==`string`?g[i]=[o,a]:Array.isArray(o)?o.push(a):g[i]=a}n(`got proxy server response: %o %o`,f,g),s(),t({connect:{statusCode:m,statusText:h,headers:g},buffered:l})}e.on(`error`,l),e.on(`end`,c),o()})}e.parseProxyResponse=i})),s=e.n((t=>{var n=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),i=t&&t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),s=t&&t.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!==`default`&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},c=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0}),t.HttpsProxyAgent=void 0;var l=s(e.t()),u=s(e.t()),d=c(e.t()),f=c(r()),p=a(),m=e.t(),h=o(),g=(0,f.default)(`https-proxy-agent`),_=e=>e.servername===void 0&&e.host&&!l.isIP(e.host)?{...e,servername:e.host}:e,v=class extends p.Agent{constructor(e,t){super(t),this.options={path:void 0},this.proxy=typeof e==`string`?new m.URL(e):e,this.proxyHeaders=t?.headers??{},g(`Creating new HttpsProxyAgent instance: %o`,this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,``),r=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol===`https:`?443:80;this.connectOpts={ALPNProtocols:[`http/1.1`],...t?b(t,`headers`):null,host:n,port:r}}async connect(e,t){let{proxy:n}=this;if(!t.host)throw TypeError(`No "host" provided`);let r;n.protocol===`https:`?(g("Creating `tls.Socket`: %o",this.connectOpts),r=u.connect(_(this.connectOpts))):(g("Creating `net.Socket`: %o",this.connectOpts),r=l.connect(this.connectOpts));let i=typeof this.proxyHeaders==`function`?this.proxyHeaders():{...this.proxyHeaders},a=l.isIPv6(t.host)?`[${t.host}]`:t.host,o=`CONNECT ${a}:${t.port} HTTP/1.1\r\n`;if(n.username||n.password){let e=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i[`Proxy-Authorization`]=`Basic ${Buffer.from(e).toString(`base64`)}`}i.Host=`${a}:${t.port}`,i[`Proxy-Connection`]||=this.keepAlive?`Keep-Alive`:`close`;for(let e of Object.keys(i))o+=`${e}: ${i[e]}\r\n`;let s=(0,h.parseProxyResponse)(r);r.write(`${o}\r\n`);let{connect:c,buffered:f}=await s;if(e.emit(`proxyConnect`,c),this.emit(`proxyConnect`,c,e),c.statusCode===200)return e.once(`socket`,y),t.secureEndpoint?(g(`Upgrading socket connection to TLS`),u.connect({...b(_(t),`host`,`path`,`port`),socket:r})):r;r.destroy();let p=new l.Socket({writable:!1});return p.readable=!0,e.once(`socket`,e=>{g(`Replaying proxy buffer for failed request`),(0,d.default)(e.listenerCount(`data`)>0),e.push(f),e.push(null)}),p}};v.protocols=[`http`,`https`],t.HttpsProxyAgent=v;function y(e){e.resume()}function b(e,...t){let n={},r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}}));Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|