tokentracker-cli 0.88.4 → 0.88.6
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/dashboard/dist/assets/{AchievementBadge-Csic_vIr.js → AchievementBadge-CgVttPJy.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-Bj8-7V5r.js → AchievementsPage-2MeyWMmO.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-BbLQ8ObS.js → AchievementsSection-hZGNcWfs.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-CktuQUom.js → BadgeDetailModal-DBMexTtI.js} +1 -1
- package/dashboard/dist/assets/{Card-BsnJyykU.js → Card-Ca6NJlW2.js} +1 -1
- package/dashboard/dist/assets/{ClawdAnimated-GnYPAQFN.js → ClawdAnimated-D5GOjZtF.js} +1 -1
- package/dashboard/dist/assets/{CommandPalette-DrWnJlji.js → CommandPalette-CPLhHuIS.js} +1 -1
- package/dashboard/dist/assets/{CommunityStatsModal-mPp8Nj1_.js → CommunityStatsModal-BFyZtlgh.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-CdiGbXgr.js → ConfirmModal-DzpUyVbg.js} +1 -1
- package/dashboard/dist/assets/{Controls-D4-f2iHj.js → Controls-CIPVemCR.js} +1 -1
- package/dashboard/dist/assets/DashboardPage-h2LfrNwp.js +1 -0
- package/dashboard/dist/assets/{DevicePage-DkpC0tYF.js → DevicePage-CORcVYoS.js} +1 -1
- package/dashboard/dist/assets/DialogClose-BMizP3FN.js +1 -0
- package/dashboard/dist/assets/DialogDescription-B_xemJjT.js +1 -0
- package/dashboard/dist/assets/DialogTitle-CAlyWmQy.js +1 -0
- package/dashboard/dist/assets/{FadeIn-CXF6KnAl.js → FadeIn-R8uHDC1n.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-3fhsfDPh.js → HeaderGithubStar-D-H9BYBq.js} +1 -1
- package/dashboard/dist/assets/{HoverTooltip-CZynal8F.js → HoverTooltip-C6D0Qf3J.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-DQNGk8Iw.js → IpCheckPage-BDKN_XOv.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-tpbUiUVp.js → LandingPage-CVS7Gi16.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardAvatar-BGhnxPC9.js → LeaderboardAvatar-By9ZRxCx.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-CNrPikYA.js → LeaderboardPage-B2FWLDbM.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProfileModal-Cm2RQVyR.js → LeaderboardProfileModal-bKfAVxsg.js} +4 -4
- package/dashboard/dist/assets/{LeaderboardProfilePage-C4Qq1ODW.js → LeaderboardProfilePage-NSZpmCOS.js} +3 -3
- package/dashboard/dist/assets/{LimitsPage-SAVDG9xp.js → LimitsPage-DEeKWZ3u.js} +4 -4
- package/dashboard/dist/assets/{LocalOnlyNotice-UBbsxcyy.js → LocalOnlyNotice-CJRoGtCr.js} +1 -1
- package/dashboard/dist/assets/{LoginCard-DXThtBOR.js → LoginCard-DsotnrVc.js} +1 -1
- package/dashboard/dist/assets/{LoginModal-Bj18MQXk.js → LoginModal-CBzSJfD-.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-CP7QGY9J.js → LoginPage-Dr7dP5R6.js} +1 -1
- package/dashboard/dist/assets/{PetPage-Buw8keHU.js → PetPage-D_FQtbbK.js} +1 -1
- package/dashboard/dist/assets/PopoverPopup-BBIGg4i-.js +1 -0
- package/dashboard/dist/assets/{ProviderIcon-C6TKxRjA.js → ProviderIcon-C6NT8xCP.js} +1 -1
- package/dashboard/dist/assets/{ResetPasswordPage-DaZ6msb-.js → ResetPasswordPage-BbDZdmyR.js} +1 -1
- package/dashboard/dist/assets/{SegmentedControl--As7fVZG.js → SegmentedControl-C0YbTO7C.js} +1 -1
- package/dashboard/dist/assets/Select-CO90ysTb.js +1 -0
- package/dashboard/dist/assets/SelectItemText-CI5GNKhv.js +1 -0
- package/dashboard/dist/assets/{ServiceStatusPage-BWIKVm4j.js → ServiceStatusPage-CV71dVHd.js} +1 -1
- package/dashboard/dist/assets/{SessionsPage-WHHzFEuH.js → SessionsPage-B5jvyh-X.js} +1 -1
- package/dashboard/dist/assets/SettingsPage-DokT0qhX.js +1 -0
- package/dashboard/dist/assets/SkillsPage-BYAAiPpI.js +1 -0
- package/dashboard/dist/assets/{TokenGalaxy-BaNIstdH.js → TokenGalaxy-m_5kxlC_.js} +1 -1
- package/dashboard/dist/assets/ToolbarRootContext-TYR3c0G7.js +1 -0
- package/dashboard/dist/assets/{TrendMonitor-BSpIKlQL.js → TrendMonitor-DjVbRbLd.js} +1 -1
- package/dashboard/dist/assets/{WidgetsPage-CyCRnjXL.js → WidgetsPage-DwImvB2Y.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-LMvmYNjg.js → WrappedPage-CEcqtP_W.js} +1 -1
- package/dashboard/dist/assets/{__vite-browser-external-DI5qs5FY.js → __vite-browser-external-BOpcJ7Bn.js} +18 -18
- package/dashboard/dist/assets/{agent-logos-B0O7qAHK.js → agent-logos-Cwc0bFNx.js} +1 -1
- package/dashboard/dist/assets/{arrow-up-right-6MT52kJv.js → arrow-up-right-C0nGIX35.js} +1 -1
- package/dashboard/dist/assets/{check-CTQhrFRB.js → check-Cpk8oXcn.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-LwZmdJ7a.js → chevron-right-DsKtZU0a.js} +1 -1
- package/dashboard/dist/assets/{copy-nZ-6jaE3.js → copy-COeB2IQx.js} +1 -1
- package/dashboard/dist/assets/{download-c3uFmIK0.js → download-Dvw5E6xA.js} +1 -1
- package/dashboard/dist/assets/{external-link-CCJOfX3E.js → external-link-COe8flh4.js} +1 -1
- package/dashboard/dist/assets/{flame-D7Ez_wqn.js → flame-Dza_-WNE.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-DUBO4Quh.js → format-tokens-CKDbxlqC.js} +1 -1
- package/dashboard/dist/assets/{icons-DAf7jSIB.js → icons-Dj3nlViF.js} +1 -1
- package/dashboard/dist/assets/{index-BEf7nkK6.js → index-CBgWOlov.js} +1 -1
- package/dashboard/dist/assets/{index-Be_boVBV.js → index-DCpYik68.js} +1 -1
- package/dashboard/dist/assets/{index-vD2QNDMX.js → index-DvR1xY_C.js} +1 -1
- package/dashboard/dist/assets/{index-lKnLA6Pd.js → index-hKOAzfwu.js} +1 -1
- package/dashboard/dist/assets/{info-BIvzEWn6.js → info-B9M6Luq-.js} +1 -1
- package/dashboard/dist/assets/{limits-providers-BFZHEUL_.js → limits-providers-CAZ_eIVT.js} +1 -1
- package/dashboard/dist/assets/{link-2-DpZ3uiWE.js → link-2-PL-NJZyN.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-vJlwHgvB.js → loader-circle-CQ-akiLL.js} +1 -1
- package/dashboard/dist/assets/{maximize-2-q695kaqF.js → maximize-2-9EZoXvlF.js} +1 -1
- package/dashboard/dist/assets/{modifiers.esm-BkMtvHXh.js → modifiers.esm-Bc1a9Bqm.js} +1 -1
- package/dashboard/dist/assets/module-BRJxSJmz.js +3 -0
- package/dashboard/dist/assets/{monitor-smartphone--Xl0796r.js → monitor-smartphone-DR9MHu8R.js} +1 -1
- package/dashboard/dist/assets/provider-display-DAH8KAyP.js +42 -0
- package/dashboard/dist/assets/{react-BAsgR4jK.js → react-gkeEFJtr.js} +1 -1
- package/dashboard/dist/assets/{search-CNt7Qya4.js → search-B67Xwb-N.js} +1 -1
- package/dashboard/dist/assets/{skills-api-D8sn6UHC.js → skills-api-aZca3hZV.js} +1 -1
- package/dashboard/dist/assets/{sortable.esm-Dywv8f48.js → sortable.esm-Crm57xTH.js} +1 -1
- package/dashboard/dist/assets/store-DisKKZeI.js +1 -0
- package/dashboard/dist/assets/{terminal-BeIdaCjX.js → terminal-DGueqM2Q.js} +1 -1
- package/dashboard/dist/assets/{trash-2-BPDXx1_u.js → trash-2-b5d9XdRV.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-novDCOb_.js → use-community-stats-DOPcq80h.js} +1 -1
- package/dashboard/dist/assets/{use-limits-display-prefs-CuwI8eqz.js → use-limits-display-prefs-DGfPkvee.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-BrIAsQBD.js → use-ordered-list-Dyul6pNM.js} +1 -1
- package/dashboard/dist/assets/use-reduced-motion-UUonF8mY.js +1 -0
- package/dashboard/dist/assets/{use-session-efficiency-pref-B0F887Me.js → use-session-efficiency-pref-BPzM7u7L.js} +1 -1
- package/dashboard/dist/assets/{use-transform-DBrPvZ0r.js → use-transform-C5yhWdHM.js} +1 -1
- package/dashboard/dist/assets/use-usage-limits-C6S69l9t.js +1 -0
- package/dashboard/dist/assets/{useCurrency-BQDWxg9L.js → useCurrency-BfJWbenA.js} +1 -1
- package/dashboard/dist/assets/useScrollLock-Btq-Jtjh.js +1 -0
- package/dashboard/dist/assets/{useTokenFormat-C7El4Ch8.js → useTokenFormat-DaXiI8qf.js} +1 -1
- package/dashboard/dist/assets/{zap-CIkFdzq5.js → zap-DMOIXlpH.js} +1 -1
- package/dashboard/dist/brand-logos/qoder-cn.svg +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist/ip-check.html +1 -1
- package/dashboard/dist/leaderboard.html +1 -1
- package/dashboard/dist/share.html +1 -1
- package/package.json +2 -2
- package/src/lib/pricing/matcher.js +5 -1
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/usage-limits.js +17 -5
- package/dashboard/dist/assets/DashboardPage-CE_9OMmz.js +0 -1
- package/dashboard/dist/assets/DialogClose-DL5Ge3vy.js +0 -1
- package/dashboard/dist/assets/DialogDescription-BwXM9NYu.js +0 -1
- package/dashboard/dist/assets/DialogTitle-a72XNy3h.js +0 -1
- package/dashboard/dist/assets/PopoverPopup-d6QSW6r8.js +0 -1
- package/dashboard/dist/assets/Select-gAHmbQVe.js +0 -1
- package/dashboard/dist/assets/SelectItemText-D7o_b5jT.js +0 -1
- package/dashboard/dist/assets/SettingsPage-BE3_VLR_.js +0 -1
- package/dashboard/dist/assets/SkillsPage-BsYIlkSY.js +0 -1
- package/dashboard/dist/assets/ToolbarRootContext-BNJ2Z9HN.js +0 -1
- package/dashboard/dist/assets/module-CzlIpkuW.js +0 -2
- package/dashboard/dist/assets/provider-display-DRo2F9U_.js +0 -42
- package/dashboard/dist/assets/store-DyEcgahO.js +0 -1
- package/dashboard/dist/assets/use-reduced-motion-uAu4ee7b.js +0 -1
- package/dashboard/dist/assets/use-usage-limits-CS9CLXuQ.js +0 -1
- package/dashboard/dist/assets/useScrollLock-CiuoV-_x.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as t,d as g}from"./__vite-browser-external-
|
|
1
|
+
import{r as s,j as t,d as g}from"./__vite-browser-external-BOpcJ7Bn.js";import{m as v}from"./react-gkeEFJtr.js";import{P as x}from"./ProviderIcon-C6NT8xCP.js";import{A as y}from"./index-DCpYik68.js";function C(a){const e=[...a];for(let o=e.length-1;o>0;o--){const r=Math.floor(Math.random()*(o+1));[e[o],e[r]]=[e[r],e[o]]}return e}function j(a,e){const o=C(a),r=Array.from({length:e},()=>[]);o.forEach((i,m)=>{r[m%e].push(i)});const c=Math.max(...r.map(i=>i.length));return r.forEach(i=>{for(;i.length<c;)i.push(o[Math.floor(Math.random()*o.length)])}),r}const w=g.memo(function({logos:e,index:o,currentTime:r,onHoverChange:c}){const[i,m]=s.useState(!1),l=4e3,p=o*400,n=(r+p)%(l*e.length),d=Math.floor(n/l),u=e[d],h=f=>{m(f),c(f)};return t.jsxs("div",{className:"relative flex flex-col items-center",onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),children:[t.jsx(v.div,{className:"relative h-8 w-8 sm:h-10 sm:w-10 md:h-12 md:w-12 overflow-hidden",initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{delay:o*.1,duration:.5,ease:"easeOut"},children:t.jsx(y,{mode:"wait",children:t.jsx(v.div,{className:"absolute inset-0 flex items-center justify-center",initial:{y:"18%",opacity:0,filter:"blur(4px)"},animate:{y:"0%",opacity:1,filter:"blur(0px)",transition:{type:"tween",ease:[.22,1,.36,1],duration:.9}},exit:{y:"-18%",opacity:0,filter:"blur(4px)",transition:{type:"tween",ease:[.4,0,1,1],duration:.55}},children:t.jsx(x,{provider:u.provider,size:24,className:"object-contain"})},`${u.id}-${d}`)})}),t.jsx(y,{children:i&&t.jsx(v.span,{className:"pointer-events-none absolute -bottom-7 z-10 whitespace-nowrap rounded bg-oai-gray-800 px-2 py-0.5 text-xs font-medium text-oai-gray-100 shadow-lg ring-1 ring-oai-gray-700",initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},children:u.name})})]})});function E({logos:a,columnCount:e=2}){const[o,r]=s.useState([]),[c,i]=s.useState(0),[m,l]=s.useState(!1);s.useEffect(()=>{r(j(a,e))},[a,e]),s.useEffect(()=>{if(m)return;const n=setInterval(()=>i(d=>d+400),400);return()=>clearInterval(n)},[m]);const p=s.useCallback(n=>{l(n)},[]);return t.jsx("div",{className:"flex gap-2.5 sm:gap-4 text-oai-gray-200",children:o.map((n,d)=>t.jsx(w,{logos:n,index:d,currentTime:c,onHoverChange:p},d))})}const A=[{id:1,name:"Claude Code",provider:"claude"},{id:2,name:"Codex",provider:"codex"},{id:3,name:"Cursor",provider:"cursor"},{id:4,name:"Gemini",provider:"gemini"},{id:5,name:"Antigravity",provider:"antigravity"},{id:6,name:"Kiro",provider:"kiro"},{id:7,name:"OpenCode",provider:"opencode"},{id:8,name:"OpenClaw",provider:"openclaw"},{id:9,name:"Every Code",provider:"every-code"},{id:10,name:"Hermes",provider:"hermes"},{id:11,name:"GitHub Copilot",provider:"copilot"},{id:12,name:"Kimi",provider:"kimi"},{id:13,name:"CodeBuddy",provider:"codebuddy"},{id:14,name:"WorkBuddy",provider:"workbuddy"},{id:15,name:"Grok",provider:"grok"},{id:16,name:"oh-my-pi",provider:"omp"},{id:17,name:"Pi",provider:"pi"},{id:18,name:"Craft",provider:"craft"},{id:19,name:"Kilo CLI",provider:"kilo-cli"},{id:20,name:"Kilo Code",provider:"kilocode"},{id:21,name:"Roo Code",provider:"roocode"},{id:22,name:"Zed",provider:"zed"},{id:23,name:"Goose",provider:"goose"},{id:24,name:"Droid",provider:"droid"},{id:25,name:"Mimo",provider:"mimo"},{id:26,name:"ZCode",provider:"zcode"},{id:27,name:"Qoder",provider:"qoder"},{id:28,name:"AnythingLLM",provider:"anythingllm"},{id:29,name:"Claude Science",provider:"claude-science"}];export{A,E as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as o}from"./__vite-browser-external-
|
|
1
|
+
import{m as o}from"./__vite-browser-external-BOpcJ7Bn.js";const t=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],a=o("arrow-up-right",t);export{a as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as c}from"./__vite-browser-external-
|
|
1
|
+
import{m as c}from"./__vite-browser-external-BOpcJ7Bn.js";const e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],t=c("check",e);export{t as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as o}from"./__vite-browser-external-
|
|
1
|
+
import{m as o}from"./__vite-browser-external-BOpcJ7Bn.js";const t=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],c=o("chevron-right",t);export{c as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as c}from"./__vite-browser-external-
|
|
1
|
+
import{m as c}from"./__vite-browser-external-BOpcJ7Bn.js";const e=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],t=c("copy",e);export{t as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as o}from"./__vite-browser-external-
|
|
1
|
+
import{m as o}from"./__vite-browser-external-BOpcJ7Bn.js";const a=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],e=o("download",a);export{e as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as a}from"./__vite-browser-external-
|
|
1
|
+
import{m as a}from"./__vite-browser-external-BOpcJ7Bn.js";const e=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],n=a("external-link",e);export{n as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as c}from"./__vite-browser-external-
|
|
1
|
+
import{m as c}from"./__vite-browser-external-BOpcJ7Bn.js";const e=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],a=c("flame",e);export{a as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as r}from"./__vite-browser-external-
|
|
1
|
+
import{l as r}from"./__vite-browser-external-BOpcJ7Bn.js";function n(o){const t=Number(o)||0;return t>=1e12?`${Number((t/1e12).toFixed(2)).toString()}T`:r(t)}export{n as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./__vite-browser-external-
|
|
1
|
+
import{j as r}from"./__vite-browser-external-BOpcJ7Bn.js";function e({className:n}){return r.jsx("svg",{viewBox:"0 0 384 512",className:n,fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"})})}function o({className:n}){return r.jsx("svg",{viewBox:"0 0 16 16",className:n,fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"})})}function t({className:n}){return r.jsx("svg",{viewBox:"0 0 24 24",className:n,fill:"currentColor","aria-hidden":"true",children:r.jsx("path",{d:"M3 5.46 10.2 4.5v6.92H3V5.46Zm0 13.08 7.2.96v-6.84H3v5.88Zm8.04 1.08L21 21V12.46h-9.96v7.16ZM11.04 4.38 21 3v8.46h-9.96V4.38Z"})})}export{e as A,o as G,t as W};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c}from"./__vite-browser-external-
|
|
1
|
+
import{r as c}from"./__vite-browser-external-BOpcJ7Bn.js";var u={},p=()=>{window.si||(window.si=function(...i){window.siq=window.siq||[],window.siq.push(i)})},h="@vercel/speed-insights",g="2.0.0";function w(){return typeof window<"u"}function S(){try{const e="production"}catch{}return"production"}function l(){return S()==="development"}function k(e,i){if(!e||!i)return e;let n=e;try{const t=Object.entries(i);for(const[r,o]of t)if(!Array.isArray(o)){const s=d(o);s.test(n)&&(n=n.replace(s,`/[${r}]`))}for(const[r,o]of t)if(Array.isArray(o)){const s=d(o.join("/"));s.test(n)&&(n=n.replace(s,`/[...${r}]`))}return n}catch{return e}}function d(e){return new RegExp(`/${b(e)}(?=[/?#]|$)`)}function b(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function m(e){return e.scriptSrc?f(e.scriptSrc):l()?"https://va.vercel-scripts.com/v1/speed-insights/script.debug.js":e.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":e.basePath?f(`${e.basePath}/speed-insights/script.js`):"/_vercel/speed-insights/script.js"}function E(e,i){var n;let t=e;if(i)try{t={...(n=JSON.parse(i))==null?void 0:n.speedInsights,...e}}catch{}const r={sdkn:h+(t.framework?`/${t.framework}`:""),sdkv:g};return t.sampleRate&&(r.sampleRate=t.sampleRate.toString()),t.route&&(r.route=t.route),l()&&t.debug===!1&&(r.debug="false"),t.dsn&&(r.dsn=t.dsn),t.endpoint?r.endpoint=f(t.endpoint):t.basePath&&(r.endpoint=f(`${t.basePath}/speed-insights/vitals`)),{src:m(t),beforeSend:t.beforeSend,dataset:r}}function f(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function y(e={},i){var n;if(!w()||e.route===null)return null;p();const{beforeSend:t,src:r,dataset:o}=E(e,i);if(document.head.querySelector(`script[src*="${r}"]`))return null;t&&((n=window.si)==null||n.call(window,"beforeSend",t));const s=document.createElement("script");s.src=r,s.defer=!0;for(const[a,v]of Object.entries(o))s.dataset[a]=v;return s.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${r}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(s),{setRoute:a=>{s.dataset.route=a??void 0}}}function R(){if(!(typeof process>"u"||typeof u>"u"))return u.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function _(){if(!(typeof process>"u"||typeof u>"u"))return u.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}function P(e){c.useEffect(()=>{var n;e.beforeSend&&((n=window.si)==null||n.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]);const i=c.useRef(null);return c.useEffect(()=>{if(!i.current){const n=y({framework:e.framework??"react",basePath:e.basePath??R(),...e},e.configString??_());n&&(i.current=n.setRoute)}},[e]),c.useEffect(()=>{i.current&&e.route&&i.current(e.route)},[e.route]),null}export{P as SpeedInsights,k as computeRoute};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as n,j as $}from"./__vite-browser-external-
|
|
1
|
+
import{r as n,j as $}from"./__vite-browser-external-BOpcJ7Bn.js";import{M as D,a as S,u as A,b as F,P as K,c as U,L as W}from"./react-gkeEFJtr.js";function I(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function B(...e){return r=>{let t=!1;const o=e.map(l=>{const i=I(l,r);return!t&&typeof i=="function"&&(t=!0),i});if(t)return()=>{for(let l=0;l<o.length;l++){const i=o[l];typeof i=="function"?i():I(e[l],null)}}}}function G(...e){return n.useCallback(B(...e),e)}class V extends n.Component{getSnapshotBeforeUpdate(r){const t=this.props.childRef.current;if(S(t)&&r.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const o=t.offsetParent,l=S(o)&&o.offsetWidth||0,i=S(o)&&o.offsetHeight||0,d=getComputedStyle(t),s=this.props.sizeRef.current;s.height=parseFloat(d.height),s.width=parseFloat(d.width),s.top=t.offsetTop,s.left=t.offsetLeft,s.right=l-s.width-s.left,s.bottom=i-s.height-s.top,s.direction=d.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function X({children:e,isPresent:r,anchorX:t,anchorY:o,root:l,pop:i}){const d=n.useId(),s=n.useRef(null),y=n.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:E}=n.useContext(D),a=i!==!1?e.props?.ref??e?.ref:void 0,M=G(s,a);return n.useInsertionEffect(()=>{const{width:u,height:p,top:x,left:C,right:f,bottom:R,direction:L}=y.current;if(r||i===!1||!s.current||!u||!p)return;const b=L==="rtl",g=t==="left"?b?`right: ${f}`:`left: ${C}`:b?`left: ${C}`:`right: ${f}`,j=o==="bottom"?`bottom: ${R}`:`top: ${x}`;s.current.dataset.motionPopId=d;const h=document.createElement("style");E&&(h.nonce=E);const P=l??document.head;return P.appendChild(h),h.sheet&&h.sheet.insertRule(`
|
|
2
2
|
[data-motion-pop-id="${d}"] {
|
|
3
3
|
position: absolute !important;
|
|
4
4
|
width: ${u}px !important;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u}from"./__vite-browser-external-
|
|
1
|
+
import{r as u}from"./__vite-browser-external-BOpcJ7Bn.js";var c={},p=()=>{window.va||(window.va=function(...r){window.vaq||(window.vaq=[]),window.vaq.push(r)})},m="@vercel/analytics",E="2.0.1";function l(){return typeof window<"u"}function w(){try{const e="production"}catch{}return"production"}function y(e="auto"){if(e==="auto"){window.vam=w();return}window.vam=e}function h(){return(l()?window.vam:w())||"production"}function v(){return h()==="production"}function d(){return h()==="development"}function g(e,{[e]:r,...i}){return i}function _(e,r){if(!e)return;let i=e;const n=[];for(const[t,o]of Object.entries(e))typeof o=="object"&&o!==null&&(r.strip?i=g(t,i):n.push(t));if(n.length>0&&!r.strip)throw Error(`The following properties are not valid: ${n.join(", ")}. Only strings, numbers, booleans, and null are allowed.`);return i}function S(e){return e.scriptSrc?a(e.scriptSrc):d()?"https://va.vercel-scripts.com/v1/script.debug.js":e.basePath?a(`${e.basePath}/insights/script.js`):"/_vercel/insights/script.js"}function k(e,r){var i;let n=e;if(r)try{n={...(i=JSON.parse(r))==null?void 0:i.analytics,...e}}catch{}y(n.mode);const t={sdkn:m+(n.framework?`/${n.framework}`:""),sdkv:E};return n.disableAutoTrack&&(t.disableAutoTrack="1"),n.viewEndpoint&&(t.viewEndpoint=a(n.viewEndpoint)),n.eventEndpoint&&(t.eventEndpoint=a(n.eventEndpoint)),n.sessionEndpoint&&(t.sessionEndpoint=a(n.sessionEndpoint)),d()&&n.debug===!1&&(t.debug="false"),n.dsn&&(t.dsn=n.dsn),n.endpoint?t.endpoint=n.endpoint:n.basePath&&(t.endpoint=a(`${n.basePath}/insights`)),{beforeSend:n.beforeSend,src:S(n),dataset:t}}function a(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("/")?e:`/${e}`}function P(e={debug:!0},r){var i;if(!l())return;const{beforeSend:n,src:t,dataset:o}=k(e,r);if(p(),n&&((i=window.va)==null||i.call(window,"beforeSend",n)),document.head.querySelector(`script[src*="${t}"]`))return;const s=document.createElement("script");s.src=t;for(const[f,b]of Object.entries(o))s.dataset[f]=b;s.defer=!0,s.onerror=()=>{const f=d()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${t}. ${f}`)},document.head.appendChild(s)}function C(e,r,i){var n,t;if(!l()){const o="[Vercel Web Analytics] Please import `track` from `@vercel/analytics/server` when using this function in a server environment";if(v())console.warn(o);else throw new Error(o);return}if(!r){(n=window.va)==null||n.call(window,"event",{name:e,options:i});return}try{const o=_(r,{strip:v()});(t=window.va)==null||t.call(window,"event",{name:e,data:o,options:i})}catch(o){o instanceof Error&&d()&&console.error(o)}}function A({route:e,path:r}){var i;(i=window.va)==null||i.call(window,"pageview",{route:e,path:r})}function T(){if(!(typeof process>"u"||typeof c>"u"))return c.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function j(){if(!(typeof process>"u"||typeof c>"u"))return c.REACT_APP_VERCEL_OBSERVABILITY_CLIENT_CONFIG}function $(e){return u.useEffect(()=>{var r;e.beforeSend&&((r=window.va)==null||r.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),u.useEffect(()=>{P({framework:e.framework||"react",basePath:e.basePath??T(),...e.route!==void 0&&{disableAutoTrack:!0},...e},e.configString??j())},[]),u.useEffect(()=>{e.route&&e.path&&A({route:e.route,path:e.path})},[e.route,e.path]),null}export{$ as Analytics,C as track};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const y=Object.create(null);y.open="0";y.close="1";y.ping="2";y.pong="3";y.message="4";y.upgrade="5";y.noop="6";const T=Object.create(null);Object.keys(y).forEach(n=>{T[y[n]]=n});const P={type:"error",data:"parser error"},Q=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",j=typeof ArrayBuffer=="function",G=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,V=({type:n,data:e},t,s)=>Q&&e instanceof Blob?t?s(e):$(e,s):j&&(e instanceof ArrayBuffer||G(e))?t?s(e):$(new Blob([e]),s):s(y[n]+(e||"")),$=(n,e)=>{const t=new FileReader;return t.onload=function(){const s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(n)};function Y(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let B;function he(n,e){if(Q&&n.data instanceof Blob)return n.data.arrayBuffer().then(Y).then(e);if(j&&(n.data instanceof ArrayBuffer||G(n.data)))return e(Y(n.data));V(n,!1,t=>{B||(B=new TextEncoder),e(B.encode(t))})}const z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<z.length;n++)E[z.charCodeAt(n)]=n;const ue=n=>{let e=n.length*.75,t=n.length,s,i=0,r,o,a,h;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);const m=new ArrayBuffer(e),f=new Uint8Array(m);for(s=0;s<t;s+=4)r=E[n.charCodeAt(s)],o=E[n.charCodeAt(s+1)],a=E[n.charCodeAt(s+2)],h=E[n.charCodeAt(s+3)],f[i++]=r<<2|o>>4,f[i++]=(o&15)<<4|a>>2,f[i++]=(a&3)<<6|h&63;return m},fe=typeof ArrayBuffer=="function",M=(n,e)=>{if(typeof n!="string")return{type:"message",data:Z(n,e)};const t=n.charAt(0);return t==="b"?{type:"message",data:le(n.substring(1),e)}:T[t]?n.length>1?{type:T[t],data:n.substring(1)}:{type:T[t]}:P},le=(n,e)=>{if(fe){const t=ue(n);return Z(t,e)}else return{base64:!0,data:n}},Z=(n,e)=>e==="blob"?n instanceof Blob?n:new Blob([n]):n instanceof ArrayBuffer?n:n.buffer,ee="",pe=(n,e)=>{const t=n.length,s=new Array(t);let i=0;n.forEach((r,o)=>{V(r,!1,a=>{s[o]=a,++i===t&&e(s.join(ee))})})},de=(n,e)=>{const t=n.split(ee),s=[];for(let i=0;i<t.length;i++){const r=M(t[i],e);if(s.push(r),r.type==="error")break}return s};function ye(){return new TransformStream({transform(n,e){he(n,t=>{const s=t.length;let i;if(s<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,s);else if(s<65536){i=new Uint8Array(3);const r=new DataView(i.buffer);r.setUint8(0,126),r.setUint16(1,s)}else{i=new Uint8Array(9);const r=new DataView(i.buffer);r.setUint8(0,127),r.setBigUint64(1,BigInt(s))}n.data&&typeof n.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}let x;function k(n){return n.reduce((e,t)=>e+t.length,0)}function A(n,e){if(n[0].length===e)return n.shift();const t=new Uint8Array(e);let s=0;for(let i=0;i<e;i++)t[i]=n[0][s++],s===n[0].length&&(n.shift(),s=0);return n.length&&s<n[0].length&&(n[0]=n[0].slice(s)),t}function me(n,e){x||(x=new TextDecoder);const t=[];let s=0,i=-1,r=!1;return new TransformStream({transform(o,a){for(t.push(o);;){if(s===0){if(k(t)<1)break;const h=A(t,1);r=(h[0]&128)===128,i=h[0]&127,i<126?s=3:i===126?s=1:s=2}else if(s===1){if(k(t)<2)break;const h=A(t,2);i=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),s=3}else if(s===2){if(k(t)<8)break;const h=A(t,8),m=new DataView(h.buffer,h.byteOffset,h.length),f=m.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(P);break}i=f*Math.pow(2,32)+m.getUint32(4),s=3}else{if(k(t)<i)break;const h=A(t,i);a.enqueue(M(r?h:x.decode(h),e)),s=0}if(i===0||i>n){a.enqueue(P);break}}}})}const te=4;function u(n){if(n)return ge(n)}function ge(n){for(var e in u.prototype)n[e]=u.prototype[e];return n}u.prototype.on=u.prototype.addEventListener=function(n,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(e),this};u.prototype.once=function(n,e){function t(){this.off(n,t),e.apply(this,arguments)}return t.fn=e,this.on(n,t),this};u.prototype.off=u.prototype.removeListener=u.prototype.removeAllListeners=u.prototype.removeEventListener=function(n,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+n];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var s,i=0;i<t.length;i++)if(s=t[i],s===e||s.fn===e){t.splice(i,1);break}return t.length===0&&delete this._callbacks["$"+n],this};u.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+n],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(t){t=t.slice(0);for(var s=0,i=t.length;s<i;++s)t[s].apply(this,e)}return this};u.prototype.emitReserved=u.prototype.emit;u.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};u.prototype.hasListeners=function(n){return!!this.listeners(n).length};const S=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),l=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),_e="arraybuffer";function se(n,...e){return e.reduce((t,s)=>(n.hasOwnProperty(s)&&(t[s]=n[s]),t),{})}const be=l.setTimeout,we=l.clearTimeout;function C(n,e){e.useNativeTimers?(n.setTimeoutFn=be.bind(l),n.clearTimeoutFn=we.bind(l)):(n.setTimeoutFn=l.setTimeout.bind(l),n.clearTimeoutFn=l.clearTimeout.bind(l))}const ve=1.33;function Ee(n){return typeof n=="string"?ke(n):Math.ceil((n.byteLength||n.size)*ve)}function ke(n){let e=0,t=0;for(let s=0,i=n.length;s<i;s++)e=n.charCodeAt(s),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(s++,t+=4);return t}function ne(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ae(n){let e="";for(let t in n)n.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(n[t]));return e}function Te(n){let e={},t=n.split("&");for(let s=0,i=t.length;s<i;s++){let r=t[s].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}class Re extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class H extends u{constructor(e){super(),this.writable=!1,C(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new Re(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=M(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=Ae(e);return t.length?"?"+t:""}}class Oe extends H{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||t()})),this.writable||(s++,this.once("drain",function(){--s||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};de(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,pe(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=ne()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let ie=!1;try{ie=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Se=ie;function Ce(){}class Be extends Oe{constructor(e){if(super(e),typeof location<"u"){const t=location.protocol==="https:";let s=location.port;s||(s=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){const s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(i,r)=>{this.onError("xhr post error",i,r)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,s)=>{this.onError("xhr poll error",t,s)}),this.pollXhr=e}}class d extends u{constructor(e,t,s){super(),this.createRequest=e,C(this,s),this._opts=s,this._method=s.method||"GET",this._uri=t,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var e;const t=se(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(t);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&s.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var i;s.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=d.requestsCount++,d.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Ce,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete d.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}d.requestsCount=0;d.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",X);else if(typeof addEventListener=="function"){const n="onpagehide"in l?"pagehide":"unload";addEventListener(n,X,!1)}}function X(){for(let n in d.requests)d.requests.hasOwnProperty(n)&&d.requests[n].abort()}const xe=(function(){const n=re({xdomain:!1});return n&&n.responseType!==null})();class Ne extends Be{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=xe&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new d(re,this.uri(),e)}}function re(n){const e=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Se))return new XMLHttpRequest}catch{}if(!e)try{return new l[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const oe=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Le extends H{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,s=oe?{}:se(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],i=t===e.length-1;V(s,this.supportsBinary,r=>{try{this.doWrite(s,r)}catch{}i&&S(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=ne()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const N=l.WebSocket||l.MozWebSocket;class Pe extends Le{createSocket(e,t,s){return oe?new N(e,t,s):t?new N(e,t):new N(e)}doWrite(e,t){this.ws.send(t)}}class qe extends H{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=me(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),i=ye();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const r=()=>{s.read().then(({done:a,value:h})=>{a||(this.onPacket(h),r())}).catch(a=>{})};r();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],i=t===e.length-1;this._writer.write(s).then(()=>{i&&S(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const De={websocket:Pe,webtransport:qe,polling:Ne},Ie=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ue=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function q(n){if(n.length>8e3)throw"URI too long";const e=n,t=n.indexOf("["),s=n.indexOf("]");t!=-1&&s!=-1&&(n=n.substring(0,t)+n.substring(t,s).replace(/:/g,";")+n.substring(s,n.length));let i=Ie.exec(n||""),r={},o=14;for(;o--;)r[Ue[o]]=i[o]||"";return t!=-1&&s!=-1&&(r.source=e,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=Fe(r,r.path),r.queryKey=Ve(r,r.query),r}function Fe(n,e){const t=/\/{2,9}/g,s=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function Ve(n,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,r){i&&(t[i]=r)}),t}const D=typeof addEventListener=="function"&&typeof removeEventListener=="function",R=[];D&&addEventListener("offline",()=>{R.forEach(n=>n())},!1);class _ extends u{constructor(e,t){if(super(),this.binaryType=_e,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(t=e,e=null),e){const s=q(e);t.hostname=s.host,t.secure=s.protocol==="https"||s.protocol==="wss",t.port=s.port,s.query&&(t.query=s.query)}else t.host&&(t.hostname=q(t.host).host);C(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(s=>{const i=s.prototype.name;this.transports.push(i),this._transportsByName[i]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Te(this.opts.query)),D&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},R.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=te,t.transport=e,this.id&&(t.sid=this.id);const s=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&_.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",_.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let s=0;s<this.writeBuffer.length;s++){const i=this.writeBuffer[s].data;if(i&&(t+=Ee(i)),s>0&&t>this._maxPayload)return this.writeBuffer.slice(0,s);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,S(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,s){return this._sendPacket("message",e,t,s),this}send(e,t,s){return this._sendPacket("message",e,t,s),this}_sendPacket(e,t,s,i){if(typeof t=="function"&&(i=t,t=void 0),typeof s=="function"&&(i=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const r={type:e,data:t,options:s};this.emitReserved("packetCreate",r),this.writeBuffer.push(r),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},s=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(_.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),D&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=R.indexOf(this._offlineEventListener);s!==-1&&R.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}_.protocol=te;class Me extends _{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;_.priorWebsocketSuccess=!1;const i=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",g=>{if(!s)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;_.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(f(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=t.name,this.emitReserved("upgradeError",w)}}))};function r(){s||(s=!0,f(),t.close(),t=null)}const o=g=>{const w=new Error("probe error: "+g);w.transport=t.name,r(),this.emitReserved("upgradeError",w)};function a(){o("transport closed")}function h(){o("socket closed")}function m(g){t&&g.name!==t.name&&r()}const f=()=>{t.removeListener("open",i),t.removeListener("error",o),t.removeListener("close",a),this.off("close",h),this.off("upgrading",m)};t.once("open",i),t.once("error",o),t.once("close",a),this.once("close",h),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}}let He=class extends Me{constructor(e,t={}){const s=typeof e=="object",i=s?{...e}:{...t};(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(r=>De[r]).filter(r=>!!r)),super(s?i:e,i)}};function We(n,e="",t){let s=n;t=t||typeof location<"u"&&location,n==null&&(n=t.protocol+"//"+t.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=t.protocol+n:n=t.host+n),/^(https?|wss?):\/\//.test(n)||(typeof t<"u"?n=t.protocol+"//"+n:n="https://"+n),s=q(n)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const r=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+r+":"+s.port+e,s.href=s.protocol+"://"+r+(t&&t.port===s.port?"":":"+s.port),s}const Ke=typeof ArrayBuffer=="function",$e=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,ae=Object.prototype.toString,Ye=typeof Blob=="function"||typeof Blob<"u"&&ae.call(Blob)==="[object BlobConstructor]",ze=typeof File=="function"||typeof File<"u"&&ae.call(File)==="[object FileConstructor]";function W(n){return Ke&&(n instanceof ArrayBuffer||$e(n))||Ye&&n instanceof Blob||ze&&n instanceof File}function O(n,e){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let t=0,s=n.length;t<s;t++)if(O(n[t]))return!0;return!1}if(W(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return O(n.toJSON(),!0);for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&O(n[t]))return!0;return!1}function Xe(n){const e=[],t=n.data,s=n;return s.data=I(t,e),s.attachments=e.length,{packet:s,buffers:e}}function I(n,e){if(!n)return n;if(W(n)){const t={_placeholder:!0,num:e.length};return e.push(n),t}else if(Array.isArray(n)){const t=new Array(n.length);for(let s=0;s<n.length;s++)t[s]=I(n[s],e);return t}else if(typeof n=="object"&&!(n instanceof Date)){const t={};for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=I(n[s],e));return t}return n}function Je(n,e){return n.data=U(n.data,e),delete n.attachments,n}function U(n,e){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<e.length)return e[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let t=0;t<n.length;t++)n[t]=U(n[t],e);else if(typeof n=="object")for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(n[t]=U(n[t],e));return n}const Qe=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var c;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(c||(c={}));class je{constructor(e){this.replacer=e}encode(e){return(e.type===c.EVENT||e.type===c.ACK)&&O(e)?this.encodeAsBinary({type:e.type===c.EVENT?c.BINARY_EVENT:c.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===c.BINARY_EVENT||e.type===c.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=Xe(e),s=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(s),i}}class K extends u{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const s=t.type===c.BINARY_EVENT;s||t.type===c.BINARY_ACK?(t.type=s?c.EVENT:c.ACK,this.reconstructor=new Ge(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(W(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const s={type:Number(e.charAt(0))};if(c[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===c.BINARY_EVENT||s.type===c.BINARY_ACK){const r=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const o=e.substring(r,t);if(o!=Number(o)||e.charAt(t)!=="-")throw new Error("Illegal attachments");const a=Number(o);if(!Ze(a)||a<0)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");s.attachments=a}if(e.charAt(t+1)==="/"){const r=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););s.nsp=e.substring(r,t)}else s.nsp="/";const i=e.charAt(t+1);if(i!==""&&Number(i)==i){const r=t+1;for(;++t;){const o=e.charAt(t);if(o==null||Number(o)!=o){--t;break}if(t===e.length)break}s.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(K.isPayloadValid(s.type,r))s.data=r;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case c.CONNECT:return J(t);case c.DISCONNECT:return t===void 0;case c.CONNECT_ERROR:return typeof t=="string"||J(t);case c.EVENT:case c.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&Qe.indexOf(t[0])===-1);case c.ACK:case c.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Ge{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=Je(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Ze=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};function J(n){return Object.prototype.toString.call(n)==="[object Object]"}const et=Object.freeze(Object.defineProperty({__proto__:null,Decoder:K,Encoder:je,get PacketType(){return c}},Symbol.toStringTag,{value:"Module"}));function p(n,e,t){return n.on(e,t),function(){n.off(e,t)}}const tt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ce extends u{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[p(e,"open",this.onopen.bind(this)),p(e,"packet",this.onpacket.bind(this)),p(e,"error",this.onerror.bind(this)),p(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,i,r;if(tt.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const o={type:c.EVENT,data:t};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const f=this.ids++,g=t.pop();this._registerAckCallback(f,g),o.id=f}const a=(i=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||i===void 0?void 0:i.writable,h=this.connected&&!(!((r=this.io.engine)===null||r===void 0)&&r._hasPingExpired());return this.flags.volatile&&!a||(h?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,t){var s;const i=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(i===void 0){this.acks[e]=t;return}const r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);t.call(this,new Error("operation has timed out"))},i),o=(...a)=>{this.io.clearTimeoutFn(r),t.apply(this,a)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise((s,i)=>{const r=(o,a)=>o?i(o):s(a);r.withError=!0,t.push(r),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...r)=>(this._queue[0],i!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...r)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:c.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){const s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case c.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case c.EVENT:case c.BINARY_EVENT:this.onevent(e);break;case c.ACK:case c.BINARY_ACK:this.onack(e);break;case c.DISCONNECT:this.ondisconnect();break;case c.CONNECT_ERROR:this.destroy();const s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let s=!1;return function(...i){s||(s=!0,t.packet({type:c.ACK,id:e,data:i}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:c.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const s of t)s.apply(this,e.data)}}}function b(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}b.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*n);n=(Math.floor(e*10)&1)==0?n-t:n+t}return Math.min(n,this.max)|0};b.prototype.reset=function(){this.attempts=0};b.prototype.setMin=function(n){this.ms=n};b.prototype.setMax=function(n){this.max=n};b.prototype.setJitter=function(n){this.jitter=n};class F extends u{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,C(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((s=t.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new b({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const i=t.parser||et;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new He(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const i=p(t,"open",function(){s.onopen(),e&&e()}),r=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},o=p(t,"error",r);if(this._timeout!==!1){const a=this._timeout,h=this.setTimeoutFn(()=>{i(),r(new Error("timeout")),t.close()},a);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(p(e,"ping",this.onping.bind(this)),p(e,"data",this.ondata.bind(this)),p(e,"error",this.onerror.bind(this)),p(e,"close",this.onclose.bind(this)),p(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){S(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new ce(this,e,t),this.nsps[e]=s),s}_destroy(e){const t=Object.keys(this.nsps);for(const s of t)if(this.nsps[s].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const v={};function L(n,e){typeof n=="object"&&(e=n,n=void 0),e=e||{};const t=We(n,e.path||"/socket.io"),s=t.source,i=t.id,r=t.path,o=v[i]&&r in v[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||o;let h;return a?h=new F(s,e):(v[i]||(v[i]=new F(s,e)),h=v[i]),t.query&&!e.query&&(e.query=t.queryKey),h.socket(t.path,e)}Object.assign(L,{Manager:F,Socket:ce,io:L,connect:L});export{F as Manager,Pe as NodeWebSocket,Ne as NodeXHR,ce as Socket,Pe as WebSocket,qe as WebTransport,Ne as XHR,L as connect,L as default,L as io};
|
|
1
|
+
const y=Object.create(null);y.open="0";y.close="1";y.ping="2";y.pong="3";y.message="4";y.upgrade="5";y.noop="6";const T=Object.create(null);Object.keys(y).forEach(n=>{T[y[n]]=n});const q={type:"error",data:"parser error"},Q=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",j=typeof ArrayBuffer=="function",G=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,V=({type:n,data:e},t,s)=>Q&&e instanceof Blob?t?s(e):$(e,s):j&&(e instanceof ArrayBuffer||G(e))?t?s(e):$(new Blob([e]),s):s(y[n]+(e||"")),$=(n,e)=>{const t=new FileReader;return t.onload=function(){const s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(n)};function Y(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let N;function he(n,e){if(Q&&n.data instanceof Blob)return n.data.arrayBuffer().then(Y).then(e);if(j&&(n.data instanceof ArrayBuffer||G(n.data)))return e(Y(n.data));V(n,!1,t=>{N||(N=new TextEncoder),e(N.encode(t))})}const z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<z.length;n++)E[z.charCodeAt(n)]=n;const ue=n=>{let e=n.length*.75,t=n.length,s,i=0,r,o,a,h;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);const m=new ArrayBuffer(e),f=new Uint8Array(m);for(s=0;s<t;s+=4)r=E[n.charCodeAt(s)],o=E[n.charCodeAt(s+1)],a=E[n.charCodeAt(s+2)],h=E[n.charCodeAt(s+3)],f[i++]=r<<2|o>>4,f[i++]=(o&15)<<4|a>>2,f[i++]=(a&3)<<6|h&63;return m},fe=typeof ArrayBuffer=="function",M=(n,e)=>{if(typeof n!="string")return{type:"message",data:Z(n,e)};const t=n.charAt(0);return t==="b"?{type:"message",data:le(n.substring(1),e)}:T[t]?n.length>1?{type:T[t],data:n.substring(1)}:{type:T[t]}:q},le=(n,e)=>{if(fe){const t=ue(n);return Z(t,e)}else return{base64:!0,data:n}},Z=(n,e)=>e==="blob"?n instanceof Blob?n:new Blob([n]):n instanceof ArrayBuffer?n:n.buffer,ee="",pe=(n,e)=>{const t=n.length,s=new Array(t);let i=0;n.forEach((r,o)=>{V(r,!1,a=>{s[o]=a,++i===t&&e(s.join(ee))})})},de=(n,e)=>{const t=n.split(ee),s=[];for(let i=0;i<t.length;i++){const r=M(t[i],e);if(s.push(r),r.type==="error")break}return s};function ye(){return new TransformStream({transform(n,e){he(n,t=>{const s=t.length;let i;if(s<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,s);else if(s<65536){i=new Uint8Array(3);const r=new DataView(i.buffer);r.setUint8(0,126),r.setUint16(1,s)}else{i=new Uint8Array(9);const r=new DataView(i.buffer);r.setUint8(0,127),r.setBigUint64(1,BigInt(s))}n.data&&typeof n.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}let x;function k(n){return n.reduce((e,t)=>e+t.length,0)}function A(n,e){if(n[0].length===e)return n.shift();const t=new Uint8Array(e);let s=0;for(let i=0;i<e;i++)t[i]=n[0][s++],s===n[0].length&&(n.shift(),s=0);return n.length&&s<n[0].length&&(n[0]=n[0].slice(s)),t}function me(n,e){x||(x=new TextDecoder);const t=[];let s=0,i=-1,r=!1;return new TransformStream({transform(o,a){for(t.push(o);;){if(s===0){if(k(t)<1)break;const h=A(t,1);r=(h[0]&128)===128,i=h[0]&127,i<126?s=3:i===126?s=1:s=2}else if(s===1){if(k(t)<2)break;const h=A(t,2);i=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),s=3}else if(s===2){if(k(t)<8)break;const h=A(t,8),m=new DataView(h.buffer,h.byteOffset,h.length),f=m.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(q);break}i=f*Math.pow(2,32)+m.getUint32(4),s=3}else{if(k(t)<i)break;const h=A(t,i);a.enqueue(M(r?h:x.decode(h),e)),s=0}if(i===0||i>n){a.enqueue(q);break}}}})}const te=4;function u(n){if(n)return ge(n)}function ge(n){for(var e in u.prototype)n[e]=u.prototype[e];return n}u.prototype.on=u.prototype.addEventListener=function(n,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(e),this};u.prototype.once=function(n,e){function t(){this.off(n,t),e.apply(this,arguments)}return t.fn=e,this.on(n,t),this};u.prototype.off=u.prototype.removeListener=u.prototype.removeAllListeners=u.prototype.removeEventListener=function(n,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+n];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var s,i=0;i<t.length;i++)if(s=t[i],s===e||s.fn===e){t.splice(i,1);break}return t.length===0&&delete this._callbacks["$"+n],this};u.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+n],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(t){t=t.slice(0);for(var s=0,i=t.length;s<i;++s)t[s].apply(this,e)}return this};u.prototype.emitReserved=u.prototype.emit;u.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};u.prototype.hasListeners=function(n){return!!this.listeners(n).length};const C=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),l=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),_e="arraybuffer";function se(n,...e){return e.reduce((t,s)=>(n.hasOwnProperty(s)&&(t[s]=n[s]),t),{})}const be=l.setTimeout,we=l.clearTimeout;function B(n,e){e.useNativeTimers?(n.setTimeoutFn=be.bind(l),n.clearTimeoutFn=we.bind(l)):(n.setTimeoutFn=l.setTimeout.bind(l),n.clearTimeoutFn=l.clearTimeout.bind(l))}const ve=1.33;function Ee(n){return typeof n=="string"?ke(n):Math.ceil((n.byteLength||n.size)*ve)}function ke(n){let e=0,t=0;for(let s=0,i=n.length;s<i;s++)e=n.charCodeAt(s),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(s++,t+=4);return t}function ne(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ae(n){let e="";for(let t in n)n.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(n[t]));return e}function Te(n){let e={},t=n.split("&");for(let s=0,i=t.length;s<i;s++){let r=t[s].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}class Oe extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class H extends u{constructor(e){super(),this.writable=!1,B(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new Oe(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=M(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=Ae(e);return t.length?"?"+t:""}}class Re extends H{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||t()})),this.writable||(s++,this.once("drain",function(){--s||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};de(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,pe(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=ne()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let ie=!1;try{ie=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Se=ie;function Ce(){}class Be extends Re{constructor(e){if(super(e),typeof location<"u"){const t=location.protocol==="https:";let s=location.port;s||(s=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){const s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(i,r)=>{this.onError("xhr post error",i,r)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,s)=>{this.onError("xhr poll error",t,s)}),this.pollXhr=e}}class d extends u{constructor(e,t,s){super(),this.createRequest=e,B(this,s),this._opts=s,this._method=s.method||"GET",this._uri=t,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var e;const t=se(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(t);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&s.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var i;s.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=d.requestsCount++,d.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Ce,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete d.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}d.requestsCount=0;d.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",J);else if(typeof addEventListener=="function"){const n="onpagehide"in l?"pagehide":"unload";addEventListener(n,J,!1)}}function J(){for(let n in d.requests)d.requests.hasOwnProperty(n)&&d.requests[n].abort()}const Ne=(function(){const n=re({xdomain:!1});return n&&n.responseType!==null})();class xe extends Be{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=Ne&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new d(re,this.uri(),e)}}function re(n){const e=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Se))return new XMLHttpRequest}catch{}if(!e)try{return new l[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const oe=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Le extends H{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,s=oe?{}:se(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],i=t===e.length-1;V(s,this.supportsBinary,r=>{try{this.doWrite(s,r)}catch{}i&&C(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=ne()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const L=l.WebSocket||l.MozWebSocket;class Pe extends Le{createSocket(e,t,s){return oe?new L(e,t,s):t?new L(e,t):new L(e)}doWrite(e,t){this.ws.send(t)}}class qe extends H{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=me(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),i=ye();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const r=()=>{s.read().then(({done:a,value:h})=>{a||(this.onPacket(h),r())}).catch(a=>{})};r();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],i=t===e.length-1;this._writer.write(s).then(()=>{i&&C(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const De={websocket:Pe,webtransport:qe,polling:xe},Ie=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ue=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function D(n){if(n.length>8e3)throw"URI too long";const e=n,t=n.indexOf("["),s=n.indexOf("]");t!=-1&&s!=-1&&(n=n.substring(0,t)+n.substring(t,s).replace(/:/g,";")+n.substring(s,n.length));let i=Ie.exec(n||""),r={},o=14;for(;o--;)r[Ue[o]]=i[o]||"";return t!=-1&&s!=-1&&(r.source=e,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=Fe(r,r.path),r.queryKey=Ve(r,r.query),r}function Fe(n,e){const t=/\/{2,9}/g,s=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function Ve(n,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,r){i&&(t[i]=r)}),t}const I=typeof addEventListener=="function"&&typeof removeEventListener=="function",O=[];I&&addEventListener("offline",()=>{O.forEach(n=>n())},!1);class _ extends u{constructor(e,t){if(super(),this.binaryType=_e,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(t=e,e=null),e){const s=D(e);t.hostname=s.host,t.secure=s.protocol==="https"||s.protocol==="wss",t.port=s.port,s.query&&(t.query=s.query)}else t.host&&(t.hostname=D(t.host).host);B(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(s=>{const i=s.prototype.name;this.transports.push(i),this._transportsByName[i]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Te(this.opts.query)),I&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},O.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=te,t.transport=e,this.id&&(t.sid=this.id);const s=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&_.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",_.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let s=0;s<this.writeBuffer.length;s++){const i=this.writeBuffer[s].data;if(i&&(t+=Ee(i)),s>0&&t>this._maxPayload)return this.writeBuffer.slice(0,s);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,C(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,s){return this._sendPacket("message",e,t,s),this}send(e,t,s){return this._sendPacket("message",e,t,s),this}_sendPacket(e,t,s,i){if(typeof t=="function"&&(i=t,t=void 0),typeof s=="function"&&(i=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const r={type:e,data:t,options:s};this.emitReserved("packetCreate",r),this.writeBuffer.push(r),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},s=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(_.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),I&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=O.indexOf(this._offlineEventListener);s!==-1&&O.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}_.protocol=te;class Me extends _{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;_.priorWebsocketSuccess=!1;const i=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",g=>{if(!s)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;_.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(f(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=t.name,this.emitReserved("upgradeError",w)}}))};function r(){s||(s=!0,f(),t.close(),t=null)}const o=g=>{const w=new Error("probe error: "+g);w.transport=t.name,r(),this.emitReserved("upgradeError",w)};function a(){o("transport closed")}function h(){o("socket closed")}function m(g){t&&g.name!==t.name&&r()}const f=()=>{t.removeListener("open",i),t.removeListener("error",o),t.removeListener("close",a),this.off("close",h),this.off("upgrading",m)};t.once("open",i),t.once("error",o),t.once("close",a),this.once("close",h),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}}let He=class extends Me{constructor(e,t={}){const s=typeof e=="object",i=s?{...e}:{...t};(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(r=>De[r]).filter(r=>!!r)),super(s?i:e,i)}};function We(n,e="",t){let s=n;t=t||typeof location<"u"&&location,n==null&&(n=t.protocol+"//"+t.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=t.protocol+n:n=t.host+n),/^(https?|wss?):\/\//.test(n)||(typeof t<"u"?n=t.protocol+"//"+n:n="https://"+n),s=D(n)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const r=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+r+":"+s.port+e,s.href=s.protocol+"://"+r+(t&&t.port===s.port?"":":"+s.port),s}const Ke=typeof ArrayBuffer=="function",$e=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,ae=Object.prototype.toString,Ye=typeof Blob=="function"||typeof Blob<"u"&&ae.call(Blob)==="[object BlobConstructor]",ze=typeof File=="function"||typeof File<"u"&&ae.call(File)==="[object FileConstructor]";function W(n){return Ke&&(n instanceof ArrayBuffer||$e(n))||Ye&&n instanceof Blob||ze&&n instanceof File}function R(n,e){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let t=0,s=n.length;t<s;t++)if(R(n[t]))return!0;return!1}if(W(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return R(n.toJSON(),!0);for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&R(n[t]))return!0;return!1}function Je(n){const e=[],t=n.data,s=n;return s.data=S(t,e),s.attachments=e.length,{packet:s,buffers:e}}function S(n,e,t){if(!n)return n;if(W(n)){const s={_placeholder:!0,num:e.length};return e.push(n),s}else if(Array.isArray(n)){const s=new Array(n.length);for(let i=0;i<n.length;i++)s[i]=S(n[i],e);return s}else if(typeof n=="object"&&!(n instanceof Date)){if(n.toJSON&&typeof n.toJSON=="function"&&!t)return S(n.toJSON(),e,!0);const s={};for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(s[i]=S(n[i],e));return s}return n}function Xe(n,e){return n.data=U(n.data,e),delete n.attachments,n}function U(n,e){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<e.length)return e[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let t=0;t<n.length;t++)n[t]=U(n[t],e);else if(typeof n=="object")for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(n[t]=U(n[t],e));return n}const Qe=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var c;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(c||(c={}));class je{constructor(e){this.replacer=e}encode(e){return(e.type===c.EVENT||e.type===c.ACK)&&R(e)?this.encodeAsBinary({type:e.type===c.EVENT?c.BINARY_EVENT:c.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===c.BINARY_EVENT||e.type===c.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=Je(e),s=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(s),i}}class K extends u{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const s=t.type===c.BINARY_EVENT;s||t.type===c.BINARY_ACK?(t.type=s?c.EVENT:c.ACK,this.reconstructor=new Ge(t)):super.emitReserved("decoded",t)}else if(W(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const s={type:Number(e.charAt(0))};if(c[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===c.BINARY_EVENT||s.type===c.BINARY_ACK){const r=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const o=e.substring(r,t);if(o!=Number(o)||e.charAt(t)!=="-")throw new Error("Illegal attachments");const a=Number(o);if(!Ze(a)||a<1)throw new Error("Illegal attachments");if(a>this.opts.maxAttachments)throw new Error("too many attachments");s.attachments=a}if(e.charAt(t+1)==="/"){const r=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););s.nsp=e.substring(r,t)}else s.nsp="/";const i=e.charAt(t+1);if(i!==""&&Number(i)==i){const r=t+1;for(;++t;){const o=e.charAt(t);if(o==null||Number(o)!=o){--t;break}if(t===e.length)break}s.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(K.isPayloadValid(s.type,r))s.data=r;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case c.CONNECT:return X(t);case c.DISCONNECT:return t===void 0;case c.CONNECT_ERROR:return typeof t=="string"||X(t);case c.EVENT:case c.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&Qe.indexOf(t[0])===-1);case c.ACK:case c.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Ge{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=Xe(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Ze=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};function X(n){return Object.prototype.toString.call(n)==="[object Object]"}const et=Object.freeze(Object.defineProperty({__proto__:null,Decoder:K,Encoder:je,get PacketType(){return c}},Symbol.toStringTag,{value:"Module"}));function p(n,e,t){return n.on(e,t),function(){n.off(e,t)}}const tt=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ce extends u{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[p(e,"open",this.onopen.bind(this)),p(e,"packet",this.onpacket.bind(this)),p(e,"error",this.onerror.bind(this)),p(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,i,r;if(tt.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const o={type:c.EVENT,data:t};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const f=this.ids++,g=t.pop();this._registerAckCallback(f,g),o.id=f}const a=(i=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||i===void 0?void 0:i.writable,h=this.connected&&!(!((r=this.io.engine)===null||r===void 0)&&r._hasPingExpired());return this.flags.volatile&&!a||(h?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,t){var s;const i=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(i===void 0){this.acks[e]=t;return}const r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);t.call(this,new Error("operation has timed out"))},i),o=(...a)=>{this.io.clearTimeoutFn(r),t.apply(this,a)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise((s,i)=>{const r=(o,a)=>o?i(o):s(a);r.withError=!0,t.push(r),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...r)=>(this._queue[0],i!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...r)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:c.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){const s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case c.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case c.EVENT:case c.BINARY_EVENT:this.onevent(e);break;case c.ACK:case c.BINARY_ACK:this.onack(e);break;case c.DISCONNECT:this.ondisconnect();break;case c.CONNECT_ERROR:this.destroy();const s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let s=!1;return function(...i){s||(s=!0,t.packet({type:c.ACK,id:e,data:i}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:c.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const s of t)s.apply(this,e.data)}}}function b(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}b.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*n);n=(Math.floor(e*10)&1)==0?n-t:n+t}return Math.min(n,this.max)|0};b.prototype.reset=function(){this.attempts=0};b.prototype.setMin=function(n){this.ms=n};b.prototype.setMax=function(n){this.max=n};b.prototype.setJitter=function(n){this.jitter=n};class F extends u{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,B(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((s=t.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new b({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const i=t.parser||et;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new He(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const i=p(t,"open",function(){s.onopen(),e&&e()}),r=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},o=p(t,"error",r);if(this._timeout!==!1){const a=this._timeout,h=this.setTimeoutFn(()=>{i(),r(new Error("timeout")),t.close()},a);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(p(e,"ping",this.onping.bind(this)),p(e,"data",this.ondata.bind(this)),p(e,"error",this.onerror.bind(this)),p(e,"close",this.onclose.bind(this)),p(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){C(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new ce(this,e,t),this.nsps[e]=s),s}_destroy(e){const t=Object.keys(this.nsps);for(const s of t)if(this.nsps[s].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const v={};function P(n,e){typeof n=="object"&&(e=n,n=void 0),e=e||{};const t=We(n,e.path||"/socket.io"),s=t.source,i=t.id,r=t.path,o=v[i]&&r in v[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||o;let h;return a?h=new F(s,e):(v[i]||(v[i]=new F(s,e)),h=v[i]),t.query&&!e.query&&(e.query=t.queryKey),h.socket(t.path,e)}Object.assign(P,{Manager:F,Socket:ce,io:P,connect:P});export{F as Manager,Pe as NodeWebSocket,xe as NodeXHR,ce as Socket,Pe as WebSocket,qe as WebTransport,xe as XHR,P as connect,P as default,P as io};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as o}from"./__vite-browser-external-
|
|
1
|
+
import{m as o}from"./__vite-browser-external-BOpcJ7Bn.js";const c=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],t=o("info",c);export{t as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r}from"./__vite-browser-external-
|
|
1
|
+
import{c as r}from"./__vite-browser-external-BOpcJ7Bn.js";const t=["claude","codex","cursor","gemini","kimi","kiro","grok","copilot","antigravity","zcode","opencodeGo","qoder","qoderCn"],e={claude:"CLAUDE",codex:"CODEX",cursor:"CURSOR",gemini:"GEMINI",kimi:"KIMI",kiro:"KIRO",grok:"GROK",copilot:"COPILOT",antigravity:"ANTIGRAVITY",zcode:"ZCODE",opencodeGo:"OPENCODE",qoder:"QODER",qoderCn:"QODER-CN"};function c(i){return e[i]||null}function n(i){switch(i){case"claude":return r("limits.provider.claude");case"codex":return r("limits.provider.codex");case"cursor":return r("limits.provider.cursor");case"gemini":return r("limits.provider.gemini");case"kimi":return r("limits.provider.kimi");case"kiro":return r("limits.provider.kiro");case"grok":return r("limits.provider.grok");case"copilot":return r("limits.provider.copilot");case"antigravity":return r("limits.provider.antigravity");case"zcode":return r("limits.provider.zcode");case"opencodeGo":return r("limits.provider.opencode_go");case"qoder":return r("limits.provider.qoder");case"qoderCn":return r("limits.provider.qoder_cn");default:return String(i||"")}}export{t as L,c as a,n as l};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./__vite-browser-external-
|
|
1
|
+
import{m as e}from"./__vite-browser-external-BOpcJ7Bn.js";const o=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],t=e("link-2",o);export{t as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./__vite-browser-external-
|
|
1
|
+
import{m as e}from"./__vite-browser-external-BOpcJ7Bn.js";const o=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],a=e("loader-circle",o);export{a as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as t}from"./__vite-browser-external-
|
|
1
|
+
import{m as t}from"./__vite-browser-external-BOpcJ7Bn.js";const a=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],i=t("maximize-2",a);export{i as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./__vite-browser-external-
|
|
1
|
+
import"./__vite-browser-external-BOpcJ7Bn.js";const s=r=>{let{transform:t}=r;return{...t,y:0}},e=r=>{let{transform:t}=r;return{...t,x:0}};export{e as a,s as r};
|