@binclusive/cli 0.2.0 → 0.3.0
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/{Menu-V4NFYPTW.js → Menu-MVQXXISI.js} +1 -1
- package/dist/bin.js +174 -169
- package/dist/{build-737TDK5H.js → build-LA3ELMTG.js} +1 -1
- package/dist/{chunk-YIGNFOT4.js → chunk-PG4MYNJU.js} +1 -1
- package/dist/{chunk-SNQ7SXG3.js → chunk-PSVNNOJC.js} +1 -1
- package/dist/{chunk-HPOSJQ4U.js → devtools-MA5OJPXQ.js} +3 -3
- package/package.json +5 -1
- package/dist/devtools-RNURB4HU.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __cjsCreateRequire } from 'node:module'; const require = __cjsCreateRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t}from"./chunk-PSVNNOJC.js";import"./chunk-3MDNIFWR.js";import"./chunk-PCQ2R3VR.js";export{a as Box,i as Newline,j as Spacer,g as Static,b as Text,h as Transform,c as kittyFlags,d as kittyModifiers,t as measureElement,e as render,f as renderToString,m as useApp,s as useCursor,p as useFocus,q as useFocusManager,l as useInput,r as useIsScreenReaderEnabled,o as useStderr,k as useStdin,n as useStdout};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __cjsCreateRequire } from 'node:module'; const require = __cjsCreateRequire(import.meta.url);
|
|
2
|
-
import{a as R,b as h,g as ce,l as ie,r as le}from"./chunk-
|
|
2
|
+
import{a as R,b as h,g as ce,l as ie,r as le}from"./chunk-PSVNNOJC.js";import{a as se}from"./chunk-3MDNIFWR.js";import{b as K,d as I}from"./chunk-PCQ2R3VR.js";var fe=K(U=>{"use strict";var ge=Symbol.for("react.transitional.element"),Ee=Symbol.for("react.fragment");function ue(t,n,o){var c=null;if(o!==void 0&&(c=""+o),n.key!==void 0&&(c=""+n.key),"key"in n){o={};for(var m in n)m!=="key"&&(o[m]=n[m])}else o=n;return n=o.ref,{$$typeof:ge,type:t,key:c,ref:n!==void 0?n:null,props:o}}U.Fragment=Ee;U.jsx=ue;U.jsxs=ue});var de=K(z=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function t(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===b?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case P:return"Fragment";case Y:return"Profiler";case X:return"StrictMode";case N:return"Suspense";case D:return"SuspenseList";case u:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case O:return"Portal";case V:return(e.displayName||"Context")+".Provider";case M:return(e._context.displayName||"Context")+".Consumer";case j:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return r=e.displayName||null,r!==null?r:t(e.type)||"Memo";case W:r=e._payload,e=e._init;try{return t(e(r))}catch{}}return null}function n(e){return""+e}function o(e){try{n(e);var r=!1}catch{r=!0}if(r){r=console;var a=r.error,f=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return a.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",f),n(e)}}function c(e){if(e===P)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===W)return"<...>";try{var r=t(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function m(){var e=s.A;return e===null?null:e.getOwner()}function T(){return Error("react-stack-top-frame")}function S(e){if(w.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function y(e,r){function a(){B||(B=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}a.isReactWarning=!0,Object.defineProperty(e,"key",{get:a,configurable:!0})}function q(){var e=t(this.type);return te[e]||(te[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function A(e,r,a,f,x,E,Q,Z){return a=E.ref,e={$$typeof:v,type:e,key:r,props:E,_owner:x},(a!==void 0?a:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:q}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Q}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Z}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function _(e,r,a,f,x,E,Q,Z){var d=r.children;if(d!==void 0)if(f)if(g(d)){for(f=0;f<d.length;f++)L(d[f]);Object.freeze&&Object.freeze(d)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else L(d);if(w.call(r,"key")){d=t(e);var C=Object.keys(r).filter(function(pe){return pe!=="key"});f=0<C.length?"{key: someKey, "+C.join(": ..., ")+": ...}":"{key: someKey}",ae[d+f]||(C=0<C.length?"{"+C.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
3
3
|
let props = %s;
|
|
4
4
|
<%s {...props} />
|
|
5
5
|
React keys must be passed directly to JSX without using spread:
|
|
@@ -218,7 +218,7 @@ No matching component was found for:
|
|
|
218
218
|
`).map(B=>M2(B,o,f)).join(`
|
|
219
219
|
`)}import Ys from"process";import{execFileSync as G2}from"child_process";import gC from"fs";import T2 from"tty";var Hp=80,Mp=24,oD=(a,o,{shell:f,env:B}={})=>G2(a,o,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500,shell:f,env:B}).trim(),Z0=(a,o)=>({columns:Number.parseInt(a,10),rows:Number.parseInt(o,10)}),Gp=(a,o)=>{let{columns:f,rows:B}=Z0(a,o);if(!(Number.isNaN(f)||Number.isNaN(B))&&!(f===Hp&&B===Mp))return{columns:f,rows:B}},O2=()=>{if(Ys.platform!=="linux")return!0;try{let a=gC.readFileSync("/proc/self/stat","utf8"),o=a.lastIndexOf(") ");if(o===-1)return!1;let f=a.slice(o+2).trim().split(/\s+/),B=Number.parseInt(f[2],10),I=Number.parseInt(f[5],10);return Number.isNaN(B)||Number.isNaN(I)||I<=0?!1:B===I}catch{return!1}};function cD(){let{env:a,stdout:o,stderr:f}=Ys;if(o?.columns&&o?.rows)return Z0(o.columns,o.rows);if(f?.columns&&f?.rows)return Z0(f.columns,f.rows);if(a.COLUMNS&&a.LINES)return Z0(a.COLUMNS,a.LINES);let B={columns:Hp,rows:Mp};return Ys.platform==="win32"?iD()??B:Ys.platform==="darwin"?Up()??iD()??B:Up()??iD()??b2()??B}var Up=()=>{try{let a=Ys.platform==="darwin"?gC.constants.O_EVTONLY|gC.constants.O_NONBLOCK:gC.constants.O_NONBLOCK,{columns:o,rows:f}=T2.WriteStream(gC.openSync("/dev/tty",a));return{columns:o,rows:f}}catch{}},iD=()=>{try{let a=oD("tput",["cols"],{env:{TERM:"dumb",...Ys.env}}),o=oD("tput",["lines"],{env:{TERM:"dumb",...Ys.env}});if(a&&o)return Gp(a,o)}catch{}},b2=()=>{try{if(!O2())return;let a=oD("resize",["-u"]).match(/\d+/g);if(a.length===2)return Gp(a[0],a[1])}catch{}};import x2 from"process";var BC=()=>x2.env.DEV==="true";var Rh=lt(Zp(),1),HC=lt(Y0(),1),gc=lt(k0(),1);var Nh=lt(Ut(),1);var P0=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],$0=[12288,12288,65281,65376,65504,65510],mD=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],dD=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],mC=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var AI=(a,o)=>{let f=0,B=Math.floor(a.length/2)-1;for(;f<=B;){let I=Math.floor((f+B)/2),D=I*2;if(o<a[D])B=I-1;else if(o>a[D+1])f=I+1;else return!0}return!1};var J2=P0[0],L2=P0.at(-1),K2=$0[0],_2=$0.at(-1),iF=mD[0],oF=mD.at(-1),cF=dD[0],sF=dD.at(-1),Y2=mC[0],w2=mC.at(-1),jp=19968,[q2,X2]=Z2(mC);function Z2(a){let o=a[0],f=a[1];for(let B=0;B<a.length;B+=2){let I=a[B],D=a[B+1];if(jp>=I&&jp<=D)return[I,D];D-I>f-o&&(o=I,f=D)}return[o,f]}var Vp=a=>a<J2||a>L2?!1:AI(P0,a),dC=a=>a<K2||a>_2?!1:AI($0,a);var pC=a=>a>=q2&&a<=X2?!0:a<Y2||a>w2?!1:AI(mC,a);function j2(a){if(!Number.isSafeInteger(a))throw new TypeError(`Expected a code point, got \`${typeof a}\`.`)}function pD(a,{ambiguousAsWide:o=!1}={}){return j2(a),dC(a)||pC(a)||o&&Vp(a)?2:1}var V2=new Intl.Segmenter,W2=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Mark}|\\p{Surrogate})+$","v"),k2=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),P2=new RegExp("^\\p{RGI_Emoji}$","v"),$2=/^[\d#*]\u20E3$/,AS=/\p{Extended_Pictographic}/gu;function tS(a){if(a.length>50)return!1;if($2.test(a))return!0;if(a.includes("\u200D")){let o=a.match(AS);return o!==null&&o.length>=2}return!1}function eS(a){return a.replace(k2,"")}function aS(a){return W2.test(a)}function uS(a,o){let f=0;if(a.length>1)for(let B of a.slice(1))B>="\uFF00"&&B<="\uFFEF"&&(f+=pD(B.codePointAt(0),o));return f}function Ei(a,o={}){if(typeof a!="string"||a.length===0)return 0;let{ambiguousIsNarrow:f=!0,countAnsiEscapeCodes:B=!1}=o,I=a;if(!B&&(I.includes("\x1B")||I.includes("\x9B"))&&(I=Ks(I)),I.length===0)return 0;if(/^[\u0020-\u007E]*$/.test(I))return I.length;let D=0,d={ambiguousAsWide:!f};for(let{segment:S}of V2.segment(I)){if(aS(S))continue;if(P2.test(S)||tS(S)){D+=2;continue}let v=eS(S).codePointAt(0);D+=pD(v,d),D+=uS(S,d)}return D}function hC(a){let o=0;for(let f of a.split(`
|
|
220
220
|
`))o=Math.max(o,Ei(f));return o}var Wp=new Map,nS=a=>{if(a.length===0)return{width:0,height:0};let o=Wp.get(a);if(o)return o;let f=hC(a),B=a.split(`
|
|
221
|
-
`).length,I={width:f,height:B};return Wp.set(a,I),I},hD=nS;function sg(a){return Number.isInteger(a)?dC(a)||pC(a):!1}var SC=27,Ah=144,th=152,eh=155,ah=156,uI=157,uh=158,nh=159,vC=new Set([SC,Ah,th,eh,ah,uI,uh,nh]),Eg="\x1B",RD="\x07",UD="[",lh="]",lS="P",iS="X",oS="^",cS="_",ih="m",eI="\\",oh=`${Eg}${eI}`,sS="\x9D",aI="\x9C",ND=`${Eg}${lh}8;`,FD=`${sS}8;`,ES=`${ND};`,fS=`${FD};`,gS="0".codePointAt(0),BS="9".codePointAt(0),CS=";".codePointAt(0),rS=":".codePointAt(0),IS="0".codePointAt(0),QS="?".codePointAt(0),DS=" ".codePointAt(0),mS="/".codePointAt(0),dS="@".codePointAt(0),pS="~".codePointAt(0),hS=127462,yS=127487,kp=0,tI=38,yD=39,SS=48,SD=49,vS=5,RS=2,Pp=3,$p=5,NS=2,FS=4,US=65039,HS=8419,MS=/\p{Emoji_Presentation}/u,HD=new Intl.Segmenter(void 0,{granularity:"grapheme"}),ch=new Set;for(let[,a]of Wt.codes)ch.add(a);function GS(a){return a>=gS&&a<=BS||a===CS||a===rS}function TS(a){return a>=IS&&a<=QS}function OS(a){return a>=DS&&a<=mS}function bS(a){return a>=dS&&a<=pS}function xS(a){return a>=hS&&a<=yS}function Hl(a,o){return{token:{type:"control",code:a},endIndex:o}}function zS(a){if(MS.test(a))return!0;for(let o of a){let f=o.codePointAt(0);if(f===US||f===HS)return!0}return!1}function sh(a){let o=0;for(let f of a){let B=f.codePointAt(0);if(sg(B))return 2;xS(B)&&o++}return o>=1||zS(a)?2:1}function JS(a){return a.startsWith("\x9B")?"\x9B":`${Eg}${UD}`}function yC(a,o){return`${a}${o.join(";")}${ih}`}function LS(a){let o=[],f=JS(a),B;if(a.startsWith(`${Eg}${UD}`))B=a.slice(2,-1);else if(a.startsWith("\x9B"))B=a.slice(1,-1);else return o;let I=B.length===0?[String(kp)]:B.split(";"),D=0;for(;D<I.length;){let d=Number.parseInt(I[D],10);if(Number.isNaN(d)){D++;continue}if(d===kp){o.push({type:"reset"}),D++;continue}if(d===tI||d===SS){let x=Number.parseInt(I[D+1],10);if(x===vS&&D+NS<I.length){let AA=yC(f,I.slice(D,D+Pp));o.push({type:"start",code:AA,endCode:Wt.color.ansi(d===tI?yD:SD)}),D+=Pp;continue}if(x===RS&&D+FS<I.length){let AA=yC(f,I.slice(D,D+$p));o.push({type:"start",code:AA,endCode:Wt.color.ansi(d===tI?yD:SD)}),D+=$p;continue}let Y=yC(f,[I[D]]);o.push({type:"start",code:Y,endCode:Wt.color.ansi(d===tI?yD:SD)}),D++;continue}if(ch.has(d)){o.push({type:"end",endCode:Wt.color.ansi(d)}),D++;continue}let S=Wt.codes.get(d);if(S!==void 0){let x=yC(f,[I[D]]);o.push({type:"start",code:x,endCode:Wt.color.ansi(S)}),D++;continue}let v=yC(f,[I[D]]);o.push({type:"start",code:v,endCode:Wt.reset.open}),D++}return o.length===0&&o.push({type:"reset"}),o}function KS(a,o){let f=a.codePointAt(o),B;if(f===SC){if(a[o+1]!==UD)return;B=o+2}else if(f===eh)B=o+1;else return;let I=!0;for(let D=B;D<a.length;D++){let d=a.codePointAt(D);if(bS(d)){let v=a.slice(o,D+1);return a[D]!==ih||!I?Hl(v,D+1):{token:{type:"sgr",code:v,fragments:LS(v)},endIndex:D+1}}if(TS(d)){GS(d)||(I=!1);continue}if(OS(d)){I=!1;continue}let S=D;return Hl(a.slice(o,S),S)}return Hl(a.slice(o),a.length)}function _S(a,o){let f,B,I=a.codePointAt(o);if(I===SC&&a.startsWith(ND,o))f=ND,B=ES;else if(I===uI&&a.startsWith(FD,o))f=FD,B=fS;else return;let D=a.indexOf(";",o+f.length);if(D===-1)return Hl(a.slice(o),a.length);for(let d=D+1;d<a.length;d++){let S=a[d];if(S===RD){let v=a.slice(o,d+1),x=d===D+1?"close":"open";return{token:{type:"hyperlink",code:v,action:x,closePrefix:B,terminator:RD},endIndex:d+1}}if(S===Eg&&a[d+1]===eI){let v=a.slice(o,d+2),x=d===D+1?"close":"open";return{token:{type:"hyperlink",code:v,action:x,closePrefix:B,terminator:oh},endIndex:d+2}}if(S===aI){let v=a.slice(o,d+1),x=d===D+1?"close":"open";return{token:{type:"hyperlink",code:v,action:x,closePrefix:B,terminator:aI},endIndex:d+1}}}return Hl(a.slice(o),a.length)}function YS(a,o){let f=a.codePointAt(o),B,I=!1;switch(f){case SC:{switch(a[o+1]){case lh:{B=o+2,I=!0;break}case lS:case iS:case oS:case cS:{B=o+2;break}case eI:return Hl(oh,o+2);default:return}break}case uI:{B=o+1,I=!0;break}case Ah:case th:case uh:case nh:{B=o+1;break}case ah:return Hl(aI,o+1);default:return}for(let D=B;D<a.length;D++){if(I&&a[D]===RD)return Hl(a.slice(o,D+1),D+1);if(a[D]===Eg&&a[D+1]===eI)return Hl(a.slice(o,D+2),D+2);if(a[D]===aI)return Hl(a.slice(o,D+1),D+1)}return Hl(a.slice(o),a.length)}function RC(a,o){let f=a.codePointAt(o);if(f===SC||f===uI){let I=_S(a,o);if(I)return I}let B=YS(a,o);return B||KS(a,o)}function Eh(a,o,f){for(;o<a.length;){let B=a.codePointAt(o);if(!vC.has(B))break;let I=RC(a,o);if(!I)break;f.push(I.token),o=I.endIndex}return o}function fh(a,o,f){let B=f.containing(o);if(!(!B||B.index!==o))return{token:{type:"character",value:B.segment,visibleWidth:sh(B.segment),isGraphemeContinuation:!1},endIndex:o+B.segment.length}}function wS(a){let o=[],f=0;for(;f<a.length;){let B=a.codePointAt(f);if(vC.has(B)){let D=RC(a,f);if(D){f=D.endIndex;continue}}let I=String.fromCodePoint(B);o.push({value:I,visibleWidth:1,isGraphemeContinuation:!1}),f+=I.length}return o}function qS(a){if(a.length===0)return;let o=a.map(({value:D})=>D).join(""),f=[],B=0;for(let D of a)f.push(B),B+=D.value.length;let I=0;for(let D of HD.segment(o)){for(;I<a.length&&f[I]<D.index;)I++;let d=I,S=!0;for(;d<a.length&&f[d]<D.index+D.segment.length;)a[d].visibleWidth=S?sh(D.segment):0,a[d].isGraphemeContinuation=!S,S=!1,d++;I=d}}function vD(a,{endCharacter:o=Number.POSITIVE_INFINITY}={}){let f=[],B=wS(a);qS(B);let I=0,D=0,d=0;for(;I<a.length;){let S=a.codePointAt(I);if(vC.has(S)){let F=RC(a,I);if(F){f.push(F.token),I=F.endIndex;continue}}let v=String.fromCodePoint(S),x=B[D],Y=sg(S)?2:v.length;x&&(Y=x.visibleWidth);let AA={type:"character",value:v,visibleWidth:Y,isGraphemeContinuation:x?x.isGraphemeContinuation:!1};if(f.push(AA),I+=v.length,D++,d+=AA.visibleWidth,d>=o){let F=B[D];if(!F||!F.isGraphemeContinuation){I=Eh(a,I,f);break}}}return f}function gh(a,o){let f=`${a}${o}`,B=a.length;for(let I of HD.segment(f)){if(I.index===B)return!1;if(I.index>B)return!0}return!0}function XS(a,o,f,B){if(!f)return!1;let I=o,D=!1;for(;I<a.length;){let d=a.codePointAt(I);if(vC.has(d)){let v=RC(a,I);if(v){D=!0,I=v.endIndex;continue}}if(!D)return!1;let S=fh(a,I,B);return S?gh(f,S.token.value):!0}return!1}function MD(a,{endCharacter:o=Number.POSITIVE_INFINITY}={}){let f=[],B=HD.segment(a),I=0,D=0,d,S=!1;for(;I<a.length;){let v=a.codePointAt(I);if(vC.has(v)){let Y=RC(a,I);if(Y){f.push(Y.token),I=Y.endIndex,S=!0;continue}}let x=fh(a,I,B);if(!x)return vD(a,{endCharacter:o});if(S&&d&&gh(d,x.token.value))return vD(a,{endCharacter:o});if(f.push(x.token),I=x.endIndex,D+=x.token.visibleWidth,S=!1,d=x.token.value,D>=o){if(XS(a,I,d,B))return vD(a,{endCharacter:o});I=Eh(a,I,f);break}}return f}function ZS(a,o){for(let f of o)switch(f.type){case"reset":{a.clear();break}case"end":{a.delete(f.endCode);break}case"start":{a.delete(f.endCode),a.set(f.endCode,f.code);break}default:break}return a}function jS(a){return[...a.keys()].reverse().join("")}function VS(a){return`${a.closePrefix}${a.terminator}`}function WS(a,o){let f=!1,B=!1;for(let I of a.fragments){if(I.type==="start"){f=!0;continue}if(I.type==="reset"&&o.size>0){B=!0;continue}I.type==="end"&&o.has(I.endCode)&&(B=!0)}return B&&!f}function kS({token:a,isPastEnd:o,activeStyles:f,returnValue:B,include:I,activeHyperlink:D,position:d}){return o&&!WS(a,f)?{activeStyles:f,activeHyperlink:D,position:d,returnValue:B,include:I}:(f=ZS(f,a.fragments),I&&(B+=a.code),{activeStyles:f,activeHyperlink:D,position:d,returnValue:B,include:I})}function PS({token:a,isPastEnd:o,activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d}){return o&&(a.action!=="close"||!B)?{activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d}:(a.action==="open"?B=a:a.action==="close"&&(B=void 0),d&&(D+=a.code),{activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d})}function $S({token:a,isPastEnd:o,activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d}){return!o&&d&&(D+=a.code),{activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d}}function Av({token:a,start:o,activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d}){return!d&&I>=o&&!a.isGraphemeContinuation&&(d=!0,D=[...f.values()].join(""),B&&(D+=B.code)),d&&(D+=a.value),I+=a.visibleWidth,{activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d}}var tv={sgr:kS,hyperlink:PS,control:$S,character:Av};function ev(a){let o=tv[a.token.type];if(!o){let{activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d}=a;return{activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d}}return o(a)}function av(a){let o=Array.from({length:a.length},()=>!1),f=!1;for(let B=a.length-1;B>=0;B--){let I=a[B];o[B]=f,I.type==="character"&&(f=!!I.isGraphemeContinuation)}return o}function jn(a,o,f){let B=MD(a,{endCharacter:f}),I=av(B),D=new Map,d,S=0,v="",x=!1;for(let[Y,AA]of B.entries()){let F=f!==void 0&&S>=f;if(F&&AA.type!=="character"&&I[Y]&&(F=!1),F&&AA.type==="character"&&!AA.isGraphemeContinuation)break;({activeStyles:D,activeHyperlink:d,position:S,returnValue:v,include:x}=ev({token:AA,isPastEnd:F,start:o,activeStyles:D,activeHyperlink:d,position:S,returnValue:v,include:x}))}return x?(d&&(v+=VS(d)),v+=jS(D),v):""}function nI(a,o,f){if(a.charAt(o)===" ")return o;let B=f?1:-1;for(let I=0;I<=3;I++){let D=o+I*B;if(a.charAt(D)===" ")return D}return o}function GD(a,o,f={}){let{position:B="end",space:I=!1,preferTruncationOnSpace:D=!1}=f,{truncationCharacter:d="\u2026"}=f;if(typeof a!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof a}`);if(typeof o!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof o}`);if(o<1)return"";let S=Ei(a);if(S<=o)return a;if(o===1)return d;let v={ESC:27,LEFT_BRACKET:91,LETTER_M:109},x=aA=>aA>=48&&aA<=57||aA===59;function Y(aA){let P=0;for(;P+2<aA.length&&aA.codePointAt(P)===v.ESC&&aA.codePointAt(P+1)===v.LEFT_BRACKET;){let Z=P+2;for(;Z<aA.length&&x(aA.codePointAt(Z));)Z++;if(Z<aA.length&&aA.codePointAt(Z)===v.LETTER_M){P=Z+1;continue}break}return P}function AA(aA){let P=aA.length;for(;P>1&&aA.codePointAt(P-1)===v.LETTER_M;){let Z=P-2;for(;Z>=0&&x(aA.codePointAt(Z));)Z--;if(Z>=1&&aA.codePointAt(Z-1)===v.ESC&&aA.codePointAt(Z)===v.LEFT_BRACKET){P=Z-1;continue}break}return P}function F(aA,P){let Z=AA(aA);return Z===aA.length?aA+P:aA.slice(0,Z)+P+aA.slice(Z)}function X(aA,P){let Z=Y(P);return Z===0?aA+P:P.slice(0,Z)+aA+P.slice(Z)}if(B==="start"){if(D){let P=nI(a,S-o+1,!0),Z=jn(a,P,S).trim();return X(d,Z)}I&&(d+=" ");let aA=jn(a,S-o+Ei(d),S);return X(d,aA)}if(B==="middle"){I&&(d=` ${d} `);let aA=Math.floor(o/2);if(D){let P=nI(a,aA),Z=nI(a,S-(o-aA)+1,!0);return jn(a,0,P)+d+jn(a,Z,S).trim()}return jn(a,0,aA)+d+jn(a,S-(o-aA)+Ei(d),S)}if(B==="end"){if(D){let P=nI(a,o-1),Z=jn(a,0,P);return F(Z,d)}I&&(d=` ${d}`);let aA=jn(a,0,o-Ei(d));return F(aA,d)}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${B}`)}var Bh={},uv=(a,o,f)=>{let B=a+String(o)+String(f),I=Bh[B];if(I)return I;let D=a;if(f==="wrap"&&(D=fC(a,o,{trim:!1,hard:!0})),f.startsWith("truncate")){let d="end";f==="truncate-middle"&&(d="middle"),f==="truncate-start"&&(d="start"),D=GD(a,o,{position:d})}return Bh[B]=D,D},lI=uv;var nv=a=>{let o=a.codePointAt(0);return o!==void 0&&o>=48&&o<=63},lv=a=>{let o=a.codePointAt(0);return o!==void 0&&o>=32&&o<=47},iv=a=>{let o=a.codePointAt(0);return o!==void 0&&o>=64&&o<=126},Ih=a=>{let o=a.codePointAt(0);return o!==void 0&&o>=32&&o<=47},ov=a=>{let o=a.codePointAt(0);return o!==void 0&&o>=48&&o<=126},Qh=a=>{let o=a.codePointAt(0);return o!==void 0&&o>=128&&o<=159},Ch=(a,o)=>{let f=o;for(;f<a.length;){let S=a[f];if(!nv(S))break;f++}let B=a.slice(o,f),I=f;for(;f<a.length;){let S=a[f];if(!lv(S))break;f++}let D=a.slice(I,f),d=a[f];if(!(d===void 0||!iv(d)))return{endIndex:f+1,parameterString:B,intermediateString:D,finalCharacter:d}},rh=(a,o,f)=>{for(let B=o;B<a.length;B++){let I=a[B];if(f&&I==="\x07"||I==="\x9C")return B+1;if(I==="\x1B"){let D=a[B+1];if(D==="\x1B"){B++;continue}if(D==="\\")return B+2}}},cv=(a,o)=>{let f=o;for(;f<a.length;){let D=a[f];if(!Ih(D))break;f++}let B=a.slice(o,f),I=a[f];if(!(I===void 0||!ov(I)))return{endIndex:f+1,intermediateString:B,finalCharacter:I}},sv=a=>{switch(a){case"]":return{type:"osc",allowBellTerminator:!0};case"P":return{type:"dcs",allowBellTerminator:!1};case"^":return{type:"pm",allowBellTerminator:!1};case"_":return{type:"apc",allowBellTerminator:!1};case"X":return{type:"sos",allowBellTerminator:!1};default:return}},Ev=a=>{switch(a){case"\x9D":return{type:"osc",allowBellTerminator:!0};case"\x90":return{type:"dcs",allowBellTerminator:!1};case"\x9E":return{type:"pm",allowBellTerminator:!1};case"\x9F":return{type:"apc",allowBellTerminator:!1};case"\x98":return{type:"sos",allowBellTerminator:!1};default:return}},TD=a=>{if(a.includes("\x1B"))return!0;for(let o of a)if(Qh(o))return!0;return!1},fg=(a,o,f,B)=>(B>f&&a.push({type:"text",value:o.slice(f,B)}),a.push({type:"invalid",value:o.slice(B)}),a),Dh=a=>{if(!TD(a))return[{type:"text",value:a}];let o=[],f=0;for(let B=0;B<a.length;){let I=a[B];if(I===void 0)break;if(I==="\x1B"){let d=a[B+1];if(d===void 0)return fg(o,a,f,B);if(d==="["){let x=Ch(a,B+2);if(x===void 0)return fg(o,a,f,B);B>f&&o.push({type:"text",value:a.slice(f,B)}),o.push({type:"csi",value:a.slice(B,x.endIndex),parameterString:x.parameterString,intermediateString:x.intermediateString,finalCharacter:x.finalCharacter}),B=x.endIndex,f=B;continue}let S=sv(d);if(S!==void 0){let x=rh(a,B+2,S.allowBellTerminator);if(x===void 0)return fg(o,a,f,B);B>f&&o.push({type:"text",value:a.slice(f,B)}),o.push({type:S.type,value:a.slice(B,x)}),B=x,f=B;continue}let v=cv(a,B+1);if(v===void 0){if(Ih(d))return fg(o,a,f,B);B>f&&o.push({type:"text",value:a.slice(f,B)}),B++,f=B;continue}B>f&&o.push({type:"text",value:a.slice(f,B)}),o.push({type:"esc",value:a.slice(B,v.endIndex),intermediateString:v.intermediateString,finalCharacter:v.finalCharacter}),B=v.endIndex,f=B;continue}if(I==="\x9B"){let d=Ch(a,B+1);if(d===void 0)return fg(o,a,f,B);B>f&&o.push({type:"text",value:a.slice(f,B)}),o.push({type:"csi",value:a.slice(B,d.endIndex),parameterString:d.parameterString,intermediateString:d.intermediateString,finalCharacter:d.finalCharacter}),B=d.endIndex,f=B;continue}let D=Ev(I);if(D!==void 0){let d=rh(a,B+1,D.allowBellTerminator);if(d===void 0)return fg(o,a,f,B);B>f&&o.push({type:"text",value:a.slice(f,B)}),o.push({type:D.type,value:a.slice(B,d)}),B=d,f=B;continue}if(I==="\x9C"){B>f&&o.push({type:"text",value:a.slice(f,B)}),o.push({type:"st",value:I}),B++,f=B;continue}if(Qh(I)){B>f&&o.push({type:"text",value:a.slice(f,B)}),o.push({type:"c1",value:I}),B++,f=B;continue}B++}return f<a.length&&o.push({type:"text",value:a.slice(f)}),o};var fv=/^[\d:;]*$/,gv=a=>{if(!TD(a))return a;let o="";for(let f of Dh(a)){if(f.type==="text"||f.type==="osc"){o+=f.value;continue}f.type==="csi"&&f.finalCharacter==="m"&&f.intermediateString===""&&fv.test(f.parameterString)&&(o+=f.value)}return o},mh=gv;var dh=a=>{let o="";for(let f=0;f<a.childNodes.length;f++){let B=a.childNodes[f];if(B===void 0)continue;let I="";B.nodeName==="#text"?I=B.nodeValue:((B.nodeName==="ink-text"||B.nodeName==="ink-virtual-text")&&(I=dh(B)),I.length>0&&typeof B.internal_transform=="function"&&(I=B.internal_transform(I,f))),o+=I}return mh(o)},NC=dh;var gg=a=>{let o={nodeName:a,style:{},attributes:{},childNodes:[],parentNode:void 0,yogaNode:a==="ink-virtual-text"?void 0:BA.Node.create(),internal_accessibility:{}};return a==="ink-text"&&o.yogaNode?.setMeasureFunc(Bv.bind(null,o)),o},iI=(a,o)=>{o.parentNode&&FC(o.parentNode,o),o.parentNode=a,a.childNodes.push(o),o.yogaNode&&a.yogaNode?.insertChild(o.yogaNode,a.yogaNode.getChildCount()),(a.nodeName==="ink-text"||a.nodeName==="ink-virtual-text")&&oI(a)},OD=(a,o,f)=>{o.parentNode&&FC(o.parentNode,o),o.parentNode=a;let B=a.childNodes.indexOf(f);B>=0?(a.childNodes.splice(B,0,o),o.yogaNode&&a.yogaNode?.insertChild(o.yogaNode,B)):(a.childNodes.push(o),o.yogaNode&&a.yogaNode?.insertChild(o.yogaNode,a.yogaNode.getChildCount())),(a.nodeName==="ink-text"||a.nodeName==="ink-virtual-text")&&oI(a)},FC=(a,o)=>{o.yogaNode&&o.parentNode?.yogaNode?.removeChild(o.yogaNode),o.parentNode=void 0;let f=a.childNodes.indexOf(o);f>=0&&a.childNodes.splice(f,1),(a.nodeName==="ink-text"||a.nodeName==="ink-virtual-text")&&oI(a)},bD=(a,o,f)=>{if(o==="internal_accessibility"){a.internal_accessibility=f;return}a.attributes[o]=f},xD=(a,o)=>{a.style=o},ph=a=>{let o={nodeName:"#text",nodeValue:a,yogaNode:void 0,parentNode:void 0,style:{}};return UC(o,a),o},Bv=function(a,o){let f=a.nodeName==="#text"?a.nodeValue:NC(a),B=hD(f);if(B.width<=o||B.width>=1&&o>0&&o<1)return B;let I=a.style?.textWrap??"wrap",D=lI(f,o,I);return hD(D)},hh=a=>{if(a?.parentNode)return a.yogaNode??hh(a.parentNode)},oI=a=>{hh(a)?.markDirty()},UC=(a,o)=>{typeof o!="string"&&(o=String(o)),a.nodeValue=o,oI(a)};var rv=(a,o)=>{"position"in o&&a.setPositionType(o.position==="absolute"?BA.POSITION_TYPE_ABSOLUTE:BA.POSITION_TYPE_RELATIVE)},Iv=(a,o)=>{"margin"in o&&a.setMargin(BA.EDGE_ALL,o.margin??0),"marginX"in o&&a.setMargin(BA.EDGE_HORIZONTAL,o.marginX??0),"marginY"in o&&a.setMargin(BA.EDGE_VERTICAL,o.marginY??0),"marginLeft"in o&&a.setMargin(BA.EDGE_START,o.marginLeft||0),"marginRight"in o&&a.setMargin(BA.EDGE_END,o.marginRight||0),"marginTop"in o&&a.setMargin(BA.EDGE_TOP,o.marginTop||0),"marginBottom"in o&&a.setMargin(BA.EDGE_BOTTOM,o.marginBottom||0)},Qv=(a,o)=>{"padding"in o&&a.setPadding(BA.EDGE_ALL,o.padding??0),"paddingX"in o&&a.setPadding(BA.EDGE_HORIZONTAL,o.paddingX??0),"paddingY"in o&&a.setPadding(BA.EDGE_VERTICAL,o.paddingY??0),"paddingLeft"in o&&a.setPadding(BA.EDGE_LEFT,o.paddingLeft||0),"paddingRight"in o&&a.setPadding(BA.EDGE_RIGHT,o.paddingRight||0),"paddingTop"in o&&a.setPadding(BA.EDGE_TOP,o.paddingTop||0),"paddingBottom"in o&&a.setPadding(BA.EDGE_BOTTOM,o.paddingBottom||0)},Dv=(a,o)=>{"flexGrow"in o&&a.setFlexGrow(o.flexGrow??0),"flexShrink"in o&&a.setFlexShrink(typeof o.flexShrink=="number"?o.flexShrink:1),"flexWrap"in o&&(o.flexWrap==="nowrap"&&a.setFlexWrap(BA.WRAP_NO_WRAP),o.flexWrap==="wrap"&&a.setFlexWrap(BA.WRAP_WRAP),o.flexWrap==="wrap-reverse"&&a.setFlexWrap(BA.WRAP_WRAP_REVERSE)),"flexDirection"in o&&(o.flexDirection==="row"&&a.setFlexDirection(BA.FLEX_DIRECTION_ROW),o.flexDirection==="row-reverse"&&a.setFlexDirection(BA.FLEX_DIRECTION_ROW_REVERSE),o.flexDirection==="column"&&a.setFlexDirection(BA.FLEX_DIRECTION_COLUMN),o.flexDirection==="column-reverse"&&a.setFlexDirection(BA.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in o&&(typeof o.flexBasis=="number"?a.setFlexBasis(o.flexBasis):typeof o.flexBasis=="string"?a.setFlexBasisPercent(Number.parseInt(o.flexBasis,10)):a.setFlexBasis(Number.NaN)),"alignItems"in o&&((o.alignItems==="stretch"||!o.alignItems)&&a.setAlignItems(BA.ALIGN_STRETCH),o.alignItems==="flex-start"&&a.setAlignItems(BA.ALIGN_FLEX_START),o.alignItems==="center"&&a.setAlignItems(BA.ALIGN_CENTER),o.alignItems==="flex-end"&&a.setAlignItems(BA.ALIGN_FLEX_END)),"alignSelf"in o&&((o.alignSelf==="auto"||!o.alignSelf)&&a.setAlignSelf(BA.ALIGN_AUTO),o.alignSelf==="flex-start"&&a.setAlignSelf(BA.ALIGN_FLEX_START),o.alignSelf==="center"&&a.setAlignSelf(BA.ALIGN_CENTER),o.alignSelf==="flex-end"&&a.setAlignSelf(BA.ALIGN_FLEX_END)),"justifyContent"in o&&((o.justifyContent==="flex-start"||!o.justifyContent)&&a.setJustifyContent(BA.JUSTIFY_FLEX_START),o.justifyContent==="center"&&a.setJustifyContent(BA.JUSTIFY_CENTER),o.justifyContent==="flex-end"&&a.setJustifyContent(BA.JUSTIFY_FLEX_END),o.justifyContent==="space-between"&&a.setJustifyContent(BA.JUSTIFY_SPACE_BETWEEN),o.justifyContent==="space-around"&&a.setJustifyContent(BA.JUSTIFY_SPACE_AROUND),o.justifyContent==="space-evenly"&&a.setJustifyContent(BA.JUSTIFY_SPACE_EVENLY))},mv=(a,o)=>{"width"in o&&(typeof o.width=="number"?a.setWidth(o.width):typeof o.width=="string"?a.setWidthPercent(Number.parseInt(o.width,10)):a.setWidthAuto()),"height"in o&&(typeof o.height=="number"?a.setHeight(o.height):typeof o.height=="string"?a.setHeightPercent(Number.parseInt(o.height,10)):a.setHeightAuto()),"minWidth"in o&&(typeof o.minWidth=="string"?a.setMinWidthPercent(Number.parseInt(o.minWidth,10)):a.setMinWidth(o.minWidth??0)),"minHeight"in o&&(typeof o.minHeight=="string"?a.setMinHeightPercent(Number.parseInt(o.minHeight,10)):a.setMinHeight(o.minHeight??0))},dv=(a,o)=>{"display"in o&&a.setDisplay(o.display==="flex"?BA.DISPLAY_FLEX:BA.DISPLAY_NONE)},pv=(a,o)=>{if("borderStyle"in o){let f=o.borderStyle?1:0;o.borderTop!==!1&&a.setBorder(BA.EDGE_TOP,f),o.borderBottom!==!1&&a.setBorder(BA.EDGE_BOTTOM,f),o.borderLeft!==!1&&a.setBorder(BA.EDGE_LEFT,f),o.borderRight!==!1&&a.setBorder(BA.EDGE_RIGHT,f)}},hv=(a,o)=>{"gap"in o&&a.setGap(BA.GUTTER_ALL,o.gap??0),"columnGap"in o&&a.setGap(BA.GUTTER_COLUMN,o.columnGap??0),"rowGap"in o&&a.setGap(BA.GUTTER_ROW,o.rowGap??0)},yv=(a,o={})=>{rv(a,o),Iv(a,o),Qv(a,o),Dv(a,o),mv(a,o),dv(a,o),pv(a,o),hv(a,o)},zD=yv;if(BC())try{await import("./devtools-RNURB4HU.js")}catch(a){if(a.code==="ERR_MODULE_NOT_FOUND")console.warn(`
|
|
221
|
+
`).length,I={width:f,height:B};return Wp.set(a,I),I},hD=nS;function sg(a){return Number.isInteger(a)?dC(a)||pC(a):!1}var SC=27,Ah=144,th=152,eh=155,ah=156,uI=157,uh=158,nh=159,vC=new Set([SC,Ah,th,eh,ah,uI,uh,nh]),Eg="\x1B",RD="\x07",UD="[",lh="]",lS="P",iS="X",oS="^",cS="_",ih="m",eI="\\",oh=`${Eg}${eI}`,sS="\x9D",aI="\x9C",ND=`${Eg}${lh}8;`,FD=`${sS}8;`,ES=`${ND};`,fS=`${FD};`,gS="0".codePointAt(0),BS="9".codePointAt(0),CS=";".codePointAt(0),rS=":".codePointAt(0),IS="0".codePointAt(0),QS="?".codePointAt(0),DS=" ".codePointAt(0),mS="/".codePointAt(0),dS="@".codePointAt(0),pS="~".codePointAt(0),hS=127462,yS=127487,kp=0,tI=38,yD=39,SS=48,SD=49,vS=5,RS=2,Pp=3,$p=5,NS=2,FS=4,US=65039,HS=8419,MS=/\p{Emoji_Presentation}/u,HD=new Intl.Segmenter(void 0,{granularity:"grapheme"}),ch=new Set;for(let[,a]of Wt.codes)ch.add(a);function GS(a){return a>=gS&&a<=BS||a===CS||a===rS}function TS(a){return a>=IS&&a<=QS}function OS(a){return a>=DS&&a<=mS}function bS(a){return a>=dS&&a<=pS}function xS(a){return a>=hS&&a<=yS}function Hl(a,o){return{token:{type:"control",code:a},endIndex:o}}function zS(a){if(MS.test(a))return!0;for(let o of a){let f=o.codePointAt(0);if(f===US||f===HS)return!0}return!1}function sh(a){let o=0;for(let f of a){let B=f.codePointAt(0);if(sg(B))return 2;xS(B)&&o++}return o>=1||zS(a)?2:1}function JS(a){return a.startsWith("\x9B")?"\x9B":`${Eg}${UD}`}function yC(a,o){return`${a}${o.join(";")}${ih}`}function LS(a){let o=[],f=JS(a),B;if(a.startsWith(`${Eg}${UD}`))B=a.slice(2,-1);else if(a.startsWith("\x9B"))B=a.slice(1,-1);else return o;let I=B.length===0?[String(kp)]:B.split(";"),D=0;for(;D<I.length;){let d=Number.parseInt(I[D],10);if(Number.isNaN(d)){D++;continue}if(d===kp){o.push({type:"reset"}),D++;continue}if(d===tI||d===SS){let x=Number.parseInt(I[D+1],10);if(x===vS&&D+NS<I.length){let AA=yC(f,I.slice(D,D+Pp));o.push({type:"start",code:AA,endCode:Wt.color.ansi(d===tI?yD:SD)}),D+=Pp;continue}if(x===RS&&D+FS<I.length){let AA=yC(f,I.slice(D,D+$p));o.push({type:"start",code:AA,endCode:Wt.color.ansi(d===tI?yD:SD)}),D+=$p;continue}let Y=yC(f,[I[D]]);o.push({type:"start",code:Y,endCode:Wt.color.ansi(d===tI?yD:SD)}),D++;continue}if(ch.has(d)){o.push({type:"end",endCode:Wt.color.ansi(d)}),D++;continue}let S=Wt.codes.get(d);if(S!==void 0){let x=yC(f,[I[D]]);o.push({type:"start",code:x,endCode:Wt.color.ansi(S)}),D++;continue}let v=yC(f,[I[D]]);o.push({type:"start",code:v,endCode:Wt.reset.open}),D++}return o.length===0&&o.push({type:"reset"}),o}function KS(a,o){let f=a.codePointAt(o),B;if(f===SC){if(a[o+1]!==UD)return;B=o+2}else if(f===eh)B=o+1;else return;let I=!0;for(let D=B;D<a.length;D++){let d=a.codePointAt(D);if(bS(d)){let v=a.slice(o,D+1);return a[D]!==ih||!I?Hl(v,D+1):{token:{type:"sgr",code:v,fragments:LS(v)},endIndex:D+1}}if(TS(d)){GS(d)||(I=!1);continue}if(OS(d)){I=!1;continue}let S=D;return Hl(a.slice(o,S),S)}return Hl(a.slice(o),a.length)}function _S(a,o){let f,B,I=a.codePointAt(o);if(I===SC&&a.startsWith(ND,o))f=ND,B=ES;else if(I===uI&&a.startsWith(FD,o))f=FD,B=fS;else return;let D=a.indexOf(";",o+f.length);if(D===-1)return Hl(a.slice(o),a.length);for(let d=D+1;d<a.length;d++){let S=a[d];if(S===RD){let v=a.slice(o,d+1),x=d===D+1?"close":"open";return{token:{type:"hyperlink",code:v,action:x,closePrefix:B,terminator:RD},endIndex:d+1}}if(S===Eg&&a[d+1]===eI){let v=a.slice(o,d+2),x=d===D+1?"close":"open";return{token:{type:"hyperlink",code:v,action:x,closePrefix:B,terminator:oh},endIndex:d+2}}if(S===aI){let v=a.slice(o,d+1),x=d===D+1?"close":"open";return{token:{type:"hyperlink",code:v,action:x,closePrefix:B,terminator:aI},endIndex:d+1}}}return Hl(a.slice(o),a.length)}function YS(a,o){let f=a.codePointAt(o),B,I=!1;switch(f){case SC:{switch(a[o+1]){case lh:{B=o+2,I=!0;break}case lS:case iS:case oS:case cS:{B=o+2;break}case eI:return Hl(oh,o+2);default:return}break}case uI:{B=o+1,I=!0;break}case Ah:case th:case uh:case nh:{B=o+1;break}case ah:return Hl(aI,o+1);default:return}for(let D=B;D<a.length;D++){if(I&&a[D]===RD)return Hl(a.slice(o,D+1),D+1);if(a[D]===Eg&&a[D+1]===eI)return Hl(a.slice(o,D+2),D+2);if(a[D]===aI)return Hl(a.slice(o,D+1),D+1)}return Hl(a.slice(o),a.length)}function RC(a,o){let f=a.codePointAt(o);if(f===SC||f===uI){let I=_S(a,o);if(I)return I}let B=YS(a,o);return B||KS(a,o)}function Eh(a,o,f){for(;o<a.length;){let B=a.codePointAt(o);if(!vC.has(B))break;let I=RC(a,o);if(!I)break;f.push(I.token),o=I.endIndex}return o}function fh(a,o,f){let B=f.containing(o);if(!(!B||B.index!==o))return{token:{type:"character",value:B.segment,visibleWidth:sh(B.segment),isGraphemeContinuation:!1},endIndex:o+B.segment.length}}function wS(a){let o=[],f=0;for(;f<a.length;){let B=a.codePointAt(f);if(vC.has(B)){let D=RC(a,f);if(D){f=D.endIndex;continue}}let I=String.fromCodePoint(B);o.push({value:I,visibleWidth:1,isGraphemeContinuation:!1}),f+=I.length}return o}function qS(a){if(a.length===0)return;let o=a.map(({value:D})=>D).join(""),f=[],B=0;for(let D of a)f.push(B),B+=D.value.length;let I=0;for(let D of HD.segment(o)){for(;I<a.length&&f[I]<D.index;)I++;let d=I,S=!0;for(;d<a.length&&f[d]<D.index+D.segment.length;)a[d].visibleWidth=S?sh(D.segment):0,a[d].isGraphemeContinuation=!S,S=!1,d++;I=d}}function vD(a,{endCharacter:o=Number.POSITIVE_INFINITY}={}){let f=[],B=wS(a);qS(B);let I=0,D=0,d=0;for(;I<a.length;){let S=a.codePointAt(I);if(vC.has(S)){let F=RC(a,I);if(F){f.push(F.token),I=F.endIndex;continue}}let v=String.fromCodePoint(S),x=B[D],Y=sg(S)?2:v.length;x&&(Y=x.visibleWidth);let AA={type:"character",value:v,visibleWidth:Y,isGraphemeContinuation:x?x.isGraphemeContinuation:!1};if(f.push(AA),I+=v.length,D++,d+=AA.visibleWidth,d>=o){let F=B[D];if(!F||!F.isGraphemeContinuation){I=Eh(a,I,f);break}}}return f}function gh(a,o){let f=`${a}${o}`,B=a.length;for(let I of HD.segment(f)){if(I.index===B)return!1;if(I.index>B)return!0}return!0}function XS(a,o,f,B){if(!f)return!1;let I=o,D=!1;for(;I<a.length;){let d=a.codePointAt(I);if(vC.has(d)){let v=RC(a,I);if(v){D=!0,I=v.endIndex;continue}}if(!D)return!1;let S=fh(a,I,B);return S?gh(f,S.token.value):!0}return!1}function MD(a,{endCharacter:o=Number.POSITIVE_INFINITY}={}){let f=[],B=HD.segment(a),I=0,D=0,d,S=!1;for(;I<a.length;){let v=a.codePointAt(I);if(vC.has(v)){let Y=RC(a,I);if(Y){f.push(Y.token),I=Y.endIndex,S=!0;continue}}let x=fh(a,I,B);if(!x)return vD(a,{endCharacter:o});if(S&&d&&gh(d,x.token.value))return vD(a,{endCharacter:o});if(f.push(x.token),I=x.endIndex,D+=x.token.visibleWidth,S=!1,d=x.token.value,D>=o){if(XS(a,I,d,B))return vD(a,{endCharacter:o});I=Eh(a,I,f);break}}return f}function ZS(a,o){for(let f of o)switch(f.type){case"reset":{a.clear();break}case"end":{a.delete(f.endCode);break}case"start":{a.delete(f.endCode),a.set(f.endCode,f.code);break}default:break}return a}function jS(a){return[...a.keys()].reverse().join("")}function VS(a){return`${a.closePrefix}${a.terminator}`}function WS(a,o){let f=!1,B=!1;for(let I of a.fragments){if(I.type==="start"){f=!0;continue}if(I.type==="reset"&&o.size>0){B=!0;continue}I.type==="end"&&o.has(I.endCode)&&(B=!0)}return B&&!f}function kS({token:a,isPastEnd:o,activeStyles:f,returnValue:B,include:I,activeHyperlink:D,position:d}){return o&&!WS(a,f)?{activeStyles:f,activeHyperlink:D,position:d,returnValue:B,include:I}:(f=ZS(f,a.fragments),I&&(B+=a.code),{activeStyles:f,activeHyperlink:D,position:d,returnValue:B,include:I})}function PS({token:a,isPastEnd:o,activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d}){return o&&(a.action!=="close"||!B)?{activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d}:(a.action==="open"?B=a:a.action==="close"&&(B=void 0),d&&(D+=a.code),{activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d})}function $S({token:a,isPastEnd:o,activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d}){return!o&&d&&(D+=a.code),{activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d}}function Av({token:a,start:o,activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d}){return!d&&I>=o&&!a.isGraphemeContinuation&&(d=!0,D=[...f.values()].join(""),B&&(D+=B.code)),d&&(D+=a.value),I+=a.visibleWidth,{activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d}}var tv={sgr:kS,hyperlink:PS,control:$S,character:Av};function ev(a){let o=tv[a.token.type];if(!o){let{activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d}=a;return{activeStyles:f,activeHyperlink:B,position:I,returnValue:D,include:d}}return o(a)}function av(a){let o=Array.from({length:a.length},()=>!1),f=!1;for(let B=a.length-1;B>=0;B--){let I=a[B];o[B]=f,I.type==="character"&&(f=!!I.isGraphemeContinuation)}return o}function jn(a,o,f){let B=MD(a,{endCharacter:f}),I=av(B),D=new Map,d,S=0,v="",x=!1;for(let[Y,AA]of B.entries()){let F=f!==void 0&&S>=f;if(F&&AA.type!=="character"&&I[Y]&&(F=!1),F&&AA.type==="character"&&!AA.isGraphemeContinuation)break;({activeStyles:D,activeHyperlink:d,position:S,returnValue:v,include:x}=ev({token:AA,isPastEnd:F,start:o,activeStyles:D,activeHyperlink:d,position:S,returnValue:v,include:x}))}return x?(d&&(v+=VS(d)),v+=jS(D),v):""}function nI(a,o,f){if(a.charAt(o)===" ")return o;let B=f?1:-1;for(let I=0;I<=3;I++){let D=o+I*B;if(a.charAt(D)===" ")return D}return o}function GD(a,o,f={}){let{position:B="end",space:I=!1,preferTruncationOnSpace:D=!1}=f,{truncationCharacter:d="\u2026"}=f;if(typeof a!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof a}`);if(typeof o!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof o}`);if(o<1)return"";let S=Ei(a);if(S<=o)return a;if(o===1)return d;let v={ESC:27,LEFT_BRACKET:91,LETTER_M:109},x=aA=>aA>=48&&aA<=57||aA===59;function Y(aA){let P=0;for(;P+2<aA.length&&aA.codePointAt(P)===v.ESC&&aA.codePointAt(P+1)===v.LEFT_BRACKET;){let Z=P+2;for(;Z<aA.length&&x(aA.codePointAt(Z));)Z++;if(Z<aA.length&&aA.codePointAt(Z)===v.LETTER_M){P=Z+1;continue}break}return P}function AA(aA){let P=aA.length;for(;P>1&&aA.codePointAt(P-1)===v.LETTER_M;){let Z=P-2;for(;Z>=0&&x(aA.codePointAt(Z));)Z--;if(Z>=1&&aA.codePointAt(Z-1)===v.ESC&&aA.codePointAt(Z)===v.LEFT_BRACKET){P=Z-1;continue}break}return P}function F(aA,P){let Z=AA(aA);return Z===aA.length?aA+P:aA.slice(0,Z)+P+aA.slice(Z)}function X(aA,P){let Z=Y(P);return Z===0?aA+P:P.slice(0,Z)+aA+P.slice(Z)}if(B==="start"){if(D){let P=nI(a,S-o+1,!0),Z=jn(a,P,S).trim();return X(d,Z)}I&&(d+=" ");let aA=jn(a,S-o+Ei(d),S);return X(d,aA)}if(B==="middle"){I&&(d=` ${d} `);let aA=Math.floor(o/2);if(D){let P=nI(a,aA),Z=nI(a,S-(o-aA)+1,!0);return jn(a,0,P)+d+jn(a,Z,S).trim()}return jn(a,0,aA)+d+jn(a,S-(o-aA)+Ei(d),S)}if(B==="end"){if(D){let P=nI(a,o-1),Z=jn(a,0,P);return F(Z,d)}I&&(d=` ${d}`);let aA=jn(a,0,o-Ei(d));return F(aA,d)}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${B}`)}var Bh={},uv=(a,o,f)=>{let B=a+String(o)+String(f),I=Bh[B];if(I)return I;let D=a;if(f==="wrap"&&(D=fC(a,o,{trim:!1,hard:!0})),f.startsWith("truncate")){let d="end";f==="truncate-middle"&&(d="middle"),f==="truncate-start"&&(d="start"),D=GD(a,o,{position:d})}return Bh[B]=D,D},lI=uv;var nv=a=>{let o=a.codePointAt(0);return o!==void 0&&o>=48&&o<=63},lv=a=>{let o=a.codePointAt(0);return o!==void 0&&o>=32&&o<=47},iv=a=>{let o=a.codePointAt(0);return o!==void 0&&o>=64&&o<=126},Ih=a=>{let o=a.codePointAt(0);return o!==void 0&&o>=32&&o<=47},ov=a=>{let o=a.codePointAt(0);return o!==void 0&&o>=48&&o<=126},Qh=a=>{let o=a.codePointAt(0);return o!==void 0&&o>=128&&o<=159},Ch=(a,o)=>{let f=o;for(;f<a.length;){let S=a[f];if(!nv(S))break;f++}let B=a.slice(o,f),I=f;for(;f<a.length;){let S=a[f];if(!lv(S))break;f++}let D=a.slice(I,f),d=a[f];if(!(d===void 0||!iv(d)))return{endIndex:f+1,parameterString:B,intermediateString:D,finalCharacter:d}},rh=(a,o,f)=>{for(let B=o;B<a.length;B++){let I=a[B];if(f&&I==="\x07"||I==="\x9C")return B+1;if(I==="\x1B"){let D=a[B+1];if(D==="\x1B"){B++;continue}if(D==="\\")return B+2}}},cv=(a,o)=>{let f=o;for(;f<a.length;){let D=a[f];if(!Ih(D))break;f++}let B=a.slice(o,f),I=a[f];if(!(I===void 0||!ov(I)))return{endIndex:f+1,intermediateString:B,finalCharacter:I}},sv=a=>{switch(a){case"]":return{type:"osc",allowBellTerminator:!0};case"P":return{type:"dcs",allowBellTerminator:!1};case"^":return{type:"pm",allowBellTerminator:!1};case"_":return{type:"apc",allowBellTerminator:!1};case"X":return{type:"sos",allowBellTerminator:!1};default:return}},Ev=a=>{switch(a){case"\x9D":return{type:"osc",allowBellTerminator:!0};case"\x90":return{type:"dcs",allowBellTerminator:!1};case"\x9E":return{type:"pm",allowBellTerminator:!1};case"\x9F":return{type:"apc",allowBellTerminator:!1};case"\x98":return{type:"sos",allowBellTerminator:!1};default:return}},TD=a=>{if(a.includes("\x1B"))return!0;for(let o of a)if(Qh(o))return!0;return!1},fg=(a,o,f,B)=>(B>f&&a.push({type:"text",value:o.slice(f,B)}),a.push({type:"invalid",value:o.slice(B)}),a),Dh=a=>{if(!TD(a))return[{type:"text",value:a}];let o=[],f=0;for(let B=0;B<a.length;){let I=a[B];if(I===void 0)break;if(I==="\x1B"){let d=a[B+1];if(d===void 0)return fg(o,a,f,B);if(d==="["){let x=Ch(a,B+2);if(x===void 0)return fg(o,a,f,B);B>f&&o.push({type:"text",value:a.slice(f,B)}),o.push({type:"csi",value:a.slice(B,x.endIndex),parameterString:x.parameterString,intermediateString:x.intermediateString,finalCharacter:x.finalCharacter}),B=x.endIndex,f=B;continue}let S=sv(d);if(S!==void 0){let x=rh(a,B+2,S.allowBellTerminator);if(x===void 0)return fg(o,a,f,B);B>f&&o.push({type:"text",value:a.slice(f,B)}),o.push({type:S.type,value:a.slice(B,x)}),B=x,f=B;continue}let v=cv(a,B+1);if(v===void 0){if(Ih(d))return fg(o,a,f,B);B>f&&o.push({type:"text",value:a.slice(f,B)}),B++,f=B;continue}B>f&&o.push({type:"text",value:a.slice(f,B)}),o.push({type:"esc",value:a.slice(B,v.endIndex),intermediateString:v.intermediateString,finalCharacter:v.finalCharacter}),B=v.endIndex,f=B;continue}if(I==="\x9B"){let d=Ch(a,B+1);if(d===void 0)return fg(o,a,f,B);B>f&&o.push({type:"text",value:a.slice(f,B)}),o.push({type:"csi",value:a.slice(B,d.endIndex),parameterString:d.parameterString,intermediateString:d.intermediateString,finalCharacter:d.finalCharacter}),B=d.endIndex,f=B;continue}let D=Ev(I);if(D!==void 0){let d=rh(a,B+1,D.allowBellTerminator);if(d===void 0)return fg(o,a,f,B);B>f&&o.push({type:"text",value:a.slice(f,B)}),o.push({type:D.type,value:a.slice(B,d)}),B=d,f=B;continue}if(I==="\x9C"){B>f&&o.push({type:"text",value:a.slice(f,B)}),o.push({type:"st",value:I}),B++,f=B;continue}if(Qh(I)){B>f&&o.push({type:"text",value:a.slice(f,B)}),o.push({type:"c1",value:I}),B++,f=B;continue}B++}return f<a.length&&o.push({type:"text",value:a.slice(f)}),o};var fv=/^[\d:;]*$/,gv=a=>{if(!TD(a))return a;let o="";for(let f of Dh(a)){if(f.type==="text"||f.type==="osc"){o+=f.value;continue}f.type==="csi"&&f.finalCharacter==="m"&&f.intermediateString===""&&fv.test(f.parameterString)&&(o+=f.value)}return o},mh=gv;var dh=a=>{let o="";for(let f=0;f<a.childNodes.length;f++){let B=a.childNodes[f];if(B===void 0)continue;let I="";B.nodeName==="#text"?I=B.nodeValue:((B.nodeName==="ink-text"||B.nodeName==="ink-virtual-text")&&(I=dh(B)),I.length>0&&typeof B.internal_transform=="function"&&(I=B.internal_transform(I,f))),o+=I}return mh(o)},NC=dh;var gg=a=>{let o={nodeName:a,style:{},attributes:{},childNodes:[],parentNode:void 0,yogaNode:a==="ink-virtual-text"?void 0:BA.Node.create(),internal_accessibility:{}};return a==="ink-text"&&o.yogaNode?.setMeasureFunc(Bv.bind(null,o)),o},iI=(a,o)=>{o.parentNode&&FC(o.parentNode,o),o.parentNode=a,a.childNodes.push(o),o.yogaNode&&a.yogaNode?.insertChild(o.yogaNode,a.yogaNode.getChildCount()),(a.nodeName==="ink-text"||a.nodeName==="ink-virtual-text")&&oI(a)},OD=(a,o,f)=>{o.parentNode&&FC(o.parentNode,o),o.parentNode=a;let B=a.childNodes.indexOf(f);B>=0?(a.childNodes.splice(B,0,o),o.yogaNode&&a.yogaNode?.insertChild(o.yogaNode,B)):(a.childNodes.push(o),o.yogaNode&&a.yogaNode?.insertChild(o.yogaNode,a.yogaNode.getChildCount())),(a.nodeName==="ink-text"||a.nodeName==="ink-virtual-text")&&oI(a)},FC=(a,o)=>{o.yogaNode&&o.parentNode?.yogaNode?.removeChild(o.yogaNode),o.parentNode=void 0;let f=a.childNodes.indexOf(o);f>=0&&a.childNodes.splice(f,1),(a.nodeName==="ink-text"||a.nodeName==="ink-virtual-text")&&oI(a)},bD=(a,o,f)=>{if(o==="internal_accessibility"){a.internal_accessibility=f;return}a.attributes[o]=f},xD=(a,o)=>{a.style=o},ph=a=>{let o={nodeName:"#text",nodeValue:a,yogaNode:void 0,parentNode:void 0,style:{}};return UC(o,a),o},Bv=function(a,o){let f=a.nodeName==="#text"?a.nodeValue:NC(a),B=hD(f);if(B.width<=o||B.width>=1&&o>0&&o<1)return B;let I=a.style?.textWrap??"wrap",D=lI(f,o,I);return hD(D)},hh=a=>{if(a?.parentNode)return a.yogaNode??hh(a.parentNode)},oI=a=>{hh(a)?.markDirty()},UC=(a,o)=>{typeof o!="string"&&(o=String(o)),a.nodeValue=o,oI(a)};var rv=(a,o)=>{"position"in o&&a.setPositionType(o.position==="absolute"?BA.POSITION_TYPE_ABSOLUTE:BA.POSITION_TYPE_RELATIVE)},Iv=(a,o)=>{"margin"in o&&a.setMargin(BA.EDGE_ALL,o.margin??0),"marginX"in o&&a.setMargin(BA.EDGE_HORIZONTAL,o.marginX??0),"marginY"in o&&a.setMargin(BA.EDGE_VERTICAL,o.marginY??0),"marginLeft"in o&&a.setMargin(BA.EDGE_START,o.marginLeft||0),"marginRight"in o&&a.setMargin(BA.EDGE_END,o.marginRight||0),"marginTop"in o&&a.setMargin(BA.EDGE_TOP,o.marginTop||0),"marginBottom"in o&&a.setMargin(BA.EDGE_BOTTOM,o.marginBottom||0)},Qv=(a,o)=>{"padding"in o&&a.setPadding(BA.EDGE_ALL,o.padding??0),"paddingX"in o&&a.setPadding(BA.EDGE_HORIZONTAL,o.paddingX??0),"paddingY"in o&&a.setPadding(BA.EDGE_VERTICAL,o.paddingY??0),"paddingLeft"in o&&a.setPadding(BA.EDGE_LEFT,o.paddingLeft||0),"paddingRight"in o&&a.setPadding(BA.EDGE_RIGHT,o.paddingRight||0),"paddingTop"in o&&a.setPadding(BA.EDGE_TOP,o.paddingTop||0),"paddingBottom"in o&&a.setPadding(BA.EDGE_BOTTOM,o.paddingBottom||0)},Dv=(a,o)=>{"flexGrow"in o&&a.setFlexGrow(o.flexGrow??0),"flexShrink"in o&&a.setFlexShrink(typeof o.flexShrink=="number"?o.flexShrink:1),"flexWrap"in o&&(o.flexWrap==="nowrap"&&a.setFlexWrap(BA.WRAP_NO_WRAP),o.flexWrap==="wrap"&&a.setFlexWrap(BA.WRAP_WRAP),o.flexWrap==="wrap-reverse"&&a.setFlexWrap(BA.WRAP_WRAP_REVERSE)),"flexDirection"in o&&(o.flexDirection==="row"&&a.setFlexDirection(BA.FLEX_DIRECTION_ROW),o.flexDirection==="row-reverse"&&a.setFlexDirection(BA.FLEX_DIRECTION_ROW_REVERSE),o.flexDirection==="column"&&a.setFlexDirection(BA.FLEX_DIRECTION_COLUMN),o.flexDirection==="column-reverse"&&a.setFlexDirection(BA.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in o&&(typeof o.flexBasis=="number"?a.setFlexBasis(o.flexBasis):typeof o.flexBasis=="string"?a.setFlexBasisPercent(Number.parseInt(o.flexBasis,10)):a.setFlexBasis(Number.NaN)),"alignItems"in o&&((o.alignItems==="stretch"||!o.alignItems)&&a.setAlignItems(BA.ALIGN_STRETCH),o.alignItems==="flex-start"&&a.setAlignItems(BA.ALIGN_FLEX_START),o.alignItems==="center"&&a.setAlignItems(BA.ALIGN_CENTER),o.alignItems==="flex-end"&&a.setAlignItems(BA.ALIGN_FLEX_END)),"alignSelf"in o&&((o.alignSelf==="auto"||!o.alignSelf)&&a.setAlignSelf(BA.ALIGN_AUTO),o.alignSelf==="flex-start"&&a.setAlignSelf(BA.ALIGN_FLEX_START),o.alignSelf==="center"&&a.setAlignSelf(BA.ALIGN_CENTER),o.alignSelf==="flex-end"&&a.setAlignSelf(BA.ALIGN_FLEX_END)),"justifyContent"in o&&((o.justifyContent==="flex-start"||!o.justifyContent)&&a.setJustifyContent(BA.JUSTIFY_FLEX_START),o.justifyContent==="center"&&a.setJustifyContent(BA.JUSTIFY_CENTER),o.justifyContent==="flex-end"&&a.setJustifyContent(BA.JUSTIFY_FLEX_END),o.justifyContent==="space-between"&&a.setJustifyContent(BA.JUSTIFY_SPACE_BETWEEN),o.justifyContent==="space-around"&&a.setJustifyContent(BA.JUSTIFY_SPACE_AROUND),o.justifyContent==="space-evenly"&&a.setJustifyContent(BA.JUSTIFY_SPACE_EVENLY))},mv=(a,o)=>{"width"in o&&(typeof o.width=="number"?a.setWidth(o.width):typeof o.width=="string"?a.setWidthPercent(Number.parseInt(o.width,10)):a.setWidthAuto()),"height"in o&&(typeof o.height=="number"?a.setHeight(o.height):typeof o.height=="string"?a.setHeightPercent(Number.parseInt(o.height,10)):a.setHeightAuto()),"minWidth"in o&&(typeof o.minWidth=="string"?a.setMinWidthPercent(Number.parseInt(o.minWidth,10)):a.setMinWidth(o.minWidth??0)),"minHeight"in o&&(typeof o.minHeight=="string"?a.setMinHeightPercent(Number.parseInt(o.minHeight,10)):a.setMinHeight(o.minHeight??0))},dv=(a,o)=>{"display"in o&&a.setDisplay(o.display==="flex"?BA.DISPLAY_FLEX:BA.DISPLAY_NONE)},pv=(a,o)=>{if("borderStyle"in o){let f=o.borderStyle?1:0;o.borderTop!==!1&&a.setBorder(BA.EDGE_TOP,f),o.borderBottom!==!1&&a.setBorder(BA.EDGE_BOTTOM,f),o.borderLeft!==!1&&a.setBorder(BA.EDGE_LEFT,f),o.borderRight!==!1&&a.setBorder(BA.EDGE_RIGHT,f)}},hv=(a,o)=>{"gap"in o&&a.setGap(BA.GUTTER_ALL,o.gap??0),"columnGap"in o&&a.setGap(BA.GUTTER_COLUMN,o.columnGap??0),"rowGap"in o&&a.setGap(BA.GUTTER_ROW,o.rowGap??0)},yv=(a,o={})=>{rv(a,o),Iv(a,o),Qv(a,o),Dv(a,o),mv(a,o),dv(a,o),pv(a,o),hv(a,o)},zD=yv;if(BC())try{await import("./devtools-MA5OJPXQ.js")}catch(a){if(a.code==="ERR_MODULE_NOT_FOUND")console.warn(`
|
|
222
222
|
The environment variable DEV is set to true, so Ink tried to import \`react-devtools-core\`,
|
|
223
223
|
but this failed as it was not installed. Debugging with React Devtools requires it.
|
|
224
224
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRequire as __cjsCreateRequire } from 'node:module'; const require = __cjsCreateRequire(import.meta.url);
|
|
2
|
-
import{a as m,b as x,d as Y}from"./chunk-PCQ2R3VR.js";var k=x((mr,je)=>{"use strict";var Ge=["nodebuffer","arraybuffer","fragments"],$e=typeof Blob<"u";$e&&Ge.push("blob");je.exports={BINARY_TYPES:Ge,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:$e,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var K=x((gr,re)=>{"use strict";var{EMPTY_BUFFER:Yt}=k(),ye=Buffer[Symbol.species];function Kt(t,e){if(t.length===0)return Yt;if(t.length===1)return t[0];let s=Buffer.allocUnsafe(e),r=0;for(let i=0;i<t.length;i++){let n=t[i];s.set(n,r),r+=n.length}return r<e?new ye(s.buffer,s.byteOffset,r):s}function Ve(t,e,s,r,i){for(let n=0;n<i;n++)s[r+n]=t[n]^e[n&3]}function ze(t,e){for(let s=0;s<t.length;s++)t[s]^=e[s&3]}function Xt(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)}function Se(t){if(Se.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new ye(t):ArrayBuffer.isView(t)?e=new ye(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),Se.readOnly=!1),e}re.exports={concat:Kt,mask:Ve,toArrayBuffer:Xt,toBuffer:Se,unmask:ze};if(!process.env.WS_NO_BUFFER_UTIL)try{let t=m("bufferutil");re.exports.mask=function(e,s,r,i,n){n<48?Ve(e,s,r,i,n):t.mask(e,s,r,i,n)},re.exports.unmask=function(e,s){e.length<32?ze(e,s):t.unmask(e,s)}}catch{}});var Ke=x((yr,Ye)=>{"use strict";var He=Symbol("kDone"),xe=Symbol("kRun"),Ee=class{constructor(e){this[He]=()=>{this.pending--,this[xe]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[xe]()}[xe](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[He])}}};Ye.exports=Ee});var Z=x((Sr,Je)=>{"use strict";var X=m("zlib"),Xe=K(),Zt=Ke(),{kStatusCode:Ze}=k(),Qt=Buffer[Symbol.species],Jt=Buffer.from([0,0,255,255]),ne=Symbol("permessage-deflate"),T=Symbol("total-length"),W=Symbol("callback"),N=Symbol("buffers"),F=Symbol("error"),ie,ve=class{constructor(e,s,r){if(this._maxPayload=r|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!s,this._deflate=null,this._inflate=null,this.params=null,!ie){let i=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ie=new Zt(i)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[W];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let s=this._options,r=e.find(i=>!(s.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(s.serverMaxWindowBits===!1||typeof s.serverMaxWindowBits=="number"&&s.serverMaxWindowBits>i.server_max_window_bits)||typeof s.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!r)throw new Error("None of the extension offers can be accepted");return s.serverNoContextTakeover&&(r.server_no_context_takeover=!0),s.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof s.serverMaxWindowBits=="number"&&(r.server_max_window_bits=s.serverMaxWindowBits),typeof s.clientMaxWindowBits=="number"?r.client_max_window_bits=s.clientMaxWindowBits:(r.client_max_window_bits===!0||s.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(e){let s=e[0];if(this._options.clientNoContextTakeover===!1&&s.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!s.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(s.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&s.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return s}normalizeParams(e){return e.forEach(s=>{Object.keys(s).forEach(r=>{let i=s[r];if(i.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(i=i[0],r==="client_max_window_bits"){if(i!==!0){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else if(r==="server_max_window_bits"){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else throw new Error(`Unknown parameter "${r}"`);s[r]=i})}),e}decompress(e,s,r){ie.add(i=>{this._decompress(e,s,(n,o)=>{i(),r(n,o)})})}compress(e,s,r){ie.add(i=>{this._compress(e,s,(n,o)=>{i(),r(n,o)})})}_decompress(e,s,r){let i=this._isServer?"client":"server";if(!this._inflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?X.Z_DEFAULT_WINDOWBITS:this.params[n];this._inflate=X.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[ne]=this,this._inflate[T]=0,this._inflate[N]=[],this._inflate.on("error",ts),this._inflate.on("data",Qe)}this._inflate[W]=r,this._inflate.write(e),s&&this._inflate.write(Jt),this._inflate.flush(()=>{let n=this._inflate[F];if(n){this._inflate.close(),this._inflate=null,r(n);return}let o=Xe.concat(this._inflate[N],this._inflate[T]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[T]=0,this._inflate[N]=[],s&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),r(null,o)})}_compress(e,s,r){let i=this._isServer?"server":"client";if(!this._deflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?X.Z_DEFAULT_WINDOWBITS:this.params[n];this._deflate=X.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[T]=0,this._deflate[N]=[],this._deflate.on("data",es)}this._deflate[W]=r,this._deflate.write(e),this._deflate.flush(X.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let n=Xe.concat(this._deflate[N],this._deflate[T]);s&&(n=new Qt(n.buffer,n.byteOffset,n.length-4)),this._deflate[W]=null,this._deflate[T]=0,this._deflate[N]=[],s&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),r(null,n)})}};Je.exports=ve;function es(t){this[N].push(t),this[T]+=t.length}function Qe(t){if(this[T]+=t.length,this[ne]._maxPayload<1||this[T]<=this[ne]._maxPayload){this[N].push(t);return}this[F]=new RangeError("Max payload size exceeded"),this[F].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[F][Ze]=1009,this.removeListener("data",Qe),this.reset()}function ts(t){if(this[ne]._inflate=null,this[F]){this[W](this[F]);return}t[Ze]=1007,this[W](t)}});var q=x((xr,oe)=>{"use strict";var{isUtf8:et}=m("buffer"),{hasBlob:ss}=k(),rs=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function is(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function be(t){let e=t.length,s=0;for(;s<e;)if((t[s]&128)===0)s++;else if((t[s]&224)===192){if(s+1===e||(t[s+1]&192)!==128||(t[s]&254)===192)return!1;s+=2}else if((t[s]&240)===224){if(s+2>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||t[s]===224&&(t[s+1]&224)===128||t[s]===237&&(t[s+1]&224)===160)return!1;s+=3}else if((t[s]&248)===240){if(s+3>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||(t[s+3]&192)!==128||t[s]===240&&(t[s+1]&240)===128||t[s]===244&&t[s+1]>143||t[s]>244)return!1;s+=4}else return!1;return!0}function ns(t){return ss&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]==="Blob"||t[Symbol.toStringTag]==="File")}oe.exports={isBlob:ns,isValidStatusCode:is,isValidUTF8:be,tokenChars:rs};if(et)oe.exports.isValidUTF8=function(t){return t.length<24?be(t):et(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=m("utf-8-validate");oe.exports.isValidUTF8=function(e){return e.length<32?be(e):t(e)}}catch{}});var Ce=x((Er,at)=>{"use strict";var{Writable:os}=m("stream"),tt=Z(),{BINARY_TYPES:as,EMPTY_BUFFER:st,kStatusCode:fs,kWebSocket:ls}=k(),{concat:we,toArrayBuffer:hs,unmask:cs}=K(),{isValidStatusCode:us,isValidUTF8:rt}=q(),ae=Buffer[Symbol.species],v=0,it=1,nt=2,ot=3,Oe=4,ke=5,fe=6,Te=class extends os{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||as[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[ls]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=v}_write(e,s,r){if(this._opcode===8&&this._state==v)return r();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let r=this._buffers[0];return this._buffers[0]=new ae(r.buffer,r.byteOffset+e,r.length-e),new ae(r.buffer,r.byteOffset,e)}let s=Buffer.allocUnsafe(e);do{let r=this._buffers[0],i=s.length-e;e>=r.length?s.set(this._buffers.shift(),i):(s.set(new Uint8Array(r.buffer,r.byteOffset,e),i),this._buffers[0]=new ae(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0);return s}startLoop(e){this._loop=!0;do switch(this._state){case v:this.getInfo(e);break;case it:this.getPayloadLength16(e);break;case nt:this.getPayloadLength64(e);break;case ot:this.getMask();break;case Oe:this.getData(e);break;case ke:case fe:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let s=this.consume(2);if((s[0]&48)!==0){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let r=(s[0]&64)===64;if(r&&!this._extensions[tt.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(s[0]&128)===128,this._opcode=s[0]&15,this._payloadLength=s[1]&127,this._opcode===0){if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(s[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=it:this._payloadLength===127?this._state=nt:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let s=this.consume(8),r=s.readUInt32BE(0);if(r>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=r*Math.pow(2,32)+s.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let s=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(s);return}this._masked?this._state=ot:this._state=Oe}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Oe}getData(e){let s=st;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}s=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&cs(s,this._mask)}if(this._opcode>7){this.controlMessage(s,e);return}if(this._compressed){this._state=ke,this.decompress(s,e);return}s.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(s)),this.dataMessage(e)}decompress(e,s){this._extensions[tt.extensionName].decompress(e,this._fin,(i,n)=>{if(i)return s(i);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");s(o);return}this._fragments.push(n)}this.dataMessage(s),this._state===v&&this.startLoop(s)})}dataMessage(e){if(!this._fin){this._state=v;return}let s=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=we(r,s):this._binaryType==="arraybuffer"?i=hs(we(r,s)):this._binaryType==="blob"?i=new Blob(r):i=r,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=v):(this._state=fe,setImmediate(()=>{this.emit("message",i,!0),this._state=v,this.startLoop(e)}))}else{let i=we(r,s);if(!this._skipUTF8Validation&&!rt(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(n);return}this._state===ke||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=v):(this._state=fe,setImmediate(()=>{this.emit("message",i,!1),this._state=v,this.startLoop(e)}))}}controlMessage(e,s){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,st),this.end();else{let r=e.readUInt16BE(0);if(!us(r)){let n=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");s(n);return}let i=new ae(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!rt(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");s(n);return}this._loop=!1,this.emit("conclude",r,i),this.end()}this._state=v;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=v):(this._state=fe,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=v,this.startLoop(s)}))}createError(e,s,r,i,n){this._loop=!1,this._errored=!0;let o=new e(r?`Invalid WebSocket frame: ${s}`:s);return Error.captureStackTrace(o,this.createError),o.code=n,o[fs]=i,o}};at.exports=Te});var Pe=x((br,ht)=>{"use strict";var{Duplex:vr}=m("stream"),{randomFillSync:ds}=m("crypto"),ft=Z(),{EMPTY_BUFFER:_s,kWebSocket:ps,NOOP:ms}=k(),{isBlob:G,isValidStatusCode:gs}=q(),{mask:lt,toBuffer:B}=K(),b=Symbol("kByteLength"),ys=Buffer.alloc(4),le=8*1024,R,$=le,w=0,Ss=1,xs=2,Le=class t{constructor(e,s,r){this._extensions=s||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=w,this.onerror=ms,this[ps]=void 0}static frame(e,s){let r,i=!1,n=2,o=!1;s.mask&&(r=s.maskBuffer||ys,s.generateMask?s.generateMask(r):($===le&&(R===void 0&&(R=Buffer.alloc(le)),ds(R,0,le),$=0),r[0]=R[$++],r[1]=R[$++],r[2]=R[$++],r[3]=R[$++]),o=(r[0]|r[1]|r[2]|r[3])===0,n=6);let f;typeof e=="string"?(!s.mask||o)&&s[b]!==void 0?f=s[b]:(e=Buffer.from(e),f=e.length):(f=e.length,i=s.mask&&s.readOnly&&!o);let l=f;f>=65536?(n+=8,l=127):f>125&&(n+=2,l=126);let a=Buffer.allocUnsafe(i?f+n:n);return a[0]=s.fin?s.opcode|128:s.opcode,s.rsv1&&(a[0]|=64),a[1]=l,l===126?a.writeUInt16BE(f,2):l===127&&(a[2]=a[3]=0,a.writeUIntBE(f,4,6)),s.mask?(a[1]|=128,a[n-4]=r[0],a[n-3]=r[1],a[n-2]=r[2],a[n-1]=r[3],o?[a,e]:i?(lt(e,r,a,n,f),[a]):(lt(e,r,e,0,f),[a,e])):[a,e]}close(e,s,r,i){let n;if(e===void 0)n=_s;else{if(typeof e!="number"||!gs(e))throw new TypeError("First argument must be a valid error code number");if(s===void 0||!s.length)n=Buffer.allocUnsafe(2),n.writeUInt16BE(e,0);else{let f=Buffer.byteLength(s);if(f>123)throw new RangeError("The message must not be greater than 123 bytes");n=Buffer.allocUnsafe(2+f),n.writeUInt16BE(e,0),typeof s=="string"?n.write(s,2):n.set(s,2)}}let o={[b]:n.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==w?this.enqueue([this.dispatch,n,!1,o,i]):this.sendFrame(t.frame(n,o),i)}ping(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):G(e)?(i=e.size,n=!1):(e=B(e),i=e.length,n=B.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[b]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};G(e)?this._state!==w?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==w?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}pong(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):G(e)?(i=e.size,n=!1):(e=B(e),i=e.length,n=B.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[b]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};G(e)?this._state!==w?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==w?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}send(e,s,r){let i=this._extensions[ft.extensionName],n=s.binary?2:1,o=s.compress,f,l;typeof e=="string"?(f=Buffer.byteLength(e),l=!1):G(e)?(f=e.size,l=!1):(e=B(e),f=e.length,l=B.readOnly),this._firstFragment?(this._firstFragment=!1,o&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=f>=i._threshold),this._compress=o):(o=!1,n=0),s.fin&&(this._firstFragment=!0);let a={[b]:f,fin:s.fin,generateMask:this._generateMask,mask:s.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:l,rsv1:o};G(e)?this._state!==w?this.enqueue([this.getBlobData,e,this._compress,a,r]):this.getBlobData(e,this._compress,a,r):this._state!==w?this.enqueue([this.dispatch,e,this._compress,a,r]):this.dispatch(e,this._compress,a,r)}getBlobData(e,s,r,i){this._bufferedBytes+=r[b],this._state=xs,e.arrayBuffer().then(n=>{if(this._socket.destroyed){let f=new Error("The socket was closed while the blob was being read");process.nextTick(Ne,this,f,i);return}this._bufferedBytes-=r[b];let o=B(n);s?this.dispatch(o,s,r,i):(this._state=w,this.sendFrame(t.frame(o,r),i),this.dequeue())}).catch(n=>{process.nextTick(Es,this,n,i)})}dispatch(e,s,r,i){if(!s){this.sendFrame(t.frame(e,r),i);return}let n=this._extensions[ft.extensionName];this._bufferedBytes+=r[b],this._state=Ss,n.compress(e,r.fin,(o,f)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");Ne(this,l,i);return}this._bufferedBytes-=r[b],this._state=w,r.readOnly=!1,this.sendFrame(t.frame(f,r),i),this.dequeue()})}dequeue(){for(;this._state===w&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][b],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][b],this._queue.push(e)}sendFrame(e,s){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],s),this._socket.uncork()):this._socket.write(e[0],s)}};ht.exports=Le;function Ne(t,e,s){typeof s=="function"&&s(e);for(let r=0;r<t._queue.length;r++){let i=t._queue[r],n=i[i.length-1];typeof n=="function"&&n(e)}}function Es(t,e,s){Ne(t,e,s),t.onerror(e)}});var St=x((wr,yt)=>{"use strict";var{kForOnEventAttribute:Q,kListener:Be}=k(),ct=Symbol("kCode"),ut=Symbol("kData"),dt=Symbol("kError"),_t=Symbol("kMessage"),pt=Symbol("kReason"),j=Symbol("kTarget"),mt=Symbol("kType"),gt=Symbol("kWasClean"),C=class{constructor(e){this[j]=null,this[mt]=e}get target(){return this[j]}get type(){return this[mt]}};Object.defineProperty(C.prototype,"target",{enumerable:!0});Object.defineProperty(C.prototype,"type",{enumerable:!0});var U=class extends C{constructor(e,s={}){super(e),this[ct]=s.code===void 0?0:s.code,this[pt]=s.reason===void 0?"":s.reason,this[gt]=s.wasClean===void 0?!1:s.wasClean}get code(){return this[ct]}get reason(){return this[pt]}get wasClean(){return this[gt]}};Object.defineProperty(U.prototype,"code",{enumerable:!0});Object.defineProperty(U.prototype,"reason",{enumerable:!0});Object.defineProperty(U.prototype,"wasClean",{enumerable:!0});var V=class extends C{constructor(e,s={}){super(e),this[dt]=s.error===void 0?null:s.error,this[_t]=s.message===void 0?"":s.message}get error(){return this[dt]}get message(){return this[_t]}};Object.defineProperty(V.prototype,"error",{enumerable:!0});Object.defineProperty(V.prototype,"message",{enumerable:!0});var J=class extends C{constructor(e,s={}){super(e),this[ut]=s.data===void 0?null:s.data}get data(){return this[ut]}};Object.defineProperty(J.prototype,"data",{enumerable:!0});var vs={addEventListener(t,e,s={}){for(let i of this.listeners(t))if(!s[Q]&&i[Be]===e&&!i[Q])return;let r;if(t==="message")r=function(n,o){let f=new J("message",{data:o?n:n.toString()});f[j]=this,he(e,this,f)};else if(t==="close")r=function(n,o){let f=new U("close",{code:n,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});f[j]=this,he(e,this,f)};else if(t==="error")r=function(n){let o=new V("error",{error:n,message:n.message});o[j]=this,he(e,this,o)};else if(t==="open")r=function(){let n=new C("open");n[j]=this,he(e,this,n)};else return;r[Q]=!!s[Q],r[Be]=e,s.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(let s of this.listeners(t))if(s[Be]===e&&!s[Q]){this.removeListener(t,s);break}}};yt.exports={CloseEvent:U,ErrorEvent:V,Event:C,EventTarget:vs,MessageEvent:J};function he(t,e,s){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,s):t.call(e,s)}});var Re=x((Or,xt)=>{"use strict";var{tokenChars:ee}=q();function O(t,e,s){t[e]===void 0?t[e]=[s]:t[e].push(s)}function bs(t){let e=Object.create(null),s=Object.create(null),r=!1,i=!1,n=!1,o,f,l=-1,a=-1,h=-1,c=0;for(;c<t.length;c++)if(a=t.charCodeAt(c),o===void 0)if(h===-1&&ee[a]===1)l===-1&&(l=c);else if(c!==0&&(a===32||a===9))h===-1&&l!==-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let g=t.slice(l,h);a===44?(O(e,g,s),s=Object.create(null)):o=g,l=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(f===void 0)if(h===-1&&ee[a]===1)l===-1&&(l=c);else if(a===32||a===9)h===-1&&l!==-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c),O(s,t.slice(l,h),!0),a===44&&(O(e,o,s),s=Object.create(null),o=void 0),l=h=-1}else if(a===61&&l!==-1&&h===-1)f=t.slice(l,c),l=h=-1;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(i){if(ee[a]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1?l=c:r||(r=!0),i=!1}else if(n)if(ee[a]===1)l===-1&&(l=c);else if(a===34&&l!==-1)n=!1,h=c;else if(a===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(a===34&&t.charCodeAt(c-1)===61)n=!0;else if(h===-1&&ee[a]===1)l===-1&&(l=c);else if(l!==-1&&(a===32||a===9))h===-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let g=t.slice(l,h);r&&(g=g.replace(/\\/g,""),r=!1),O(s,f,g),a===44&&(O(e,o,s),s=Object.create(null),o=void 0),f=void 0,l=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);if(l===-1||n||a===32||a===9)throw new SyntaxError("Unexpected end of input");h===-1&&(h=c);let _=t.slice(l,h);return o===void 0?O(e,_,s):(f===void 0?O(s,_,!0):r?O(s,f,_.replace(/\\/g,"")):O(s,f,_),O(e,o,s)),e}function ws(t){return Object.keys(t).map(e=>{let s=t[e];return Array.isArray(s)||(s=[s]),s.map(r=>[e].concat(Object.keys(r).map(i=>{let n=r[i];return Array.isArray(n)||(n=[n]),n.map(o=>o===!0?i:`${i}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}xt.exports={format:ws,parse:bs}});var _e=x((Cr,Bt)=>{"use strict";var Os=m("events"),ks=m("https"),Ts=m("http"),bt=m("net"),Cs=m("tls"),{randomBytes:Ls,createHash:Ns}=m("crypto"),{Duplex:kr,Readable:Tr}=m("stream"),{URL:Ue}=m("url"),P=Z(),Ps=Ce(),Bs=Pe(),{isBlob:Rs}=q(),{BINARY_TYPES:Et,EMPTY_BUFFER:ce,GUID:Us,kForOnEventAttribute:Ie,kListener:Is,kStatusCode:Ds,kWebSocket:y,NOOP:wt}=k(),{EventTarget:{addEventListener:Ms,removeEventListener:As}}=St(),{format:Ws,parse:Fs}=Re(),{toBuffer:qs}=K(),Gs=30*1e3,Ot=Symbol("kAborted"),De=[8,13],L=["CONNECTING","OPEN","CLOSING","CLOSED"],$s=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,d=class t extends Os{constructor(e,s,r){super(),this._binaryType=Et[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ce,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,s===void 0?s=[]:Array.isArray(s)||(typeof s=="object"&&s!==null?(r=s,s=[]):s=[s]),kt(this,e,s,r)):(this._autoPong=r.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){Et.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,s,r){let i=new Ps({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),n=new Bs(e,this._extensions,r.generateMask);this._receiver=i,this._sender=n,this._socket=e,i[y]=this,n[y]=this,e[y]=this,i.on("conclude",zs),i.on("drain",Hs),i.on("error",Ys),i.on("message",Ks),i.on("ping",Xs),i.on("pong",Zs),n.onerror=Qs,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),s.length>0&&e.unshift(s),e.on("close",Lt),e.on("data",de),e.on("end",Nt),e.on("error",Pt),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[P.extensionName]&&this._extensions[P.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,s){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){E(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=t.CLOSING,this._sender.close(e,s,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),Ct(this)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Me(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.ping(e||ce,s,r)}pong(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Me(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.pong(e||ce,s,r)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof s=="function"&&(r=s,s={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Me(this,e,r);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...s};this._extensions[P.extensionName]||(i.compress=!1),this._sender.send(e||ce,i,r)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){E(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(d,"CONNECTING",{enumerable:!0,value:L.indexOf("CONNECTING")});Object.defineProperty(d.prototype,"CONNECTING",{enumerable:!0,value:L.indexOf("CONNECTING")});Object.defineProperty(d,"OPEN",{enumerable:!0,value:L.indexOf("OPEN")});Object.defineProperty(d.prototype,"OPEN",{enumerable:!0,value:L.indexOf("OPEN")});Object.defineProperty(d,"CLOSING",{enumerable:!0,value:L.indexOf("CLOSING")});Object.defineProperty(d.prototype,"CLOSING",{enumerable:!0,value:L.indexOf("CLOSING")});Object.defineProperty(d,"CLOSED",{enumerable:!0,value:L.indexOf("CLOSED")});Object.defineProperty(d.prototype,"CLOSED",{enumerable:!0,value:L.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(d.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(d.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[Ie])return e[Is];return null},set(e){for(let s of this.listeners(t))if(s[Ie]){this.removeListener(t,s);break}typeof e=="function"&&this.addEventListener(t,e,{[Ie]:!0})}})});d.prototype.addEventListener=Ms;d.prototype.removeEventListener=As;Bt.exports=d;function kt(t,e,s,r){let i={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:De[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=i.autoPong,!De.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${De.join(", ")})`);let n;if(e instanceof Ue)n=e;else try{n=new Ue(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}n.protocol==="http:"?n.protocol="ws:":n.protocol==="https:"&&(n.protocol="wss:"),t._url=n.href;let o=n.protocol==="wss:",f=n.protocol==="ws+unix:",l;if(n.protocol!=="ws:"&&!o&&!f?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:f&&!n.pathname?l="The URL's pathname is empty":n.hash&&(l="The URL contains a fragment identifier"),l){let u=new SyntaxError(l);if(t._redirects===0)throw u;ue(t,u);return}let a=o?443:80,h=Ls(16).toString("base64"),c=o?ks.request:Ts.request,_=new Set,g;if(i.createConnection=i.createConnection||(o?Vs:js),i.defaultPort=i.defaultPort||a,i.port=n.port||a,i.host=n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":h,Connection:"Upgrade",Upgrade:"websocket"},i.path=n.pathname+n.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(g=new P(i.perMessageDeflate!==!0?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=Ws({[P.extensionName]:g.offer()})),s.length){for(let u of s){if(typeof u!="string"||!$s.test(u)||_.has(u))throw new SyntaxError("An invalid or duplicated subprotocol was specified");_.add(u)}i.headers["Sec-WebSocket-Protocol"]=s.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(n.username||n.password)&&(i.auth=`${n.username}:${n.password}`),f){let u=i.path.split(":");i.socketPath=u[0],i.path=u[1]}let p;if(i.followRedirects){if(t._redirects===0){t._originalIpc=f,t._originalSecure=o,t._originalHostOrSocketPath=f?i.socketPath:n.host;let u=r&&r.headers;if(r={...r,headers:{}},u)for(let[S,M]of Object.entries(u))r.headers[S.toLowerCase()]=M}else if(t.listenerCount("redirect")===0){let u=f?t._originalIpc?i.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:n.host===t._originalHostOrSocketPath;(!u||t._originalSecure&&!o)&&(delete i.headers.authorization,delete i.headers.cookie,u||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),p=t._req=c(i),t._redirects&&t.emit("redirect",t.url,p)}else p=t._req=c(i);i.timeout&&p.on("timeout",()=>{E(t,p,"Opening handshake has timed out")}),p.on("error",u=>{p===null||p[Ot]||(p=t._req=null,ue(t,u))}),p.on("response",u=>{let S=u.headers.location,M=u.statusCode;if(S&&i.followRedirects&&M>=300&&M<400){if(++t._redirects>i.maxRedirects){E(t,p,"Maximum redirects exceeded");return}p.abort();let z;try{z=new Ue(S,e)}catch{let A=new SyntaxError(`Invalid URL: ${S}`);ue(t,A);return}kt(t,z,s,r)}else t.emit("unexpected-response",p,u)||E(t,p,`Unexpected server response: ${u.statusCode}`)}),p.on("upgrade",(u,S,M)=>{if(t.emit("upgrade",u),t.readyState!==d.CONNECTING)return;p=t._req=null;let z=u.headers.upgrade;if(z===void 0||z.toLowerCase()!=="websocket"){E(t,S,"Invalid Upgrade header");return}let We=Ns("sha1").update(h+Us).digest("base64");if(u.headers["sec-websocket-accept"]!==We){E(t,S,"Invalid Sec-WebSocket-Accept header");return}let A=u.headers["sec-websocket-protocol"],H;if(A!==void 0?_.size?_.has(A)||(H="Server sent an invalid subprotocol"):H="Server sent a subprotocol but none was requested":_.size&&(H="Server sent no subprotocol"),H){E(t,S,H);return}A&&(t._protocol=A);let Fe=u.headers["sec-websocket-extensions"];if(Fe!==void 0){if(!g){E(t,S,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let me;try{me=Fs(Fe)}catch{E(t,S,"Invalid Sec-WebSocket-Extensions header");return}let qe=Object.keys(me);if(qe.length!==1||qe[0]!==P.extensionName){E(t,S,"Server indicated an extension that was not requested");return}try{g.accept(me[P.extensionName])}catch{E(t,S,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[P.extensionName]=g}t.setSocket(S,M,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(p,t):p.end()}function ue(t,e){t._readyState=d.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function js(t){return t.path=t.socketPath,bt.connect(t)}function Vs(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=bt.isIP(t.host)?"":t.host),Cs.connect(t)}function E(t,e,s){t._readyState=d.CLOSING;let r=new Error(s);Error.captureStackTrace(r,E),e.setHeader?(e[Ot]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(ue,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function Me(t,e,s){if(e){let r=Rs(e)?e.size:qs(e).length;t._socket?t._sender._bufferedBytes+=r:t._bufferedAmount+=r}if(s){let r=new Error(`WebSocket is not open: readyState ${t.readyState} (${L[t.readyState]})`);process.nextTick(s,r)}}function zs(t,e){let s=this[y];s._closeFrameReceived=!0,s._closeMessage=e,s._closeCode=t,s._socket[y]!==void 0&&(s._socket.removeListener("data",de),process.nextTick(Tt,s._socket),t===1005?s.close():s.close(t,e))}function Hs(){let t=this[y];t.isPaused||t._socket.resume()}function Ys(t){let e=this[y];e._socket[y]!==void 0&&(e._socket.removeListener("data",de),process.nextTick(Tt,e._socket),e.close(t[Ds])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function vt(){this[y].emitClose()}function Ks(t,e){this[y].emit("message",t,e)}function Xs(t){let e=this[y];e._autoPong&&e.pong(t,!this._isServer,wt),e.emit("ping",t)}function Zs(t){this[y].emit("pong",t)}function Tt(t){t.resume()}function Qs(t){let e=this[y];e.readyState!==d.CLOSED&&(e.readyState===d.OPEN&&(e._readyState=d.CLOSING,Ct(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function Ct(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),Gs)}function Lt(){let t=this[y];this.removeListener("close",Lt),this.removeListener("data",de),this.removeListener("end",Nt),t._readyState=d.CLOSING;let e;!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&(e=t._socket.read())!==null&&t._receiver.write(e),t._receiver.end(),this[y]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",vt),t._receiver.on("finish",vt))}function de(t){this[y]._receiver.write(t)||this.pause()}function Nt(){let t=this[y];t._readyState=d.CLOSING,t._receiver.end(),this.end()}function Pt(){let t=this[y];this.removeListener("error",Pt),this.on("error",wt),t&&(t._readyState=d.CLOSING,this.destroy())}});var Dt=x((Nr,It)=>{"use strict";var Lr=_e(),{Duplex:Js}=m("stream");function Rt(t){t.emit("close")}function er(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Ut(t){this.removeListener("error",Ut),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function tr(t,e){let s=!0,r=new Js({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(n,o){let f=!o&&r._readableState.objectMode?n.toString():n;r.push(f)||t.pause()}),t.once("error",function(n){r.destroyed||(s=!1,r.destroy(n))}),t.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(i,n){if(t.readyState===t.CLOSED){n(i),process.nextTick(Rt,r);return}let o=!1;t.once("error",function(l){o=!0,n(l)}),t.once("close",function(){o||n(i),process.nextTick(Rt,r)}),s&&t.terminate()},r._final=function(i){if(t.readyState===t.CONNECTING){t.once("open",function(){r._final(i)});return}t._socket!==null&&(t._socket._writableState.finished?(i(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",function(){i()}),t.close()))},r._read=function(){t.isPaused&&t.resume()},r._write=function(i,n,o){if(t.readyState===t.CONNECTING){t.once("open",function(){r._write(i,n,o)});return}t.send(i,o)},r.on("end",er),r.on("error",Ut),r}It.exports=tr});var At=x((Pr,Mt)=>{"use strict";var{tokenChars:sr}=q();function rr(t){let e=new Set,s=-1,r=-1,i=0;for(i;i<t.length;i++){let o=t.charCodeAt(i);if(r===-1&&sr[o]===1)s===-1&&(s=i);else if(i!==0&&(o===32||o===9))r===-1&&s!==-1&&(r=i);else if(o===44){if(s===-1)throw new SyntaxError(`Unexpected character at index ${i}`);r===-1&&(r=i);let f=t.slice(s,r);if(e.has(f))throw new SyntaxError(`The "${f}" subprotocol is duplicated`);e.add(f),s=r=-1}else throw new SyntaxError(`Unexpected character at index ${i}`)}if(s===-1||r!==-1)throw new SyntaxError("Unexpected end of input");let n=t.slice(s,i);if(e.has(n))throw new SyntaxError(`The "${n}" subprotocol is duplicated`);return e.add(n),e}Mt.exports={parse:rr}});var Vt=x((Rr,jt)=>{"use strict";var ir=m("events"),pe=m("http"),{Duplex:Br}=m("stream"),{createHash:nr}=m("crypto"),Wt=Re(),I=Z(),or=At(),ar=_e(),{GUID:fr,kWebSocket:lr}=k(),hr=/^[+/0-9A-Za-z]{22}==$/,Ft=0,qt=1,$t=2,Ae=class extends ir{constructor(e,s){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:ar,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=pe.createServer((r,i)=>{let n=pe.STATUS_CODES[426];i.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),i.end(n)}),this._server.listen(e.port,e.host,e.backlog,s)):e.server&&(this._server=e.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=cr(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,n,o)=>{this.handleUpgrade(i,n,o,r)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=Ft}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===$t){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(te,this);return}if(e&&this.once("close",e),this._state!==qt)if(this._state=qt,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(te,this):process.nextTick(te,this);else{let s=this._server;this._removeListeners(),this._removeListeners=this._server=null,s.close(()=>{te(this)})}}shouldHandle(e){if(this.options.path){let s=e.url.indexOf("?");if((s!==-1?e.url.slice(0,s):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,s,r,i){s.on("error",Gt);let n=e.headers["sec-websocket-key"],o=e.headers.upgrade,f=+e.headers["sec-websocket-version"];if(e.method!=="GET"){D(this,e,s,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){D(this,e,s,400,"Invalid Upgrade header");return}if(n===void 0||!hr.test(n)){D(this,e,s,400,"Missing or invalid Sec-WebSocket-Key header");return}if(f!==13&&f!==8){D(this,e,s,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){se(s,400);return}let l=e.headers["sec-websocket-protocol"],a=new Set;if(l!==void 0)try{a=or.parse(l)}catch{D(this,e,s,400,"Invalid Sec-WebSocket-Protocol header");return}let h=e.headers["sec-websocket-extensions"],c={};if(this.options.perMessageDeflate&&h!==void 0){let _=new I(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let g=Wt.parse(h);g[I.extensionName]&&(_.accept(g[I.extensionName]),c[I.extensionName]=_)}catch{D(this,e,s,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let _={origin:e.headers[`${f===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(_,(g,p,u,S)=>{if(!g)return se(s,p||401,u,S);this.completeUpgrade(c,n,a,e,s,r,i)});return}if(!this.options.verifyClient(_))return se(s,401)}this.completeUpgrade(c,n,a,e,s,r,i)}completeUpgrade(e,s,r,i,n,o,f){if(!n.readable||!n.writable)return n.destroy();if(n[lr])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Ft)return se(n,503);let a=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${nr("sha1").update(s+fr).digest("base64")}`],h=new this.options.WebSocket(null,void 0,this.options);if(r.size){let c=this.options.handleProtocols?this.options.handleProtocols(r,i):r.values().next().value;c&&(a.push(`Sec-WebSocket-Protocol: ${c}`),h._protocol=c)}if(e[I.extensionName]){let c=e[I.extensionName].params,_=Wt.format({[I.extensionName]:[c]});a.push(`Sec-WebSocket-Extensions: ${_}`),h._extensions=e}this.emit("headers",a,i),n.write(a.concat(`\r
|
|
2
|
+
import{a as m,b as x,d as Y}from"./chunk-PCQ2R3VR.js";var T=x((Sr,je)=>{"use strict";var Ve=["nodebuffer","arraybuffer","fragments"],$e=typeof Blob<"u";$e&&Ve.push("blob");je.exports={BINARY_TYPES:Ve,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:$e,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var K=x((xr,re)=>{"use strict";var{EMPTY_BUFFER:Zt}=T(),Se=Buffer[Symbol.species];function Qt(t,e){if(t.length===0)return Zt;if(t.length===1)return t[0];let s=Buffer.allocUnsafe(e),r=0;for(let i=0;i<t.length;i++){let n=t[i];s.set(n,r),r+=n.length}return r<e?new Se(s.buffer,s.byteOffset,r):s}function ze(t,e,s,r,i){for(let n=0;n<i;n++)s[r+n]=t[n]^e[n&3]}function He(t,e){for(let s=0;s<t.length;s++)t[s]^=e[s&3]}function Jt(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)}function xe(t){if(xe.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new Se(t):ArrayBuffer.isView(t)?e=new Se(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),xe.readOnly=!1),e}re.exports={concat:Qt,mask:ze,toArrayBuffer:Jt,toBuffer:xe,unmask:He};if(!process.env.WS_NO_BUFFER_UTIL)try{let t=m("bufferutil");re.exports.mask=function(e,s,r,i,n){n<48?ze(e,s,r,i,n):t.mask(e,s,r,i,n)},re.exports.unmask=function(e,s){e.length<32?He(e,s):t.unmask(e,s)}}catch{}});var Xe=x((Er,Ke)=>{"use strict";var Ye=Symbol("kDone"),Ee=Symbol("kRun"),ve=class{constructor(e){this[Ye]=()=>{this.pending--,this[Ee]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[Ee]()}[Ee](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Ye])}}};Ke.exports=ve});var Z=x((vr,et)=>{"use strict";var X=m("zlib"),Ze=K(),es=Xe(),{kStatusCode:Qe}=T(),ts=Buffer[Symbol.species],ss=Buffer.from([0,0,255,255]),ne=Symbol("permessage-deflate"),k=Symbol("total-length"),W=Symbol("callback"),N=Symbol("buffers"),F=Symbol("error"),ie,be=class{constructor(e,s,r){if(this._maxPayload=r|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!s,this._deflate=null,this._inflate=null,this.params=null,!ie){let i=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ie=new es(i)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[W];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let s=this._options,r=e.find(i=>!(s.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(s.serverMaxWindowBits===!1||typeof s.serverMaxWindowBits=="number"&&s.serverMaxWindowBits>i.server_max_window_bits)||typeof s.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!r)throw new Error("None of the extension offers can be accepted");return s.serverNoContextTakeover&&(r.server_no_context_takeover=!0),s.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof s.serverMaxWindowBits=="number"&&(r.server_max_window_bits=s.serverMaxWindowBits),typeof s.clientMaxWindowBits=="number"?r.client_max_window_bits=s.clientMaxWindowBits:(r.client_max_window_bits===!0||s.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(e){let s=e[0];if(this._options.clientNoContextTakeover===!1&&s.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!s.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(s.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&s.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return s}normalizeParams(e){return e.forEach(s=>{Object.keys(s).forEach(r=>{let i=s[r];if(i.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(i=i[0],r==="client_max_window_bits"){if(i!==!0){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else if(r==="server_max_window_bits"){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else throw new Error(`Unknown parameter "${r}"`);s[r]=i})}),e}decompress(e,s,r){ie.add(i=>{this._decompress(e,s,(n,o)=>{i(),r(n,o)})})}compress(e,s,r){ie.add(i=>{this._compress(e,s,(n,o)=>{i(),r(n,o)})})}_decompress(e,s,r){let i=this._isServer?"client":"server";if(!this._inflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?X.Z_DEFAULT_WINDOWBITS:this.params[n];this._inflate=X.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[ne]=this,this._inflate[k]=0,this._inflate[N]=[],this._inflate.on("error",is),this._inflate.on("data",Je)}this._inflate[W]=r,this._inflate.write(e),s&&this._inflate.write(ss),this._inflate.flush(()=>{let n=this._inflate[F];if(n){this._inflate.close(),this._inflate=null,r(n);return}let o=Ze.concat(this._inflate[N],this._inflate[k]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[k]=0,this._inflate[N]=[],s&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),r(null,o)})}_compress(e,s,r){let i=this._isServer?"server":"client";if(!this._deflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?X.Z_DEFAULT_WINDOWBITS:this.params[n];this._deflate=X.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[k]=0,this._deflate[N]=[],this._deflate.on("data",rs)}this._deflate[W]=r,this._deflate.write(e),this._deflate.flush(X.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let n=Ze.concat(this._deflate[N],this._deflate[k]);s&&(n=new ts(n.buffer,n.byteOffset,n.length-4)),this._deflate[W]=null,this._deflate[k]=0,this._deflate[N]=[],s&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),r(null,n)})}};et.exports=be;function rs(t){this[N].push(t),this[k]+=t.length}function Je(t){if(this[k]+=t.length,this[ne]._maxPayload<1||this[k]<=this[ne]._maxPayload){this[N].push(t);return}this[F]=new RangeError("Max payload size exceeded"),this[F].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[F][Qe]=1009,this.removeListener("data",Je),this.reset()}function is(t){if(this[ne]._inflate=null,this[F]){this[W](this[F]);return}t[Qe]=1007,this[W](t)}});var q=x((br,oe)=>{"use strict";var{isUtf8:tt}=m("buffer"),{hasBlob:ns}=T(),os=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function as(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function we(t){let e=t.length,s=0;for(;s<e;)if((t[s]&128)===0)s++;else if((t[s]&224)===192){if(s+1===e||(t[s+1]&192)!==128||(t[s]&254)===192)return!1;s+=2}else if((t[s]&240)===224){if(s+2>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||t[s]===224&&(t[s+1]&224)===128||t[s]===237&&(t[s+1]&224)===160)return!1;s+=3}else if((t[s]&248)===240){if(s+3>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||(t[s+3]&192)!==128||t[s]===240&&(t[s+1]&240)===128||t[s]===244&&t[s+1]>143||t[s]>244)return!1;s+=4}else return!1;return!0}function ls(t){return ns&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]==="Blob"||t[Symbol.toStringTag]==="File")}oe.exports={isBlob:ls,isValidStatusCode:as,isValidUTF8:we,tokenChars:os};if(tt)oe.exports.isValidUTF8=function(t){return t.length<24?we(t):tt(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=m("utf-8-validate");oe.exports.isValidUTF8=function(e){return e.length<32?we(e):t(e)}}catch{}});var Le=x((wr,lt)=>{"use strict";var{Writable:fs}=m("stream"),st=Z(),{BINARY_TYPES:hs,EMPTY_BUFFER:rt,kStatusCode:cs,kWebSocket:us}=T(),{concat:Oe,toArrayBuffer:ds,unmask:_s}=K(),{isValidStatusCode:ps,isValidUTF8:it}=q(),ae=Buffer[Symbol.species],v=0,nt=1,ot=2,at=3,Te=4,ke=5,le=6,Ce=class extends fs{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||hs[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[us]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=v}_write(e,s,r){if(this._opcode===8&&this._state==v)return r();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let r=this._buffers[0];return this._buffers[0]=new ae(r.buffer,r.byteOffset+e,r.length-e),new ae(r.buffer,r.byteOffset,e)}let s=Buffer.allocUnsafe(e);do{let r=this._buffers[0],i=s.length-e;e>=r.length?s.set(this._buffers.shift(),i):(s.set(new Uint8Array(r.buffer,r.byteOffset,e),i),this._buffers[0]=new ae(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0);return s}startLoop(e){this._loop=!0;do switch(this._state){case v:this.getInfo(e);break;case nt:this.getPayloadLength16(e);break;case ot:this.getPayloadLength64(e);break;case at:this.getMask();break;case Te:this.getData(e);break;case ke:case le:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let s=this.consume(2);if((s[0]&48)!==0){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let r=(s[0]&64)===64;if(r&&!this._extensions[st.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(s[0]&128)===128,this._opcode=s[0]&15,this._payloadLength=s[1]&127,this._opcode===0){if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(s[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=nt:this._payloadLength===127?this._state=ot:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let s=this.consume(8),r=s.readUInt32BE(0);if(r>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=r*Math.pow(2,32)+s.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let s=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(s);return}this._masked?this._state=at:this._state=Te}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Te}getData(e){let s=rt;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}s=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&_s(s,this._mask)}if(this._opcode>7){this.controlMessage(s,e);return}if(this._compressed){this._state=ke,this.decompress(s,e);return}s.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(s)),this.dataMessage(e)}decompress(e,s){this._extensions[st.extensionName].decompress(e,this._fin,(i,n)=>{if(i)return s(i);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");s(o);return}this._fragments.push(n)}this.dataMessage(s),this._state===v&&this.startLoop(s)})}dataMessage(e){if(!this._fin){this._state=v;return}let s=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=Oe(r,s):this._binaryType==="arraybuffer"?i=ds(Oe(r,s)):this._binaryType==="blob"?i=new Blob(r):i=r,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=v):(this._state=le,setImmediate(()=>{this.emit("message",i,!0),this._state=v,this.startLoop(e)}))}else{let i=Oe(r,s);if(!this._skipUTF8Validation&&!it(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(n);return}this._state===ke||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=v):(this._state=le,setImmediate(()=>{this.emit("message",i,!1),this._state=v,this.startLoop(e)}))}}controlMessage(e,s){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,rt),this.end();else{let r=e.readUInt16BE(0);if(!ps(r)){let n=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");s(n);return}let i=new ae(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!it(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");s(n);return}this._loop=!1,this.emit("conclude",r,i),this.end()}this._state=v;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=v):(this._state=le,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=v,this.startLoop(s)}))}createError(e,s,r,i,n){this._loop=!1,this._errored=!0;let o=new e(r?`Invalid WebSocket frame: ${s}`:s);return Error.captureStackTrace(o,this.createError),o.code=n,o[cs]=i,o}};lt.exports=Ce});var Be=x((Tr,ct)=>{"use strict";var{Duplex:Or}=m("stream"),{randomFillSync:ms}=m("crypto"),ft=Z(),{EMPTY_BUFFER:gs,kWebSocket:ys,NOOP:Ss}=T(),{isBlob:G,isValidStatusCode:xs}=q(),{mask:ht,toBuffer:B}=K(),b=Symbol("kByteLength"),Es=Buffer.alloc(4),fe=8*1024,R,V=fe,w=0,vs=1,bs=2,Ne=class t{constructor(e,s,r){this._extensions=s||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=w,this.onerror=Ss,this[ys]=void 0}static frame(e,s){let r,i=!1,n=2,o=!1;s.mask&&(r=s.maskBuffer||Es,s.generateMask?s.generateMask(r):(V===fe&&(R===void 0&&(R=Buffer.alloc(fe)),ms(R,0,fe),V=0),r[0]=R[V++],r[1]=R[V++],r[2]=R[V++],r[3]=R[V++]),o=(r[0]|r[1]|r[2]|r[3])===0,n=6);let l;typeof e=="string"?(!s.mask||o)&&s[b]!==void 0?l=s[b]:(e=Buffer.from(e),l=e.length):(l=e.length,i=s.mask&&s.readOnly&&!o);let f=l;l>=65536?(n+=8,f=127):l>125&&(n+=2,f=126);let a=Buffer.allocUnsafe(i?l+n:n);return a[0]=s.fin?s.opcode|128:s.opcode,s.rsv1&&(a[0]|=64),a[1]=f,f===126?a.writeUInt16BE(l,2):f===127&&(a[2]=a[3]=0,a.writeUIntBE(l,4,6)),s.mask?(a[1]|=128,a[n-4]=r[0],a[n-3]=r[1],a[n-2]=r[2],a[n-1]=r[3],o?[a,e]:i?(ht(e,r,a,n,l),[a]):(ht(e,r,e,0,l),[a,e])):[a,e]}close(e,s,r,i){let n;if(e===void 0)n=gs;else{if(typeof e!="number"||!xs(e))throw new TypeError("First argument must be a valid error code number");if(s===void 0||!s.length)n=Buffer.allocUnsafe(2),n.writeUInt16BE(e,0);else{let l=Buffer.byteLength(s);if(l>123)throw new RangeError("The message must not be greater than 123 bytes");n=Buffer.allocUnsafe(2+l),n.writeUInt16BE(e,0),typeof s=="string"?n.write(s,2):n.set(s,2)}}let o={[b]:n.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==w?this.enqueue([this.dispatch,n,!1,o,i]):this.sendFrame(t.frame(n,o),i)}ping(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):G(e)?(i=e.size,n=!1):(e=B(e),i=e.length,n=B.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[b]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};G(e)?this._state!==w?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==w?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}pong(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):G(e)?(i=e.size,n=!1):(e=B(e),i=e.length,n=B.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[b]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};G(e)?this._state!==w?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==w?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}send(e,s,r){let i=this._extensions[ft.extensionName],n=s.binary?2:1,o=s.compress,l,f;typeof e=="string"?(l=Buffer.byteLength(e),f=!1):G(e)?(l=e.size,f=!1):(e=B(e),l=e.length,f=B.readOnly),this._firstFragment?(this._firstFragment=!1,o&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=l>=i._threshold),this._compress=o):(o=!1,n=0),s.fin&&(this._firstFragment=!0);let a={[b]:l,fin:s.fin,generateMask:this._generateMask,mask:s.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:f,rsv1:o};G(e)?this._state!==w?this.enqueue([this.getBlobData,e,this._compress,a,r]):this.getBlobData(e,this._compress,a,r):this._state!==w?this.enqueue([this.dispatch,e,this._compress,a,r]):this.dispatch(e,this._compress,a,r)}getBlobData(e,s,r,i){this._bufferedBytes+=r[b],this._state=bs,e.arrayBuffer().then(n=>{if(this._socket.destroyed){let l=new Error("The socket was closed while the blob was being read");process.nextTick(Pe,this,l,i);return}this._bufferedBytes-=r[b];let o=B(n);s?this.dispatch(o,s,r,i):(this._state=w,this.sendFrame(t.frame(o,r),i),this.dequeue())}).catch(n=>{process.nextTick(ws,this,n,i)})}dispatch(e,s,r,i){if(!s){this.sendFrame(t.frame(e,r),i);return}let n=this._extensions[ft.extensionName];this._bufferedBytes+=r[b],this._state=vs,n.compress(e,r.fin,(o,l)=>{if(this._socket.destroyed){let f=new Error("The socket was closed while data was being compressed");Pe(this,f,i);return}this._bufferedBytes-=r[b],this._state=w,r.readOnly=!1,this.sendFrame(t.frame(l,r),i),this.dequeue()})}dequeue(){for(;this._state===w&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][b],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][b],this._queue.push(e)}sendFrame(e,s){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],s),this._socket.uncork()):this._socket.write(e[0],s)}};ct.exports=Ne;function Pe(t,e,s){typeof s=="function"&&s(e);for(let r=0;r<t._queue.length;r++){let i=t._queue[r],n=i[i.length-1];typeof n=="function"&&n(e)}}function ws(t,e,s){Pe(t,e,s),t.onerror(e)}});var xt=x((kr,St)=>{"use strict";var{kForOnEventAttribute:Q,kListener:Re}=T(),ut=Symbol("kCode"),dt=Symbol("kData"),_t=Symbol("kError"),pt=Symbol("kMessage"),mt=Symbol("kReason"),$=Symbol("kTarget"),gt=Symbol("kType"),yt=Symbol("kWasClean"),C=class{constructor(e){this[$]=null,this[gt]=e}get target(){return this[$]}get type(){return this[gt]}};Object.defineProperty(C.prototype,"target",{enumerable:!0});Object.defineProperty(C.prototype,"type",{enumerable:!0});var I=class extends C{constructor(e,s={}){super(e),this[ut]=s.code===void 0?0:s.code,this[mt]=s.reason===void 0?"":s.reason,this[yt]=s.wasClean===void 0?!1:s.wasClean}get code(){return this[ut]}get reason(){return this[mt]}get wasClean(){return this[yt]}};Object.defineProperty(I.prototype,"code",{enumerable:!0});Object.defineProperty(I.prototype,"reason",{enumerable:!0});Object.defineProperty(I.prototype,"wasClean",{enumerable:!0});var j=class extends C{constructor(e,s={}){super(e),this[_t]=s.error===void 0?null:s.error,this[pt]=s.message===void 0?"":s.message}get error(){return this[_t]}get message(){return this[pt]}};Object.defineProperty(j.prototype,"error",{enumerable:!0});Object.defineProperty(j.prototype,"message",{enumerable:!0});var J=class extends C{constructor(e,s={}){super(e),this[dt]=s.data===void 0?null:s.data}get data(){return this[dt]}};Object.defineProperty(J.prototype,"data",{enumerable:!0});var Os={addEventListener(t,e,s={}){for(let i of this.listeners(t))if(!s[Q]&&i[Re]===e&&!i[Q])return;let r;if(t==="message")r=function(n,o){let l=new J("message",{data:o?n:n.toString()});l[$]=this,he(e,this,l)};else if(t==="close")r=function(n,o){let l=new I("close",{code:n,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});l[$]=this,he(e,this,l)};else if(t==="error")r=function(n){let o=new j("error",{error:n,message:n.message});o[$]=this,he(e,this,o)};else if(t==="open")r=function(){let n=new C("open");n[$]=this,he(e,this,n)};else return;r[Q]=!!s[Q],r[Re]=e,s.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(let s of this.listeners(t))if(s[Re]===e&&!s[Q]){this.removeListener(t,s);break}}};St.exports={CloseEvent:I,ErrorEvent:j,Event:C,EventTarget:Os,MessageEvent:J};function he(t,e,s){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,s):t.call(e,s)}});var Ie=x((Cr,Et)=>{"use strict";var{tokenChars:ee}=q();function O(t,e,s){t[e]===void 0?t[e]=[s]:t[e].push(s)}function Ts(t){let e=Object.create(null),s=Object.create(null),r=!1,i=!1,n=!1,o,l,f=-1,a=-1,h=-1,c=0;for(;c<t.length;c++)if(a=t.charCodeAt(c),o===void 0)if(h===-1&&ee[a]===1)f===-1&&(f=c);else if(c!==0&&(a===32||a===9))h===-1&&f!==-1&&(h=c);else if(a===59||a===44){if(f===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let g=t.slice(f,h);a===44?(O(e,g,s),s=Object.create(null)):o=g,f=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(l===void 0)if(h===-1&&ee[a]===1)f===-1&&(f=c);else if(a===32||a===9)h===-1&&f!==-1&&(h=c);else if(a===59||a===44){if(f===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c),O(s,t.slice(f,h),!0),a===44&&(O(e,o,s),s=Object.create(null),o=void 0),f=h=-1}else if(a===61&&f!==-1&&h===-1)l=t.slice(f,c),f=h=-1;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(i){if(ee[a]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);f===-1?f=c:r||(r=!0),i=!1}else if(n)if(ee[a]===1)f===-1&&(f=c);else if(a===34&&f!==-1)n=!1,h=c;else if(a===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(a===34&&t.charCodeAt(c-1)===61)n=!0;else if(h===-1&&ee[a]===1)f===-1&&(f=c);else if(f!==-1&&(a===32||a===9))h===-1&&(h=c);else if(a===59||a===44){if(f===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let g=t.slice(f,h);r&&(g=g.replace(/\\/g,""),r=!1),O(s,l,g),a===44&&(O(e,o,s),s=Object.create(null),o=void 0),l=void 0,f=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);if(f===-1||n||a===32||a===9)throw new SyntaxError("Unexpected end of input");h===-1&&(h=c);let _=t.slice(f,h);return o===void 0?O(e,_,s):(l===void 0?O(s,_,!0):r?O(s,l,_.replace(/\\/g,"")):O(s,l,_),O(e,o,s)),e}function ks(t){return Object.keys(t).map(e=>{let s=t[e];return Array.isArray(s)||(s=[s]),s.map(r=>[e].concat(Object.keys(r).map(i=>{let n=r[i];return Array.isArray(n)||(n=[n]),n.map(o=>o===!0?i:`${i}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Et.exports={format:ks,parse:Ts}});var _e=x((Pr,Rt)=>{"use strict";var Cs=m("events"),Ls=m("https"),Ns=m("http"),wt=m("net"),Ps=m("tls"),{randomBytes:Bs,createHash:Rs}=m("crypto"),{Duplex:Lr,Readable:Nr}=m("stream"),{URL:Ue}=m("url"),P=Z(),Is=Le(),Us=Be(),{isBlob:Ds}=q(),{BINARY_TYPES:vt,EMPTY_BUFFER:ce,GUID:Ms,kForOnEventAttribute:De,kListener:As,kStatusCode:Ws,kWebSocket:y,NOOP:Ot}=T(),{EventTarget:{addEventListener:Fs,removeEventListener:qs}}=xt(),{format:Gs,parse:Vs}=Ie(),{toBuffer:$s}=K(),js=30*1e3,Tt=Symbol("kAborted"),Me=[8,13],L=["CONNECTING","OPEN","CLOSING","CLOSED"],zs=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,d=class t extends Cs{constructor(e,s,r){super(),this._binaryType=vt[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ce,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,s===void 0?s=[]:Array.isArray(s)||(typeof s=="object"&&s!==null?(r=s,s=[]):s=[s]),kt(this,e,s,r)):(this._autoPong=r.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){vt.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,s,r){let i=new Is({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),n=new Us(e,this._extensions,r.generateMask);this._receiver=i,this._sender=n,this._socket=e,i[y]=this,n[y]=this,e[y]=this,i.on("conclude",Ks),i.on("drain",Xs),i.on("error",Zs),i.on("message",Qs),i.on("ping",Js),i.on("pong",er),n.onerror=tr,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),s.length>0&&e.unshift(s),e.on("close",Nt),e.on("data",de),e.on("end",Pt),e.on("error",Bt),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[P.extensionName]&&this._extensions[P.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,s){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){E(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=t.CLOSING,this._sender.close(e,s,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),Lt(this)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Ae(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.ping(e||ce,s,r)}pong(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Ae(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.pong(e||ce,s,r)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof s=="function"&&(r=s,s={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Ae(this,e,r);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...s};this._extensions[P.extensionName]||(i.compress=!1),this._sender.send(e||ce,i,r)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){E(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(d,"CONNECTING",{enumerable:!0,value:L.indexOf("CONNECTING")});Object.defineProperty(d.prototype,"CONNECTING",{enumerable:!0,value:L.indexOf("CONNECTING")});Object.defineProperty(d,"OPEN",{enumerable:!0,value:L.indexOf("OPEN")});Object.defineProperty(d.prototype,"OPEN",{enumerable:!0,value:L.indexOf("OPEN")});Object.defineProperty(d,"CLOSING",{enumerable:!0,value:L.indexOf("CLOSING")});Object.defineProperty(d.prototype,"CLOSING",{enumerable:!0,value:L.indexOf("CLOSING")});Object.defineProperty(d,"CLOSED",{enumerable:!0,value:L.indexOf("CLOSED")});Object.defineProperty(d.prototype,"CLOSED",{enumerable:!0,value:L.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(d.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(d.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[De])return e[As];return null},set(e){for(let s of this.listeners(t))if(s[De]){this.removeListener(t,s);break}typeof e=="function"&&this.addEventListener(t,e,{[De]:!0})}})});d.prototype.addEventListener=Fs;d.prototype.removeEventListener=qs;Rt.exports=d;function kt(t,e,s,r){let i={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Me[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=i.autoPong,!Me.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Me.join(", ")})`);let n;if(e instanceof Ue)n=e;else try{n=new Ue(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}n.protocol==="http:"?n.protocol="ws:":n.protocol==="https:"&&(n.protocol="wss:"),t._url=n.href;let o=n.protocol==="wss:",l=n.protocol==="ws+unix:",f;if(n.protocol!=="ws:"&&!o&&!l?f=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:l&&!n.pathname?f="The URL's pathname is empty":n.hash&&(f="The URL contains a fragment identifier"),f){let u=new SyntaxError(f);if(t._redirects===0)throw u;ue(t,u);return}let a=o?443:80,h=Bs(16).toString("base64"),c=o?Ls.request:Ns.request,_=new Set,g;if(i.createConnection=i.createConnection||(o?Ys:Hs),i.defaultPort=i.defaultPort||a,i.port=n.port||a,i.host=n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":h,Connection:"Upgrade",Upgrade:"websocket"},i.path=n.pathname+n.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(g=new P(i.perMessageDeflate!==!0?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=Gs({[P.extensionName]:g.offer()})),s.length){for(let u of s){if(typeof u!="string"||!zs.test(u)||_.has(u))throw new SyntaxError("An invalid or duplicated subprotocol was specified");_.add(u)}i.headers["Sec-WebSocket-Protocol"]=s.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(n.username||n.password)&&(i.auth=`${n.username}:${n.password}`),l){let u=i.path.split(":");i.socketPath=u[0],i.path=u[1]}let p;if(i.followRedirects){if(t._redirects===0){t._originalIpc=l,t._originalSecure=o,t._originalHostOrSocketPath=l?i.socketPath:n.host;let u=r&&r.headers;if(r={...r,headers:{}},u)for(let[S,M]of Object.entries(u))r.headers[S.toLowerCase()]=M}else if(t.listenerCount("redirect")===0){let u=l?t._originalIpc?i.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:n.host===t._originalHostOrSocketPath;(!u||t._originalSecure&&!o)&&(delete i.headers.authorization,delete i.headers.cookie,u||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),p=t._req=c(i),t._redirects&&t.emit("redirect",t.url,p)}else p=t._req=c(i);i.timeout&&p.on("timeout",()=>{E(t,p,"Opening handshake has timed out")}),p.on("error",u=>{p===null||p[Tt]||(p=t._req=null,ue(t,u))}),p.on("response",u=>{let S=u.headers.location,M=u.statusCode;if(S&&i.followRedirects&&M>=300&&M<400){if(++t._redirects>i.maxRedirects){E(t,p,"Maximum redirects exceeded");return}p.abort();let z;try{z=new Ue(S,e)}catch{let A=new SyntaxError(`Invalid URL: ${S}`);ue(t,A);return}kt(t,z,s,r)}else t.emit("unexpected-response",p,u)||E(t,p,`Unexpected server response: ${u.statusCode}`)}),p.on("upgrade",(u,S,M)=>{if(t.emit("upgrade",u),t.readyState!==d.CONNECTING)return;p=t._req=null;let z=u.headers.upgrade;if(z===void 0||z.toLowerCase()!=="websocket"){E(t,S,"Invalid Upgrade header");return}let Fe=Rs("sha1").update(h+Ms).digest("base64");if(u.headers["sec-websocket-accept"]!==Fe){E(t,S,"Invalid Sec-WebSocket-Accept header");return}let A=u.headers["sec-websocket-protocol"],H;if(A!==void 0?_.size?_.has(A)||(H="Server sent an invalid subprotocol"):H="Server sent a subprotocol but none was requested":_.size&&(H="Server sent no subprotocol"),H){E(t,S,H);return}A&&(t._protocol=A);let qe=u.headers["sec-websocket-extensions"];if(qe!==void 0){if(!g){E(t,S,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let ge;try{ge=Vs(qe)}catch{E(t,S,"Invalid Sec-WebSocket-Extensions header");return}let Ge=Object.keys(ge);if(Ge.length!==1||Ge[0]!==P.extensionName){E(t,S,"Server indicated an extension that was not requested");return}try{g.accept(ge[P.extensionName])}catch{E(t,S,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[P.extensionName]=g}t.setSocket(S,M,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(p,t):p.end()}function ue(t,e){t._readyState=d.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function Hs(t){return t.path=t.socketPath,wt.connect(t)}function Ys(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=wt.isIP(t.host)?"":t.host),Ps.connect(t)}function E(t,e,s){t._readyState=d.CLOSING;let r=new Error(s);Error.captureStackTrace(r,E),e.setHeader?(e[Tt]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(ue,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function Ae(t,e,s){if(e){let r=Ds(e)?e.size:$s(e).length;t._socket?t._sender._bufferedBytes+=r:t._bufferedAmount+=r}if(s){let r=new Error(`WebSocket is not open: readyState ${t.readyState} (${L[t.readyState]})`);process.nextTick(s,r)}}function Ks(t,e){let s=this[y];s._closeFrameReceived=!0,s._closeMessage=e,s._closeCode=t,s._socket[y]!==void 0&&(s._socket.removeListener("data",de),process.nextTick(Ct,s._socket),t===1005?s.close():s.close(t,e))}function Xs(){let t=this[y];t.isPaused||t._socket.resume()}function Zs(t){let e=this[y];e._socket[y]!==void 0&&(e._socket.removeListener("data",de),process.nextTick(Ct,e._socket),e.close(t[Ws])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function bt(){this[y].emitClose()}function Qs(t,e){this[y].emit("message",t,e)}function Js(t){let e=this[y];e._autoPong&&e.pong(t,!this._isServer,Ot),e.emit("ping",t)}function er(t){this[y].emit("pong",t)}function Ct(t){t.resume()}function tr(t){let e=this[y];e.readyState!==d.CLOSED&&(e.readyState===d.OPEN&&(e._readyState=d.CLOSING,Lt(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function Lt(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),js)}function Nt(){let t=this[y];this.removeListener("close",Nt),this.removeListener("data",de),this.removeListener("end",Pt),t._readyState=d.CLOSING;let e;!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&(e=t._socket.read())!==null&&t._receiver.write(e),t._receiver.end(),this[y]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",bt),t._receiver.on("finish",bt))}function de(t){this[y]._receiver.write(t)||this.pause()}function Pt(){let t=this[y];t._readyState=d.CLOSING,t._receiver.end(),this.end()}function Bt(){let t=this[y];this.removeListener("error",Bt),this.on("error",Ot),t&&(t._readyState=d.CLOSING,this.destroy())}});var Mt=x((Rr,Dt)=>{"use strict";var Br=_e(),{Duplex:sr}=m("stream");function It(t){t.emit("close")}function rr(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Ut(t){this.removeListener("error",Ut),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function ir(t,e){let s=!0,r=new sr({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(n,o){let l=!o&&r._readableState.objectMode?n.toString():n;r.push(l)||t.pause()}),t.once("error",function(n){r.destroyed||(s=!1,r.destroy(n))}),t.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(i,n){if(t.readyState===t.CLOSED){n(i),process.nextTick(It,r);return}let o=!1;t.once("error",function(f){o=!0,n(f)}),t.once("close",function(){o||n(i),process.nextTick(It,r)}),s&&t.terminate()},r._final=function(i){if(t.readyState===t.CONNECTING){t.once("open",function(){r._final(i)});return}t._socket!==null&&(t._socket._writableState.finished?(i(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",function(){i()}),t.close()))},r._read=function(){t.isPaused&&t.resume()},r._write=function(i,n,o){if(t.readyState===t.CONNECTING){t.once("open",function(){r._write(i,n,o)});return}t.send(i,o)},r.on("end",rr),r.on("error",Ut),r}Dt.exports=ir});var Wt=x((Ir,At)=>{"use strict";var{tokenChars:nr}=q();function or(t){let e=new Set,s=-1,r=-1,i=0;for(i;i<t.length;i++){let o=t.charCodeAt(i);if(r===-1&&nr[o]===1)s===-1&&(s=i);else if(i!==0&&(o===32||o===9))r===-1&&s!==-1&&(r=i);else if(o===44){if(s===-1)throw new SyntaxError(`Unexpected character at index ${i}`);r===-1&&(r=i);let l=t.slice(s,r);if(e.has(l))throw new SyntaxError(`The "${l}" subprotocol is duplicated`);e.add(l),s=r=-1}else throw new SyntaxError(`Unexpected character at index ${i}`)}if(s===-1||r!==-1)throw new SyntaxError("Unexpected end of input");let n=t.slice(s,i);if(e.has(n))throw new SyntaxError(`The "${n}" subprotocol is duplicated`);return e.add(n),e}At.exports={parse:or}});var zt=x((Dr,jt)=>{"use strict";var ar=m("events"),pe=m("http"),{Duplex:Ur}=m("stream"),{createHash:lr}=m("crypto"),Ft=Ie(),U=Z(),fr=Wt(),hr=_e(),{GUID:cr,kWebSocket:ur}=T(),dr=/^[+/0-9A-Za-z]{22}==$/,qt=0,Gt=1,$t=2,We=class extends ar{constructor(e,s){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:hr,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=pe.createServer((r,i)=>{let n=pe.STATUS_CODES[426];i.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),i.end(n)}),this._server.listen(e.port,e.host,e.backlog,s)):e.server&&(this._server=e.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=_r(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,n,o)=>{this.handleUpgrade(i,n,o,r)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=qt}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===$t){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(te,this);return}if(e&&this.once("close",e),this._state!==Gt)if(this._state=Gt,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(te,this):process.nextTick(te,this);else{let s=this._server;this._removeListeners(),this._removeListeners=this._server=null,s.close(()=>{te(this)})}}shouldHandle(e){if(this.options.path){let s=e.url.indexOf("?");if((s!==-1?e.url.slice(0,s):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,s,r,i){s.on("error",Vt);let n=e.headers["sec-websocket-key"],o=e.headers.upgrade,l=+e.headers["sec-websocket-version"];if(e.method!=="GET"){D(this,e,s,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){D(this,e,s,400,"Invalid Upgrade header");return}if(n===void 0||!dr.test(n)){D(this,e,s,400,"Missing or invalid Sec-WebSocket-Key header");return}if(l!==13&&l!==8){D(this,e,s,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){se(s,400);return}let f=e.headers["sec-websocket-protocol"],a=new Set;if(f!==void 0)try{a=fr.parse(f)}catch{D(this,e,s,400,"Invalid Sec-WebSocket-Protocol header");return}let h=e.headers["sec-websocket-extensions"],c={};if(this.options.perMessageDeflate&&h!==void 0){let _=new U(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let g=Ft.parse(h);g[U.extensionName]&&(_.accept(g[U.extensionName]),c[U.extensionName]=_)}catch{D(this,e,s,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let _={origin:e.headers[`${l===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(_,(g,p,u,S)=>{if(!g)return se(s,p||401,u,S);this.completeUpgrade(c,n,a,e,s,r,i)});return}if(!this.options.verifyClient(_))return se(s,401)}this.completeUpgrade(c,n,a,e,s,r,i)}completeUpgrade(e,s,r,i,n,o,l){if(!n.readable||!n.writable)return n.destroy();if(n[ur])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>qt)return se(n,503);let a=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${lr("sha1").update(s+cr).digest("base64")}`],h=new this.options.WebSocket(null,void 0,this.options);if(r.size){let c=this.options.handleProtocols?this.options.handleProtocols(r,i):r.values().next().value;c&&(a.push(`Sec-WebSocket-Protocol: ${c}`),h._protocol=c)}if(e[U.extensionName]){let c=e[U.extensionName].params,_=Ft.format({[U.extensionName]:[c]});a.push(`Sec-WebSocket-Extensions: ${_}`),h._extensions=e}this.emit("headers",a,i),n.write(a.concat(`\r
|
|
3
3
|
`).join(`\r
|
|
4
|
-
`)),n.removeListener("error",
|
|
4
|
+
`)),n.removeListener("error",Vt),h.setSocket(n,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(h),h.on("close",()=>{this.clients.delete(h),this._shouldEmitClose&&!this.clients.size&&process.nextTick(te,this)})),l(h,i)}};jt.exports=We;function _r(t,e){for(let s of Object.keys(e))t.on(s,e[s]);return function(){for(let r of Object.keys(e))t.removeListener(r,e[r])}}function te(t){t._state=$t,t.emit("close")}function Vt(){this.destroy()}function se(t,e,s,r){s=s||pe.STATUS_CODES[e],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(s),...r},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${pe.STATUS_CODES[e]}\r
|
|
5
5
|
`+Object.keys(r).map(i=>`${i}: ${r[i]}`).join(`\r
|
|
6
6
|
`)+`\r
|
|
7
7
|
\r
|
|
8
|
-
`+s)}function D(t,e,s,r,i,n){if(t.listenerCount("wsClientError")){let o=new Error(i);Error.captureStackTrace(o,D),t.emit("wsClientError",o,s,e)}else se(s,r,i,n)}});var
|
|
8
|
+
`+s)}function D(t,e,s,r,i,n){if(t.listenerCount("wsClientError")){let o=new Error(i);Error.captureStackTrace(o,D),t.emit("wsClientError",o,s,e)}else se(s,r,i,n)}});var pr=Y(Mt(),1),mr=Y(Le(),1),gr=Y(Be(),1),Ht=Y(_e(),1),yr=Y(zt(),1);var Yt=Ht.default;var me=global;me.WebSocket||=Yt;me.window||=global;me.self||=global;me.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__=[{type:1,value:7,isEnabled:!0},{type:2,value:"InternalApp",isEnabled:!0,isValid:!0},{type:2,value:"InternalAppContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdoutContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStderrContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdinContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalFocusContext",isEnabled:!0,isValid:!0}];import Kt from"react-devtools-core";Kt.initialize();Kt.connectToDevTools();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@binclusive/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Binclusive accessibility CLI — run audits and view violation tickets from your terminal.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"type": "module",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"prepublishOnly": "pnpm build"
|
|
30
30
|
},
|
|
31
31
|
"optionalDependencies": {
|
|
32
|
+
"@guidepup/guidepup": "^0.28.1",
|
|
32
33
|
"playwright": "^1.50.0",
|
|
33
34
|
"playwright-extra": "^4.3.6",
|
|
34
35
|
"puppeteer-extra-plugin-stealth": "^2.11.2"
|
|
@@ -38,9 +39,12 @@
|
|
|
38
39
|
"@b8e/captcha": "workspace:^",
|
|
39
40
|
"@b8e/hands-machine": "workspace:^",
|
|
40
41
|
"@b8e/nvda-screen-reader": "workspace:^",
|
|
42
|
+
"@b8e/sr-hands": "workspace:^",
|
|
43
|
+
"@b8e/sr-tools": "workspace:^",
|
|
41
44
|
"@b8e/tea": "workspace:^",
|
|
42
45
|
"@b8e/tea-react": "workspace:^",
|
|
43
46
|
"@babel/core": "^7.24.0",
|
|
47
|
+
"@binclusive/a11y-contract": "workspace:^",
|
|
44
48
|
"@binclusive/tsconfig": "workspace:^",
|
|
45
49
|
"@sentry/cli": "^3.4.1",
|
|
46
50
|
"@types/react": "catalog:",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __cjsCreateRequire } from 'node:module'; const require = __cjsCreateRequire(import.meta.url);
|
|
2
|
-
import{a as t}from"./chunk-HPOSJQ4U.js";import"./chunk-PCQ2R3VR.js";var e=global;e.WebSocket||=t;e.window||=global;e.self||=global;e.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__=[{type:1,value:7,isEnabled:!0},{type:2,value:"InternalApp",isEnabled:!0,isValid:!0},{type:2,value:"InternalAppContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdoutContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStderrContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdinContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalFocusContext",isEnabled:!0,isValid:!0}];import l from"react-devtools-core";l.initialize();l.connectToDevTools();
|