@shopify/create-hydrogen 5.0.24 → 5.0.26
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/assets/hydrogen/bundle/analyzer.html +155 -148
- package/dist/assets/hydrogen/starter/CHANGELOG.md +131 -49
- package/dist/assets/hydrogen/starter/app/components/AddToCartButton.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/CartLineItem.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +62 -29
- package/dist/assets/hydrogen/starter/app/components/Header.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/PageLayout.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/ProductForm.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/components/SearchForm.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/components/SearchFormPredictive.tsx +8 -3
- package/dist/assets/hydrogen/starter/app/components/SearchResults.tsx +3 -11
- package/dist/assets/hydrogen/starter/app/components/SearchResultsPredictive.tsx +2 -6
- package/dist/assets/hydrogen/starter/app/entry.client.tsx +10 -2
- package/dist/assets/hydrogen/starter/app/entry.server.tsx +5 -3
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerAddressMutations.ts +7 -4
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerDetailsQuery.ts +1 -1
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerOrderQuery.ts +4 -1
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerOrdersQuery.ts +10 -5
- package/dist/assets/hydrogen/starter/app/graphql/customer-account/CustomerUpdateMutation.ts +3 -2
- package/dist/assets/hydrogen/starter/app/lib/context.ts +34 -17
- package/dist/assets/hydrogen/starter/app/lib/fragments.ts +1 -0
- package/dist/assets/hydrogen/starter/app/lib/orderFilters.ts +90 -0
- package/dist/assets/hydrogen/starter/app/lib/redirect.ts +1 -1
- package/dist/assets/hydrogen/starter/app/lib/session.ts +1 -1
- package/dist/assets/hydrogen/starter/app/lib/variants.ts +1 -1
- package/dist/assets/hydrogen/starter/app/root.tsx +23 -18
- package/dist/assets/hydrogen/starter/app/routes/$.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/[robots.txt].tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/[sitemap.xml].tsx +2 -3
- package/dist/assets/hydrogen/starter/app/routes/_index.tsx +12 -8
- package/dist/assets/hydrogen/starter/app/routes/account.$.tsx +4 -3
- package/dist/assets/hydrogen/starter/app/routes/account._index.tsx +1 -1
- package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +15 -11
- package/dist/assets/hydrogen/starter/app/routes/account.orders.$id.tsx +47 -22
- package/dist/assets/hydrogen/starter/app/routes/account.orders._index.tsx +152 -23
- package/dist/assets/hydrogen/starter/app/routes/account.profile.tsx +11 -8
- package/dist/assets/hydrogen/starter/app/routes/account.tsx +16 -4
- package/dist/assets/hydrogen/starter/app/routes/account_.authorize.tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/account_.login.tsx +5 -3
- package/dist/assets/hydrogen/starter/app/routes/account_.logout.tsx +3 -2
- package/dist/assets/hydrogen/starter/app/routes/api.$version.[graphql.json].tsx +2 -2
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle.$articleHandle.tsx +6 -10
- package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle._index.tsx +10 -7
- package/dist/assets/hydrogen/starter/app/routes/blogs._index.tsx +13 -7
- package/dist/assets/hydrogen/starter/app/routes/cart.$lines.tsx +3 -2
- package/dist/assets/hydrogen/starter/app/routes/cart.tsx +13 -9
- package/dist/assets/hydrogen/starter/app/routes/collections.$handle.tsx +8 -11
- package/dist/assets/hydrogen/starter/app/routes/collections._index.tsx +6 -6
- package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +10 -7
- package/dist/assets/hydrogen/starter/app/routes/discount.$code.tsx +3 -2
- package/dist/assets/hydrogen/starter/app/routes/pages.$handle.tsx +8 -6
- package/dist/assets/hydrogen/starter/app/routes/policies.$handle.tsx +7 -4
- package/dist/assets/hydrogen/starter/app/routes/policies._index.tsx +19 -13
- package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +9 -6
- package/dist/assets/hydrogen/starter/app/routes/search.tsx +14 -14
- package/dist/assets/hydrogen/starter/app/routes/sitemap.$type.$page[.xml].tsx +2 -3
- package/dist/assets/hydrogen/starter/app/routes.ts +1 -1
- package/dist/assets/hydrogen/starter/app/styles/app.css +53 -1
- package/dist/assets/hydrogen/starter/customer-accountapi.generated.d.ts +47 -13
- package/dist/assets/hydrogen/starter/env.d.ts +1 -39
- package/dist/assets/hydrogen/starter/eslint.config.js +35 -52
- package/dist/assets/hydrogen/starter/package.json +14 -15
- package/dist/assets/hydrogen/starter/react-router.config.ts +9 -3
- package/dist/assets/hydrogen/starter/server.ts +7 -7
- package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +1 -1
- package/dist/assets/hydrogen/starter/tsconfig.json +17 -13
- package/dist/assets/hydrogen/starter/vite.config.ts +4 -1
- package/dist/assets/hydrogen/virtual-routes/components/RequestDetails.jsx +13 -20
- package/dist/assets/hydrogen/virtual-routes/routes/[.]well-known.appspecific.com[.]chrome[.]devtools[.]json.jsx +37 -0
- package/dist/chunk-2LZQLWDR.js +1189 -0
- package/dist/{chunk-EO6F7WJJ.js → chunk-6YUUFKYO.js} +1 -1
- package/dist/chunk-AUULK6IN.js +5 -0
- package/dist/chunk-CJKPLQJ7.js +51 -0
- package/dist/{chunk-MNT4XW23.js → chunk-LBUW5UHX.js} +1 -1
- package/dist/chunk-RUCJI22O.js +3 -0
- package/dist/{chunk-PMDMUCNY.js → chunk-VXJIQGAB.js} +1 -1
- package/dist/chunk-Y5VZE2FH.js +32 -0
- package/dist/chunk-ZLNTSIDN.js +2 -0
- package/dist/create-app.js +293 -288
- package/dist/{del-72VO4HYK.js → del-VDYQZFAQ.js} +1 -1
- package/dist/devtools-3BYEW2L2.js +8 -0
- package/dist/error-handler-XRI3ZDLO.js +2 -0
- package/dist/is-wsl-52AELLDM.js +2 -0
- package/dist/{morph-3JSBLNUD.js → morph-S2LU6PQ4.js} +7 -7
- package/dist/{multipart-parser-QIHQVIZA.js → multipart-parser-MX4R5XJM.js} +1 -1
- package/dist/open-PMJ32HTM.js +2 -0
- package/dist/out-U7AI7XUQ.js +2 -0
- package/package.json +4 -2
- package/dist/chokidar-FXMI63T6.js +0 -12
- package/dist/chunk-3LZ6M5C2.js +0 -3
- package/dist/chunk-D7CI46F7.js +0 -10
- package/dist/chunk-FB327AH7.js +0 -5
- package/dist/chunk-MZPD7BFF.js +0 -23
- package/dist/chunk-QUKX7CP5.js +0 -1180
- package/dist/chunk-UASQ33JG.js +0 -45
- package/dist/chunk-VMIOG46Y.js +0 -2
- package/dist/devtools-DGRGSZU7.js +0 -8
- package/dist/error-handler-YXM2BB34.js +0 -2
- package/dist/is-wsl-LL6KGQIK.js +0 -2
- package/dist/open-OD6DRFEG.js +0 -2
- package/dist/out-DXB3K325.js +0 -2
package/dist/chunk-UASQ33JG.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'module';globalThis.require = __createRequire(import.meta.url);
|
|
2
|
-
import{a as se,c as k,i as d}from"./chunk-MNT4XW23.js";var De=k((yn,Ge)=>{"use strict";d();Ge.exports=function(t){if(typeof t!="string"||t==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(r[2])return!0;t=t.slice(r.index+r[0].length)}return!1}});var qe=k((Sn,Ke)=>{"use strict";d();var Wt=De(),Ue={"{":"}","(":")","[":"]"},Zt=function(e){if(e[0]==="!")return!0;for(var t=0,r=-2,n=-2,s=-2,i=-2,u=-2;t<e.length;){if(e[t]==="*"||e[t+1]==="?"&&/[\].+)]/.test(e[t])||n!==-1&&e[t]==="["&&e[t+1]!=="]"&&(n<t&&(n=e.indexOf("]",t)),n>t&&(u===-1||u>n||(u=e.indexOf("\\",t),u===-1||u>n)))||s!==-1&&e[t]==="{"&&e[t+1]!=="}"&&(s=e.indexOf("}",t),s>t&&(u=e.indexOf("\\",t),u===-1||u>s))||i!==-1&&e[t]==="("&&e[t+1]==="?"&&/[:!=]/.test(e[t+2])&&e[t+3]!==")"&&(i=e.indexOf(")",t),i>t&&(u=e.indexOf("\\",t),u===-1||u>i))||r!==-1&&e[t]==="("&&e[t+1]!=="|"&&(r<t&&(r=e.indexOf("|",t)),r!==-1&&e[r+1]!==")"&&(i=e.indexOf(")",r),i>r&&(u=e.indexOf("\\",r),u===-1||u>i))))return!0;if(e[t]==="\\"){var l=e[t+1];t+=2;var A=Ue[l];if(A){var _=e.indexOf(A,t);_!==-1&&(t=_+1)}if(e[t]==="!")return!0}else t++}return!1},jt=function(e){if(e[0]==="!")return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if(e[t]==="\\"){var r=e[t+1];t+=2;var n=Ue[r];if(n){var s=e.indexOf(n,t);s!==-1&&(t=s+1)}if(e[t]==="!")return!0}else t++}return!1};Ke.exports=function(t,r){if(typeof t!="string"||t==="")return!1;if(Wt(t))return!0;var n=Zt;return r&&r.strict===!1&&(n=jt),n(t)}});var nr=k((Hn,Fe)=>{"use strict";d();var zt=qe(),Yt=se("path").posix.dirname,Vt=se("os").platform()==="win32",Se="/",Jt=/\\/g,er=/[\{\[].*[\}\]]$/,tr=/(^|[^\\])([\{\[]|\([^\)]+$)/,rr=/\\([\!\*\?\|\[\]\(\)\{\}])/g;Fe.exports=function(t,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&Vt&&t.indexOf(Se)<0&&(t=t.replace(Jt,Se)),er.test(t)&&(t+=Se),t+="a";do t=Yt(t);while(zt(t)||tr.test(t));return t.replace(rr,"$1")}});var Re=k(W=>{"use strict";d();W.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;W.find=(e,t)=>e.nodes.find(r=>r.type===t);W.exceedsLimit=(e,t,r=1,n)=>n===!1||!W.isInteger(e)||!W.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;W.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};W.encloseBrace=e=>e.type!=="brace"?!1:e.commas>>0+e.ranges>>0===0?(e.invalid=!0,!0):!1;W.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:e.commas>>0+e.ranges>>0===0||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;W.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;W.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);W.flatten=(...e)=>{let t=[],r=n=>{for(let s=0;s<n.length;s++){let i=n[s];if(Array.isArray(i)){r(i);continue}i!==void 0&&t.push(i)}return t};return r(e),t}});var he=k((Ln,Xe)=>{"use strict";d();var Qe=Re();Xe.exports=(e,t={})=>{let r=(n,s={})=>{let i=t.escapeInvalid&&Qe.isInvalidBrace(s),u=n.invalid===!0&&t.escapeInvalid===!0,l="";if(n.value)return(i||u)&&Qe.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let A of n.nodes)l+=r(A);return l};return r(e)}});var Ze=k((mn,We)=>{"use strict";d();We.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var nt=k((wn,rt)=>{"use strict";d();var je=Ze(),re=(e,t,r)=>{if(je(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(je(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let s=String(n.relaxZeros),i=String(n.shorthand),u=String(n.capture),l=String(n.wrap),A=e+":"+t+"="+s+i+u+l;if(re.cache.hasOwnProperty(A))return re.cache[A].result;let _=Math.min(e,t),h=Math.max(e,t);if(Math.abs(_-h)===1){let g=e+"|"+t;return n.capture?`(${g})`:n.wrap===!1?g:`(?:${g})`}let E=tt(e)||tt(t),f={min:e,max:t,a:_,b:h},H=[],C=[];if(E&&(f.isPadded=E,f.maxLen=String(f.max).length),_<0){let g=h<0?Math.abs(h):1;C=ze(g,Math.abs(_),f,n),_=f.a=0}return h>=0&&(H=ze(_,h,f,n)),f.negatives=C,f.positives=H,f.result=sr(C,H,n),n.capture===!0?f.result=`(${f.result})`:n.wrap!==!1&&H.length+C.length>1&&(f.result=`(?:${f.result})`),re.cache[A]=f,f.result};function sr(e,t,r){let n=be(e,t,"-",!1,r)||[],s=be(t,e,"",!1,r)||[],i=be(e,t,"-?",!0,r)||[];return n.concat(i).concat(s).join("|")}function ur(e,t){let r=1,n=1,s=Ve(e,r),i=new Set([t]);for(;e<=s&&s<=t;)i.add(s),r+=1,s=Ve(e,r);for(s=Je(t+1,n)-1;e<s&&s<=t;)i.add(s),n+=1,s=Je(t+1,n)-1;return i=[...i],i.sort(or),i}function ir(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=ar(e,t),s=n.length,i="",u=0;for(let l=0;l<s;l++){let[A,_]=n[l];A===_?i+=A:A!=="0"||_!=="9"?i+=cr(A,_,r):u++}return u&&(i+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:i,count:[u],digits:s}}function ze(e,t,r,n){let s=ur(e,t),i=[],u=e,l;for(let A=0;A<s.length;A++){let _=s[A],h=ir(String(u),String(_),n),E="";if(!r.isPadded&&l&&l.pattern===h.pattern){l.count.length>1&&l.count.pop(),l.count.push(h.count[0]),l.string=l.pattern+et(l.count),u=_+1;continue}r.isPadded&&(E=lr(_,r,n)),h.string=E+h.pattern+et(h.count),i.push(h),u=_+1,l=h}return i}function be(e,t,r,n,s){let i=[];for(let u of e){let{string:l}=u;!n&&!Ye(t,"string",l)&&i.push(r+l),n&&Ye(t,"string",l)&&i.push(r+l)}return i}function ar(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function or(e,t){return e>t?1:t>e?-1:0}function Ye(e,t,r){return e.some(n=>n[t]===r)}function Ve(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function Je(e,t){return e-e%Math.pow(10,t)}function et(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function cr(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function tt(e){return/^-?(0+)\d/.test(e)}function lr(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),s=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return s?"0?":"0";case 2:return s?"0{0,2}":"00";default:return s?`0{0,${n}}`:`0{${n}}`}}re.cache={};re.clearCache=()=>re.cache={};rt.exports=re});var $e=k((Bn,lt)=>{"use strict";d();var fr=se("util"),ut=nt(),st=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),pr=e=>t=>e===!0?Number(t):String(t),He=e=>typeof e=="number"||typeof e=="string"&&e!=="",ae=e=>Number.isInteger(+e),ve=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},Ar=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,Rr=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},_e=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},hr=(e,t,r)=>{e.negatives.sort((l,A)=>l<A?-1:l>A?1:0),e.positives.sort((l,A)=>l<A?-1:l>A?1:0);let n=t.capture?"":"?:",s="",i="",u;return e.positives.length&&(s=e.positives.map(l=>_e(String(l),r)).join("|")),e.negatives.length&&(i=`-(${n}${e.negatives.map(l=>_e(String(l),r)).join("|")})`),s&&i?u=`${s}|${i}`:u=s||i,t.wrap?`(${n}${u})`:u},it=(e,t,r,n)=>{if(r)return ut(e,t,{wrap:!1,...n});let s=String.fromCharCode(e);if(e===t)return s;let i=String.fromCharCode(t);return`[${s}-${i}]`},at=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,s=r.capture?"":"?:";return n?`(${s}${e.join("|")})`:e.join("|")}return ut(e,t,r)},ot=(...e)=>new RangeError("Invalid range arguments: "+fr.inspect(...e)),ct=(e,t,r)=>{if(r.strictRanges===!0)throw ot([e,t]);return[]},gr=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},_r=(e,t,r=1,n={})=>{let s=Number(e),i=Number(t);if(!Number.isInteger(s)||!Number.isInteger(i)){if(n.strictRanges===!0)throw ot([e,t]);return[]}s===0&&(s=0),i===0&&(i=0);let u=s>i,l=String(e),A=String(t),_=String(r);r=Math.max(Math.abs(r),1);let h=ve(l)||ve(A)||ve(_),E=h?Math.max(l.length,A.length,_.length):0,f=h===!1&&Ar(e,t,n)===!1,H=n.transform||pr(f);if(n.toRegex&&r===1)return it(_e(e,E),_e(t,E),!0,n);let C={negatives:[],positives:[]},g=K=>C[K<0?"negatives":"positives"].push(Math.abs(K)),$=[],N=0;for(;u?s>=i:s<=i;)n.toRegex===!0&&r>1?g(s):$.push(Rr(H(s,N),E,f)),s=u?s-r:s+r,N++;return n.toRegex===!0?r>1?hr(C,n,E):at($,null,{wrap:!1,...n}):$},Er=(e,t,r=1,n={})=>{if(!ae(e)&&e.length>1||!ae(t)&&t.length>1)return ct(e,t,n);let s=n.transform||(f=>String.fromCharCode(f)),i=`${e}`.charCodeAt(0),u=`${t}`.charCodeAt(0),l=i>u,A=Math.min(i,u),_=Math.max(i,u);if(n.toRegex&&r===1)return it(A,_,!1,n);let h=[],E=0;for(;l?i>=u:i<=u;)h.push(s(i,E)),i=l?i-r:i+r,E++;return n.toRegex===!0?at(h,null,{wrap:!1,options:n}):h},ge=(e,t,r,n={})=>{if(t==null&&He(e))return[e];if(!He(e)||!He(t))return ct(e,t,n);if(typeof r=="function")return ge(e,t,1,{transform:r});if(st(r))return ge(e,t,0,r);let s={...n};return s.capture===!0&&(s.wrap=!0),r=r||s.step||1,ae(r)?ae(e)&&ae(t)?_r(e,t,r,s):Er(e,t,Math.max(Math.abs(r),1),s):r!=null&&!st(r)?gr(r,s):ge(e,t,1,r)};lt.exports=ge});var At=k((Mn,pt)=>{"use strict";d();var Cr=$e(),ft=Re(),xr=(e,t={})=>{let r=(n,s={})=>{let i=ft.isInvalidBrace(s),u=n.invalid===!0&&t.escapeInvalid===!0,l=i===!0||u===!0,A=t.escapeInvalid===!0?"\\":"",_="";if(n.isOpen===!0)return A+n.value;if(n.isClose===!0)return console.log("node.isClose",A,n.value),A+n.value;if(n.type==="open")return l?A+n.value:"(";if(n.type==="close")return l?A+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":l?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let h=ft.reduce(n.nodes),E=Cr(...h,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(E.length!==0)return h.length>1&&E.length>1?`(${E})`:E}if(n.nodes)for(let h of n.nodes)_+=r(h,n);return _};return r(e)};pt.exports=xr});var gt=k((Gn,ht)=>{"use strict";d();var yr=$e(),Rt=he(),ue=Re(),ne=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?ue.flatten(t).map(s=>`{${s}}`):t;for(let s of e)if(Array.isArray(s))for(let i of s)n.push(ne(i,t,r));else for(let i of t)r===!0&&typeof i=="string"&&(i=`{${i}}`),n.push(Array.isArray(i)?ne(s,i,r):s+i);return ue.flatten(n)},dr=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(s,i={})=>{s.queue=[];let u=i,l=i.queue;for(;u.type!=="brace"&&u.type!=="root"&&u.parent;)u=u.parent,l=u.queue;if(s.invalid||s.dollar){l.push(ne(l.pop(),Rt(s,t)));return}if(s.type==="brace"&&s.invalid!==!0&&s.nodes.length===2){l.push(ne(l.pop(),["{}"]));return}if(s.nodes&&s.ranges>0){let E=ue.reduce(s.nodes);if(ue.exceedsLimit(...E,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let f=yr(...E,t);f.length===0&&(f=Rt(s,t)),l.push(ne(l.pop(),f)),s.nodes=[];return}let A=ue.encloseBrace(s),_=s.queue,h=s;for(;h.type!=="brace"&&h.type!=="root"&&h.parent;)h=h.parent,_=h.queue;for(let E=0;E<s.nodes.length;E++){let f=s.nodes[E];if(f.type==="comma"&&s.type==="brace"){E===1&&_.push(""),_.push("");continue}if(f.type==="close"){l.push(ne(l.pop(),_,A));continue}if(f.value&&f.type!=="open"){_.push(ne(_.pop(),f.value));continue}f.nodes&&n(f,s)}return _};return ue.flatten(n(e))};ht.exports=dr});var Et=k((Un,_t)=>{"use strict";d();_t.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
3
|
-
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var St=k((qn,dt)=>{"use strict";d();var Sr=he(),{MAX_LENGTH:Ct,CHAR_BACKSLASH:Te,CHAR_BACKTICK:br,CHAR_COMMA:Hr,CHAR_DOT:vr,CHAR_LEFT_PARENTHESES:$r,CHAR_RIGHT_PARENTHESES:Tr,CHAR_LEFT_CURLY_BRACE:Lr,CHAR_RIGHT_CURLY_BRACE:Or,CHAR_LEFT_SQUARE_BRACKET:xt,CHAR_RIGHT_SQUARE_BRACKET:yt,CHAR_DOUBLE_QUOTE:mr,CHAR_SINGLE_QUOTE:Nr,CHAR_NO_BREAK_SPACE:wr,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Ir}=Et(),Br=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(Ct,r.maxLength):Ct;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let s={type:"root",input:e,nodes:[]},i=[s],u=s,l=s,A=0,_=e.length,h=0,E=0,f,H=()=>e[h++],C=g=>{if(g.type==="text"&&l.type==="dot"&&(l.type="text"),l&&l.type==="text"&&g.type==="text"){l.value+=g.value;return}return u.nodes.push(g),g.parent=u,g.prev=l,l=g,g};for(C({type:"bos"});h<_;)if(u=i[i.length-1],f=H(),!(f===Ir||f===wr)){if(f===Te){C({type:"text",value:(t.keepEscaping?f:"")+H()});continue}if(f===yt){C({type:"text",value:"\\"+f});continue}if(f===xt){A++;let g;for(;h<_&&(g=H());){if(f+=g,g===xt){A++;continue}if(g===Te){f+=H();continue}if(g===yt&&(A--,A===0))break}C({type:"text",value:f});continue}if(f===$r){u=C({type:"paren",nodes:[]}),i.push(u),C({type:"text",value:f});continue}if(f===Tr){if(u.type!=="paren"){C({type:"text",value:f});continue}u=i.pop(),C({type:"text",value:f}),u=i[i.length-1];continue}if(f===mr||f===Nr||f===br){let g=f,$;for(t.keepQuotes!==!0&&(f="");h<_&&($=H());){if($===Te){f+=$+H();continue}if($===g){t.keepQuotes===!0&&(f+=$);break}f+=$}C({type:"text",value:f});continue}if(f===Lr){E++;let $={type:"brace",open:!0,close:!1,dollar:l.value&&l.value.slice(-1)==="$"||u.dollar===!0,depth:E,commas:0,ranges:0,nodes:[]};u=C($),i.push(u),C({type:"open",value:f});continue}if(f===Or){if(u.type!=="brace"){C({type:"text",value:f});continue}let g="close";u=i.pop(),u.close=!0,C({type:g,value:f}),E--,u=i[i.length-1];continue}if(f===Hr&&E>0){if(u.ranges>0){u.ranges=0;let g=u.nodes.shift();u.nodes=[g,{type:"text",value:Sr(u)}]}C({type:"comma",value:f}),u.commas++;continue}if(f===vr&&E>0&&u.commas===0){let g=u.nodes;if(E===0||g.length===0){C({type:"text",value:f});continue}if(l.type==="dot"){if(u.range=[],l.value+=f,l.type="range",u.nodes.length!==3&&u.nodes.length!==5){u.invalid=!0,u.ranges=0,l.type="text";continue}u.ranges++,u.args=[];continue}if(l.type==="range"){g.pop();let $=g[g.length-1];$.value+=l.value+f,l=$,u.ranges--;continue}C({type:"dot",value:f});continue}C({type:"text",value:f})}do if(u=i.pop(),u.type!=="root"){u.nodes.forEach(N=>{N.nodes||(N.type==="open"&&(N.isOpen=!0),N.type==="close"&&(N.isClose=!0),N.nodes||(N.type="text"),N.invalid=!0)});let g=i[i.length-1],$=g.nodes.indexOf(u);g.nodes.splice($,1,...u.nodes)}while(i.length>0);return C({type:"eos"}),s};dt.exports=Br});var Gr=k((Qn,Ht)=>{"use strict";d();var bt=he(),kr=At(),Mr=gt(),Pr=St(),Q=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let s=Q.create(n,t);Array.isArray(s)?r.push(...s):r.push(s)}else r=[].concat(Q.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};Q.parse=(e,t={})=>Pr(e,t);Q.stringify=(e,t={})=>bt(typeof e=="string"?Q.parse(e,t):e,t);Q.compile=(e,t={})=>(typeof e=="string"&&(e=Q.parse(e,t)),kr(e,t));Q.expand=(e,t={})=>{typeof e=="string"&&(e=Q.parse(e,t));let r=Mr(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};Q.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?Q.compile(e,t):Q.expand(e,t);Ht.exports=Q});var oe=k((Wn,Ot)=>{"use strict";d();var Dr=se("path"),Y="\\\\/",vt=`[^${Y}]`,V="\\.",Ur="\\+",Kr="\\?",Ee="\\/",qr="(?=.)",$t="[^/]",Le=`(?:${Ee}|$)`,Tt=`(?:^|${Ee})`,Oe=`${V}{1,2}${Le}`,Fr=`(?!${V})`,Qr=`(?!${Tt}${Oe})`,Xr=`(?!${V}{0,1}${Le})`,Wr=`(?!${Oe})`,Zr=`[^.${Ee}]`,jr=`${$t}*?`,Lt={DOT_LITERAL:V,PLUS_LITERAL:Ur,QMARK_LITERAL:Kr,SLASH_LITERAL:Ee,ONE_CHAR:qr,QMARK:$t,END_ANCHOR:Le,DOTS_SLASH:Oe,NO_DOT:Fr,NO_DOTS:Qr,NO_DOT_SLASH:Xr,NO_DOTS_SLASH:Wr,QMARK_NO_DOT:Zr,STAR:jr,START_ANCHOR:Tt},zr={...Lt,SLASH_LITERAL:`[${Y}]`,QMARK:vt,STAR:`${vt}*?`,DOTS_SLASH:`${V}{1,2}(?:[${Y}]|$)`,NO_DOT:`(?!${V})`,NO_DOTS:`(?!(?:^|[${Y}])${V}{1,2}(?:[${Y}]|$))`,NO_DOT_SLASH:`(?!${V}{0,1}(?:[${Y}]|$))`,NO_DOTS_SLASH:`(?!${V}{1,2}(?:[${Y}]|$))`,QMARK_NO_DOT:`[^.${Y}]`,START_ANCHOR:`(?:^|[${Y}])`,END_ANCHOR:`(?:[${Y}]|$)`},Yr={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Ot.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Yr,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Dr.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?zr:Lt}}});var Ce=k(q=>{"use strict";d();var Vr=se("path"),Jr=process.platform==="win32",{REGEX_BACKSLASH:en,REGEX_REMOVE_BACKSLASH:tn,REGEX_SPECIAL_CHARS:rn,REGEX_SPECIAL_CHARS_GLOBAL:nn}=oe();q.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);q.hasRegexChars=e=>rn.test(e);q.isRegexChar=e=>e.length===1&&q.hasRegexChars(e);q.escapeRegex=e=>e.replace(nn,"\\$1");q.toPosixSlashes=e=>e.replace(en,"/");q.removeBackslashes=e=>e.replace(tn,t=>t==="\\"?"":t);q.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};q.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:Jr===!0||Vr.sep==="\\";q.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?q.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};q.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};q.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",s=r.contains?"":"$",i=`${n}(?:${e})${s}`;return t.negated===!0&&(i=`(?:^(?!${i}).*$)`),i}});var Pt=k((Yn,Mt)=>{"use strict";d();var mt=Ce(),{CHAR_ASTERISK:me,CHAR_AT:sn,CHAR_BACKWARD_SLASH:ce,CHAR_COMMA:un,CHAR_DOT:Ne,CHAR_EXCLAMATION_MARK:we,CHAR_FORWARD_SLASH:kt,CHAR_LEFT_CURLY_BRACE:Ie,CHAR_LEFT_PARENTHESES:Be,CHAR_LEFT_SQUARE_BRACKET:an,CHAR_PLUS:on,CHAR_QUESTION_MARK:Nt,CHAR_RIGHT_CURLY_BRACE:cn,CHAR_RIGHT_PARENTHESES:wt,CHAR_RIGHT_SQUARE_BRACKET:ln}=oe(),It=e=>e===kt||e===ce,Bt=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},fn=(e,t)=>{let r=t||{},n=e.length-1,s=r.parts===!0||r.scanToEnd===!0,i=[],u=[],l=[],A=e,_=-1,h=0,E=0,f=!1,H=!1,C=!1,g=!1,$=!1,N=!1,K=!1,w=!1,Z=!1,P=!1,J=0,G,x,v={value:"",depth:0,isGlob:!1},M=()=>_>=n,c=()=>A.charCodeAt(_+1),O=()=>(G=x,A.charCodeAt(++_));for(;_<n;){x=O();let D;if(x===ce){K=v.backslashes=!0,x=O(),x===Ie&&(N=!0);continue}if(N===!0||x===Ie){for(J++;M()!==!0&&(x=O());){if(x===ce){K=v.backslashes=!0,O();continue}if(x===Ie){J++;continue}if(N!==!0&&x===Ne&&(x=O())===Ne){if(f=v.isBrace=!0,C=v.isGlob=!0,P=!0,s===!0)continue;break}if(N!==!0&&x===un){if(f=v.isBrace=!0,C=v.isGlob=!0,P=!0,s===!0)continue;break}if(x===cn&&(J--,J===0)){N=!1,f=v.isBrace=!0,P=!0;break}}if(s===!0)continue;break}if(x===kt){if(i.push(_),u.push(v),v={value:"",depth:0,isGlob:!1},P===!0)continue;if(G===Ne&&_===h+1){h+=2;continue}E=_+1;continue}if(r.noext!==!0&&(x===on||x===sn||x===me||x===Nt||x===we)===!0&&c()===Be){if(C=v.isGlob=!0,g=v.isExtglob=!0,P=!0,x===we&&_===h&&(Z=!0),s===!0){for(;M()!==!0&&(x=O());){if(x===ce){K=v.backslashes=!0,x=O();continue}if(x===wt){C=v.isGlob=!0,P=!0;break}}continue}break}if(x===me){if(G===me&&($=v.isGlobstar=!0),C=v.isGlob=!0,P=!0,s===!0)continue;break}if(x===Nt){if(C=v.isGlob=!0,P=!0,s===!0)continue;break}if(x===an){for(;M()!==!0&&(D=O());){if(D===ce){K=v.backslashes=!0,O();continue}if(D===ln){H=v.isBracket=!0,C=v.isGlob=!0,P=!0;break}}if(s===!0)continue;break}if(r.nonegate!==!0&&x===we&&_===h){w=v.negated=!0,h++;continue}if(r.noparen!==!0&&x===Be){if(C=v.isGlob=!0,s===!0){for(;M()!==!0&&(x=O());){if(x===Be){K=v.backslashes=!0,x=O();continue}if(x===wt){P=!0;break}}continue}break}if(C===!0){if(P=!0,s===!0)continue;break}}r.noext===!0&&(g=!1,C=!1);let T=A,ee="",a="";h>0&&(ee=A.slice(0,h),A=A.slice(h),E-=h),T&&C===!0&&E>0?(T=A.slice(0,E),a=A.slice(E)):C===!0?(T="",a=A):T=A,T&&T!==""&&T!=="/"&&T!==A&&It(T.charCodeAt(T.length-1))&&(T=T.slice(0,-1)),r.unescape===!0&&(a&&(a=mt.removeBackslashes(a)),T&&K===!0&&(T=mt.removeBackslashes(T)));let o={prefix:ee,input:e,start:h,base:T,glob:a,isBrace:f,isBracket:H,isGlob:C,isExtglob:g,isGlobstar:$,negated:w,negatedExtglob:Z};if(r.tokens===!0&&(o.maxDepth=0,It(x)||u.push(v),o.tokens=u),r.parts===!0||r.tokens===!0){let D;for(let b=0;b<i.length;b++){let j=D?D+1:h,z=i[b],F=e.slice(j,z);r.tokens&&(b===0&&h!==0?(u[b].isPrefix=!0,u[b].value=ee):u[b].value=F,Bt(u[b]),o.maxDepth+=u[b].depth),(b!==0||F!=="")&&l.push(F),D=z}if(D&&D+1<e.length){let b=e.slice(D+1);l.push(b),r.tokens&&(u[u.length-1].value=b,Bt(u[u.length-1]),o.maxDepth+=u[u.length-1].depth)}o.slashes=i,o.parts=l}return o};Mt.exports=fn});var Ut=k((Jn,Dt)=>{"use strict";d();var xe=oe(),X=Ce(),{MAX_LENGTH:ye,POSIX_REGEX_SOURCE:pn,REGEX_NON_SPECIAL_CHARS:An,REGEX_SPECIAL_CHARS_BACKREF:Rn,REPLACEMENTS:Gt}=xe,hn=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(s=>X.escapeRegex(s)).join("..")}return r},ie=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,ke=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Gt[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(ye,r.maxLength):ye,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);let i={type:"bos",value:"",output:r.prepend||""},u=[i],l=r.capture?"":"?:",A=X.isWindows(t),_=xe.globChars(A),h=xe.extglobChars(_),{DOT_LITERAL:E,PLUS_LITERAL:f,SLASH_LITERAL:H,ONE_CHAR:C,DOTS_SLASH:g,NO_DOT:$,NO_DOT_SLASH:N,NO_DOTS_SLASH:K,QMARK:w,QMARK_NO_DOT:Z,STAR:P,START_ANCHOR:J}=_,G=R=>`(${l}(?:(?!${J}${R.dot?g:E}).)*?)`,x=r.dot?"":$,v=r.dot?w:Z,M=r.bash===!0?G(r):P;r.capture&&(M=`(${M})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let c={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:u};e=X.removePrefix(e,c),s=e.length;let O=[],T=[],ee=[],a=i,o,D=()=>c.index===s-1,b=c.peek=(R=1)=>e[c.index+R],j=c.advance=()=>e[++c.index]||"",z=()=>e.slice(c.index+1),F=(R="",L=0)=>{c.consumed+=R,c.index+=L},le=R=>{c.output+=R.output!=null?R.output:R.value,F(R.value)},Qt=()=>{let R=1;for(;b()==="!"&&(b(2)!=="("||b(3)==="?");)j(),c.start++,R++;return R%2===0?!1:(c.negated=!0,c.start++,!0)},fe=R=>{c[R]++,ee.push(R)},te=R=>{c[R]--,ee.pop()},S=R=>{if(a.type==="globstar"){let L=c.braces>0&&(R.type==="comma"||R.type==="brace"),p=R.extglob===!0||O.length&&(R.type==="pipe"||R.type==="paren");R.type!=="slash"&&R.type!=="paren"&&!L&&!p&&(c.output=c.output.slice(0,-a.output.length),a.type="star",a.value="*",a.output=M,c.output+=a.output)}if(O.length&&R.type!=="paren"&&(O[O.length-1].inner+=R.value),(R.value||R.output)&&le(R),a&&a.type==="text"&&R.type==="text"){a.value+=R.value,a.output=(a.output||"")+R.value;return}R.prev=a,u.push(R),a=R},pe=(R,L)=>{let p={...h[L],conditions:1,inner:""};p.prev=a,p.parens=c.parens,p.output=c.output;let y=(r.capture?"(":"")+p.open;fe("parens"),S({type:R,value:L,output:c.output?"":C}),S({type:"paren",extglob:!0,value:j(),output:y}),O.push(p)},Xt=R=>{let L=R.close+(r.capture?")":""),p;if(R.type==="negate"){let y=M;if(R.inner&&R.inner.length>1&&R.inner.includes("/")&&(y=G(r)),(y!==M||D()||/^\)+$/.test(z()))&&(L=R.close=`)$))${y}`),R.inner.includes("*")&&(p=z())&&/^\.[^\\/.]+$/.test(p)){let m=ke(p,{...t,fastpaths:!1}).output;L=R.close=`)${m})${y})`}R.prev.type==="bos"&&(c.negatedExtglob=!0)}S({type:"paren",extglob:!0,value:o,output:L}),te("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let R=!1,L=e.replace(Rn,(p,y,m,U,B,de)=>U==="\\"?(R=!0,p):U==="?"?y?y+U+(B?w.repeat(B.length):""):de===0?v+(B?w.repeat(B.length):""):w.repeat(m.length):U==="."?E.repeat(m.length):U==="*"?y?y+U+(B?M:""):M:y?p:`\\${p}`);return R===!0&&(r.unescape===!0?L=L.replace(/\\/g,""):L=L.replace(/\\+/g,p=>p.length%2===0?"\\\\":p?"\\":"")),L===e&&r.contains===!0?(c.output=e,c):(c.output=X.wrapOutput(L,c,t),c)}for(;!D();){if(o=j(),o==="\0")continue;if(o==="\\"){let p=b();if(p==="/"&&r.bash!==!0||p==="."||p===";")continue;if(!p){o+="\\",S({type:"text",value:o});continue}let y=/^\\+/.exec(z()),m=0;if(y&&y[0].length>2&&(m=y[0].length,c.index+=m,m%2!==0&&(o+="\\")),r.unescape===!0?o=j():o+=j(),c.brackets===0){S({type:"text",value:o});continue}}if(c.brackets>0&&(o!=="]"||a.value==="["||a.value==="[^")){if(r.posix!==!1&&o===":"){let p=a.value.slice(1);if(p.includes("[")&&(a.posix=!0,p.includes(":"))){let y=a.value.lastIndexOf("["),m=a.value.slice(0,y),U=a.value.slice(y+2),B=pn[U];if(B){a.value=m+B,c.backtrack=!0,j(),!i.output&&u.indexOf(a)===1&&(i.output=C);continue}}}(o==="["&&b()!==":"||o==="-"&&b()==="]")&&(o=`\\${o}`),o==="]"&&(a.value==="["||a.value==="[^")&&(o=`\\${o}`),r.posix===!0&&o==="!"&&a.value==="["&&(o="^"),a.value+=o,le({value:o});continue}if(c.quotes===1&&o!=='"'){o=X.escapeRegex(o),a.value+=o,le({value:o});continue}if(o==='"'){c.quotes=c.quotes===1?0:1,r.keepQuotes===!0&&S({type:"text",value:o});continue}if(o==="("){fe("parens"),S({type:"paren",value:o});continue}if(o===")"){if(c.parens===0&&r.strictBrackets===!0)throw new SyntaxError(ie("opening","("));let p=O[O.length-1];if(p&&c.parens===p.parens+1){Xt(O.pop());continue}S({type:"paren",value:o,output:c.parens?")":"\\)"}),te("parens");continue}if(o==="["){if(r.nobracket===!0||!z().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(ie("closing","]"));o=`\\${o}`}else fe("brackets");S({type:"bracket",value:o});continue}if(o==="]"){if(r.nobracket===!0||a&&a.type==="bracket"&&a.value.length===1){S({type:"text",value:o,output:`\\${o}`});continue}if(c.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(ie("opening","["));S({type:"text",value:o,output:`\\${o}`});continue}te("brackets");let p=a.value.slice(1);if(a.posix!==!0&&p[0]==="^"&&!p.includes("/")&&(o=`/${o}`),a.value+=o,le({value:o}),r.literalBrackets===!1||X.hasRegexChars(p))continue;let y=X.escapeRegex(a.value);if(c.output=c.output.slice(0,-a.value.length),r.literalBrackets===!0){c.output+=y,a.value=y;continue}a.value=`(${l}${y}|${a.value})`,c.output+=a.value;continue}if(o==="{"&&r.nobrace!==!0){fe("braces");let p={type:"brace",value:o,output:"(",outputIndex:c.output.length,tokensIndex:c.tokens.length};T.push(p),S(p);continue}if(o==="}"){let p=T[T.length-1];if(r.nobrace===!0||!p){S({type:"text",value:o,output:o});continue}let y=")";if(p.dots===!0){let m=u.slice(),U=[];for(let B=m.length-1;B>=0&&(u.pop(),m[B].type!=="brace");B--)m[B].type!=="dots"&&U.unshift(m[B].value);y=hn(U,r),c.backtrack=!0}if(p.comma!==!0&&p.dots!==!0){let m=c.output.slice(0,p.outputIndex),U=c.tokens.slice(p.tokensIndex);p.value=p.output="\\{",o=y="\\}",c.output=m;for(let B of U)c.output+=B.output||B.value}S({type:"brace",value:o,output:y}),te("braces"),T.pop();continue}if(o==="|"){O.length>0&&O[O.length-1].conditions++,S({type:"text",value:o});continue}if(o===","){let p=o,y=T[T.length-1];y&&ee[ee.length-1]==="braces"&&(y.comma=!0,p="|"),S({type:"comma",value:o,output:p});continue}if(o==="/"){if(a.type==="dot"&&c.index===c.start+1){c.start=c.index+1,c.consumed="",c.output="",u.pop(),a=i;continue}S({type:"slash",value:o,output:H});continue}if(o==="."){if(c.braces>0&&a.type==="dot"){a.value==="."&&(a.output=E);let p=T[T.length-1];a.type="dots",a.output+=o,a.value+=o,p.dots=!0;continue}if(c.braces+c.parens===0&&a.type!=="bos"&&a.type!=="slash"){S({type:"text",value:o,output:E});continue}S({type:"dot",value:o,output:E});continue}if(o==="?"){if(!(a&&a.value==="(")&&r.noextglob!==!0&&b()==="("&&b(2)!=="?"){pe("qmark",o);continue}if(a&&a.type==="paren"){let y=b(),m=o;if(y==="<"&&!X.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(a.value==="("&&!/[!=<:]/.test(y)||y==="<"&&!/<([!=]|\w+>)/.test(z()))&&(m=`\\${o}`),S({type:"text",value:o,output:m});continue}if(r.dot!==!0&&(a.type==="slash"||a.type==="bos")){S({type:"qmark",value:o,output:Z});continue}S({type:"qmark",value:o,output:w});continue}if(o==="!"){if(r.noextglob!==!0&&b()==="("&&(b(2)!=="?"||!/[!=<:]/.test(b(3)))){pe("negate",o);continue}if(r.nonegate!==!0&&c.index===0){Qt();continue}}if(o==="+"){if(r.noextglob!==!0&&b()==="("&&b(2)!=="?"){pe("plus",o);continue}if(a&&a.value==="("||r.regex===!1){S({type:"plus",value:o,output:f});continue}if(a&&(a.type==="bracket"||a.type==="paren"||a.type==="brace")||c.parens>0){S({type:"plus",value:o});continue}S({type:"plus",value:f});continue}if(o==="@"){if(r.noextglob!==!0&&b()==="("&&b(2)!=="?"){S({type:"at",extglob:!0,value:o,output:""});continue}S({type:"text",value:o});continue}if(o!=="*"){(o==="$"||o==="^")&&(o=`\\${o}`);let p=An.exec(z());p&&(o+=p[0],c.index+=p[0].length),S({type:"text",value:o});continue}if(a&&(a.type==="globstar"||a.star===!0)){a.type="star",a.star=!0,a.value+=o,a.output=M,c.backtrack=!0,c.globstar=!0,F(o);continue}let R=z();if(r.noextglob!==!0&&/^\([^?]/.test(R)){pe("star",o);continue}if(a.type==="star"){if(r.noglobstar===!0){F(o);continue}let p=a.prev,y=p.prev,m=p.type==="slash"||p.type==="bos",U=y&&(y.type==="star"||y.type==="globstar");if(r.bash===!0&&(!m||R[0]&&R[0]!=="/")){S({type:"star",value:o,output:""});continue}let B=c.braces>0&&(p.type==="comma"||p.type==="brace"),de=O.length&&(p.type==="pipe"||p.type==="paren");if(!m&&p.type!=="paren"&&!B&&!de){S({type:"star",value:o,output:""});continue}for(;R.slice(0,3)==="/**";){let Ae=e[c.index+4];if(Ae&&Ae!=="/")break;R=R.slice(3),F("/**",3)}if(p.type==="bos"&&D()){a.type="globstar",a.value+=o,a.output=G(r),c.output=a.output,c.globstar=!0,F(o);continue}if(p.type==="slash"&&p.prev.type!=="bos"&&!U&&D()){c.output=c.output.slice(0,-(p.output+a.output).length),p.output=`(?:${p.output}`,a.type="globstar",a.output=G(r)+(r.strictSlashes?")":"|$)"),a.value+=o,c.globstar=!0,c.output+=p.output+a.output,F(o);continue}if(p.type==="slash"&&p.prev.type!=="bos"&&R[0]==="/"){let Ae=R[1]!==void 0?"|$":"";c.output=c.output.slice(0,-(p.output+a.output).length),p.output=`(?:${p.output}`,a.type="globstar",a.output=`${G(r)}${H}|${H}${Ae})`,a.value+=o,c.output+=p.output+a.output,c.globstar=!0,F(o+j()),S({type:"slash",value:"/",output:""});continue}if(p.type==="bos"&&R[0]==="/"){a.type="globstar",a.value+=o,a.output=`(?:^|${H}|${G(r)}${H})`,c.output=a.output,c.globstar=!0,F(o+j()),S({type:"slash",value:"/",output:""});continue}c.output=c.output.slice(0,-a.output.length),a.type="globstar",a.output=G(r),a.value+=o,c.output+=a.output,c.globstar=!0,F(o);continue}let L={type:"star",value:o,output:M};if(r.bash===!0){L.output=".*?",(a.type==="bos"||a.type==="slash")&&(L.output=x+L.output),S(L);continue}if(a&&(a.type==="bracket"||a.type==="paren")&&r.regex===!0){L.output=o,S(L);continue}(c.index===c.start||a.type==="slash"||a.type==="dot")&&(a.type==="dot"?(c.output+=N,a.output+=N):r.dot===!0?(c.output+=K,a.output+=K):(c.output+=x,a.output+=x),b()!=="*"&&(c.output+=C,a.output+=C)),S(L)}for(;c.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(ie("closing","]"));c.output=X.escapeLast(c.output,"["),te("brackets")}for(;c.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(ie("closing",")"));c.output=X.escapeLast(c.output,"("),te("parens")}for(;c.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(ie("closing","}"));c.output=X.escapeLast(c.output,"{"),te("braces")}if(r.strictSlashes!==!0&&(a.type==="star"||a.type==="bracket")&&S({type:"maybe_slash",value:"",output:`${H}?`}),c.backtrack===!0){c.output="";for(let R of c.tokens)c.output+=R.output!=null?R.output:R.value,R.suffix&&(c.output+=R.suffix)}return c};ke.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(ye,r.maxLength):ye,s=e.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);e=Gt[e]||e;let i=X.isWindows(t),{DOT_LITERAL:u,SLASH_LITERAL:l,ONE_CHAR:A,DOTS_SLASH:_,NO_DOT:h,NO_DOTS:E,NO_DOTS_SLASH:f,STAR:H,START_ANCHOR:C}=xe.globChars(i),g=r.dot?E:h,$=r.dot?f:h,N=r.capture?"":"?:",K={negated:!1,prefix:""},w=r.bash===!0?".*?":H;r.capture&&(w=`(${w})`);let Z=x=>x.noglobstar===!0?w:`(${N}(?:(?!${C}${x.dot?_:u}).)*?)`,P=x=>{switch(x){case"*":return`${g}${A}${w}`;case".*":return`${u}${A}${w}`;case"*.*":return`${g}${w}${u}${A}${w}`;case"*/*":return`${g}${w}${l}${A}${$}${w}`;case"**":return g+Z(r);case"**/*":return`(?:${g}${Z(r)}${l})?${$}${A}${w}`;case"**/*.*":return`(?:${g}${Z(r)}${l})?${$}${w}${u}${A}${w}`;case"**/.*":return`(?:${g}${Z(r)}${l})?${u}${A}${w}`;default:{let v=/^(.*?)\.(\w+)$/.exec(x);if(!v)return;let M=P(v[1]);return M?M+u+v[2]:void 0}}},J=X.removePrefix(e,K),G=P(J);return G&&r.strictSlashes!==!0&&(G+=`${l}?`),G};Dt.exports=ke});var qt=k((ts,Kt)=>{"use strict";d();var gn=se("path"),_n=Pt(),Me=Ut(),Pe=Ce(),En=oe(),Cn=e=>e&&typeof e=="object"&&!Array.isArray(e),I=(e,t,r=!1)=>{if(Array.isArray(e)){let h=e.map(f=>I(f,t,r));return f=>{for(let H of h){let C=H(f);if(C)return C}return!1}}let n=Cn(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let s=t||{},i=Pe.isWindows(t),u=n?I.compileRe(e,t):I.makeRe(e,t,!1,!0),l=u.state;delete u.state;let A=()=>!1;if(s.ignore){let h={...t,ignore:null,onMatch:null,onResult:null};A=I(s.ignore,h,r)}let _=(h,E=!1)=>{let{isMatch:f,match:H,output:C}=I.test(h,u,t,{glob:e,posix:i}),g={glob:e,state:l,regex:u,posix:i,input:h,output:C,match:H,isMatch:f};return typeof s.onResult=="function"&&s.onResult(g),f===!1?(g.isMatch=!1,E?g:!1):A(h)?(typeof s.onIgnore=="function"&&s.onIgnore(g),g.isMatch=!1,E?g:!1):(typeof s.onMatch=="function"&&s.onMatch(g),E?g:!0)};return r&&(_.state=l),_};I.test=(e,t,r,{glob:n,posix:s}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let i=r||{},u=i.format||(s?Pe.toPosixSlashes:null),l=e===n,A=l&&u?u(e):e;return l===!1&&(A=u?u(e):e,l=A===n),(l===!1||i.capture===!0)&&(i.matchBase===!0||i.basename===!0?l=I.matchBase(e,t,r,s):l=t.exec(A)),{isMatch:!!l,match:l,output:A}};I.matchBase=(e,t,r,n=Pe.isWindows(r))=>(t instanceof RegExp?t:I.makeRe(t,r)).test(gn.basename(e));I.isMatch=(e,t,r)=>I(t,r)(e);I.parse=(e,t)=>Array.isArray(e)?e.map(r=>I.parse(r,t)):Me(e,{...t,fastpaths:!1});I.scan=(e,t)=>_n(e,t);I.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let s=t||{},i=s.contains?"":"^",u=s.contains?"":"$",l=`${i}(?:${e.output})${u}`;e&&e.negated===!0&&(l=`^(?!${l}).*$`);let A=I.toRegex(l,t);return n===!0&&(A.state=e),A};I.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(s.output=Me.fastpaths(e,t)),s.output||(s=Me(e,t)),I.compileRe(s,t,r,n)};I.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};I.constants=En;Kt.exports=I});var xn=k((ns,Ft)=>{"use strict";d();Ft.exports=qt()});export{qe as a,nr as b,Gr as c,Ce as d,xn as e};
|
|
4
|
-
/*! Bundled license information:
|
|
5
|
-
|
|
6
|
-
is-extglob/index.js:
|
|
7
|
-
(*!
|
|
8
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
9
|
-
*
|
|
10
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
11
|
-
* Licensed under the MIT License.
|
|
12
|
-
*)
|
|
13
|
-
|
|
14
|
-
is-glob/index.js:
|
|
15
|
-
(*!
|
|
16
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
17
|
-
*
|
|
18
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
19
|
-
* Released under the MIT License.
|
|
20
|
-
*)
|
|
21
|
-
|
|
22
|
-
is-number/index.js:
|
|
23
|
-
(*!
|
|
24
|
-
* is-number <https://github.com/jonschlinkert/is-number>
|
|
25
|
-
*
|
|
26
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
27
|
-
* Released under the MIT License.
|
|
28
|
-
*)
|
|
29
|
-
|
|
30
|
-
to-regex-range/index.js:
|
|
31
|
-
(*!
|
|
32
|
-
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
33
|
-
*
|
|
34
|
-
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
35
|
-
* Released under the MIT License.
|
|
36
|
-
*)
|
|
37
|
-
|
|
38
|
-
fill-range/index.js:
|
|
39
|
-
(*!
|
|
40
|
-
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
41
|
-
*
|
|
42
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
43
|
-
* Licensed under the MIT License.
|
|
44
|
-
*)
|
|
45
|
-
*/
|
package/dist/chunk-VMIOG46Y.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'module';globalThis.require = __createRequire(import.meta.url);
|
|
2
|
-
import{a as r,c as o,i as e}from"./chunk-MNT4XW23.js";var i=o((y,u)=>{"use strict";e();var n=r("fs"),s;function l(){try{return n.statSync("/.dockerenv"),!0}catch{return!1}}function p(){try{return n.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}u.exports=()=>(s===void 0&&(s=l()||p()),s)});var k=o((h,t)=>{"use strict";e();var d=r("os"),_=r("fs"),f=i(),a=()=>{if(process.platform!=="linux")return!1;if(d.release().toLowerCase().includes("microsoft"))return!f();try{return _.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!f():!1}catch{return!1}};process.env.__IS_WSL_TEST__?t.exports=a:t.exports=a()});export{i as a,k as b};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'module';globalThis.require = __createRequire(import.meta.url);
|
|
2
|
-
import{a as g,c as E,e as Y,i as d}from"./chunk-MNT4XW23.js";var k=E((xr,ze)=>{"use strict";d();var $e=["nodebuffer","arraybuffer","fragments"],je=typeof Blob<"u";je&&$e.push("blob");ze.exports={BINARY_TYPES:$e,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:je,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var K=E((vr,ie)=>{"use strict";d();var{EMPTY_BUFFER:Zt}=k(),xe=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 xe(s.buffer,s.byteOffset,r):s}function He(t,e,s,r,i){for(let n=0;n<i;n++)s[r+n]=t[n]^e[n&3]}function Ye(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 Ee(t){if(Ee.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new xe(t):ArrayBuffer.isView(t)?e=new xe(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),Ee.readOnly=!1),e}ie.exports={concat:Qt,mask:He,toArrayBuffer:Jt,toBuffer:Ee,unmask:Ye};if(!process.env.WS_NO_BUFFER_UTIL)try{let t=g("bufferutil");ie.exports.mask=function(e,s,r,i,n){n<48?He(e,s,r,i,n):t.mask(e,s,r,i,n)},ie.exports.unmask=function(e,s){e.length<32?Ye(e,s):t.unmask(e,s)}}catch{}});var Ze=E((wr,Xe)=>{"use strict";d();var Ke=Symbol("kDone"),ve=Symbol("kRun"),be=class{constructor(e){this[Ke]=()=>{this.pending--,this[ve]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[ve]()}[ve](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Ke])}}};Xe.exports=be});var Q=E((Tr,tt)=>{"use strict";d();var X=g("zlib"),Qe=K(),es=Ze(),{kStatusCode:Je}=k(),ts=Buffer[Symbol.species],ss=Buffer.from([0,0,255,255]),ae=Symbol("permessage-deflate"),C=Symbol("total-length"),Z=Symbol("callback"),P=Symbol("buffers"),oe=Symbol("error"),ne,we=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,!ne){let i=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ne=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[Z];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){ne.add(i=>{this._decompress(e,s,(n,o)=>{i(),r(n,o)})})}compress(e,s,r){ne.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[ae]=this,this._inflate[C]=0,this._inflate[P]=[],this._inflate.on("error",is),this._inflate.on("data",et)}this._inflate[Z]=r,this._inflate.write(e),s&&this._inflate.write(ss),this._inflate.flush(()=>{let n=this._inflate[oe];if(n){this._inflate.close(),this._inflate=null,r(n);return}let o=Qe.concat(this._inflate[P],this._inflate[C]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[C]=0,this._inflate[P]=[],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[C]=0,this._deflate[P]=[],this._deflate.on("data",rs)}this._deflate[Z]=r,this._deflate.write(e),this._deflate.flush(X.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let n=Qe.concat(this._deflate[P],this._deflate[C]);s&&(n=new ts(n.buffer,n.byteOffset,n.length-4)),this._deflate[Z]=null,this._deflate[C]=0,this._deflate[P]=[],s&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),r(null,n)})}};tt.exports=we;function rs(t){this[P].push(t),this[C]+=t.length}function et(t){if(this[C]+=t.length,this[ae]._maxPayload<1||this[C]<=this[ae]._maxPayload){this[P].push(t);return}this[oe]=new RangeError("Max payload size exceeded"),this[oe].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[oe][Je]=1009,this.removeListener("data",et),this.reset()}function is(t){this[ae]._inflate=null,t[Je]=1007,this[Z](t)}});var q=E((Cr,le)=>{"use strict";d();var{isUtf8:st}=g("buffer"),{hasBlob:ns}=k(),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 Oe(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")}le.exports={isBlob:ls,isValidStatusCode:as,isValidUTF8:Oe,tokenChars:os};if(st)le.exports.isValidUTF8=function(t){return t.length<24?Oe(t):st(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=g("utf-8-validate");le.exports.isValidUTF8=function(e){return e.length<32?Oe(e):t(e)}}catch{}});var Ne=E((Nr,ft)=>{"use strict";d();var{Writable:fs}=g("stream"),rt=Q(),{BINARY_TYPES:hs,EMPTY_BUFFER:it,kStatusCode:cs,kWebSocket:us}=k(),{concat:Te,toArrayBuffer:ds,unmask:_s}=K(),{isValidStatusCode:ps,isValidUTF8:nt}=q(),fe=Buffer[Symbol.species],b=0,ot=1,at=2,lt=3,ke=4,Ce=5,he=6,Le=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=b}_write(e,s,r){if(this._opcode===8&&this._state==b)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 fe(r.buffer,r.byteOffset+e,r.length-e),new fe(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 fe(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 b:this.getInfo(e);break;case ot:this.getPayloadLength16(e);break;case at:this.getPayloadLength64(e);break;case lt:this.getMask();break;case ke:this.getData(e);break;case Ce:case he: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[rt.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=ot:this._payloadLength===127?this._state=at: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=lt:this._state=ke}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=ke}getData(e){let s=it;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=Ce,this.decompress(s,e);return}s.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(s)),this.dataMessage(e)}decompress(e,s){this._extensions[rt.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===b&&this.startLoop(s)})}dataMessage(e){if(!this._fin){this._state=b;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=Te(r,s):this._binaryType==="arraybuffer"?i=ds(Te(r,s)):this._binaryType==="blob"?i=new Blob(r):i=r,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=b):(this._state=he,setImmediate(()=>{this.emit("message",i,!0),this._state=b,this.startLoop(e)}))}else{let i=Te(r,s);if(!this._skipUTF8Validation&&!nt(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(n);return}this._state===Ce||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=b):(this._state=he,setImmediate(()=>{this.emit("message",i,!1),this._state=b,this.startLoop(e)}))}}controlMessage(e,s){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,it),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 fe(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!nt(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=b;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=b):(this._state=he,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=b,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}};ft.exports=Le});var Re=E((Rr,ut)=>{"use strict";d();var{Duplex:Br}=g("stream"),{randomFillSync:ms}=g("crypto"),ht=Q(),{EMPTY_BUFFER:gs,kWebSocket:ys,NOOP:Ss}=k(),{isBlob:G,isValidStatusCode:xs}=q(),{mask:ct,toBuffer:R}=K(),w=Symbol("kByteLength"),Es=Buffer.alloc(4),ce=8*1024,I,V=ce,O=0,vs=1,bs=2,Pe=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=O,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===ce&&(I===void 0&&(I=Buffer.alloc(ce)),ms(I,0,ce),V=0),r[0]=I[V++],r[1]=I[V++],r[2]=I[V++],r[3]=I[V++]),o=(r[0]|r[1]|r[2]|r[3])===0,n=6);let l;typeof e=="string"?(!s.mask||o)&&s[w]!==void 0?l=s[w]:(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?(ct(e,r,a,n,l),[a]):(ct(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={[w]:n.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==O?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=R(e),i=e.length,n=R.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[w]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};G(e)?this._state!==O?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==O?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=R(e),i=e.length,n=R.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[w]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};G(e)?this._state!==O?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==O?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}send(e,s,r){let i=this._extensions[ht.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=R(e),l=e.length,f=R.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={[w]:l,fin:s.fin,generateMask:this._generateMask,mask:s.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:f,rsv1:o};G(e)?this._state!==O?this.enqueue([this.getBlobData,e,this._compress,a,r]):this.getBlobData(e,this._compress,a,r):this._state!==O?this.enqueue([this.dispatch,e,this._compress,a,r]):this.dispatch(e,this._compress,a,r)}getBlobData(e,s,r,i){this._bufferedBytes+=r[w],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(Be,this,l,i);return}this._bufferedBytes-=r[w];let o=R(n);s?this.dispatch(o,s,r,i):(this._state=O,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[ht.extensionName];this._bufferedBytes+=r[w],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");Be(this,f,i);return}this._bufferedBytes-=r[w],this._state=O,r.readOnly=!1,this.sendFrame(t.frame(l,r),i),this.dequeue()})}dequeue(){for(;this._state===O&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][w],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][w],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)}};ut.exports=Pe;function Be(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){Be(t,e,s),t.onerror(e)}});var Et=E((Ur,xt)=>{"use strict";d();var{kForOnEventAttribute:J,kListener:Ie}=k(),dt=Symbol("kCode"),_t=Symbol("kData"),pt=Symbol("kError"),mt=Symbol("kMessage"),gt=Symbol("kReason"),$=Symbol("kTarget"),yt=Symbol("kType"),St=Symbol("kWasClean"),L=class{constructor(e){this[$]=null,this[yt]=e}get target(){return this[$]}get type(){return this[yt]}};Object.defineProperty(L.prototype,"target",{enumerable:!0});Object.defineProperty(L.prototype,"type",{enumerable:!0});var U=class extends L{constructor(e,s={}){super(e),this[dt]=s.code===void 0?0:s.code,this[gt]=s.reason===void 0?"":s.reason,this[St]=s.wasClean===void 0?!1:s.wasClean}get code(){return this[dt]}get reason(){return this[gt]}get wasClean(){return this[St]}};Object.defineProperty(U.prototype,"code",{enumerable:!0});Object.defineProperty(U.prototype,"reason",{enumerable:!0});Object.defineProperty(U.prototype,"wasClean",{enumerable:!0});var j=class extends L{constructor(e,s={}){super(e),this[pt]=s.error===void 0?null:s.error,this[mt]=s.message===void 0?"":s.message}get error(){return this[pt]}get message(){return this[mt]}};Object.defineProperty(j.prototype,"error",{enumerable:!0});Object.defineProperty(j.prototype,"message",{enumerable:!0});var ee=class extends L{constructor(e,s={}){super(e),this[_t]=s.data===void 0?null:s.data}get data(){return this[_t]}};Object.defineProperty(ee.prototype,"data",{enumerable:!0});var Os={addEventListener(t,e,s={}){for(let i of this.listeners(t))if(!s[J]&&i[Ie]===e&&!i[J])return;let r;if(t==="message")r=function(n,o){let l=new ee("message",{data:o?n:n.toString()});l[$]=this,ue(e,this,l)};else if(t==="close")r=function(n,o){let l=new U("close",{code:n,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});l[$]=this,ue(e,this,l)};else if(t==="error")r=function(n){let o=new j("error",{error:n,message:n.message});o[$]=this,ue(e,this,o)};else if(t==="open")r=function(){let n=new L("open");n[$]=this,ue(e,this,n)};else return;r[J]=!!s[J],r[Ie]=e,s.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(let s of this.listeners(t))if(s[Ie]===e&&!s[J]){this.removeListener(t,s);break}}};xt.exports={CloseEvent:U,ErrorEvent:j,Event:L,EventTarget:Os,MessageEvent:ee};function ue(t,e,s){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,s):t.call(e,s)}});var Ue=E((Mr,vt)=>{"use strict";d();var{tokenChars:te}=q();function T(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&&te[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 y=t.slice(f,h);a===44?(T(e,y,s),s=Object.create(null)):o=y,f=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(l===void 0)if(h===-1&&te[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),T(s,t.slice(f,h),!0),a===44&&(T(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(te[a]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);f===-1?f=c:r||(r=!0),i=!1}else if(n)if(te[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&&te[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 y=t.slice(f,h);r&&(y=y.replace(/\\/g,""),r=!1),T(s,l,y),a===44&&(T(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 p=t.slice(f,h);return o===void 0?T(e,p,s):(l===void 0?T(s,p,!0):r?T(s,l,p.replace(/\\/g,"")):T(s,l,p),T(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(", ")}vt.exports={format:ks,parse:Ts}});var me=E((qr,It)=>{"use strict";d();var Cs=g("events"),Ls=g("https"),Ns=g("http"),Ot=g("net"),Ps=g("tls"),{randomBytes:Bs,createHash:Rs}=g("crypto"),{Duplex:Wr,Readable:Fr}=g("stream"),{URL:De}=g("url"),B=Q(),Is=Ne(),Us=Re(),{isBlob:Ds}=q(),{BINARY_TYPES:bt,EMPTY_BUFFER:de,GUID:Ms,kForOnEventAttribute:Me,kListener:As,kStatusCode:Ws,kWebSocket:S,NOOP:Tt}=k(),{EventTarget:{addEventListener:Fs,removeEventListener:qs}}=Et(),{format:Gs,parse:Vs}=Ue(),{toBuffer:$s}=K(),js=30*1e3,kt=Symbol("kAborted"),Ae=[8,13],N=["CONNECTING","OPEN","CLOSING","CLOSED"],zs=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,_=class t extends Cs{constructor(e,s,r){super(),this._binaryType=bt[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=de,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]),Ct(this,e,s,r)):(this._autoPong=r.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){bt.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[S]=this,n[S]=this,e[S]=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",Pt),e.on("data",pe),e.on("end",Bt),e.on("error",Rt),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[B.extensionName]&&this._extensions[B.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){v(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())}),Nt(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){We(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.ping(e||de,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){We(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.pong(e||de,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){We(this,e,r);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...s};this._extensions[B.extensionName]||(i.compress=!1),this._sender.send(e||de,i,r)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){v(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(_,"CONNECTING",{enumerable:!0,value:N.indexOf("CONNECTING")});Object.defineProperty(_.prototype,"CONNECTING",{enumerable:!0,value:N.indexOf("CONNECTING")});Object.defineProperty(_,"OPEN",{enumerable:!0,value:N.indexOf("OPEN")});Object.defineProperty(_.prototype,"OPEN",{enumerable:!0,value:N.indexOf("OPEN")});Object.defineProperty(_,"CLOSING",{enumerable:!0,value:N.indexOf("CLOSING")});Object.defineProperty(_.prototype,"CLOSING",{enumerable:!0,value:N.indexOf("CLOSING")});Object.defineProperty(_,"CLOSED",{enumerable:!0,value:N.indexOf("CLOSED")});Object.defineProperty(_.prototype,"CLOSED",{enumerable:!0,value:N.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(_.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(_.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[Me])return e[As];return null},set(e){for(let s of this.listeners(t))if(s[Me]){this.removeListener(t,s);break}typeof e=="function"&&this.addEventListener(t,e,{[Me]:!0})}})});_.prototype.addEventListener=Fs;_.prototype.removeEventListener=qs;It.exports=_;function Ct(t,e,s,r){let i={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Ae[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,!Ae.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Ae.join(", ")})`);let n;if(e instanceof De)n=e;else try{n=new De(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;_e(t,u);return}let a=o?443:80,h=Bs(16).toString("base64"),c=o?Ls.request:Ns.request,p=new Set,y;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&&(y=new B(i.perMessageDeflate!==!0?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=Gs({[B.extensionName]:y.offer()})),s.length){for(let u of s){if(typeof u!="string"||!zs.test(u)||p.has(u))throw new SyntaxError("An invalid or duplicated subprotocol was specified");p.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 m;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[x,W]of Object.entries(u))r.headers[x.toLowerCase()]=W}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")),m=t._req=c(i),t._redirects&&t.emit("redirect",t.url,m)}else m=t._req=c(i);i.timeout&&m.on("timeout",()=>{v(t,m,"Opening handshake has timed out")}),m.on("error",u=>{m===null||m[kt]||(m=t._req=null,_e(t,u))}),m.on("response",u=>{let x=u.headers.location,W=u.statusCode;if(x&&i.followRedirects&&W>=300&&W<400){if(++t._redirects>i.maxRedirects){v(t,m,"Maximum redirects exceeded");return}m.abort();let z;try{z=new De(x,e)}catch{let F=new SyntaxError(`Invalid URL: ${x}`);_e(t,F);return}Ct(t,z,s,r)}else t.emit("unexpected-response",m,u)||v(t,m,`Unexpected server response: ${u.statusCode}`)}),m.on("upgrade",(u,x,W)=>{if(t.emit("upgrade",u),t.readyState!==_.CONNECTING)return;m=t._req=null;let z=u.headers.upgrade;if(z===void 0||z.toLowerCase()!=="websocket"){v(t,x,"Invalid Upgrade header");return}let qe=Rs("sha1").update(h+Ms).digest("base64");if(u.headers["sec-websocket-accept"]!==qe){v(t,x,"Invalid Sec-WebSocket-Accept header");return}let F=u.headers["sec-websocket-protocol"],H;if(F!==void 0?p.size?p.has(F)||(H="Server sent an invalid subprotocol"):H="Server sent a subprotocol but none was requested":p.size&&(H="Server sent no subprotocol"),H){v(t,x,H);return}F&&(t._protocol=F);let Ge=u.headers["sec-websocket-extensions"];if(Ge!==void 0){if(!y){v(t,x,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let ye;try{ye=Vs(Ge)}catch{v(t,x,"Invalid Sec-WebSocket-Extensions header");return}let Ve=Object.keys(ye);if(Ve.length!==1||Ve[0]!==B.extensionName){v(t,x,"Server indicated an extension that was not requested");return}try{y.accept(ye[B.extensionName])}catch{v(t,x,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[B.extensionName]=y}t.setSocket(x,W,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(m,t):m.end()}function _e(t,e){t._readyState=_.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function Hs(t){return t.path=t.socketPath,Ot.connect(t)}function Ys(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=Ot.isIP(t.host)?"":t.host),Ps.connect(t)}function v(t,e,s){t._readyState=_.CLOSING;let r=new Error(s);Error.captureStackTrace(r,v),e.setHeader?(e[kt]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(_e,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function We(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} (${N[t.readyState]})`);process.nextTick(s,r)}}function Ks(t,e){let s=this[S];s._closeFrameReceived=!0,s._closeMessage=e,s._closeCode=t,s._socket[S]!==void 0&&(s._socket.removeListener("data",pe),process.nextTick(Lt,s._socket),t===1005?s.close():s.close(t,e))}function Xs(){let t=this[S];t.isPaused||t._socket.resume()}function Zs(t){let e=this[S];e._socket[S]!==void 0&&(e._socket.removeListener("data",pe),process.nextTick(Lt,e._socket),e.close(t[Ws])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function wt(){this[S].emitClose()}function Qs(t,e){this[S].emit("message",t,e)}function Js(t){let e=this[S];e._autoPong&&e.pong(t,!this._isServer,Tt),e.emit("ping",t)}function er(t){this[S].emit("pong",t)}function Lt(t){t.resume()}function tr(t){let e=this[S];e.readyState!==_.CLOSED&&(e.readyState===_.OPEN&&(e._readyState=_.CLOSING,Nt(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function Nt(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),js)}function Pt(){let t=this[S];this.removeListener("close",Pt),this.removeListener("data",pe),this.removeListener("end",Bt),t._readyState=_.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[S]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",wt),t._receiver.on("finish",wt))}function pe(t){this[S]._receiver.write(t)||this.pause()}function Bt(){let t=this[S];t._readyState=_.CLOSING,t._receiver.end(),this.end()}function Rt(){let t=this[S];this.removeListener("error",Rt),this.on("error",Tt),t&&(t._readyState=_.CLOSING,this.destroy())}});var At=E(($r,Mt)=>{"use strict";d();var Vr=me(),{Duplex:sr}=g("stream");function Ut(t){t.emit("close")}function rr(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Dt(t){this.removeListener("error",Dt),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(Ut,r);return}let o=!1;t.once("error",function(f){o=!0,n(f)}),t.once("close",function(){o||n(i),process.nextTick(Ut,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",Dt),r}Mt.exports=ir});var Ft=E((zr,Wt)=>{"use strict";d();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}Wt.exports={parse:or}});var Ht=E((Kr,zt)=>{"use strict";d();var ar=g("events"),ge=g("http"),{Duplex:Yr}=g("stream"),{createHash:lr}=g("crypto"),qt=Ue(),D=Q(),fr=Ft(),hr=me(),{GUID:cr,kWebSocket:ur}=k(),dr=/^[+/0-9A-Za-z]{22}==$/,Gt=0,Vt=1,jt=2,Fe=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=ge.createServer((r,i)=>{let n=ge.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=Gt}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===jt){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(se,this);return}if(e&&this.once("close",e),this._state!==Vt)if(this._state=Vt,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(se,this):process.nextTick(se,this);else{let s=this._server;this._removeListeners(),this._removeListeners=this._server=null,s.close(()=>{se(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",$t);let n=e.headers["sec-websocket-key"],o=e.headers.upgrade,l=+e.headers["sec-websocket-version"];if(e.method!=="GET"){M(this,e,s,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){M(this,e,s,400,"Invalid Upgrade header");return}if(n===void 0||!dr.test(n)){M(this,e,s,400,"Missing or invalid Sec-WebSocket-Key header");return}if(l!==8&&l!==13){M(this,e,s,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){re(s,400);return}let f=e.headers["sec-websocket-protocol"],a=new Set;if(f!==void 0)try{a=fr.parse(f)}catch{M(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 p=new D(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let y=qt.parse(h);y[D.extensionName]&&(p.accept(y[D.extensionName]),c[D.extensionName]=p)}catch{M(this,e,s,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let p={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(p,(y,m,u,x)=>{if(!y)return re(s,m||401,u,x);this.completeUpgrade(c,n,a,e,s,r,i)});return}if(!this.options.verifyClient(p))return re(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>Gt)return re(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[D.extensionName]){let c=e[D.extensionName].params,p=qt.format({[D.extensionName]:[c]});a.push(`Sec-WebSocket-Extensions: ${p}`),h._extensions=e}this.emit("headers",a,i),n.write(a.concat(`\r
|
|
3
|
-
`).join(`\r
|
|
4
|
-
`)),n.removeListener("error",$t),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(se,this)})),l(h,i)}};zt.exports=Fe;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 se(t){t._state=jt,t.emit("close")}function $t(){this.destroy()}function re(t,e,s,r){s=s||ge.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} ${ge.STATUS_CODES[e]}\r
|
|
5
|
-
`+Object.keys(r).map(i=>`${i}: ${r[i]}`).join(`\r
|
|
6
|
-
`)+`\r
|
|
7
|
-
\r
|
|
8
|
-
`+s)}function M(t,e,s,r,i){if(t.listenerCount("wsClientError")){let n=new Error(i);Error.captureStackTrace(n,M),t.emit("wsClientError",n,s,e)}else re(s,r,i)}});d();d();d();var pr=Y(At(),1),mr=Y(Ne(),1),gr=Y(Re(),1),Yt=Y(me(),1),yr=Y(Ht(),1);var Kt=Yt.default;var A=global;A.WebSocket||(A.WebSocket=Kt);A.window||(A.window=global);A.self||(A.self=global);A.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 Sr from"react-devtools-core";Sr.connectToDevTools();
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'module';globalThis.require = __createRequire(import.meta.url);
|
|
2
|
-
import{Ka as a,La as b,Ma as c,Na as d,Oa as e}from"./chunk-QUKX7CP5.js";import"./chunk-FB327AH7.js";import"./chunk-VMIOG46Y.js";import"./chunk-3LZ6M5C2.js";import"./chunk-EO6F7WJJ.js";import"./chunk-D7CI46F7.js";import"./chunk-UASQ33JG.js";import"./chunk-MZPD7BFF.js";import"./chunk-MNT4XW23.js";export{e as addBugsnagMetadata,c as cleanStackFrameFilePath,a as errorHandler,d as registerCleanBugsnagErrorsFromWithinPlugins,b as sendErrorToBugsnag};
|
package/dist/is-wsl-LL6KGQIK.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'module';globalThis.require = __createRequire(import.meta.url);
|
|
2
|
-
import{i as r}from"./chunk-MNT4XW23.js";r();import c from"node:process";import d from"node:os";import m from"node:fs";r();import a from"node:fs";r();import s from"node:fs";var t;function f(){try{return s.statSync("/.dockerenv"),!0}catch{return!1}}function u(){try{return s.readFileSync("/proc/self/cgroup","utf8").includes("docker")}catch{return!1}}function n(){return t===void 0&&(t=f()||u()),t}var o,l=()=>{try{return a.statSync("/run/.containerenv"),!0}catch{return!1}};function e(){return o===void 0&&(o=l()||n()),o}var i=()=>{if(c.platform!=="linux")return!1;if(d.release().toLowerCase().includes("microsoft"))return!e();try{return m.readFileSync("/proc/version","utf8").toLowerCase().includes("microsoft")?!e():!1}catch{return!1}},I=c.env.__IS_WSL_TEST__?i:i();export{I as default};
|
package/dist/open-OD6DRFEG.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'module';globalThis.require = __createRequire(import.meta.url);
|
|
2
|
-
import{a as M,b as W}from"./chunk-VMIOG46Y.js";import{a as h,c as A,g as __dirname,i as l}from"./chunk-MNT4XW23.js";var F=A((L,E)=>{"use strict";l();E.exports=(e,r,t)=>{let o=n=>Object.defineProperty(e,r,{value:n,enumerable:!0,writable:!0});return Object.defineProperty(e,r,{configurable:!0,enumerable:!0,get(){let n=t();return o(n),n},set(n){o(n)}}),e}});var G=A((j,$)=>{l();var q=h("path"),T=h("child_process"),{promises:g,constants:v}=h("fs"),p=W(),z=M(),x=F(),O=q.join(__dirname,"xdg-open"),{platform:c,arch:C}=process,B=()=>{try{return g.statSync("/run/.containerenv"),!0}catch{return!1}},w;function X(){return w===void 0&&(w=B()||z()),w}var k=(()=>{let e="/mnt/",r;return async function(){if(r)return r;let t="/etc/wsl.conf",o=!1;try{await g.access(t,v.F_OK),o=!0}catch{}if(!o)return e;let n=await g.readFile(t,{encoding:"utf8"}),a=/(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(n);return a?(r=a.groups.mountPoint.trim(),r=r.endsWith("/")?r:`${r}/`,r):e}})(),S=async(e,r)=>{let t;for(let o of e)try{return await r(o)}catch(n){t=n}throw t},d=async e=>{if(e={wait:!1,background:!1,newInstance:!1,allowNonzeroExitCode:!1,...e},Array.isArray(e.app))return S(e.app,i=>d({...e,app:i}));let{name:r,arguments:t=[]}=e.app||{};if(t=[...t],Array.isArray(r))return S(r,i=>d({...e,app:{name:i,arguments:t}}));let o,n=[],a={};if(c==="darwin")o="open",e.wait&&n.push("--wait-apps"),e.background&&n.push("--background"),e.newInstance&&n.push("--new"),r&&n.push("-a",r);else if(c==="win32"||p&&!X()&&!r){let i=await k();o=p?`${i}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`:`${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`,n.push("-NoProfile","-NonInteractive","\u2013ExecutionPolicy","Bypass","-EncodedCommand"),p||(a.windowsVerbatimArguments=!0);let s=["Start"];e.wait&&s.push("-Wait"),r?(s.push(`"\`"${r}\`""`,"-ArgumentList"),e.target&&t.unshift(e.target)):e.target&&s.push(`"${e.target}"`),t.length>0&&(t=t.map(f=>`"\`"${f}\`""`),s.push(t.join(","))),e.target=Buffer.from(s.join(" "),"utf16le").toString("base64")}else{if(r)o=r;else{let i=!__dirname||__dirname==="/",s=!1;try{await g.access(O,v.X_OK),s=!0}catch{}o=process.versions.electron||c==="android"||i||!s?"xdg-open":O}t.length>0&&n.push(...t),e.wait||(a.stdio="ignore",a.detached=!0)}e.target&&n.push(e.target),c==="darwin"&&t.length>0&&n.push("--args",...t);let u=T.spawn(o,n,a);return e.wait?new Promise((i,s)=>{u.once("error",s),u.once("close",f=>{if(!e.allowNonzeroExitCode&&f>0){s(new Error(`Exited with code ${f}`));return}i(u)})}):(u.unref(),u)},y=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a `target`");return d({...r,target:e})},I=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a `name`");let{arguments:t=[]}=r||{};if(t!=null&&!Array.isArray(t))throw new TypeError("Expected `appArguments` as Array type");return d({...r,app:{name:e,arguments:t}})};function b(e){if(typeof e=="string"||Array.isArray(e))return e;let{[C]:r}=e;if(!r)throw new Error(`${C} is not supported`);return r}function P({[c]:e},{wsl:r}){if(r&&p)return b(r);if(!e)throw new Error(`${c} is not supported`);return b(e)}var m={};x(m,"chrome",()=>P({darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},{wsl:{ia32:"/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",x64:["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe","/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]}}));x(m,"firefox",()=>P({darwin:"firefox",win32:"C:\\Program Files\\Mozilla Firefox\\firefox.exe",linux:"firefox"},{wsl:"/mnt/c/Program Files/Mozilla Firefox/firefox.exe"}));x(m,"edge",()=>P({darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]},{wsl:"/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}));y.apps=m;y.openApp=I;$.exports=y});export default G();
|
package/dist/out-DXB3K325.js
DELETED