plum-e2e 2.7.1 → 2.8.1
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/backend/middleware/jwtAuth.js +2 -2
- package/backend/middleware/runnerOrAdmin.js +26 -0
- package/backend/routes/runners.routes.js +11 -6
- package/backend/scripts/manage-runners.mjs +20 -5
- package/backend/services/runnerService.js +11 -0
- package/frontend/.svelte-kit/adapter-node/chunks/internal.js +1 -1
- package/frontend/.svelte-kit/adapter-node/manifest-full.js +1 -1
- package/frontend/.svelte-kit/adapter-node/manifest.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/0.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/1.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/11.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/12.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/3.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/5.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/6.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/8.js +1 -1
- package/frontend/.svelte-kit/adapter-node/nodes/9.js +1 -1
- package/frontend/.svelte-kit/generated/server/internal.js +1 -1
- package/frontend/.svelte-kit/output/client/.vite/manifest.json +37 -37
- package/frontend/{build/client/_app/immutable/chunks/nURnIknV.js → .svelte-kit/output/client/_app/immutable/chunks/DEKAA-Fm.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/chunks/{DMyTUV-Y.js → Dhf4xQKo.js} +1 -1
- package/frontend/{build/client/_app/immutable/entry/app.BkBD0hgA.js → .svelte-kit/output/client/_app/immutable/entry/app.B0GH5ONo.js} +2 -2
- package/frontend/.svelte-kit/output/client/_app/immutable/entry/start.Bn25CW9X.js +1 -0
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/{0.ChjDHxSJ.js → 0.-imXt0f5.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/{1.DBSWa36f.js → 1.Dom3CKWF.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/{11.O4cjXCg4.js → 11.DMlayLCK.js} +1 -1
- package/frontend/{build/client/_app/immutable/nodes/12.BWQdeRdX.js → .svelte-kit/output/client/_app/immutable/nodes/12.Bu89A1eX.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/{3._S1vrLVF.js → 3.B86rlHXU.js} +1 -1
- package/frontend/{build/client/_app/immutable/nodes/5.BiFBiWcW.js → .svelte-kit/output/client/_app/immutable/nodes/5.CqTXvadV.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/{6.BNS-W0R_.js → 6.BJZ62MCd.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/{8.BEUdazrw.js → 8.B4fj2Xyu.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/nodes/{9.CrLHYPEJ.js → 9.C57_2xq6.js} +1 -1
- package/frontend/.svelte-kit/output/client/_app/version.json +1 -1
- package/frontend/.svelte-kit/output/server/chunks/internal.js +1 -1
- package/frontend/.svelte-kit/output/server/manifest-full.js +1 -1
- package/frontend/.svelte-kit/output/server/manifest.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/0.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/1.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/11.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/12.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/3.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/5.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/6.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/8.js +1 -1
- package/frontend/.svelte-kit/output/server/nodes/9.js +1 -1
- package/frontend/{.svelte-kit/output/client/_app/immutable/chunks/nURnIknV.js → build/client/_app/immutable/chunks/DEKAA-Fm.js} +1 -1
- package/frontend/build/client/_app/immutable/chunks/DEKAA-Fm.js.br +0 -0
- package/frontend/build/client/_app/immutable/chunks/DEKAA-Fm.js.gz +0 -0
- package/frontend/build/client/_app/immutable/chunks/{DMyTUV-Y.js → Dhf4xQKo.js} +1 -1
- package/frontend/build/client/_app/immutable/chunks/Dhf4xQKo.js.br +0 -0
- package/frontend/build/client/_app/immutable/chunks/Dhf4xQKo.js.gz +0 -0
- package/frontend/{.svelte-kit/output/client/_app/immutable/entry/app.BkBD0hgA.js → build/client/_app/immutable/entry/app.B0GH5ONo.js} +2 -2
- package/frontend/build/client/_app/immutable/entry/app.B0GH5ONo.js.br +0 -0
- package/frontend/build/client/_app/immutable/entry/app.B0GH5ONo.js.gz +0 -0
- package/frontend/build/client/_app/immutable/entry/start.Bn25CW9X.js +1 -0
- package/frontend/build/client/_app/immutable/entry/start.Bn25CW9X.js.br +0 -0
- package/frontend/build/client/_app/immutable/entry/start.Bn25CW9X.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/{0.ChjDHxSJ.js → 0.-imXt0f5.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/0.-imXt0f5.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/0.-imXt0f5.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/{1.DBSWa36f.js → 1.Dom3CKWF.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/1.Dom3CKWF.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/1.Dom3CKWF.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/{11.O4cjXCg4.js → 11.DMlayLCK.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/11.DMlayLCK.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/11.DMlayLCK.js.gz +0 -0
- package/frontend/{.svelte-kit/output/client/_app/immutable/nodes/12.BWQdeRdX.js → build/client/_app/immutable/nodes/12.Bu89A1eX.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/12.Bu89A1eX.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/12.Bu89A1eX.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/{3._S1vrLVF.js → 3.B86rlHXU.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/3.B86rlHXU.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/3.B86rlHXU.js.gz +0 -0
- package/frontend/{.svelte-kit/output/client/_app/immutable/nodes/5.BiFBiWcW.js → build/client/_app/immutable/nodes/5.CqTXvadV.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/5.CqTXvadV.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/5.CqTXvadV.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/{6.BNS-W0R_.js → 6.BJZ62MCd.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/6.BJZ62MCd.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/6.BJZ62MCd.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/{8.BEUdazrw.js → 8.B4fj2Xyu.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/8.B4fj2Xyu.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/8.B4fj2Xyu.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/{9.CrLHYPEJ.js → 9.C57_2xq6.js} +1 -1
- package/frontend/build/client/_app/immutable/nodes/9.C57_2xq6.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/9.C57_2xq6.js.gz +0 -0
- package/frontend/build/client/_app/version.json +1 -1
- package/frontend/build/client/_app/version.json.br +0 -0
- package/frontend/build/client/_app/version.json.gz +0 -0
- package/frontend/build/server/chunks/{0-Cn_2hzqk.js → 0-DG1Uv07a.js} +2 -2
- package/frontend/build/server/chunks/{0-Cn_2hzqk.js.map → 0-DG1Uv07a.js.map} +1 -1
- package/frontend/build/server/chunks/{1-BrRGJFSB.js → 1-iB0ogJU_.js} +2 -2
- package/frontend/build/server/chunks/{1-BrRGJFSB.js.map → 1-iB0ogJU_.js.map} +1 -1
- package/frontend/build/server/chunks/{11-BLPbHJqB.js → 11-Df9vGZ_v.js} +2 -2
- package/frontend/build/server/chunks/{11-BLPbHJqB.js.map → 11-Df9vGZ_v.js.map} +1 -1
- package/frontend/build/server/chunks/{12-S1ujUrHy.js → 12-DqvjCln4.js} +2 -2
- package/frontend/build/server/chunks/{12-S1ujUrHy.js.map → 12-DqvjCln4.js.map} +1 -1
- package/frontend/build/server/chunks/{3-BHkXVoNI.js → 3-BYKCZi4U.js} +2 -2
- package/frontend/build/server/chunks/{3-BHkXVoNI.js.map → 3-BYKCZi4U.js.map} +1 -1
- package/frontend/build/server/chunks/{5-F1ZsXMt2.js → 5-B6Jc1foX.js} +2 -2
- package/frontend/build/server/chunks/{5-F1ZsXMt2.js.map → 5-B6Jc1foX.js.map} +1 -1
- package/frontend/build/server/chunks/{6-FlZLnYJ6.js → 6-dXZKtN86.js} +2 -2
- package/frontend/build/server/chunks/{6-FlZLnYJ6.js.map → 6-dXZKtN86.js.map} +1 -1
- package/frontend/build/server/chunks/{8-DXReUGxi.js → 8-D-Bp7HzS.js} +2 -2
- package/frontend/build/server/chunks/{8-DXReUGxi.js.map → 8-D-Bp7HzS.js.map} +1 -1
- package/frontend/build/server/chunks/{9-Cy_mGmt4.js → 9-BynjuGUO.js} +2 -2
- package/frontend/build/server/chunks/{9-Cy_mGmt4.js.map → 9-BynjuGUO.js.map} +1 -1
- package/frontend/build/server/index.js +1 -1
- package/frontend/build/server/index.js.map +1 -1
- package/frontend/build/server/manifest.js +10 -10
- package/frontend/build/server/manifest.js.map +1 -1
- package/package.json +1 -1
- package/frontend/.svelte-kit/output/client/_app/immutable/entry/start.BxeX1Uxs.js +0 -1
- package/frontend/build/client/_app/immutable/chunks/DMyTUV-Y.js.br +0 -0
- package/frontend/build/client/_app/immutable/chunks/DMyTUV-Y.js.gz +0 -0
- package/frontend/build/client/_app/immutable/chunks/nURnIknV.js.br +0 -0
- package/frontend/build/client/_app/immutable/chunks/nURnIknV.js.gz +0 -0
- package/frontend/build/client/_app/immutable/entry/app.BkBD0hgA.js.br +0 -0
- package/frontend/build/client/_app/immutable/entry/app.BkBD0hgA.js.gz +0 -0
- package/frontend/build/client/_app/immutable/entry/start.BxeX1Uxs.js +0 -1
- package/frontend/build/client/_app/immutable/entry/start.BxeX1Uxs.js.br +0 -2
- package/frontend/build/client/_app/immutable/entry/start.BxeX1Uxs.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/0.ChjDHxSJ.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/0.ChjDHxSJ.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/1.DBSWa36f.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/1.DBSWa36f.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/11.O4cjXCg4.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/11.O4cjXCg4.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/12.BWQdeRdX.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/12.BWQdeRdX.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/3._S1vrLVF.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/3._S1vrLVF.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/5.BiFBiWcW.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/5.BiFBiWcW.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/6.BNS-W0R_.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/6.BNS-W0R_.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/8.BEUdazrw.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/8.BEUdazrw.js.gz +0 -0
- package/frontend/build/client/_app/immutable/nodes/9.CrLHYPEJ.js.br +0 -0
- package/frontend/build/client/_app/immutable/nodes/9.CrLHYPEJ.js.gz +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var Yt=t=>{throw TypeError(t)};var Ce=(t,e,n)=>e.has(t)||Yt("Cannot "+n);var A=(t,e,n)=>(Ce(t,e,"read from private field"),n?n.call(t):e.get(t)),P=(t,e,n)=>e.has(t)?Yt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{w as Ct,o as zt,au as C,g as O,s as N,z as Oe}from"./BAACMRH5.js";const Ne="1784381622985";new URL("sveltekit-internal://");function je(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function $e(t){return t.split("%25").map(decodeURI).join("%25")}function De(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function Rt({href:t}){return t.split("#")[0]}function Fe(t,e,n,r=!1){const a=new URL(t);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return f=>(n(f),i[o](f));e();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return e(),t[i]},enumerable:!0,configurable:!0});return a}function Ve(...t){let e=5381;for(const n of t)if(typeof n=="string"){let r=n.length;for(;r;)e=e*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)e=e*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}function Be(t){const e=atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n.buffer}const Ge=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&W.delete(Ot(t)),Ge(t,e));const W=new Map;function Me(t,e){const n=Ot(t,e),r=document.querySelector(n);if(r!=null&&r.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&W.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=Be(a)),Promise.resolve(new Response(a,s))}return window.fetch(t,e)}function qe(t,e,n){if(W.size>0){const r=Ot(t,n),a=W.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);W.delete(r)}}return window.fetch(e,n)}function Ot(t,e){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const a=[];e.headers&&a.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&a.push(e.body),r+=`[data-hash="${Ve(...a)}"]`}return r}const He=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Ke(t){const e=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${Ye(t).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return e.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return e.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,f)=>{if(f%2){if(c.startsWith("x+"))return It(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return It(String.fromCharCode(...c.slice(2).split("-").map(d=>parseInt(d,16))));const u=He.exec(c),[,p,y,l,m]=u;return e.push({name:l,matcher:m,optional:!!p,rest:!!y,chained:y?f===1&&i[0]==="":!1}),y?"(.*?)":p?"([^/]*)?":"([^/]+?)"}return It(c)}).join("")}).join("")}/?$`),params:e}}function We(t){return!/^\([^)]+\)$/.test(t)}function Ye(t){return t.slice(1).split("/").filter(We)}function ze(t,e,n){const r={},a=t.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<e.length;o+=1){const c=e[o];let f=a[o-i];if(c.chained&&c.rest&&i&&(f=a.slice(o-i,o+1).filter(u=>u).join("/"),i=0),f===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](f)){r[c.name]=f;const u=e[o+1],p=a[o+1];u&&!u.rest&&u.optional&&p&&c.chained&&(i=0),!u&&!p&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function It(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Je({nodes:t,server_loads:e,dictionary:n,matchers:r}){const a=new Set(e);return Object.entries(n).map(([o,[c,f,u]])=>{const{pattern:p,params:y}=Ke(o),l={id:o,exec:m=>{const d=p.exec(m);if(d)return ze(d,y,r)},errors:[1,...u||[]].map(m=>t[m]),layouts:[0,...f||[]].map(i),leaf:s(c)};return l.errors.length=l.layouts.length=Math.max(l.errors.length,l.layouts.length),l});function s(o){const c=o<0;return c&&(o=~o),[c,t[o]]}function i(o){return o===void 0?o:[a.has(o),t[o]]}}function fe(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function Jt(t,e,n=JSON.stringify){const r=n(e);try{sessionStorage[t]=r}catch{}}var oe;const x=((oe=globalThis.__sveltekit_1v80gvr)==null?void 0:oe.base)??"";var se;const Xe=((se=globalThis.__sveltekit_1v80gvr)==null?void 0:se.assets)??x,ue="sveltekit:snapshot",he="sveltekit:scroll",de="sveltekit:states",Ze="sveltekit:pageurl",G="sveltekit:history",J="sveltekit:navigation",ut={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ft=location.origin;function pe(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function Nt(){return{x:pageXOffset,y:pageYOffset}}function B(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const Xt={...ut,"":ut.hover};function ge(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function me(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=ge(t)}}function Tt(t,e,n){let r;try{if(r=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,s=!r||!!a||vt(r,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(r==null?void 0:r.origin)===ft&&t.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function ht(t){let e=null,n=null,r=null,a=null,s=null,i=null,o=t;for(;o&&o!==document.documentElement;)r===null&&(r=B(o,"preload-code")),a===null&&(a=B(o,"preload-data")),e===null&&(e=B(o,"keepfocus")),n===null&&(n=B(o,"noscroll")),s===null&&(s=B(o,"reload")),i===null&&(i=B(o,"replacestate")),o=ge(o);function c(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Xt[r??"off"],preload_data:Xt[a??"off"],keepfocus:c(e),noscroll:c(n),reload:c(s),replace_state:c(i)}}function Zt(t){const e=Ct(t);let n=!0;function r(){n=!0,e.update(i=>i)}function a(i){n=!1,e.set(i)}function s(i){let o;return e.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const ye={v:()=>{}};function Qe(){const{set:t,subscribe:e}=Ct(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Xe}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Ne;return i&&(t(!0),ye.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:e,check:r}}function vt(t,e,n){return t.origin!==ft||!t.pathname.startsWith(e)?!0:n?!(t.pathname===e+"/"||t.pathname===e+"/index.html"||t.protocol==="file:"&&t.pathname.replace(/\/[^/]+\.html?$/,"")===e):!1}function Qt(t){const e=en(t),n=new ArrayBuffer(e.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,e.charCodeAt(a));return n}const tn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function en(t){t.length%4===0&&(t=t.replace(/==?$/,""));let e="",n=0,r=0;for(let a=0;a<t.length;a++)n<<=6,n|=tn.indexOf(t[a]),r+=6,r===24&&(e+=String.fromCharCode((n&16711680)>>16),e+=String.fromCharCode((n&65280)>>8),e+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,e+=String.fromCharCode(n)):r===18&&(n>>=2,e+=String.fromCharCode((n&65280)>>8),e+=String.fromCharCode(n&255)),e}const nn=-1,rn=-2,an=-3,on=-4,sn=-5,cn=-6;function ln(t,e){if(typeof t=="number")return a(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const n=t,r=Array(n.length);function a(s,i=!1){if(s===nn)return;if(s===an)return NaN;if(s===on)return 1/0;if(s===sn)return-1/0;if(s===cn)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],f=e==null?void 0:e[c];if(f)return r[s]=f(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const u=new Set;r[s]=u;for(let l=1;l<o.length;l+=1)u.add(a(o[l]));break;case"Map":const p=new Map;r[s]=p;for(let l=1;l<o.length;l+=2)p.set(a(o[l]),a(o[l+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const y=Object.create(null);r[s]=y;for(let l=1;l<o.length;l+=2)y[o[l]]=a(o[l+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const l=globalThis[c],m=o[1],d=Qt(m),h=new l(d);r[s]=h;break}case"ArrayBuffer":{const l=o[1],m=Qt(l);r[s]=m;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let f=0;f<o.length;f+=1){const u=o[f];u!==rn&&(c[f]=a(u))}}else{const c={};r[s]=c;for(const f in o){const u=o[f];c[f]=a(u)}}return r[s]}return a(0)}const we=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...we];const fn=new Set([...we]);[...fn];function un(t){return t.filter(e=>e!=null)}class bt{constructor(e,n){this.status=e,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class jt{constructor(e,n){this.status=e,this.location=n}}class $t extends Error{constructor(e,n,r){super(r),this.status=e,this.text=n}}const hn="x-sveltekit-invalidated",dn="x-sveltekit-trailing-slash";function dt(t){return t instanceof bt||t instanceof $t?t.status:500}function pn(t){return t instanceof $t?t.text:"Internal Error"}let U,X,Ut;const gn=zt.toString().includes("$$")||/function \w+\(\) \{\}/.test(zt.toString());var tt,et,nt,rt,at,ot,st,it,ie,ct,ce,lt,le;gn?(U={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},X={current:null},Ut={current:!1}):(U=new(ie=class{constructor(){P(this,tt,C({}));P(this,et,C(null));P(this,nt,C(null));P(this,rt,C({}));P(this,at,C({id:null}));P(this,ot,C({}));P(this,st,C(-1));P(this,it,C(new URL("https://example.com")))}get data(){return O(A(this,tt))}set data(e){N(A(this,tt),e)}get form(){return O(A(this,et))}set form(e){N(A(this,et),e)}get error(){return O(A(this,nt))}set error(e){N(A(this,nt),e)}get params(){return O(A(this,rt))}set params(e){N(A(this,rt),e)}get route(){return O(A(this,at))}set route(e){N(A(this,at),e)}get state(){return O(A(this,ot))}set state(e){N(A(this,ot),e)}get status(){return O(A(this,st))}set status(e){N(A(this,st),e)}get url(){return O(A(this,it))}set url(e){N(A(this,it),e)}},tt=new WeakMap,et=new WeakMap,nt=new WeakMap,rt=new WeakMap,at=new WeakMap,ot=new WeakMap,st=new WeakMap,it=new WeakMap,ie),X=new(ce=class{constructor(){P(this,ct,C(null))}get current(){return O(A(this,ct))}set current(e){N(A(this,ct),e)}},ct=new WeakMap,ce),Ut=new(le=class{constructor(){P(this,lt,C(!1))}get current(){return O(A(this,lt))}set current(e){N(A(this,lt),e)}},lt=new WeakMap,le),ye.v=()=>Ut.current=!0);function mn(t){Object.assign(U,t)}const yn="/__data.json",wn=".html__data.json";function _n(t){return t.endsWith(".html")?t.replace(/\.html$/,wn):t.replace(/\/$/,"")+yn}const vn=new Set(["icon","shortcut icon","apple-touch-icon"]),V=fe(he)??{},Z=fe(ue)??{},$={url:Zt({}),page:Zt({}),navigating:Ct(null),updated:Qe()};function Dt(t){V[t]=Nt()}function bn(t,e){let n=t+1;for(;V[n];)delete V[n],n+=1;for(n=e+1;Z[n];)delete Z[n],n+=1}function q(t){return location.href=t.href,new Promise(()=>{})}async function _e(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(x||"/");t&&await t.update()}}function te(){}let Ft,xt,pt,j,Pt,k;const gt=[],mt=[];let L=null;const ve=new Set,An=new Set,Y=new Set;let v={branch:[],error:null,url:null},Vt=!1,yt=!1,ee=!0,Q=!1,H=!1,be=!1,Bt=!1,Ae,R,T,F;const z=new Set;async function Vn(t,e,n){var a,s,i,o;document.URL!==location.href&&(location.href=location.href),k=t,await((s=(a=t.hooks).init)==null?void 0:s.call(a)),Ft=Je(t),j=document.documentElement,Pt=e,xt=t.nodes[0],pt=t.nodes[1],xt(),pt(),R=(i=history.state)==null?void 0:i[G],T=(o=history.state)==null?void 0:o[J],R||(R=T=Date.now(),history.replaceState({...history.state,[G]:R,[J]:T},""));const r=V[R];r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y)),n?await Cn(Pt,n):await Tn(k.hash?Pe(new URL(location.href)):location.href,{replaceState:!0}),Pn()}function kn(){gt.length=0,Bt=!1}function ke(t){mt.some(e=>e==null?void 0:e.snapshot)&&(Z[t]=mt.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function Se(t){var e;(e=Z[t])==null||e.forEach((n,r)=>{var a,s;(s=(a=mt[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function ne(){Dt(R),Jt(he,V),ke(T),Jt(ue,Z)}async function Gt(t,e,n,r){return K({type:"goto",url:pe(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:r,accept:()=>{e.invalidateAll&&(Bt=!0),e.invalidate&&e.invalidate.forEach(xn)}})}async function Sn(t){if(t.id!==(L==null?void 0:L.id)){const e={};z.add(e),L={id:t.id,token:e,promise:Re({...t,preload:e}).then(n=>(z.delete(e),n.type==="loaded"&&n.state.error&&(L=null),n))}}return L.promise}async function Lt(t){var n;const e=(n=await kt(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].map(r=>r==null?void 0:r[1]()))}function Ee(t,e,n){var s;v=t.state;const r=document.querySelector("style[data-sveltekit]");r&&r.remove(),Object.assign(U,t.props.page),Ae=new k.root({target:e,props:{...t.props,stores:$,components:mt},hydrate:n,sync:!1}),Se(T);const a={from:null,to:{params:v.params,route:{id:((s=v.route)==null?void 0:s.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};Y.forEach(i=>i(a)),yt=!0}function wt({url:t,params:e,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(x&&(t.pathname===x||t.pathname===x+"/"))o="always";else for(const l of n)(l==null?void 0:l.slash)!==void 0&&(o=l.slash);t.pathname=je(t.pathname,o),t.search=t.search;const c={type:"loaded",state:{url:t,params:e,branch:n,error:a,route:s},props:{constructors:un(n).map(l=>l.node.component),page:Ht(U)}};i!==void 0&&(c.props.form=i);let f={},u=!U,p=0;for(let l=0;l<Math.max(n.length,v.branch.length);l+=1){const m=n[l],d=v.branch[l];(m==null?void 0:m.data)!==(d==null?void 0:d.data)&&(u=!0),m&&(f={...f,...m.data},u&&(c.props[`data_${p}`]=f),p+=1)}return(!v.url||t.href!==v.url.href||v.error!==a||i!==void 0&&i!==U.form||u)&&(c.props.page={error:a,params:e,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(t),form:i??null,data:u?f:U.data}),c}async function Mt({loader:t,parent:e,url:n,params:r,route:a,server_data_node:s}){var u,p,y;let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},f=await t();if((u=f.universal)!=null&&u.load){let l=function(...d){for(const h of d){const{href:w}=new URL(h,n);c.dependencies.add(w)}};const m={route:new Proxy(a,{get:(d,h)=>(o&&(c.route=!0),d[h])}),params:new Proxy(r,{get:(d,h)=>(o&&c.params.add(h),d[h])}),data:(s==null?void 0:s.data)??null,url:Fe(n,()=>{o&&(c.url=!0)},d=>{o&&c.search_params.add(d)},k.hash),async fetch(d,h){let w;d instanceof Request?(w=d.url,h={body:d.method==="GET"||d.method==="HEAD"?void 0:await d.blob(),cache:d.cache,credentials:d.credentials,headers:[...d.headers].length?d.headers:void 0,integrity:d.integrity,keepalive:d.keepalive,method:d.method,mode:d.mode,redirect:d.redirect,referrer:d.referrer,referrerPolicy:d.referrerPolicy,signal:d.signal,...h}):w=d;const S=new URL(w,n);return o&&l(S.href),S.origin===n.origin&&(w=S.href.slice(n.origin.length)),yt?qe(w,S.href,h):Me(w,h)},setHeaders:()=>{},depends:l,parent(){return o&&(c.parent=!0),e()},untrack(d){o=!1;try{return d()}finally{o=!0}}};i=await f.universal.load.call(null,m)??null}return{node:f,loader:t,server:s,universal:(p=f.universal)!=null&&p.load?{type:"data",data:i,uses:c}:null,data:i??(s==null?void 0:s.data)??null,slash:((y=f.universal)==null?void 0:y.trailingSlash)??(s==null?void 0:s.slash)}}function re(t,e,n,r,a,s){if(Bt)return!0;if(!a)return!1;if(a.parent&&t||a.route&&e||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==v.params[i])return!0;for(const i of a.dependencies)if(gt.some(o=>o(new URL(i))))return!0;return!1}function qt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function En(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const r of n){const a=t.searchParams.getAll(r),s=e.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function ae({error:t,url:e,route:n,params:r}){return{type:"loaded",state:{error:t,url:e,route:n,params:r,branch:[]},props:{page:Ht(U),constructors:[]}}}async function Re({id:t,invalidating:e,url:n,params:r,route:a,preload:s}){if((L==null?void 0:L.id)===t)return z.delete(L.token),L.promise;const{errors:i,layouts:o,leaf:c}=a,f=[...o,c];i.forEach(g=>g==null?void 0:g().catch(()=>{})),f.forEach(g=>g==null?void 0:g[1]().catch(()=>{}));let u=null;const p=v.url?t!==_t(v.url):!1,y=v.route?a.id!==v.route.id:!1,l=En(v.url,n);let m=!1;const d=f.map((g,_)=>{var D;const b=v.branch[_],E=!!(g!=null&&g[0])&&((b==null?void 0:b.loader)!==g[1]||re(m,y,p,l,(D=b.server)==null?void 0:D.uses,r));return E&&(m=!0),E});if(d.some(Boolean)){try{u=await Le(n,d)}catch(g){const _=await M(g,{url:n,params:r,route:{id:t}});return z.has(s)?ae({error:_,url:n,params:r,route:a}):At({status:dt(g),error:_,url:n,route:a})}if(u.type==="redirect")return u}const h=u==null?void 0:u.nodes;let w=!1;const S=f.map(async(g,_)=>{var St;if(!g)return;const b=v.branch[_],E=h==null?void 0:h[_];if((!E||E.type==="skip")&&g[1]===(b==null?void 0:b.loader)&&!re(w,y,p,l,(St=b.universal)==null?void 0:St.uses,r))return b;if(w=!0,(E==null?void 0:E.type)==="error")throw E;return Mt({loader:g[1],url:n,params:r,route:a,parent:async()=>{var Wt;const Kt={};for(let Et=0;Et<_;Et+=1)Object.assign(Kt,(Wt=await S[Et])==null?void 0:Wt.data);return Kt},server_data_node:qt(E===void 0&&g[0]?{type:"skip"}:E??null,g[0]?b==null?void 0:b.server:void 0)})});for(const g of S)g.catch(()=>{});const I=[];for(let g=0;g<f.length;g+=1)if(f[g])try{I.push(await S[g])}catch(_){if(_ instanceof jt)return{type:"redirect",location:_.location};if(z.has(s))return ae({error:await M(_,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=dt(_),E;if(h!=null&&h.includes(_))b=_.status??b,E=_.error;else if(_ instanceof bt)E=_.body;else{if(await $.updated.check())return await _e(),await q(n);E=await M(_,{params:r,url:n,route:{id:a.id}})}const D=await Rn(g,I,i);return D?wt({url:n,params:r,branch:I.slice(0,D.idx).concat(D.node),status:b,error:E,route:a}):await Ue(n,{id:a.id},E,b)}else I.push(void 0);return wt({url:n,params:r,branch:I,status:200,error:null,route:a,form:e?void 0:null})}async function Rn(t,e,n){for(;t--;)if(n[t]){let r=t;for(;!e[r];)r-=1;try{return{idx:r+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function At({status:t,error:e,url:n,route:r}){const a={};let s=null;if(k.server_loads[0]===0)try{const o=await Le(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==ft||n.pathname!==location.pathname||Vt)&&await q(n)}try{const o=await Mt({loader:xt,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:qt(s)}),c={node:await pt(),loader:pt,universal:null,server:null,data:null};return wt({url:n,params:a,branch:[o,c],status:t,error:e,route:null})}catch(o){if(o instanceof jt)return Gt(new URL(o.location,location.href),{},0);throw o}}function In(t){let e;try{if(e=k.hooks.reroute({url:new URL(t)})??t,typeof e=="string"){const n=new URL(t);k.hash?n.hash=e:n.pathname=e,e=n}}catch{return}return e}async function kt(t,e){if(t&&!vt(t,x,k.hash)){const n=In(t);if(!n)return;const r=Un(n);for(const a of Ft){const s=a.exec(r);if(s)return{id:_t(t),invalidating:e,route:a,params:De(s),url:t}}}}function Un(t){return $e(k.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(x.length))||"/"}function _t(t){return(k.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function Ie({url:t,type:e,intent:n,delta:r}){let a=!1;const s=xe(v,n,t,e);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return Q||ve.forEach(o=>o(i)),a?null:s}async function K({type:t,url:e,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:f=te,block:u=te}){const p=F;F=c;const y=await kt(e,!1),l=Ie({url:e,type:t,delta:n==null?void 0:n.delta,intent:y});if(!l){u(),F===c&&(F=p);return}const m=R,d=T;f(),Q=!0,yt&&$.navigating.set(X.current=l.navigation);let h=y&&await Re(y);if(!h){if(vt(e,x,k.hash))return await q(e);h=await Ue(e,{id:null},await M(new $t(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404)}if(e=(y==null?void 0:y.url)||e,F!==c)return l.reject(new Error("navigation aborted")),!1;if(h.type==="redirect")if(o>=20)h=await At({status:500,error:await M(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}});else return await Gt(new URL(h.location,e).href,{},o+1,c),!1;else h.props.page.status>=400&&await $.updated.check()&&(await _e(),await q(e));if(kn(),Dt(m),ke(d),h.props.page.url.pathname!==e.pathname&&(e.pathname=h.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,_={[G]:R+=g,[J]:T+=g,[de]:i};(s?history.replaceState:history.pushState).call(history,_,"",e),s||bn(R,T)}if(L=null,h.props.page.state=i,yt){v=h.state,h.props.page&&(h.props.page.url=e);const g=(await Promise.all(Array.from(An,_=>_(l.navigation)))).filter(_=>typeof _=="function");if(g.length>0){let _=function(){g.forEach(b=>{Y.delete(b)})};g.push(_),g.forEach(b=>{Y.add(b)})}Ae.$set(h.props),mn(h.props.page),be=!0}else Ee(h,Pt,!1);const{activeElement:w}=document;await Oe();const S=n?n.scroll:a?Nt():null;if(ee){const g=e.hash&&document.getElementById(decodeURIComponent(k.hash?e.hash.split("#")[2]??"":e.hash.slice(1)));S?scrollTo(S.x,S.y):g?g.scrollIntoView():scrollTo(0,0)}const I=document.activeElement!==w&&document.activeElement!==document.body;!r&&!I&&On(),ee=!0,h.props.page&&Object.assign(U,h.props.page),Q=!1,t==="popstate"&&Se(T),l.fulfil(void 0),Y.forEach(g=>g(l.navigation)),$.navigating.set(X.current=null)}async function Ue(t,e,n,r){return t.origin===ft&&t.pathname===location.pathname&&!Vt?await At({status:r,error:n,url:t,route:e}):await q(t)}function Ln(){let t,e;j.addEventListener("mousemove",i=>{const o=i.target;clearTimeout(t),t=setTimeout(()=>{a(o,2)},20)});function n(i){i.defaultPrevented||a(i.composedPath()[0],1)}j.addEventListener("mousedown",n),j.addEventListener("touchstart",n,{passive:!0});const r=new IntersectionObserver(i=>{for(const o of i)o.isIntersecting&&(Lt(new URL(o.target.href)),r.unobserve(o.target))},{threshold:0});async function a(i,o){const c=me(i,j);if(!c||c===e)return;e=c;const{url:f,external:u,download:p}=Tt(c,x,k.hash);if(u||p)return;const y=ht(c),l=f&&_t(v.url)===_t(f);if(!y.reload&&!l)if(o<=y.preload_data){const m=await kt(f,!1);m&&Sn(m)}else o<=y.preload_code&&Lt(f)}function s(){r.disconnect();for(const i of j.querySelectorAll("a")){const{url:o,external:c,download:f}=Tt(i,x,k.hash);if(c||f)continue;const u=ht(i);u.reload||(u.preload_code===ut.viewport&&r.observe(i),u.preload_code===ut.eager&&Lt(o))}}Y.add(s),s()}function M(t,e){if(t instanceof bt)return t.body;const n=dt(t),r=pn(t);return k.hooks.handleError({error:t,event:e,status:n,message:r})??{message:r}}function Tn(t,e={}){return t=new URL(pe(t)),t.origin!==ft?Promise.reject(new Error("goto: invalid URL")):Gt(t,e,0)}function xn(t){if(typeof t=="function")gt.push(t);else{const{href:e}=new URL(t,location.href);gt.push(n=>n.href===e)}}function Pn(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(ne(),!Q){const a=xe(v,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};ve.forEach(i=>i(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ne()}),(e=navigator.connection)!=null&&e.saveData||Ln(),j.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=me(n.composedPath()[0],j);if(!r)return;const{url:a,external:s,target:i,download:o}=Tt(r,x,k.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=ht(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[u,p]=(k.hash?a.hash.replace(/^#/,""):a.href).split("#"),y=u===Rt(location);if(s||c.reload&&(!y||!p)){Ie({url:a,type:"link"})?Q=!0:n.preventDefault();return}if(p!==void 0&&y){const[,l]=v.url.href.split("#");if(l===p){if(n.preventDefault(),p===""||p==="top"&&r.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const m=r.ownerDocument.getElementById(decodeURIComponent(p));m&&(m.scrollIntoView(),m.focus())}return}if(H=!0,Dt(R),t(a),!c.replace_state)return;H=!1}n.preventDefault(),await new Promise(l=>{requestAnimationFrame(()=>{setTimeout(l,0)}),setTimeout(l,100)}),await K({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href})}),j.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const o=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(vt(o,x,!1))return;const c=n.target,f=ht(c);if(f.reload)return;n.preventDefault(),n.stopPropagation();const u=new FormData(c),p=a==null?void 0:a.getAttribute("name");p&&u.append(p,(a==null?void 0:a.getAttribute("value"))??""),o.search=new URLSearchParams(u).toString(),K({type:"form",url:o,keepfocus:f.keepfocus,noscroll:f.noscroll,replace_state:f.replace_state??o.href===location.href})}),addEventListener("popstate",async n=>{var r;if((r=n.state)!=null&&r[G]){const a=n.state[G];if(F={},a===R)return;const s=V[a],i=n.state[de]??{},o=new URL(n.state[Ze]??location.href),c=n.state[J],f=v.url?Rt(location)===Rt(v.url):!1;if(c===T&&(be||f)){i!==U.state&&(U.state=i),t(o),V[R]=Nt(),s&&scrollTo(s.x,s.y),R=a;return}const p=a-R;await K({type:"popstate",url:o,popped:{state:i,scroll:s,delta:p},accept:()=>{R=a,T=c},block:()=>{history.go(-p)},nav_token:F})}else if(!H){const a=new URL(location.href);t(a)}}),addEventListener("hashchange",()=>{H?(H=!1,history.replaceState({...history.state,[G]:++R,[J]:T},"",location.href)):k.hash&&v.url.hash===location.hash&&K({type:"goto",url:Pe(v.url)})});for(const n of document.querySelectorAll("link"))vn.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&$.navigating.set(X.current=null)});function t(n){v.url=U.url=n,$.page.set(Ht(U)),$.page.notify()}}async function Cn(t,{status:e=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){Vt=!0;const f=new URL(location.href);let u;({params:a={},route:s={id:null}}=await kt(f,!1)||{}),u=Ft.find(({id:l})=>l===s.id);let p,y=!0;try{const l=r.map(async(d,h)=>{const w=o[h];return w!=null&&w.uses&&(w.uses=Te(w.uses)),Mt({loader:k.nodes[d],url:f,params:a,route:s,parent:async()=>{const S={};for(let I=0;I<h;I+=1)Object.assign(S,(await l[I]).data);return S},server_data_node:qt(w)})}),m=await Promise.all(l);if(u){const d=u.layouts;for(let h=0;h<d.length;h++)d[h]||m.splice(h,0,void 0)}p=wt({url:f,params:a,branch:m,status:e,error:n,form:c,route:u??null})}catch(l){if(l instanceof jt){await q(new URL(l.location,location.href));return}p=await At({status:dt(l),error:await M(l,{url:f,params:a,route:s}),url:f,route:s}),t.textContent="",y=!1}p.props.page&&(p.props.page.state={}),Ee(p,t,y)}async function Le(t,e){var s;const n=new URL(t);n.pathname=_n(t.pathname),t.pathname.endsWith("/")&&n.searchParams.append(dn,"1"),n.searchParams.append(hn,e.map(i=>i?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let i;throw(s=a.headers.get("content-type"))!=null&&s.includes("application/json")?i=await a.json():a.status===404?i="Not Found":a.status===500&&(i="Internal Error"),new bt(a.status,i)}return new Promise(async i=>{var y;const o=new Map,c=a.body.getReader(),f=new TextDecoder;function u(l){return ln(l,{...k.decoders,Promise:m=>new Promise((d,h)=>{o.set(m,{fulfil:d,reject:h})})})}let p="";for(;;){const{done:l,value:m}=await c.read();if(l&&!p)break;for(p+=!m&&p?`
|
|
1
|
+
var Wt=t=>{throw TypeError(t)};var Ce=(t,e,n)=>e.has(t)||Wt("Cannot "+n);var A=(t,e,n)=>(Ce(t,e,"read from private field"),n?n.call(t):e.get(t)),P=(t,e,n)=>e.has(t)?Wt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{w as Ct,o as Yt,au as C,g as O,s as N,z as Oe}from"./BAACMRH5.js";const Ne="1784391632626";new URL("sveltekit-internal://");function je(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function $e(t){return t.split("%25").map(decodeURI).join("%25")}function De(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function Rt({href:t}){return t.split("#")[0]}function Fe(t,e,n,r=!1){const a=new URL(t);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return f=>(n(f),i[o](f));e();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return e(),t[i]},enumerable:!0,configurable:!0});return a}function Ve(...t){let e=5381;for(const n of t)if(typeof n=="string"){let r=n.length;for(;r;)e=e*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)e=e*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}function Be(t){const e=atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n.buffer}const qe=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&z.delete(Ot(t)),qe(t,e));const z=new Map;function Ge(t,e){const n=Ot(t,e),r=document.querySelector(n);if(r!=null&&r.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&z.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=Be(a)),Promise.resolve(new Response(a,s))}return window.fetch(t,e)}function Me(t,e,n){if(z.size>0){const r=Ot(t,n),a=z.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);z.delete(r)}}return window.fetch(e,n)}function Ot(t,e){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const a=[];e.headers&&a.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&a.push(e.body),r+=`[data-hash="${Ve(...a)}"]`}return r}const He=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Ke(t){const e=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${We(t).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return e.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return e.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,f)=>{if(f%2){if(c.startsWith("x+"))return It(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return It(String.fromCharCode(...c.slice(2).split("-").map(d=>parseInt(d,16))));const u=He.exec(c),[,p,y,l,m]=u;return e.push({name:l,matcher:m,optional:!!p,rest:!!y,chained:y?f===1&&i[0]==="":!1}),y?"(.*?)":p?"([^/]*)?":"([^/]+?)"}return It(c)}).join("")}).join("")}/?$`),params:e}}function ze(t){return!/^\([^)]+\)$/.test(t)}function We(t){return t.slice(1).split("/").filter(ze)}function Ye(t,e,n){const r={},a=t.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<e.length;o+=1){const c=e[o];let f=a[o-i];if(c.chained&&c.rest&&i&&(f=a.slice(o-i,o+1).filter(u=>u).join("/"),i=0),f===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](f)){r[c.name]=f;const u=e[o+1],p=a[o+1];u&&!u.rest&&u.optional&&p&&c.chained&&(i=0),!u&&!p&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function It(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Je({nodes:t,server_loads:e,dictionary:n,matchers:r}){const a=new Set(e);return Object.entries(n).map(([o,[c,f,u]])=>{const{pattern:p,params:y}=Ke(o),l={id:o,exec:m=>{const d=p.exec(m);if(d)return Ye(d,y,r)},errors:[1,...u||[]].map(m=>t[m]),layouts:[0,...f||[]].map(i),leaf:s(c)};return l.errors.length=l.layouts.length=Math.max(l.errors.length,l.layouts.length),l});function s(o){const c=o<0;return c&&(o=~o),[c,t[o]]}function i(o){return o===void 0?o:[a.has(o),t[o]]}}function fe(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function Jt(t,e,n=JSON.stringify){const r=n(e);try{sessionStorage[t]=r}catch{}}var oe;const x=((oe=globalThis.__sveltekit_1m6qzpt)==null?void 0:oe.base)??"";var se;const Xe=((se=globalThis.__sveltekit_1m6qzpt)==null?void 0:se.assets)??x,ue="sveltekit:snapshot",he="sveltekit:scroll",de="sveltekit:states",Ze="sveltekit:pageurl",q="sveltekit:history",J="sveltekit:navigation",ut={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ft=location.origin;function pe(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function Nt(){return{x:pageXOffset,y:pageYOffset}}function B(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const Xt={...ut,"":ut.hover};function ge(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function me(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=ge(t)}}function Tt(t,e,n){let r;try{if(r=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,s=!r||!!a||vt(r,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(r==null?void 0:r.origin)===ft&&t.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function ht(t){let e=null,n=null,r=null,a=null,s=null,i=null,o=t;for(;o&&o!==document.documentElement;)r===null&&(r=B(o,"preload-code")),a===null&&(a=B(o,"preload-data")),e===null&&(e=B(o,"keepfocus")),n===null&&(n=B(o,"noscroll")),s===null&&(s=B(o,"reload")),i===null&&(i=B(o,"replacestate")),o=ge(o);function c(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Xt[r??"off"],preload_data:Xt[a??"off"],keepfocus:c(e),noscroll:c(n),reload:c(s),replace_state:c(i)}}function Zt(t){const e=Ct(t);let n=!0;function r(){n=!0,e.update(i=>i)}function a(i){n=!1,e.set(i)}function s(i){let o;return e.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const ye={v:()=>{}};function Qe(){const{set:t,subscribe:e}=Ct(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Xe}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Ne;return i&&(t(!0),ye.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:e,check:r}}function vt(t,e,n){return t.origin!==ft||!t.pathname.startsWith(e)?!0:n?!(t.pathname===e+"/"||t.pathname===e+"/index.html"||t.protocol==="file:"&&t.pathname.replace(/\/[^/]+\.html?$/,"")===e):!1}function Qt(t){const e=en(t),n=new ArrayBuffer(e.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,e.charCodeAt(a));return n}const tn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function en(t){t.length%4===0&&(t=t.replace(/==?$/,""));let e="",n=0,r=0;for(let a=0;a<t.length;a++)n<<=6,n|=tn.indexOf(t[a]),r+=6,r===24&&(e+=String.fromCharCode((n&16711680)>>16),e+=String.fromCharCode((n&65280)>>8),e+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,e+=String.fromCharCode(n)):r===18&&(n>>=2,e+=String.fromCharCode((n&65280)>>8),e+=String.fromCharCode(n&255)),e}const nn=-1,rn=-2,an=-3,on=-4,sn=-5,cn=-6;function ln(t,e){if(typeof t=="number")return a(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const n=t,r=Array(n.length);function a(s,i=!1){if(s===nn)return;if(s===an)return NaN;if(s===on)return 1/0;if(s===sn)return-1/0;if(s===cn)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],f=e==null?void 0:e[c];if(f)return r[s]=f(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const u=new Set;r[s]=u;for(let l=1;l<o.length;l+=1)u.add(a(o[l]));break;case"Map":const p=new Map;r[s]=p;for(let l=1;l<o.length;l+=2)p.set(a(o[l]),a(o[l+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const y=Object.create(null);r[s]=y;for(let l=1;l<o.length;l+=2)y[o[l]]=a(o[l+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const l=globalThis[c],m=o[1],d=Qt(m),h=new l(d);r[s]=h;break}case"ArrayBuffer":{const l=o[1],m=Qt(l);r[s]=m;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let f=0;f<o.length;f+=1){const u=o[f];u!==rn&&(c[f]=a(u))}}else{const c={};r[s]=c;for(const f in o){const u=o[f];c[f]=a(u)}}return r[s]}return a(0)}const we=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...we];const fn=new Set([...we]);[...fn];function un(t){return t.filter(e=>e!=null)}class bt{constructor(e,n){this.status=e,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class jt{constructor(e,n){this.status=e,this.location=n}}class $t extends Error{constructor(e,n,r){super(r),this.status=e,this.text=n}}const hn="x-sveltekit-invalidated",dn="x-sveltekit-trailing-slash";function dt(t){return t instanceof bt||t instanceof $t?t.status:500}function pn(t){return t instanceof $t?t.text:"Internal Error"}let U,X,Ut;const gn=Yt.toString().includes("$$")||/function \w+\(\) \{\}/.test(Yt.toString());var tt,et,nt,rt,at,ot,st,it,ie,ct,ce,lt,le;gn?(U={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},X={current:null},Ut={current:!1}):(U=new(ie=class{constructor(){P(this,tt,C({}));P(this,et,C(null));P(this,nt,C(null));P(this,rt,C({}));P(this,at,C({id:null}));P(this,ot,C({}));P(this,st,C(-1));P(this,it,C(new URL("https://example.com")))}get data(){return O(A(this,tt))}set data(e){N(A(this,tt),e)}get form(){return O(A(this,et))}set form(e){N(A(this,et),e)}get error(){return O(A(this,nt))}set error(e){N(A(this,nt),e)}get params(){return O(A(this,rt))}set params(e){N(A(this,rt),e)}get route(){return O(A(this,at))}set route(e){N(A(this,at),e)}get state(){return O(A(this,ot))}set state(e){N(A(this,ot),e)}get status(){return O(A(this,st))}set status(e){N(A(this,st),e)}get url(){return O(A(this,it))}set url(e){N(A(this,it),e)}},tt=new WeakMap,et=new WeakMap,nt=new WeakMap,rt=new WeakMap,at=new WeakMap,ot=new WeakMap,st=new WeakMap,it=new WeakMap,ie),X=new(ce=class{constructor(){P(this,ct,C(null))}get current(){return O(A(this,ct))}set current(e){N(A(this,ct),e)}},ct=new WeakMap,ce),Ut=new(le=class{constructor(){P(this,lt,C(!1))}get current(){return O(A(this,lt))}set current(e){N(A(this,lt),e)}},lt=new WeakMap,le),ye.v=()=>Ut.current=!0);function mn(t){Object.assign(U,t)}const yn="/__data.json",wn=".html__data.json";function _n(t){return t.endsWith(".html")?t.replace(/\.html$/,wn):t.replace(/\/$/,"")+yn}const vn=new Set(["icon","shortcut icon","apple-touch-icon"]),V=fe(he)??{},Z=fe(ue)??{},$={url:Zt({}),page:Zt({}),navigating:Ct(null),updated:Qe()};function Dt(t){V[t]=Nt()}function bn(t,e){let n=t+1;for(;V[n];)delete V[n],n+=1;for(n=e+1;Z[n];)delete Z[n],n+=1}function M(t){return location.href=t.href,new Promise(()=>{})}async function _e(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(x||"/");t&&await t.update()}}function te(){}let Ft,xt,pt,j,Pt,k;const gt=[],mt=[];let L=null;const ve=new Set,An=new Set,W=new Set;let v={branch:[],error:null,url:null},Vt=!1,yt=!1,ee=!0,Q=!1,H=!1,be=!1,Bt=!1,Ae,R,T,F;const Y=new Set;async function Vn(t,e,n){var a,s,i,o;document.URL!==location.href&&(location.href=location.href),k=t,await((s=(a=t.hooks).init)==null?void 0:s.call(a)),Ft=Je(t),j=document.documentElement,Pt=e,xt=t.nodes[0],pt=t.nodes[1],xt(),pt(),R=(i=history.state)==null?void 0:i[q],T=(o=history.state)==null?void 0:o[J],R||(R=T=Date.now(),history.replaceState({...history.state,[q]:R,[J]:T},""));const r=V[R];r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y)),n?await Cn(Pt,n):await Tn(k.hash?Pe(new URL(location.href)):location.href,{replaceState:!0}),Pn()}function kn(){gt.length=0,Bt=!1}function ke(t){mt.some(e=>e==null?void 0:e.snapshot)&&(Z[t]=mt.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function Se(t){var e;(e=Z[t])==null||e.forEach((n,r)=>{var a,s;(s=(a=mt[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function ne(){Dt(R),Jt(he,V),ke(T),Jt(ue,Z)}async function qt(t,e,n,r){return K({type:"goto",url:pe(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:r,accept:()=>{e.invalidateAll&&(Bt=!0),e.invalidate&&e.invalidate.forEach(xn)}})}async function Sn(t){if(t.id!==(L==null?void 0:L.id)){const e={};Y.add(e),L={id:t.id,token:e,promise:Re({...t,preload:e}).then(n=>(Y.delete(e),n.type==="loaded"&&n.state.error&&(L=null),n))}}return L.promise}async function Lt(t){var n;const e=(n=await kt(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].map(r=>r==null?void 0:r[1]()))}function Ee(t,e,n){var s;v=t.state;const r=document.querySelector("style[data-sveltekit]");r&&r.remove(),Object.assign(U,t.props.page),Ae=new k.root({target:e,props:{...t.props,stores:$,components:mt},hydrate:n,sync:!1}),Se(T);const a={from:null,to:{params:v.params,route:{id:((s=v.route)==null?void 0:s.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};W.forEach(i=>i(a)),yt=!0}function wt({url:t,params:e,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(x&&(t.pathname===x||t.pathname===x+"/"))o="always";else for(const l of n)(l==null?void 0:l.slash)!==void 0&&(o=l.slash);t.pathname=je(t.pathname,o),t.search=t.search;const c={type:"loaded",state:{url:t,params:e,branch:n,error:a,route:s},props:{constructors:un(n).map(l=>l.node.component),page:Ht(U)}};i!==void 0&&(c.props.form=i);let f={},u=!U,p=0;for(let l=0;l<Math.max(n.length,v.branch.length);l+=1){const m=n[l],d=v.branch[l];(m==null?void 0:m.data)!==(d==null?void 0:d.data)&&(u=!0),m&&(f={...f,...m.data},u&&(c.props[`data_${p}`]=f),p+=1)}return(!v.url||t.href!==v.url.href||v.error!==a||i!==void 0&&i!==U.form||u)&&(c.props.page={error:a,params:e,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(t),form:i??null,data:u?f:U.data}),c}async function Gt({loader:t,parent:e,url:n,params:r,route:a,server_data_node:s}){var u,p,y;let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},f=await t();if((u=f.universal)!=null&&u.load){let l=function(...d){for(const h of d){const{href:w}=new URL(h,n);c.dependencies.add(w)}};const m={route:new Proxy(a,{get:(d,h)=>(o&&(c.route=!0),d[h])}),params:new Proxy(r,{get:(d,h)=>(o&&c.params.add(h),d[h])}),data:(s==null?void 0:s.data)??null,url:Fe(n,()=>{o&&(c.url=!0)},d=>{o&&c.search_params.add(d)},k.hash),async fetch(d,h){let w;d instanceof Request?(w=d.url,h={body:d.method==="GET"||d.method==="HEAD"?void 0:await d.blob(),cache:d.cache,credentials:d.credentials,headers:[...d.headers].length?d.headers:void 0,integrity:d.integrity,keepalive:d.keepalive,method:d.method,mode:d.mode,redirect:d.redirect,referrer:d.referrer,referrerPolicy:d.referrerPolicy,signal:d.signal,...h}):w=d;const S=new URL(w,n);return o&&l(S.href),S.origin===n.origin&&(w=S.href.slice(n.origin.length)),yt?Me(w,S.href,h):Ge(w,h)},setHeaders:()=>{},depends:l,parent(){return o&&(c.parent=!0),e()},untrack(d){o=!1;try{return d()}finally{o=!0}}};i=await f.universal.load.call(null,m)??null}return{node:f,loader:t,server:s,universal:(p=f.universal)!=null&&p.load?{type:"data",data:i,uses:c}:null,data:i??(s==null?void 0:s.data)??null,slash:((y=f.universal)==null?void 0:y.trailingSlash)??(s==null?void 0:s.slash)}}function re(t,e,n,r,a,s){if(Bt)return!0;if(!a)return!1;if(a.parent&&t||a.route&&e||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==v.params[i])return!0;for(const i of a.dependencies)if(gt.some(o=>o(new URL(i))))return!0;return!1}function Mt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function En(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const r of n){const a=t.searchParams.getAll(r),s=e.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function ae({error:t,url:e,route:n,params:r}){return{type:"loaded",state:{error:t,url:e,route:n,params:r,branch:[]},props:{page:Ht(U),constructors:[]}}}async function Re({id:t,invalidating:e,url:n,params:r,route:a,preload:s}){if((L==null?void 0:L.id)===t)return Y.delete(L.token),L.promise;const{errors:i,layouts:o,leaf:c}=a,f=[...o,c];i.forEach(g=>g==null?void 0:g().catch(()=>{})),f.forEach(g=>g==null?void 0:g[1]().catch(()=>{}));let u=null;const p=v.url?t!==_t(v.url):!1,y=v.route?a.id!==v.route.id:!1,l=En(v.url,n);let m=!1;const d=f.map((g,_)=>{var D;const b=v.branch[_],E=!!(g!=null&&g[0])&&((b==null?void 0:b.loader)!==g[1]||re(m,y,p,l,(D=b.server)==null?void 0:D.uses,r));return E&&(m=!0),E});if(d.some(Boolean)){try{u=await Le(n,d)}catch(g){const _=await G(g,{url:n,params:r,route:{id:t}});return Y.has(s)?ae({error:_,url:n,params:r,route:a}):At({status:dt(g),error:_,url:n,route:a})}if(u.type==="redirect")return u}const h=u==null?void 0:u.nodes;let w=!1;const S=f.map(async(g,_)=>{var St;if(!g)return;const b=v.branch[_],E=h==null?void 0:h[_];if((!E||E.type==="skip")&&g[1]===(b==null?void 0:b.loader)&&!re(w,y,p,l,(St=b.universal)==null?void 0:St.uses,r))return b;if(w=!0,(E==null?void 0:E.type)==="error")throw E;return Gt({loader:g[1],url:n,params:r,route:a,parent:async()=>{var zt;const Kt={};for(let Et=0;Et<_;Et+=1)Object.assign(Kt,(zt=await S[Et])==null?void 0:zt.data);return Kt},server_data_node:Mt(E===void 0&&g[0]?{type:"skip"}:E??null,g[0]?b==null?void 0:b.server:void 0)})});for(const g of S)g.catch(()=>{});const I=[];for(let g=0;g<f.length;g+=1)if(f[g])try{I.push(await S[g])}catch(_){if(_ instanceof jt)return{type:"redirect",location:_.location};if(Y.has(s))return ae({error:await G(_,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=dt(_),E;if(h!=null&&h.includes(_))b=_.status??b,E=_.error;else if(_ instanceof bt)E=_.body;else{if(await $.updated.check())return await _e(),await M(n);E=await G(_,{params:r,url:n,route:{id:a.id}})}const D=await Rn(g,I,i);return D?wt({url:n,params:r,branch:I.slice(0,D.idx).concat(D.node),status:b,error:E,route:a}):await Ue(n,{id:a.id},E,b)}else I.push(void 0);return wt({url:n,params:r,branch:I,status:200,error:null,route:a,form:e?void 0:null})}async function Rn(t,e,n){for(;t--;)if(n[t]){let r=t;for(;!e[r];)r-=1;try{return{idx:r+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function At({status:t,error:e,url:n,route:r}){const a={};let s=null;if(k.server_loads[0]===0)try{const o=await Le(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==ft||n.pathname!==location.pathname||Vt)&&await M(n)}try{const o=await Gt({loader:xt,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Mt(s)}),c={node:await pt(),loader:pt,universal:null,server:null,data:null};return wt({url:n,params:a,branch:[o,c],status:t,error:e,route:null})}catch(o){if(o instanceof jt)return qt(new URL(o.location,location.href),{},0);throw o}}function In(t){let e;try{if(e=k.hooks.reroute({url:new URL(t)})??t,typeof e=="string"){const n=new URL(t);k.hash?n.hash=e:n.pathname=e,e=n}}catch{return}return e}async function kt(t,e){if(t&&!vt(t,x,k.hash)){const n=In(t);if(!n)return;const r=Un(n);for(const a of Ft){const s=a.exec(r);if(s)return{id:_t(t),invalidating:e,route:a,params:De(s),url:t}}}}function Un(t){return $e(k.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(x.length))||"/"}function _t(t){return(k.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function Ie({url:t,type:e,intent:n,delta:r}){let a=!1;const s=xe(v,n,t,e);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return Q||ve.forEach(o=>o(i)),a?null:s}async function K({type:t,url:e,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:f=te,block:u=te}){const p=F;F=c;const y=await kt(e,!1),l=Ie({url:e,type:t,delta:n==null?void 0:n.delta,intent:y});if(!l){u(),F===c&&(F=p);return}const m=R,d=T;f(),Q=!0,yt&&$.navigating.set(X.current=l.navigation);let h=y&&await Re(y);if(!h){if(vt(e,x,k.hash))return await M(e);h=await Ue(e,{id:null},await G(new $t(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404)}if(e=(y==null?void 0:y.url)||e,F!==c)return l.reject(new Error("navigation aborted")),!1;if(h.type==="redirect")if(o>=20)h=await At({status:500,error:await G(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}});else return await qt(new URL(h.location,e).href,{},o+1,c),!1;else h.props.page.status>=400&&await $.updated.check()&&(await _e(),await M(e));if(kn(),Dt(m),ke(d),h.props.page.url.pathname!==e.pathname&&(e.pathname=h.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,_={[q]:R+=g,[J]:T+=g,[de]:i};(s?history.replaceState:history.pushState).call(history,_,"",e),s||bn(R,T)}if(L=null,h.props.page.state=i,yt){v=h.state,h.props.page&&(h.props.page.url=e);const g=(await Promise.all(Array.from(An,_=>_(l.navigation)))).filter(_=>typeof _=="function");if(g.length>0){let _=function(){g.forEach(b=>{W.delete(b)})};g.push(_),g.forEach(b=>{W.add(b)})}Ae.$set(h.props),mn(h.props.page),be=!0}else Ee(h,Pt,!1);const{activeElement:w}=document;await Oe();const S=n?n.scroll:a?Nt():null;if(ee){const g=e.hash&&document.getElementById(decodeURIComponent(k.hash?e.hash.split("#")[2]??"":e.hash.slice(1)));S?scrollTo(S.x,S.y):g?g.scrollIntoView():scrollTo(0,0)}const I=document.activeElement!==w&&document.activeElement!==document.body;!r&&!I&&On(),ee=!0,h.props.page&&Object.assign(U,h.props.page),Q=!1,t==="popstate"&&Se(T),l.fulfil(void 0),W.forEach(g=>g(l.navigation)),$.navigating.set(X.current=null)}async function Ue(t,e,n,r){return t.origin===ft&&t.pathname===location.pathname&&!Vt?await At({status:r,error:n,url:t,route:e}):await M(t)}function Ln(){let t,e;j.addEventListener("mousemove",i=>{const o=i.target;clearTimeout(t),t=setTimeout(()=>{a(o,2)},20)});function n(i){i.defaultPrevented||a(i.composedPath()[0],1)}j.addEventListener("mousedown",n),j.addEventListener("touchstart",n,{passive:!0});const r=new IntersectionObserver(i=>{for(const o of i)o.isIntersecting&&(Lt(new URL(o.target.href)),r.unobserve(o.target))},{threshold:0});async function a(i,o){const c=me(i,j);if(!c||c===e)return;e=c;const{url:f,external:u,download:p}=Tt(c,x,k.hash);if(u||p)return;const y=ht(c),l=f&&_t(v.url)===_t(f);if(!y.reload&&!l)if(o<=y.preload_data){const m=await kt(f,!1);m&&Sn(m)}else o<=y.preload_code&&Lt(f)}function s(){r.disconnect();for(const i of j.querySelectorAll("a")){const{url:o,external:c,download:f}=Tt(i,x,k.hash);if(c||f)continue;const u=ht(i);u.reload||(u.preload_code===ut.viewport&&r.observe(i),u.preload_code===ut.eager&&Lt(o))}}W.add(s),s()}function G(t,e){if(t instanceof bt)return t.body;const n=dt(t),r=pn(t);return k.hooks.handleError({error:t,event:e,status:n,message:r})??{message:r}}function Tn(t,e={}){return t=new URL(pe(t)),t.origin!==ft?Promise.reject(new Error("goto: invalid URL")):qt(t,e,0)}function xn(t){if(typeof t=="function")gt.push(t);else{const{href:e}=new URL(t,location.href);gt.push(n=>n.href===e)}}function Pn(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(ne(),!Q){const a=xe(v,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};ve.forEach(i=>i(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ne()}),(e=navigator.connection)!=null&&e.saveData||Ln(),j.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=me(n.composedPath()[0],j);if(!r)return;const{url:a,external:s,target:i,download:o}=Tt(r,x,k.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=ht(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[u,p]=(k.hash?a.hash.replace(/^#/,""):a.href).split("#"),y=u===Rt(location);if(s||c.reload&&(!y||!p)){Ie({url:a,type:"link"})?Q=!0:n.preventDefault();return}if(p!==void 0&&y){const[,l]=v.url.href.split("#");if(l===p){if(n.preventDefault(),p===""||p==="top"&&r.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const m=r.ownerDocument.getElementById(decodeURIComponent(p));m&&(m.scrollIntoView(),m.focus())}return}if(H=!0,Dt(R),t(a),!c.replace_state)return;H=!1}n.preventDefault(),await new Promise(l=>{requestAnimationFrame(()=>{setTimeout(l,0)}),setTimeout(l,100)}),await K({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href})}),j.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const o=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(vt(o,x,!1))return;const c=n.target,f=ht(c);if(f.reload)return;n.preventDefault(),n.stopPropagation();const u=new FormData(c),p=a==null?void 0:a.getAttribute("name");p&&u.append(p,(a==null?void 0:a.getAttribute("value"))??""),o.search=new URLSearchParams(u).toString(),K({type:"form",url:o,keepfocus:f.keepfocus,noscroll:f.noscroll,replace_state:f.replace_state??o.href===location.href})}),addEventListener("popstate",async n=>{var r;if((r=n.state)!=null&&r[q]){const a=n.state[q];if(F={},a===R)return;const s=V[a],i=n.state[de]??{},o=new URL(n.state[Ze]??location.href),c=n.state[J],f=v.url?Rt(location)===Rt(v.url):!1;if(c===T&&(be||f)){i!==U.state&&(U.state=i),t(o),V[R]=Nt(),s&&scrollTo(s.x,s.y),R=a;return}const p=a-R;await K({type:"popstate",url:o,popped:{state:i,scroll:s,delta:p},accept:()=>{R=a,T=c},block:()=>{history.go(-p)},nav_token:F})}else if(!H){const a=new URL(location.href);t(a)}}),addEventListener("hashchange",()=>{H?(H=!1,history.replaceState({...history.state,[q]:++R,[J]:T},"",location.href)):k.hash&&v.url.hash===location.hash&&K({type:"goto",url:Pe(v.url)})});for(const n of document.querySelectorAll("link"))vn.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&$.navigating.set(X.current=null)});function t(n){v.url=U.url=n,$.page.set(Ht(U)),$.page.notify()}}async function Cn(t,{status:e=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){Vt=!0;const f=new URL(location.href);let u;({params:a={},route:s={id:null}}=await kt(f,!1)||{}),u=Ft.find(({id:l})=>l===s.id);let p,y=!0;try{const l=r.map(async(d,h)=>{const w=o[h];return w!=null&&w.uses&&(w.uses=Te(w.uses)),Gt({loader:k.nodes[d],url:f,params:a,route:s,parent:async()=>{const S={};for(let I=0;I<h;I+=1)Object.assign(S,(await l[I]).data);return S},server_data_node:Mt(w)})}),m=await Promise.all(l);if(u){const d=u.layouts;for(let h=0;h<d.length;h++)d[h]||m.splice(h,0,void 0)}p=wt({url:f,params:a,branch:m,status:e,error:n,form:c,route:u??null})}catch(l){if(l instanceof jt){await M(new URL(l.location,location.href));return}p=await At({status:dt(l),error:await G(l,{url:f,params:a,route:s}),url:f,route:s}),t.textContent="",y=!1}p.props.page&&(p.props.page.state={}),Ee(p,t,y)}async function Le(t,e){var s;const n=new URL(t);n.pathname=_n(t.pathname),t.pathname.endsWith("/")&&n.searchParams.append(dn,"1"),n.searchParams.append(hn,e.map(i=>i?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let i;throw(s=a.headers.get("content-type"))!=null&&s.includes("application/json")?i=await a.json():a.status===404?i="Not Found":a.status===500&&(i="Internal Error"),new bt(a.status,i)}return new Promise(async i=>{var y;const o=new Map,c=a.body.getReader(),f=new TextDecoder;function u(l){return ln(l,{...k.decoders,Promise:m=>new Promise((d,h)=>{o.set(m,{fulfil:d,reject:h})})})}let p="";for(;;){const{done:l,value:m}=await c.read();if(l&&!p)break;for(p+=!m&&p?`
|
|
2
2
|
`:f.decode(m,{stream:!0});;){const d=p.indexOf(`
|
|
3
3
|
`);if(d===-1)break;const h=JSON.parse(p.slice(0,d));if(p=p.slice(d+1),h.type==="redirect")return i(h);if(h.type==="data")(y=h.nodes)==null||y.forEach(w=>{(w==null?void 0:w.type)==="data"&&(w.uses=Te(w.uses),w.data=u(w.data))}),i(h);else if(h.type==="chunk"){const{id:w,data:S,error:I}=h,g=o.get(w);o.delete(w),I?g.reject(u(I)):g.fulfil(u(S))}}}})}function Te(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}function On(){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const e=document.body,n=e.getAttribute("tabindex");e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),n!==null?e.setAttribute("tabindex",n):e.removeAttribute("tabindex");const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s<r.rangeCount;s+=1)a.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===a.length){for(let s=0;s<r.rangeCount;s+=1){const i=a[s],o=r.getRangeAt(s);if(i.commonAncestorContainer!==o.commonAncestorContainer||i.startContainer!==o.startContainer||i.endContainer!==o.endContainer||i.startOffset!==o.startOffset||i.endOffset!==o.endOffset)return}r.removeAllRanges()}})}}}function xe(t,e,n,r){var c,f;let a,s;const i=new Promise((u,p)=>{a=u,s=p});return i.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url},to:n&&{params:(e==null?void 0:e.params)??null,route:{id:((f=e==null?void 0:e.route)==null?void 0:f.id)??null},url:n},willUnload:!e,type:r,complete:i},fulfil:a,reject:s}}function Ht(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function Pe(t){const e=new URL(t);return e.hash=decodeURIComponent(t.hash),e}export{Vn as a,Tn as g,U as p,$ as s};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.
|
|
2
|
-
var W=r=>{throw TypeError(r)};var z=(r,t,s)=>t.has(r)||W("Cannot "+s);var u=(r,t,s)=>(z(r,t,"read from private field"),s?s.call(r):t.get(r)),w=(r,t,s)=>t.has(r)?W("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,s),D=(r,t,s,a)=>(z(r,t,"write to private field"),a?a.call(r,s):t.set(r,s),s);import{s as V,O as K,g as E,at as Q,ac as X,W as M,h as G,_ as $,Z as tt,a0 as et,a6 as rt,a7 as st,a8 as ot,p as at,ae as nt,af as it,o as ct,z as ut,f as T,j as lt,c as _t,au as I,d as mt,k as dt,t as ft,V as x}from"../chunks/BAACMRH5.js";import{f as ht,m as vt,u as Et,a as b,c as S,t as Y,b as gt,s as yt}from"../chunks/CMBQQ9RZ.js";import{i as C}from"../chunks/CgnwuKKO.js";import{p as j,a as pt}from"../chunks/C8OURRSs.js";import{b as B}from"../chunks/2zMvi6fR.js";const Pt="modulepreload",Rt=function(r,t){return new URL(r,t).href},N={},l=function(t,s,a){let n=Promise.resolve();if(s&&s.length>0){const o=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),d=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));n=Promise.allSettled(s.map(_=>{if(_=Rt(_,a),_ in N)return;N[_]=!0;const y=_.endsWith(".css"),k=y?'[rel="stylesheet"]':"";if(!!a)for(let p=o.length-1;p>=0;p--){const i=o[p];if(i.href===_&&(!y||i.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${_}"]${k}`))return;const h=document.createElement("link");if(h.rel=y?"stylesheet":Pt,y||(h.as="script"),h.crossOrigin="",h.href=_,d&&h.setAttribute("nonce",d),document.head.appendChild(h),y)return new Promise((p,i)=>{h.addEventListener("load",p),h.addEventListener("error",()=>i(new Error(`Unable to preload CSS for ${_}`)))})}))}function c(o){const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=o,window.dispatchEvent(e),!e.defaultPrevented)throw o}return n.then(o=>{for(const e of o||[])e.status==="rejected"&&c(e.reason);return t().catch(c)})},Bt={};function bt(r){return class extends Ot{constructor(t){super({component:r,...t})}}}var g,m;class Ot{constructor(t){w(this,g);w(this,m);var c;var s=new Map,a=(o,e)=>{var d=M(e);return s.set(o,d),d};const n=new Proxy({...t.props||{},$$events:{}},{get(o,e){return E(s.get(e)??a(e,Reflect.get(o,e)))},has(o,e){return e===K?!0:(E(s.get(e)??a(e,Reflect.get(o,e))),Reflect.has(o,e))},set(o,e,d){return V(s.get(e)??a(e,d),d),Reflect.set(o,e,d)}});D(this,m,(t.hydrate?ht:vt)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((c=t==null?void 0:t.props)!=null&&c.$$host)||t.sync===!1)&&Q(),D(this,g,n.$$events);for(const o of Object.keys(u(this,m)))o==="$set"||o==="$destroy"||o==="$on"||X(this,o,{get(){return u(this,m)[o]},set(e){u(this,m)[o]=e},enumerable:!0});u(this,m).$set=o=>{Object.assign(n,o)},u(this,m).$destroy=()=>{Et(u(this,m))}}$set(t){u(this,m).$set(t)}$on(t,s){u(this,g)[t]=u(this,g)[t]||[];const a=(...n)=>s.call(this,...n);return u(this,g)[t].push(a),()=>{u(this,g)[t]=u(this,g)[t].filter(n=>n!==a)}}$destroy(){u(this,m).$destroy()}}g=new WeakMap,m=new WeakMap;function q(r,t,s){G&&$();var a=r,n,c;tt(()=>{n!==(n=t())&&(c&&(st(c),c=null),n&&(c=rt(()=>s(a,n))))},et),G&&(a=ot)}var At=Y('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Lt=Y("<!> <!>",1);function Tt(r,t){at(t,!0);let s=j(t,"components",23,()=>[]),a=j(t,"data_0",3,null),n=j(t,"data_1",3,null);nt(()=>t.stores.page.set(t.page)),it(()=>{t.stores,t.page,t.constructors,s(),t.form,a(),n(),t.stores.page.notify()});let c=I(!1),o=I(!1),e=I(null);ct(()=>{const i=t.stores.page.subscribe(()=>{E(c)&&(V(o,!0),ut().then(()=>{V(e,pt(document.title||"untitled page"))}))});return V(c,!0),i});const d=x(()=>t.constructors[1]);var _=Lt(),y=T(_);{var k=i=>{var v=S();const O=x(()=>t.constructors[0]);var A=T(v);q(A,()=>E(O),(P,R)=>{B(R(P,{get data(){return a()},get form(){return t.form},children:(f,wt)=>{var U=S(),Z=T(U);q(Z,()=>E(d),(H,J)=>{B(J(H,{get data(){return n()},get form(){return t.form}}),L=>s()[1]=L,()=>{var L;return(L=s())==null?void 0:L[1]})}),b(f,U)},$$slots:{default:!0}}),f=>s()[0]=f,()=>{var f;return(f=s())==null?void 0:f[0]})}),b(i,v)},F=i=>{var v=S();const O=x(()=>t.constructors[0]);var A=T(v);q(A,()=>E(O),(P,R)=>{B(R(P,{get data(){return a()},get form(){return t.form}}),f=>s()[0]=f,()=>{var f;return(f=s())==null?void 0:f[0]})}),b(i,v)};C(y,i=>{t.constructors[1]?i(k):i(F,!1)})}var h=lt(y,2);{var p=i=>{var v=At(),O=mt(v);{var A=P=>{var R=gt();ft(()=>yt(R,E(e))),b(P,R)};C(O,P=>{E(o)&&P(A)})}dt(v),b(i,v)};C(h,i=>{E(c)&&i(p)})}b(r,_),_t()}const qt=bt(Tt),Ft=[()=>l(()=>import("../nodes/0.
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.-imXt0f5.js","../chunks/CMBQQ9RZ.js","../chunks/BAACMRH5.js","../chunks/CKDtmZUQ.js","../chunks/CgnwuKKO.js","../chunks/TOCyHP97.js","../chunks/Dhf4xQKo.js","../chunks/DEKAA-Fm.js","../chunks/CUC98kMZ.js","../chunks/C1Vid6wz.js","../chunks/3InFPLvE.js","../chunks/DHM6H-es.js","../chunks/DbgD7JLa.js","../chunks/BUwxRmHf.js","../chunks/DSLBMEpr.js","../chunks/DMZwI8Cj.js","../chunks/C8OURRSs.js","../chunks/CMEtqUfQ.js","../assets/Modal.BZpm0HP8.css","../assets/ConfirmModal.Dd3uP-Sk.css","../chunks/CuqnZUex.js","../assets/Badge.D1SV0Gv7.css","../chunks/BmZ9upwL.js","../assets/0.BhSG-jZH.css","../nodes/1.Dom3CKWF.js","../nodes/2.BnHalSCi.js","../chunks/t-La0hgu.js","../chunks/BKuh57WU.js","../assets/EmptyState.DUDM4P19.css","../assets/2.DvMkmYA-.css","../nodes/3.B86rlHXU.js","../chunks/DCgHuuvs.js","../chunks/Dlnxgs49.js","../assets/3.BR3wgXcZ.css","../nodes/4.D-YT_JJe.js","../chunks/w0D4Uzlq.js","../assets/Pagination.DZmi2Po-.css","../chunks/Co3xKhEp.js","../assets/4.0Eln51hV.css","../nodes/5.CqTXvadV.js","../chunks/Bfc47y5P.js","../chunks/CNdcuGR0.js","../chunks/CGeZlCaI.js","../assets/BackLink.CvWWuO3h.css","../assets/5.DFV9OgAu.css","../nodes/6.BJZ62MCd.js","../chunks/2zMvi6fR.js","../assets/6.CFnbmY-D.css","../nodes/7.C-pKvVZy.js","../chunks/CzlPaHY9.js","../assets/Button.FOWXxvc7.css","../assets/7.CBHi6pzT.css","../nodes/8.B4fj2Xyu.js","../assets/8.BwgOqeMo.css","../nodes/9.C57_2xq6.js","../assets/9._h2o67kg.css","../nodes/10.DEbnxfND.js","../chunks/BAMUGSh7.js","../assets/10.CdaQUS6U.css","../nodes/11.DMlayLCK.js","../assets/11.BWAH0Beh.css","../nodes/12.Bu89A1eX.js","../assets/12.Bj_a_5lv.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var W=r=>{throw TypeError(r)};var z=(r,t,s)=>t.has(r)||W("Cannot "+s);var u=(r,t,s)=>(z(r,t,"read from private field"),s?s.call(r):t.get(r)),w=(r,t,s)=>t.has(r)?W("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,s),D=(r,t,s,a)=>(z(r,t,"write to private field"),a?a.call(r,s):t.set(r,s),s);import{s as V,O as K,g as E,at as Q,ac as X,W as M,h as G,_ as $,Z as tt,a0 as et,a6 as rt,a7 as st,a8 as ot,p as at,ae as nt,af as it,o as ct,z as ut,f as T,j as lt,c as _t,au as I,d as mt,k as dt,t as ft,V as x}from"../chunks/BAACMRH5.js";import{f as ht,m as vt,u as Et,a as b,c as S,t as Y,b as gt,s as yt}from"../chunks/CMBQQ9RZ.js";import{i as C}from"../chunks/CgnwuKKO.js";import{p as j,a as pt}from"../chunks/C8OURRSs.js";import{b as B}from"../chunks/2zMvi6fR.js";const Pt="modulepreload",Rt=function(r,t){return new URL(r,t).href},N={},l=function(t,s,a){let n=Promise.resolve();if(s&&s.length>0){const o=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),d=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));n=Promise.allSettled(s.map(_=>{if(_=Rt(_,a),_ in N)return;N[_]=!0;const y=_.endsWith(".css"),k=y?'[rel="stylesheet"]':"";if(!!a)for(let p=o.length-1;p>=0;p--){const i=o[p];if(i.href===_&&(!y||i.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${_}"]${k}`))return;const h=document.createElement("link");if(h.rel=y?"stylesheet":Pt,y||(h.as="script"),h.crossOrigin="",h.href=_,d&&h.setAttribute("nonce",d),document.head.appendChild(h),y)return new Promise((p,i)=>{h.addEventListener("load",p),h.addEventListener("error",()=>i(new Error(`Unable to preload CSS for ${_}`)))})}))}function c(o){const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=o,window.dispatchEvent(e),!e.defaultPrevented)throw o}return n.then(o=>{for(const e of o||[])e.status==="rejected"&&c(e.reason);return t().catch(c)})},Bt={};function bt(r){return class extends Ot{constructor(t){super({component:r,...t})}}}var g,m;class Ot{constructor(t){w(this,g);w(this,m);var c;var s=new Map,a=(o,e)=>{var d=M(e);return s.set(o,d),d};const n=new Proxy({...t.props||{},$$events:{}},{get(o,e){return E(s.get(e)??a(e,Reflect.get(o,e)))},has(o,e){return e===K?!0:(E(s.get(e)??a(e,Reflect.get(o,e))),Reflect.has(o,e))},set(o,e,d){return V(s.get(e)??a(e,d),d),Reflect.set(o,e,d)}});D(this,m,(t.hydrate?ht:vt)(t.component,{target:t.target,anchor:t.anchor,props:n,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((c=t==null?void 0:t.props)!=null&&c.$$host)||t.sync===!1)&&Q(),D(this,g,n.$$events);for(const o of Object.keys(u(this,m)))o==="$set"||o==="$destroy"||o==="$on"||X(this,o,{get(){return u(this,m)[o]},set(e){u(this,m)[o]=e},enumerable:!0});u(this,m).$set=o=>{Object.assign(n,o)},u(this,m).$destroy=()=>{Et(u(this,m))}}$set(t){u(this,m).$set(t)}$on(t,s){u(this,g)[t]=u(this,g)[t]||[];const a=(...n)=>s.call(this,...n);return u(this,g)[t].push(a),()=>{u(this,g)[t]=u(this,g)[t].filter(n=>n!==a)}}$destroy(){u(this,m).$destroy()}}g=new WeakMap,m=new WeakMap;function q(r,t,s){G&&$();var a=r,n,c;tt(()=>{n!==(n=t())&&(c&&(st(c),c=null),n&&(c=rt(()=>s(a,n))))},et),G&&(a=ot)}var At=Y('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Lt=Y("<!> <!>",1);function Tt(r,t){at(t,!0);let s=j(t,"components",23,()=>[]),a=j(t,"data_0",3,null),n=j(t,"data_1",3,null);nt(()=>t.stores.page.set(t.page)),it(()=>{t.stores,t.page,t.constructors,s(),t.form,a(),n(),t.stores.page.notify()});let c=I(!1),o=I(!1),e=I(null);ct(()=>{const i=t.stores.page.subscribe(()=>{E(c)&&(V(o,!0),ut().then(()=>{V(e,pt(document.title||"untitled page"))}))});return V(c,!0),i});const d=x(()=>t.constructors[1]);var _=Lt(),y=T(_);{var k=i=>{var v=S();const O=x(()=>t.constructors[0]);var A=T(v);q(A,()=>E(O),(P,R)=>{B(R(P,{get data(){return a()},get form(){return t.form},children:(f,wt)=>{var U=S(),Z=T(U);q(Z,()=>E(d),(H,J)=>{B(J(H,{get data(){return n()},get form(){return t.form}}),L=>s()[1]=L,()=>{var L;return(L=s())==null?void 0:L[1]})}),b(f,U)},$$slots:{default:!0}}),f=>s()[0]=f,()=>{var f;return(f=s())==null?void 0:f[0]})}),b(i,v)},F=i=>{var v=S();const O=x(()=>t.constructors[0]);var A=T(v);q(A,()=>E(O),(P,R)=>{B(R(P,{get data(){return a()},get form(){return t.form}}),f=>s()[0]=f,()=>{var f;return(f=s())==null?void 0:f[0]})}),b(i,v)};C(y,i=>{t.constructors[1]?i(k):i(F,!1)})}var h=lt(y,2);{var p=i=>{var v=At(),O=mt(v);{var A=P=>{var R=gt();ft(()=>yt(R,E(e))),b(P,R)};C(O,P=>{E(o)&&P(A)})}dt(v),b(i,v)};C(h,i=>{E(c)&&i(p)})}b(r,_),_t()}const qt=bt(Tt),Ft=[()=>l(()=>import("../nodes/0.-imXt0f5.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]),import.meta.url),()=>l(()=>import("../nodes/1.Dom3CKWF.js"),__vite__mapDeps([24,1,2,3,6]),import.meta.url),()=>l(()=>import("../nodes/2.BnHalSCi.js"),__vite__mapDeps([25,1,2,3,4,5,8,26,11,9,14,27,16,28,29]),import.meta.url),()=>l(()=>import("../nodes/3.B86rlHXU.js"),__vite__mapDeps([30,1,2,3,4,8,26,6,9,22,31,32,33]),import.meta.url),()=>l(()=>import("../nodes/4.D-YT_JJe.js"),__vite__mapDeps([34,1,2,3,4,5,8,12,11,9,14,20,16,21,35,36,15,17,18,19,27,28,37,38]),import.meta.url),()=>l(()=>import("../nodes/5.CqTXvadV.js"),__vite__mapDeps([39,1,2,3,4,5,8,40,41,7,6,12,14,37,20,16,21,42,43,44]),import.meta.url),()=>l(()=>import("../nodes/6.BJZ62MCd.js"),__vite__mapDeps([45,1,2,3,4,5,8,46,6,7,11,9,12,37,14,42,16,43,20,21,47]),import.meta.url),()=>l(()=>import("../nodes/7.C-pKvVZy.js"),__vite__mapDeps([48,1,2,3,4,5,8,26,49,16,41,50,40,10,9,11,14,20,21,17,18,15,19,27,28,51]),import.meta.url),()=>l(()=>import("../nodes/8.B4fj2Xyu.js"),__vite__mapDeps([52,1,2,3,4,5,8,26,49,16,41,50,46,6,10,9,13,22,11,31,15,17,18,19,20,21,53]),import.meta.url),()=>l(()=>import("../nodes/9.C57_2xq6.js"),__vite__mapDeps([54,1,2,3,4,8,26,6,22,9,31,32,55]),import.meta.url),()=>l(()=>import("../nodes/10.DEbnxfND.js"),__vite__mapDeps([56,1,2,3,4,5,8,26,49,16,41,50,13,9,11,35,36,27,28,15,17,18,19,57,58]),import.meta.url),()=>l(()=>import("../nodes/11.DMlayLCK.js"),__vite__mapDeps([59,1,2,3,4,5,8,26,49,16,41,50,7,6,13,9,11,17,18,27,28,57,60]),import.meta.url),()=>l(()=>import("../nodes/12.Bu89A1eX.js"),__vite__mapDeps([61,1,2,3,4,5,8,26,49,16,41,50,40,7,6,13,9,27,28,15,17,18,19,35,36,57,62]),import.meta.url)],Ut=[],Wt={"/":[2],"/login":[3],"/reports":[4],"/reports/live":[6],"/reports/[id]":[5],"/scheduled-tests":[7],"/settings":[8],"/setup":[9],"/test-repository":[10],"/test-repository/runs/[id]":[11],"/test-repository/suites/[id]":[12]},Vt={handleError:({error:r})=>{console.error(r)},reroute:()=>{},transport:{}},kt=Object.fromEntries(Object.entries(Vt.transport).map(([r,t])=>[r,t.decode])),zt=!1,Gt=(r,t)=>kt[r](t);export{Gt as decode,kt as decoders,Wt as dictionary,zt as hash,Vt as hooks,Bt as matchers,Ft as nodes,qt as root,Ut as server_loads};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"../chunks/Dhf4xQKo.js";export{t as start};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as $,a as y,e as D,t as R,b as ps,n as mn,c as We}from"../chunks/CMBQQ9RZ.js";import{i as Wt}from"../chunks/CKDtmZUQ.js";import{e as ot,u as bn,p as Ht,o as Kt,s as x,d as _,j as d,f as K,g as r,k as v,t as I,x as ee,c as Yt,m as P,an as wn,l as he,b as En,n as Pe}from"../chunks/BAACMRH5.js";import{i as N,s as jt,a as Re}from"../chunks/CgnwuKKO.js";import{e as He,t as B,i as Xe,a as $e,g as Ts,b as Pt,f as je}from"../chunks/TOCyHP97.js";import{g as vs}from"../chunks/DMyTUV-Y.js";import{p as Ns}from"../chunks/nURnIknV.js";import{s as se,A as Bs,y as Ae,x as Cs,u as Rn,v as kn,J as nt,T as _s,K as gs,B as Tt,N as ys,O as ms,r as Nt,H as xn,j as Sn,n as bs,z as An,F as Tn}from"../chunks/CUC98kMZ.js";import{a as zt}from"../chunks/C1Vid6wz.js";import{b as Nn,f as Bn,a as Cn}from"../chunks/3InFPLvE.js";import{e as Se,p as Fe,f as Bt,b as ze,s as Ln,S as G,c as Oe,a as ws,t as Ct,r as On}from"../chunks/DHM6H-es.js";import{c as In,r as Un}from"../chunks/DbgD7JLa.js";import{a as Pn,q as $n}from"../chunks/BUwxRmHf.js";import{t as Ls,a as Dn}from"../chunks/DSLBMEpr.js";import{C as qn}from"../chunks/DMZwI8Cj.js";import{B as Es}from"../chunks/CuqnZUex.js";import{c as Vn}from"../chunks/BmZ9upwL.js";function Lt(n,e,t){ot(()=>{var s=bn(()=>e(n,t==null?void 0:t())||{});if(s!=null&&s.destroy)return()=>s.destroy()})}const Mn=!1,bo=Object.freeze(Object.defineProperty({__proto__:null,ssr:Mn},Symbol.toStringTag,{value:"Module"}));var Fn=R('<span class="nav-sep svelte-10t98u4" aria-hidden="true"></span>'),Wn=R('<!> <a class="link svelte-10t98u4"> </a>',1),Hn=R('<img alt="" class="project-logo svelte-10t98u4">'),Kn=R('<div class="project-card svelte-10t98u4"><!> <span class="project-name svelte-10t98u4"> </span></div>'),Yn=R('<span class="nav-user svelte-10t98u4"> </span>'),jn=R('<hr class="mobile-sep svelte-10t98u4">'),zn=R('<!> <a class="mobile-link svelte-10t98u4"> </a>',1),Gn=R('<div class="mobile-menu svelte-10t98u4"><!> <a href="/settings" class="mobile-link svelte-10t98u4">Settings</a></div>'),Jn=R('<nav class="nav svelte-10t98u4"><div class="inner svelte-10t98u4"><a href="/" class="brand svelte-10t98u4"><span class="brand-serif svelte-10t98u4">Pl</span><span class="brand-sans svelte-10t98u4">um</span></a> <div class="links svelte-10t98u4"></div> <div class="actions svelte-10t98u4"><!> <!> <a href="/settings" class="settings-btn svelte-10t98u4" aria-label="Settings" title="Settings"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg></a> <button class="hamburger svelte-10t98u4"><span class="svelte-10t98u4"></span> <span class="svelte-10t98u4"></span> <span class="svelte-10t98u4"></span></button></div></div> <!></nav>');function Xn(n,e){Ht(e,!1);const[t,s]=jt(),i=()=>Re(Ns,"$page",t),c=()=>Re(zt,"$auth",t);let p=P(!1),b=P({name:"",logoUrl:""});Kt(async()=>{try{x(b,await Nn())}catch{}});const E=[{href:"/",label:"Automated Tests"},{href:"/reports",label:"Reports"},{href:"/scheduled-tests",label:"Scheduled"},{href:"/test-repository",label:"Test Repository",sep:!0}];function Y(){x(p,!1)}Wt();var f=Jn(),U=_(f),q=_(U),j=d(q,2);He(j,5,()=>E,Xe,(V,L)=>{var J=Wn(),re=K(J);{var ie=z=>{var Be=Fn();y(z,Be)};N(re,z=>{r(L).sep&&z(ie)})}var M=d(re,2),H=_(M,!0);v(M),I(z=>{se(M,"href",r(L).href),B(M,"repo",r(L).sep),B(M,"active",z),$(H,r(L).label)},[()=>r(L).href==="/"?i().url.pathname==="/":i().url.pathname.startsWith(r(L).href)],ee),y(V,J)}),v(j);var te=d(j,2),Te=_(te);{var De=V=>{var L=Kn(),J=_(L);{var re=H=>{var z=Hn();I(()=>se(z,"src",r(b).logoUrl)),y(H,z)};N(J,H=>{r(b).logoUrl&&H(re)})}var ie=d(J,2),M=_(ie,!0);v(ie),v(L),I(()=>$(M,r(b).name)),y(V,L)};N(Te,V=>{r(b).name&&V(De)})}var ne=d(Te,2);{var ye=V=>{var L=Yn(),J=_(L,!0);v(L),I(()=>$(J,c().user.name)),y(V,L)};N(ne,V=>{c().user&&V(ye)})}var me=d(ne,2),de=d(me,2),ce=_(de),Ne=d(ce,2),C=d(Ne,2);v(de),v(te),v(U);var fe=d(U,2);{var pe=V=>{var L=Gn(),J=_(L);He(J,1,()=>E,Xe,(ie,M)=>{var H=zn(),z=K(H);{var Be=Ce=>{var ft=jn();y(Ce,ft)};N(z,Ce=>{r(M).sep&&Ce(Be)})}var be=d(z,2),qe=_(be,!0);v(be),I(Ce=>{se(be,"href",r(M).href),B(be,"active",Ce),$(qe,r(M).label)},[()=>r(M).href==="/"?i().url.pathname==="/":i().url.pathname.startsWith(r(M).href)],ee),D("click",be,Y),y(ie,H)});var re=d(J,2);v(L),I(()=>B(re,"active",i().url.pathname==="/settings")),D("click",re,Y),$e(3,L,()=>Ts,()=>({duration:200})),y(V,L)};N(fe,V=>{r(p)&&V(pe)})}v(f),I(()=>{B(me,"active",i().url.pathname==="/settings"),se(de,"aria-label",r(p)?"Close menu":"Open menu"),se(de,"aria-expanded",r(p)),B(ce,"rotated",r(p)),B(Ne,"hidden",r(p)),B(C,"rotated-reverse",r(p))}),D("click",q,Y),D("click",de,()=>x(p,!r(p))),y(n,f),Yt(),s()}var Qn=R('<main class="shell svelte-28zx1m"><!></main>');function Zn(n,e){var t=Qn(),s=_(t);Pt(s,e,"default",{},null),v(t),y(n,t)}const xe=Object.create(null);xe.open="0";xe.close="1";xe.ping="2";xe.pong="3";xe.message="4";xe.upgrade="5";xe.noop="6";const at=Object.create(null);Object.keys(xe).forEach(n=>{at[xe[n]]=n});const $t={type:"error",data:"parser error"},Os=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Is=typeof ArrayBuffer=="function",Us=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,Gt=({type:n,data:e},t,s)=>Os&&e instanceof Blob?t?s(e):Rs(e,s):Is&&(e instanceof ArrayBuffer||Us(e))?t?s(e):Rs(new Blob([e]),s):s(xe[n]+(e||"")),Rs=(n,e)=>{const t=new FileReader;return t.onload=function(){const s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(n)};function ks(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let Ot;function er(n,e){if(Os&&n.data instanceof Blob)return n.data.arrayBuffer().then(ks).then(e);if(Is&&(n.data instanceof ArrayBuffer||Us(n.data)))return e(ks(n.data));Gt(n,!1,t=>{Ot||(Ot=new TextEncoder),e(Ot.encode(t))})}const xs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Je=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<xs.length;n++)Je[xs.charCodeAt(n)]=n;const tr=n=>{let e=n.length*.75,t=n.length,s,i=0,c,p,b,E;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);const Y=new ArrayBuffer(e),f=new Uint8Array(Y);for(s=0;s<t;s+=4)c=Je[n.charCodeAt(s)],p=Je[n.charCodeAt(s+1)],b=Je[n.charCodeAt(s+2)],E=Je[n.charCodeAt(s+3)],f[i++]=c<<2|p>>4,f[i++]=(p&15)<<4|b>>2,f[i++]=(b&3)<<6|E&63;return Y},sr=typeof ArrayBuffer=="function",Jt=(n,e)=>{if(typeof n!="string")return{type:"message",data:Ps(n,e)};const t=n.charAt(0);return t==="b"?{type:"message",data:nr(n.substring(1),e)}:at[t]?n.length>1?{type:at[t],data:n.substring(1)}:{type:at[t]}:$t},nr=(n,e)=>{if(sr){const t=tr(n);return Ps(t,e)}else return{base64:!0,data:n}},Ps=(n,e)=>{switch(e){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},$s="",rr=(n,e)=>{const t=n.length,s=new Array(t);let i=0;n.forEach((c,p)=>{Gt(c,!1,b=>{s[p]=b,++i===t&&e(s.join($s))})})},ir=(n,e)=>{const t=n.split($s),s=[];for(let i=0;i<t.length;i++){const c=Jt(t[i],e);if(s.push(c),c.type==="error")break}return s};function or(){return new TransformStream({transform(n,e){er(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 c=new DataView(i.buffer);c.setUint8(0,126),c.setUint16(1,s)}else{i=new Uint8Array(9);const c=new DataView(i.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(s))}n.data&&typeof n.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}let It;function rt(n){return n.reduce((e,t)=>e+t.length,0)}function it(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 ar(n,e){It||(It=new TextDecoder);const t=[];let s=0,i=-1,c=!1;return new TransformStream({transform(p,b){for(t.push(p);;){if(s===0){if(rt(t)<1)break;const E=it(t,1);c=(E[0]&128)===128,i=E[0]&127,i<126?s=3:i===126?s=1:s=2}else if(s===1){if(rt(t)<2)break;const E=it(t,2);i=new DataView(E.buffer,E.byteOffset,E.length).getUint16(0),s=3}else if(s===2){if(rt(t)<8)break;const E=it(t,8),Y=new DataView(E.buffer,E.byteOffset,E.length),f=Y.getUint32(0);if(f>Math.pow(2,21)-1){b.enqueue($t);break}i=f*Math.pow(2,32)+Y.getUint32(4),s=3}else{if(rt(t)<i)break;const E=it(t,i);b.enqueue(Jt(c?E:It.decode(E),e)),s=0}if(i===0||i>n){b.enqueue($t);break}}}})}const Ds=4;function W(n){if(n)return cr(n)}function cr(n){for(var e in W.prototype)n[e]=W.prototype[e];return n}W.prototype.on=W.prototype.addEventListener=function(n,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(e),this};W.prototype.once=function(n,e){function t(){this.off(n,t),e.apply(this,arguments)}return t.fn=e,this.on(n,t),this};W.prototype.off=W.prototype.removeListener=W.prototype.removeAllListeners=W.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};W.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};W.prototype.emitReserved=W.prototype.emit;W.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};W.prototype.hasListeners=function(n){return!!this.listeners(n).length};const ut=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),ue=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),lr="arraybuffer";function qs(n,...e){return e.reduce((t,s)=>(n.hasOwnProperty(s)&&(t[s]=n[s]),t),{})}const hr=ue.setTimeout,ur=ue.clearTimeout;function dt(n,e){e.useNativeTimers?(n.setTimeoutFn=hr.bind(ue),n.clearTimeoutFn=ur.bind(ue)):(n.setTimeoutFn=ue.setTimeout.bind(ue),n.clearTimeoutFn=ue.clearTimeout.bind(ue))}const dr=1.33;function fr(n){return typeof n=="string"?pr(n):Math.ceil((n.byteLength||n.size)*dr)}function pr(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 Vs(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function vr(n){let e="";for(let t in n)n.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(n[t]));return e}function _r(n){let e={},t=n.split("&");for(let s=0,i=t.length;s<i;s++){let c=t[s].split("=");e[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return e}class gr extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class Xt extends W{constructor(e){super(),this.writable=!1,dt(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 gr(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=Jt(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&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=vr(e);return t.length?"?"+t:""}}class yr extends Xt{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)};ir(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,rr(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]=Vs()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let Ms=!1;try{Ms=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const mr=Ms;function br(){}class wr extends yr{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,c)=>{this.onError("xhr post error",i,c)})}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 ke extends W{constructor(e,t,s){super(),this.createRequest=e,dt(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=qs(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=ke.requestsCount++,ke.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=br,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete ke.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()}}ke.requestsCount=0;ke.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ss);else if(typeof addEventListener=="function"){const n="onpagehide"in ue?"pagehide":"unload";addEventListener(n,Ss,!1)}}function Ss(){for(let n in ke.requests)ke.requests.hasOwnProperty(n)&&ke.requests[n].abort()}const Er=function(){const n=Fs({xdomain:!1});return n&&n.responseType!==null}();class Rr extends wr{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=Er&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new ke(Fs,this.uri(),e)}}function Fs(n){const e=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||mr))return new XMLHttpRequest}catch{}if(!e)try{return new ue[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Ws=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class kr extends Xt{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,s=Ws?{}:qs(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;Gt(s,this.supportsBinary,c=>{try{this.doWrite(s,c)}catch{}i&&ut(()=>{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]=Vs()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const Ut=ue.WebSocket||ue.MozWebSocket;class xr extends kr{createSocket(e,t,s){return Ws?new Ut(e,t,s):t?new Ut(e,t):new Ut(e)}doWrite(e,t){this.ws.send(t)}}class Sr extends Xt{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=ar(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),i=or();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const c=()=>{s.read().then(({done:b,value:E})=>{b||(this.onPacket(E),c())}).catch(b=>{})};c();const p={type:"open"};this.query.sid&&(p.data=`{"sid":"${this.query.sid}"}`),this._writer.write(p).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&&ut(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const Ar={websocket:xr,webtransport:Sr,polling:Rr},Tr=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Nr=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Dt(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=Tr.exec(n||""),c={},p=14;for(;p--;)c[Nr[p]]=i[p]||"";return t!=-1&&s!=-1&&(c.source=e,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=Br(c,c.path),c.queryKey=Cr(c,c.query),c}function Br(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 Cr(n,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,c){i&&(t[i]=c)}),t}const qt=typeof addEventListener=="function"&&typeof removeEventListener=="function",ct=[];qt&&addEventListener("offline",()=>{ct.forEach(n=>n())},!1);class Ie extends W{constructor(e,t){if(super(),this.binaryType=lr,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=Dt(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=Dt(t.host).host);dt(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=_r(this.opts.query)),qt&&(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"})},ct.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=Ds,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&&Ie.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",Ie.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+=fr(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,ut(()=>{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 c={type:e,data:t,options:s};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),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(Ie.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(),qt&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=ct.indexOf(this._offlineEventListener);s!==-1&&ct.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}Ie.protocol=Ds;class Lr extends Ie{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;Ie.priorWebsocketSuccess=!1;const i=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",U=>{if(!s)if(U.type==="pong"&&U.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Ie.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 q=new Error("probe error");q.transport=t.name,this.emitReserved("upgradeError",q)}}))};function c(){s||(s=!0,f(),t.close(),t=null)}const p=U=>{const q=new Error("probe error: "+U);q.transport=t.name,c(),this.emitReserved("upgradeError",q)};function b(){p("transport closed")}function E(){p("socket closed")}function Y(U){t&&U.name!==t.name&&c()}const f=()=>{t.removeListener("open",i),t.removeListener("error",p),t.removeListener("close",b),this.off("close",E),this.off("upgrading",Y)};t.once("open",i),t.once("error",p),t.once("close",b),this.once("close",E),this.once("upgrading",Y),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 Or=class extends Lr{constructor(e,t={}){const s=typeof e=="object"?e:t;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(i=>Ar[i]).filter(i=>!!i)),super(e,s)}};function Ir(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=Dt(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 c=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+c+":"+s.port+e,s.href=s.protocol+"://"+c+(t&&t.port===s.port?"":":"+s.port),s}const Ur=typeof ArrayBuffer=="function",Pr=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,Hs=Object.prototype.toString,$r=typeof Blob=="function"||typeof Blob<"u"&&Hs.call(Blob)==="[object BlobConstructor]",Dr=typeof File=="function"||typeof File<"u"&&Hs.call(File)==="[object FileConstructor]";function Qt(n){return Ur&&(n instanceof ArrayBuffer||Pr(n))||$r&&n instanceof Blob||Dr&&n instanceof File}function lt(n,e){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let t=0,s=n.length;t<s;t++)if(lt(n[t]))return!0;return!1}if(Qt(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return lt(n.toJSON(),!0);for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&<(n[t]))return!0;return!1}function qr(n){const e=[],t=n.data,s=n;return s.data=Vt(t,e),s.attachments=e.length,{packet:s,buffers:e}}function Vt(n,e){if(!n)return n;if(Qt(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]=Vt(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]=Vt(n[s],e));return t}return n}function Vr(n,e){return n.data=Mt(n.data,e),delete n.attachments,n}function Mt(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]=Mt(n[t],e);else if(typeof n=="object")for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(n[t]=Mt(n[t],e));return n}const Mr=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var S;(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"})(S||(S={}));class Fr{constructor(e){this.replacer=e}encode(e){return(e.type===S.EVENT||e.type===S.ACK)&<(e)?this.encodeAsBinary({type:e.type===S.EVENT?S.BINARY_EVENT:S.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===S.BINARY_EVENT||e.type===S.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=qr(e),s=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(s),i}}function As(n){return Object.prototype.toString.call(n)==="[object Object]"}class Zt extends W{constructor(e){super(),this.reviver=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===S.BINARY_EVENT;s||t.type===S.BINARY_ACK?(t.type=s?S.EVENT:S.ACK,this.reconstructor=new Wr(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(Qt(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(S[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===S.BINARY_EVENT||s.type===S.BINARY_ACK){const c=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const p=e.substring(c,t);if(p!=Number(p)||e.charAt(t)!=="-")throw new Error("Illegal attachments");s.attachments=Number(p)}if(e.charAt(t+1)==="/"){const c=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););s.nsp=e.substring(c,t)}else s.nsp="/";const i=e.charAt(t+1);if(i!==""&&Number(i)==i){const c=t+1;for(;++t;){const p=e.charAt(t);if(p==null||Number(p)!=p){--t;break}if(t===e.length)break}s.id=Number(e.substring(c,t+1))}if(e.charAt(++t)){const c=this.tryParse(e.substr(t));if(Zt.isPayloadValid(s.type,c))s.data=c;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case S.CONNECT:return As(t);case S.DISCONNECT:return t===void 0;case S.CONNECT_ERROR:return typeof t=="string"||As(t);case S.EVENT:case S.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&Mr.indexOf(t[0])===-1);case S.ACK:case S.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Wr{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=Vr(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Hr=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Zt,Encoder:Fr,get PacketType(){return S}},Symbol.toStringTag,{value:"Module"}));function ge(n,e,t){return n.on(e,t),function(){n.off(e,t)}}const Kr=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Ks extends W{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=[ge(e,"open",this.onopen.bind(this)),ge(e,"packet",this.onpacket.bind(this)),ge(e,"error",this.onerror.bind(this)),ge(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,c;if(Kr.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 p={type:S.EVENT,data:t};if(p.options={},p.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const f=this.ids++,U=t.pop();this._registerAckCallback(f,U),p.id=f}const b=(i=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||i===void 0?void 0:i.writable,E=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!b||(E?(this.notifyOutgoingListeners(p),this.packet(p)):this.sendBuffer.push(p)),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 c=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let b=0;b<this.sendBuffer.length;b++)this.sendBuffer[b].id===e&&this.sendBuffer.splice(b,1);t.call(this,new Error("operation has timed out"))},i),p=(...b)=>{this.io.clearTimeoutFn(c),t.apply(this,b)};p.withError=!0,this.acks[e]=p}emitWithAck(e,...t){return new Promise((s,i)=>{const c=(p,b)=>p?i(p):s(b);c.withError=!0,t.push(c),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,...c)=>s!==this._queue[0]?void 0:(i!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...c)),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:S.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 S.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 S.EVENT:case S.BINARY_EVENT:this.onevent(e);break;case S.ACK:case S.BINARY_ACK:this.onack(e);break;case S.DISCONNECT:this.ondisconnect();break;case S.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:S.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.emitReserved("connect"),this._drainQueue(!0)}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:S.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 Ke(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}Ke.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?n+t:n-t}return Math.min(n,this.max)|0};Ke.prototype.reset=function(){this.attempts=0};Ke.prototype.setMin=function(n){this.ms=n};Ke.prototype.setMax=function(n){this.max=n};Ke.prototype.setJitter=function(n){this.jitter=n};class Ft extends W{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,dt(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 Ke({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||Hr;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 Or(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const i=ge(t,"open",function(){s.onopen(),e&&e()}),c=b=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",b),e?e(b):this.maybeReconnectOnOpen()},p=ge(t,"error",c);if(this._timeout!==!1){const b=this._timeout,E=this.setTimeoutFn(()=>{i(),c(new Error("timeout")),t.close()},b);this.opts.autoUnref&&E.unref(),this.subs.push(()=>{this.clearTimeoutFn(E)})}return this.subs.push(i),this.subs.push(p),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(ge(e,"ping",this.onping.bind(this)),ge(e,"data",this.ondata.bind(this)),ge(e,"error",this.onerror.bind(this)),ge(e,"close",this.onclose.bind(this)),ge(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){ut(()=>{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 Ks(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 Ge={};function ht(n,e){typeof n=="object"&&(e=n,n=void 0),e=e||{};const t=Ir(n,e.path||"/socket.io"),s=t.source,i=t.id,c=t.path,p=Ge[i]&&c in Ge[i].nsps,b=e.forceNew||e["force new connection"]||e.multiplex===!1||p;let E;return b?E=new Ft(s,e):(Ge[i]||(Ge[i]=new Ft(s,e)),E=Ge[i]),t.query&&!e.query&&(e.query=t.queryKey),E.socket(t.path,e)}Object.assign(ht,{Manager:Ft,Socket:Ks,io:ht,connect:ht});function Yr(){return{Authorization:`Bearer ${zt.getToken()}`}}async function jr(){const n=await fetch(`${Bs}/active-runs`,{headers:Yr()});if(!n.ok)return[];const{runs:e}=await n.json();return e??[]}const zr="Run all tests?",Gr="Run all tests",Jr="No tag or filter is set. This will run",Xr="every test",Qr="in the suite, which may take a while.",Zr="View Report",ei="Test Run",ti="Clear test run",si="None",ni="No active test runs",ri="Workers",ii="Browser",oi="Runners",ai="Notify",ci="No automated cases in this run",li="Running",hi="Run",ui="Manual run",di="No tests currently running",fi="Live",pi=n=>`${n} automated`,vi=n=>n?"Discord notification on":"Discord notification off",_i=n=>n?"Slack notification on":"Slack notification off",gi=n=>`${n} runners`,yi=n=>`${Ls(n)} run`,mi=n=>`started by ${n}`,bi=n=>n?"Collapse panel":"Expand panel";function wi(n,e,t){return n.running?"Running":n.status==="pass"?"Passed":n.status==="fail"?"Failed":t?"Scheduled":e?"Running":"Ready"}function Ei(n,e){var t;return n.selectedRunners.length===1&&n.selectedRunners[0]===Ae?Cs:n.selectedRunners.length===1?((t=e.find(s=>s.id===n.selectedRunners[0]))==null?void 0:t.name)??"1 node":`${n.selectedRunners.length} nodes`}var Ri=R(' <strong class="svelte-h71cn6"></strong> ',1),ki=R('<span class="run-tag svelte-h71cn6"> </span>'),xi=R('<a class="view-report-btn svelte-h71cn6"> <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-h71cn6"><line x1="5" y1="12" x2="19" y2="12" class="svelte-h71cn6"></line><polyline points="12 5 19 12 12 19" class="svelte-h71cn6"></polyline></svg></a>'),Si=R('<span class="run-chip-spinner svelte-h71cn6"></span>'),Ai=R('<span class="run-chip-count svelte-h71cn6"> </span>'),Ti=R('<div class="run-chip svelte-h71cn6"><svg width="9" height="10" viewBox="0 0 10 12" fill="currentColor" stroke="none" style="opacity:0.6;flex-shrink:0" class="svelte-h71cn6"><polygon points="0,0 10,6 0,12" class="svelte-h71cn6"></polygon></svg> <span class="run-chip-title svelte-h71cn6"> </span> <!> <button class="run-chip-clear svelte-h71cn6"><svg width="9" height="9" viewBox="0 0 14 14" fill="none" class="svelte-h71cn6"><path d="M1 1l12 12M13 1L1 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" class="svelte-h71cn6"></path></svg></button></div>'),Ni=R('<div class="input-wrap svelte-h71cn6"><svg class="input-icon svelte-h71cn6" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8" class="svelte-h71cn6"></circle><line x1="21" y1="21" x2="16.65" y2="16.65" class="svelte-h71cn6"></line></svg> <input type="text" class="tag-input svelte-h71cn6" placeholder="@tag or leave blank for all tests"></div>'),Bi=R('<button class="dropdown-item svelte-h71cn6"><span style="color:var(--text-muted)" class="svelte-h71cn6">✕</span> </button> <div class="dropdown-divider svelte-h71cn6"></div>',1),Ci=R('<div class="dropdown-empty svelte-h71cn6"></div>'),Li=R('<button class="dropdown-item svelte-h71cn6"> </button>'),Oi=R('<div class="dropdown-menu run-pick-menu svelte-h71cn6"><!> <!></div>'),Ii=R('<button class="dropdown-item svelte-h71cn6"> </button>'),Ui=R('<div class="dropdown-menu svelte-h71cn6"></div>'),Pi=R('<label class="runner-option svelte-h71cn6"><input type="checkbox" class="svelte-h71cn6"> <span class="runner-dot built-in svelte-h71cn6"></span> <span class="svelte-h71cn6"></span></label>'),$i=R('<label class="runner-option svelte-h71cn6"><input type="checkbox" class="svelte-h71cn6"> <span class="runner-dot remote svelte-h71cn6"></span> <span class="svelte-h71cn6"> </span></label>'),Di=R('<div class="dropdown-menu runners-menu svelte-h71cn6"><!> <!></div>'),qi=R('<div class="ctrl-divider svelte-h71cn6"></div> <div class="ctrl-group svelte-h71cn6"><span class="ctrl-label svelte-h71cn6"></span> <div class="dropdown-wrap svelte-h71cn6"><button class="dropdown-trigger svelte-h71cn6"><span class="svelte-h71cn6"> </span> <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" class="trigger-chevron svelte-h71cn6"><polyline points="6 9 12 15 18 9" class="svelte-h71cn6"></polyline></svg></button> <!></div></div>',1),Vi=R('<button type="button" class="notify-btn svelte-h71cn6"></button>'),Mi=R('<button type="button" class="notify-btn svelte-h71cn6"></button>'),Fi=R('<div class="ctrl-divider svelte-h71cn6"></div> <div class="ctrl-group svelte-h71cn6"><span class="ctrl-label svelte-h71cn6"></span> <div class="notify-toggles svelte-h71cn6"><!> <!></div></div>',1),Wi=R('<span class="run-spinner svelte-h71cn6"></span> ',1),Hi=mn('<svg width="9" height="10" viewBox="0 0 10 12" fill="currentColor" stroke="none" class="svelte-h71cn6"><polygon points="0,0 10,6 0,12" class="svelte-h71cn6"></polygon></svg> ',1),Ki=R('<span class="meta-dot svelte-h71cn6">·</span> ',1),Yi=R('<span class="run-card-meta svelte-h71cn6"> <span class="meta-dot svelte-h71cn6">·</span> <span class="meta-dot svelte-h71cn6">·</span> <!></span>'),ji=R('<a href="/reports/live" class="run-card active-run svelte-h71cn6"><span class="run-card-dot pulse-accent svelte-h71cn6"></span> <div class="run-card-info svelte-h71cn6"><span class="run-card-label svelte-h71cn6"> </span> <!></div> <!> <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" class="run-card-arrow svelte-h71cn6"><line x1="5" y1="12" x2="19" y2="12" class="svelte-h71cn6"></line><polyline points="12 5 19 12 12 19" class="svelte-h71cn6"></polyline></svg></a>'),zi=R('<span class="meta-dot svelte-h71cn6">·</span> ',1),Gi=R('<a class="run-card cron-run svelte-h71cn6"><span class="run-card-dot pulse-pass svelte-h71cn6"></span> <div class="run-card-info svelte-h71cn6"><span class="run-card-label svelte-h71cn6"> </span> <span class="run-card-meta svelte-h71cn6"> <!></span></div> <!> <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" class="run-card-arrow svelte-h71cn6"><line x1="5" y1="12" x2="19" y2="12" class="svelte-h71cn6"></line><polyline points="12 5 19 12 12 19" class="svelte-h71cn6"></polyline></svg></a>'),Ji=R('<div class="empty-runs svelte-h71cn6"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="empty-icon svelte-h71cn6"><circle cx="12" cy="12" r="10" class="svelte-h71cn6"></circle><line x1="10" y1="15" x2="10" y2="12" class="svelte-h71cn6"></line><line x1="10" y1="9" x2="10.01" y2="9" class="svelte-h71cn6"></line></svg> </div>'),Xi=R('<div class="body svelte-h71cn6"><!> <!> <!></div>'),Qi=R('<!> <div class="panel svelte-h71cn6"><div class="scan-line svelte-h71cn6"></div> <div class="bar svelte-h71cn6"><div class="bar-left svelte-h71cn6"><div class="bar-status svelte-h71cn6"><span class="status-dot svelte-h71cn6"></span> <span class="status-word svelte-h71cn6"> </span> <!></div> <!></div> <span class="flex-gap svelte-h71cn6"></span> <div class="bar-center svelte-h71cn6"><!> <div class="ctrl-group svelte-h71cn6"><span class="ctrl-label svelte-h71cn6"></span> <div class="dropdown-wrap svelte-h71cn6"><button class="dropdown-trigger svelte-h71cn6"><span class="svelte-h71cn6"> </span> <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" class="trigger-chevron svelte-h71cn6"><polyline points="6 9 12 15 18 9" class="svelte-h71cn6"></polyline></svg></button> <!></div></div> <div class="ctrl-divider svelte-h71cn6"></div> <div class="ctrl-group svelte-h71cn6"><span class="ctrl-label svelte-h71cn6"></span> <div class="stepper svelte-h71cn6"><button class="step-btn svelte-h71cn6">−</button> <span class="step-val svelte-h71cn6"> </span> <button class="step-btn svelte-h71cn6">+</button></div></div> <div class="ctrl-divider svelte-h71cn6"></div> <div class="ctrl-group svelte-h71cn6"><span class="ctrl-label svelte-h71cn6"></span> <div class="dropdown-wrap svelte-h71cn6"><button class="dropdown-trigger svelte-h71cn6"><span class="svelte-h71cn6"> </span> <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" class="trigger-chevron svelte-h71cn6"><polyline points="6 9 12 15 18 9" class="svelte-h71cn6"></polyline></svg></button> <!></div></div> <!> <!> <div class="ctrl-divider svelte-h71cn6"></div> <button class="run-btn svelte-h71cn6"><!></button></div> <span class="flex-gap-sm svelte-h71cn6"></span> <button class="expand-btn svelte-h71cn6"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-h71cn6"><polyline points="18 15 12 9 6 15" class="svelte-h71cn6"></polyline></svg></button></div> <!></div>',1);function Zi(n,e){Ht(e,!1);const[t,s]=jt(),i=()=>Re(Oe,"$runnerState",t),c=()=>Re(Se,"$runnerConfig",t),p=()=>Re(ze,"$backgroundRuns",t),b=()=>Re(On,"$runsVersion",t),E=()=>Re(Fe,"$panelExpanded",t),Y=()=>Re(Bt,"$builtInEnabled",t),f=P(),U=P(),q=P(),j=P(),te=P(),Te=P(),De=P(),ne=P(),ye=P(),me=P(),de=P();let ce=P([]),Ne=P([]),C=P(null),fe=P(!1),pe=P(!1),V=P(!1),L=P(!1),J=P(!1),re=P({discordWebhookUrl:"",slackWebhookUrl:"",notifyPublicUrl:""}),ie=P(!1),M=P(!1);function H(a){function u(o){a.contains(o.target)||a.dispatchEvent(new CustomEvent("clickoutside"))}return document.addEventListener("click",u,!0),{destroy(){document.removeEventListener("click",u,!0)}}}let z,Be,be,qe;function Ce(a,u,o){return{kind:a,label:u,output:"",running:!0,testCompleted:!1,latestReportId:null,status:"running",lanes:[],currentRun:{tag:o==null?void 0:o.tag,workers:o==null?void 0:o.workers,browser:o==null?void 0:o.browser,runTitle:u,startedBy:o==null?void 0:o.startedBy},latestScreenshot:null}}Kt(()=>{try{const o=localStorage.getItem("plum:runnerConfig");o&&Se.update(h=>({...h,...JSON.parse(o)}))}catch{}try{const o=localStorage.getItem("plum:panelExpanded");o!==null&&Fe.set(o==="true")}catch{}try{const o=localStorage.getItem("plum:builtInEnabled");o!==null&&Bt.set(o!=="false")}catch{}Bn().then(o=>{x(ce,o);const h=new Set([Ae,...o.map(l=>l.id)]);Se.update(l=>{const g=l.selectedRunners.filter(m=>h.has(m));return{...l,selectedRunners:g.length>0?g:[Ae]}})}).catch(()=>{}),Cn().then(o=>x(re,o)).catch(()=>{}),jr().then(o=>{o.length!==0&&(ze.update(h=>{const l={...h};for(const{runId:g,kind:m,label:w,meta:k}of o)l[g]||(l[g]=Ce(m,w,k));return l}),Fe.set(!0))}).catch(()=>{}),z=Se.subscribe(o=>{try{localStorage.setItem("plum:runnerConfig",JSON.stringify(o))}catch{}}),Be=Fe.subscribe(o=>{try{localStorage.setItem("plum:panelExpanded",String(o))}catch{}}),be=Bt.subscribe(o=>{try{localStorage.setItem("plum:builtInEnabled",String(o))}catch{}Se.update(h=>{if(!o&&h.selectedRunners.includes(Ae)){const l=h.selectedRunners.filter(m=>m!==Ae),g=l.length>0?l:r(ce)[0]?[r(ce)[0].id]:[];return{...h,selectedRunners:g}}return h})});const a=ht(Bs,{transports:["websocket"]});qe=a,Ln.set(a),a.on(G.LOG,o=>{Oe.update(h=>({...h,output:h.output+o+`
|
|
1
|
+
import{s as $,a as y,e as D,t as R,b as ps,n as mn,c as We}from"../chunks/CMBQQ9RZ.js";import{i as Wt}from"../chunks/CKDtmZUQ.js";import{e as ot,u as bn,p as Ht,o as Kt,s as x,d as _,j as d,f as K,g as r,k as v,t as I,x as ee,c as Yt,m as P,an as wn,l as he,b as En,n as Pe}from"../chunks/BAACMRH5.js";import{i as N,s as jt,a as Re}from"../chunks/CgnwuKKO.js";import{e as He,t as B,i as Xe,a as $e,g as Ts,b as Pt,f as je}from"../chunks/TOCyHP97.js";import{g as vs}from"../chunks/Dhf4xQKo.js";import{p as Ns}from"../chunks/DEKAA-Fm.js";import{s as se,A as Bs,y as Ae,x as Cs,u as Rn,v as kn,J as nt,T as _s,K as gs,B as Tt,N as ys,O as ms,r as Nt,H as xn,j as Sn,n as bs,z as An,F as Tn}from"../chunks/CUC98kMZ.js";import{a as zt}from"../chunks/C1Vid6wz.js";import{b as Nn,f as Bn,a as Cn}from"../chunks/3InFPLvE.js";import{e as Se,p as Fe,f as Bt,b as ze,s as Ln,S as G,c as Oe,a as ws,t as Ct,r as On}from"../chunks/DHM6H-es.js";import{c as In,r as Un}from"../chunks/DbgD7JLa.js";import{a as Pn,q as $n}from"../chunks/BUwxRmHf.js";import{t as Ls,a as Dn}from"../chunks/DSLBMEpr.js";import{C as qn}from"../chunks/DMZwI8Cj.js";import{B as Es}from"../chunks/CuqnZUex.js";import{c as Vn}from"../chunks/BmZ9upwL.js";function Lt(n,e,t){ot(()=>{var s=bn(()=>e(n,t==null?void 0:t())||{});if(s!=null&&s.destroy)return()=>s.destroy()})}const Mn=!1,bo=Object.freeze(Object.defineProperty({__proto__:null,ssr:Mn},Symbol.toStringTag,{value:"Module"}));var Fn=R('<span class="nav-sep svelte-10t98u4" aria-hidden="true"></span>'),Wn=R('<!> <a class="link svelte-10t98u4"> </a>',1),Hn=R('<img alt="" class="project-logo svelte-10t98u4">'),Kn=R('<div class="project-card svelte-10t98u4"><!> <span class="project-name svelte-10t98u4"> </span></div>'),Yn=R('<span class="nav-user svelte-10t98u4"> </span>'),jn=R('<hr class="mobile-sep svelte-10t98u4">'),zn=R('<!> <a class="mobile-link svelte-10t98u4"> </a>',1),Gn=R('<div class="mobile-menu svelte-10t98u4"><!> <a href="/settings" class="mobile-link svelte-10t98u4">Settings</a></div>'),Jn=R('<nav class="nav svelte-10t98u4"><div class="inner svelte-10t98u4"><a href="/" class="brand svelte-10t98u4"><span class="brand-serif svelte-10t98u4">Pl</span><span class="brand-sans svelte-10t98u4">um</span></a> <div class="links svelte-10t98u4"></div> <div class="actions svelte-10t98u4"><!> <!> <a href="/settings" class="settings-btn svelte-10t98u4" aria-label="Settings" title="Settings"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg></a> <button class="hamburger svelte-10t98u4"><span class="svelte-10t98u4"></span> <span class="svelte-10t98u4"></span> <span class="svelte-10t98u4"></span></button></div></div> <!></nav>');function Xn(n,e){Ht(e,!1);const[t,s]=jt(),i=()=>Re(Ns,"$page",t),c=()=>Re(zt,"$auth",t);let p=P(!1),b=P({name:"",logoUrl:""});Kt(async()=>{try{x(b,await Nn())}catch{}});const E=[{href:"/",label:"Automated Tests"},{href:"/reports",label:"Reports"},{href:"/scheduled-tests",label:"Scheduled"},{href:"/test-repository",label:"Test Repository",sep:!0}];function Y(){x(p,!1)}Wt();var f=Jn(),U=_(f),q=_(U),j=d(q,2);He(j,5,()=>E,Xe,(V,L)=>{var J=Wn(),re=K(J);{var ie=z=>{var Be=Fn();y(z,Be)};N(re,z=>{r(L).sep&&z(ie)})}var M=d(re,2),H=_(M,!0);v(M),I(z=>{se(M,"href",r(L).href),B(M,"repo",r(L).sep),B(M,"active",z),$(H,r(L).label)},[()=>r(L).href==="/"?i().url.pathname==="/":i().url.pathname.startsWith(r(L).href)],ee),y(V,J)}),v(j);var te=d(j,2),Te=_(te);{var De=V=>{var L=Kn(),J=_(L);{var re=H=>{var z=Hn();I(()=>se(z,"src",r(b).logoUrl)),y(H,z)};N(J,H=>{r(b).logoUrl&&H(re)})}var ie=d(J,2),M=_(ie,!0);v(ie),v(L),I(()=>$(M,r(b).name)),y(V,L)};N(Te,V=>{r(b).name&&V(De)})}var ne=d(Te,2);{var ye=V=>{var L=Yn(),J=_(L,!0);v(L),I(()=>$(J,c().user.name)),y(V,L)};N(ne,V=>{c().user&&V(ye)})}var me=d(ne,2),de=d(me,2),ce=_(de),Ne=d(ce,2),C=d(Ne,2);v(de),v(te),v(U);var fe=d(U,2);{var pe=V=>{var L=Gn(),J=_(L);He(J,1,()=>E,Xe,(ie,M)=>{var H=zn(),z=K(H);{var Be=Ce=>{var ft=jn();y(Ce,ft)};N(z,Ce=>{r(M).sep&&Ce(Be)})}var be=d(z,2),qe=_(be,!0);v(be),I(Ce=>{se(be,"href",r(M).href),B(be,"active",Ce),$(qe,r(M).label)},[()=>r(M).href==="/"?i().url.pathname==="/":i().url.pathname.startsWith(r(M).href)],ee),D("click",be,Y),y(ie,H)});var re=d(J,2);v(L),I(()=>B(re,"active",i().url.pathname==="/settings")),D("click",re,Y),$e(3,L,()=>Ts,()=>({duration:200})),y(V,L)};N(fe,V=>{r(p)&&V(pe)})}v(f),I(()=>{B(me,"active",i().url.pathname==="/settings"),se(de,"aria-label",r(p)?"Close menu":"Open menu"),se(de,"aria-expanded",r(p)),B(ce,"rotated",r(p)),B(Ne,"hidden",r(p)),B(C,"rotated-reverse",r(p))}),D("click",q,Y),D("click",de,()=>x(p,!r(p))),y(n,f),Yt(),s()}var Qn=R('<main class="shell svelte-28zx1m"><!></main>');function Zn(n,e){var t=Qn(),s=_(t);Pt(s,e,"default",{},null),v(t),y(n,t)}const xe=Object.create(null);xe.open="0";xe.close="1";xe.ping="2";xe.pong="3";xe.message="4";xe.upgrade="5";xe.noop="6";const at=Object.create(null);Object.keys(xe).forEach(n=>{at[xe[n]]=n});const $t={type:"error",data:"parser error"},Os=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Is=typeof ArrayBuffer=="function",Us=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,Gt=({type:n,data:e},t,s)=>Os&&e instanceof Blob?t?s(e):Rs(e,s):Is&&(e instanceof ArrayBuffer||Us(e))?t?s(e):Rs(new Blob([e]),s):s(xe[n]+(e||"")),Rs=(n,e)=>{const t=new FileReader;return t.onload=function(){const s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(n)};function ks(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let Ot;function er(n,e){if(Os&&n.data instanceof Blob)return n.data.arrayBuffer().then(ks).then(e);if(Is&&(n.data instanceof ArrayBuffer||Us(n.data)))return e(ks(n.data));Gt(n,!1,t=>{Ot||(Ot=new TextEncoder),e(Ot.encode(t))})}const xs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Je=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<xs.length;n++)Je[xs.charCodeAt(n)]=n;const tr=n=>{let e=n.length*.75,t=n.length,s,i=0,c,p,b,E;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);const Y=new ArrayBuffer(e),f=new Uint8Array(Y);for(s=0;s<t;s+=4)c=Je[n.charCodeAt(s)],p=Je[n.charCodeAt(s+1)],b=Je[n.charCodeAt(s+2)],E=Je[n.charCodeAt(s+3)],f[i++]=c<<2|p>>4,f[i++]=(p&15)<<4|b>>2,f[i++]=(b&3)<<6|E&63;return Y},sr=typeof ArrayBuffer=="function",Jt=(n,e)=>{if(typeof n!="string")return{type:"message",data:Ps(n,e)};const t=n.charAt(0);return t==="b"?{type:"message",data:nr(n.substring(1),e)}:at[t]?n.length>1?{type:at[t],data:n.substring(1)}:{type:at[t]}:$t},nr=(n,e)=>{if(sr){const t=tr(n);return Ps(t,e)}else return{base64:!0,data:n}},Ps=(n,e)=>{switch(e){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},$s="",rr=(n,e)=>{const t=n.length,s=new Array(t);let i=0;n.forEach((c,p)=>{Gt(c,!1,b=>{s[p]=b,++i===t&&e(s.join($s))})})},ir=(n,e)=>{const t=n.split($s),s=[];for(let i=0;i<t.length;i++){const c=Jt(t[i],e);if(s.push(c),c.type==="error")break}return s};function or(){return new TransformStream({transform(n,e){er(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 c=new DataView(i.buffer);c.setUint8(0,126),c.setUint16(1,s)}else{i=new Uint8Array(9);const c=new DataView(i.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(s))}n.data&&typeof n.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}let It;function rt(n){return n.reduce((e,t)=>e+t.length,0)}function it(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 ar(n,e){It||(It=new TextDecoder);const t=[];let s=0,i=-1,c=!1;return new TransformStream({transform(p,b){for(t.push(p);;){if(s===0){if(rt(t)<1)break;const E=it(t,1);c=(E[0]&128)===128,i=E[0]&127,i<126?s=3:i===126?s=1:s=2}else if(s===1){if(rt(t)<2)break;const E=it(t,2);i=new DataView(E.buffer,E.byteOffset,E.length).getUint16(0),s=3}else if(s===2){if(rt(t)<8)break;const E=it(t,8),Y=new DataView(E.buffer,E.byteOffset,E.length),f=Y.getUint32(0);if(f>Math.pow(2,21)-1){b.enqueue($t);break}i=f*Math.pow(2,32)+Y.getUint32(4),s=3}else{if(rt(t)<i)break;const E=it(t,i);b.enqueue(Jt(c?E:It.decode(E),e)),s=0}if(i===0||i>n){b.enqueue($t);break}}}})}const Ds=4;function W(n){if(n)return cr(n)}function cr(n){for(var e in W.prototype)n[e]=W.prototype[e];return n}W.prototype.on=W.prototype.addEventListener=function(n,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(e),this};W.prototype.once=function(n,e){function t(){this.off(n,t),e.apply(this,arguments)}return t.fn=e,this.on(n,t),this};W.prototype.off=W.prototype.removeListener=W.prototype.removeAllListeners=W.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};W.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};W.prototype.emitReserved=W.prototype.emit;W.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};W.prototype.hasListeners=function(n){return!!this.listeners(n).length};const ut=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),ue=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),lr="arraybuffer";function qs(n,...e){return e.reduce((t,s)=>(n.hasOwnProperty(s)&&(t[s]=n[s]),t),{})}const hr=ue.setTimeout,ur=ue.clearTimeout;function dt(n,e){e.useNativeTimers?(n.setTimeoutFn=hr.bind(ue),n.clearTimeoutFn=ur.bind(ue)):(n.setTimeoutFn=ue.setTimeout.bind(ue),n.clearTimeoutFn=ue.clearTimeout.bind(ue))}const dr=1.33;function fr(n){return typeof n=="string"?pr(n):Math.ceil((n.byteLength||n.size)*dr)}function pr(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 Vs(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function vr(n){let e="";for(let t in n)n.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(n[t]));return e}function _r(n){let e={},t=n.split("&");for(let s=0,i=t.length;s<i;s++){let c=t[s].split("=");e[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return e}class gr extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class Xt extends W{constructor(e){super(),this.writable=!1,dt(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 gr(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=Jt(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&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=vr(e);return t.length?"?"+t:""}}class yr extends Xt{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)};ir(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,rr(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]=Vs()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}}let Ms=!1;try{Ms=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const mr=Ms;function br(){}class wr extends yr{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,c)=>{this.onError("xhr post error",i,c)})}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 ke extends W{constructor(e,t,s){super(),this.createRequest=e,dt(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=qs(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=ke.requestsCount++,ke.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=br,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete ke.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()}}ke.requestsCount=0;ke.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ss);else if(typeof addEventListener=="function"){const n="onpagehide"in ue?"pagehide":"unload";addEventListener(n,Ss,!1)}}function Ss(){for(let n in ke.requests)ke.requests.hasOwnProperty(n)&&ke.requests[n].abort()}const Er=function(){const n=Fs({xdomain:!1});return n&&n.responseType!==null}();class Rr extends wr{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=Er&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new ke(Fs,this.uri(),e)}}function Fs(n){const e=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||mr))return new XMLHttpRequest}catch{}if(!e)try{return new ue[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Ws=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class kr extends Xt{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,s=Ws?{}:qs(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;Gt(s,this.supportsBinary,c=>{try{this.doWrite(s,c)}catch{}i&&ut(()=>{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]=Vs()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const Ut=ue.WebSocket||ue.MozWebSocket;class xr extends kr{createSocket(e,t,s){return Ws?new Ut(e,t,s):t?new Ut(e,t):new Ut(e)}doWrite(e,t){this.ws.send(t)}}class Sr extends Xt{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=ar(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),i=or();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();const c=()=>{s.read().then(({done:b,value:E})=>{b||(this.onPacket(E),c())}).catch(b=>{})};c();const p={type:"open"};this.query.sid&&(p.data=`{"sid":"${this.query.sid}"}`),this._writer.write(p).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&&ut(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const Ar={websocket:xr,webtransport:Sr,polling:Rr},Tr=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Nr=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Dt(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=Tr.exec(n||""),c={},p=14;for(;p--;)c[Nr[p]]=i[p]||"";return t!=-1&&s!=-1&&(c.source=e,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=Br(c,c.path),c.queryKey=Cr(c,c.query),c}function Br(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 Cr(n,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,c){i&&(t[i]=c)}),t}const qt=typeof addEventListener=="function"&&typeof removeEventListener=="function",ct=[];qt&&addEventListener("offline",()=>{ct.forEach(n=>n())},!1);class Ie extends W{constructor(e,t){if(super(),this.binaryType=lr,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=Dt(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=Dt(t.host).host);dt(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=_r(this.opts.query)),qt&&(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"})},ct.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=Ds,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&&Ie.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",Ie.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+=fr(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,ut(()=>{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 c={type:e,data:t,options:s};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),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(Ie.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(),qt&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=ct.indexOf(this._offlineEventListener);s!==-1&&ct.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}Ie.protocol=Ds;class Lr extends Ie{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;Ie.priorWebsocketSuccess=!1;const i=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",U=>{if(!s)if(U.type==="pong"&&U.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Ie.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 q=new Error("probe error");q.transport=t.name,this.emitReserved("upgradeError",q)}}))};function c(){s||(s=!0,f(),t.close(),t=null)}const p=U=>{const q=new Error("probe error: "+U);q.transport=t.name,c(),this.emitReserved("upgradeError",q)};function b(){p("transport closed")}function E(){p("socket closed")}function Y(U){t&&U.name!==t.name&&c()}const f=()=>{t.removeListener("open",i),t.removeListener("error",p),t.removeListener("close",b),this.off("close",E),this.off("upgrading",Y)};t.once("open",i),t.once("error",p),t.once("close",b),this.once("close",E),this.once("upgrading",Y),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 Or=class extends Lr{constructor(e,t={}){const s=typeof e=="object"?e:t;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(i=>Ar[i]).filter(i=>!!i)),super(e,s)}};function Ir(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=Dt(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 c=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+c+":"+s.port+e,s.href=s.protocol+"://"+c+(t&&t.port===s.port?"":":"+s.port),s}const Ur=typeof ArrayBuffer=="function",Pr=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,Hs=Object.prototype.toString,$r=typeof Blob=="function"||typeof Blob<"u"&&Hs.call(Blob)==="[object BlobConstructor]",Dr=typeof File=="function"||typeof File<"u"&&Hs.call(File)==="[object FileConstructor]";function Qt(n){return Ur&&(n instanceof ArrayBuffer||Pr(n))||$r&&n instanceof Blob||Dr&&n instanceof File}function lt(n,e){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let t=0,s=n.length;t<s;t++)if(lt(n[t]))return!0;return!1}if(Qt(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return lt(n.toJSON(),!0);for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&<(n[t]))return!0;return!1}function qr(n){const e=[],t=n.data,s=n;return s.data=Vt(t,e),s.attachments=e.length,{packet:s,buffers:e}}function Vt(n,e){if(!n)return n;if(Qt(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]=Vt(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]=Vt(n[s],e));return t}return n}function Vr(n,e){return n.data=Mt(n.data,e),delete n.attachments,n}function Mt(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]=Mt(n[t],e);else if(typeof n=="object")for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(n[t]=Mt(n[t],e));return n}const Mr=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var S;(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"})(S||(S={}));class Fr{constructor(e){this.replacer=e}encode(e){return(e.type===S.EVENT||e.type===S.ACK)&<(e)?this.encodeAsBinary({type:e.type===S.EVENT?S.BINARY_EVENT:S.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===S.BINARY_EVENT||e.type===S.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=qr(e),s=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(s),i}}function As(n){return Object.prototype.toString.call(n)==="[object Object]"}class Zt extends W{constructor(e){super(),this.reviver=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===S.BINARY_EVENT;s||t.type===S.BINARY_ACK?(t.type=s?S.EVENT:S.ACK,this.reconstructor=new Wr(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(Qt(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(S[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===S.BINARY_EVENT||s.type===S.BINARY_ACK){const c=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const p=e.substring(c,t);if(p!=Number(p)||e.charAt(t)!=="-")throw new Error("Illegal attachments");s.attachments=Number(p)}if(e.charAt(t+1)==="/"){const c=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););s.nsp=e.substring(c,t)}else s.nsp="/";const i=e.charAt(t+1);if(i!==""&&Number(i)==i){const c=t+1;for(;++t;){const p=e.charAt(t);if(p==null||Number(p)!=p){--t;break}if(t===e.length)break}s.id=Number(e.substring(c,t+1))}if(e.charAt(++t)){const c=this.tryParse(e.substr(t));if(Zt.isPayloadValid(s.type,c))s.data=c;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case S.CONNECT:return As(t);case S.DISCONNECT:return t===void 0;case S.CONNECT_ERROR:return typeof t=="string"||As(t);case S.EVENT:case S.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&Mr.indexOf(t[0])===-1);case S.ACK:case S.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Wr{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=Vr(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Hr=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Zt,Encoder:Fr,get PacketType(){return S}},Symbol.toStringTag,{value:"Module"}));function ge(n,e,t){return n.on(e,t),function(){n.off(e,t)}}const Kr=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Ks extends W{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=[ge(e,"open",this.onopen.bind(this)),ge(e,"packet",this.onpacket.bind(this)),ge(e,"error",this.onerror.bind(this)),ge(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,c;if(Kr.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 p={type:S.EVENT,data:t};if(p.options={},p.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const f=this.ids++,U=t.pop();this._registerAckCallback(f,U),p.id=f}const b=(i=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||i===void 0?void 0:i.writable,E=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!b||(E?(this.notifyOutgoingListeners(p),this.packet(p)):this.sendBuffer.push(p)),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 c=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let b=0;b<this.sendBuffer.length;b++)this.sendBuffer[b].id===e&&this.sendBuffer.splice(b,1);t.call(this,new Error("operation has timed out"))},i),p=(...b)=>{this.io.clearTimeoutFn(c),t.apply(this,b)};p.withError=!0,this.acks[e]=p}emitWithAck(e,...t){return new Promise((s,i)=>{const c=(p,b)=>p?i(p):s(b);c.withError=!0,t.push(c),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,...c)=>s!==this._queue[0]?void 0:(i!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...c)),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:S.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 S.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 S.EVENT:case S.BINARY_EVENT:this.onevent(e);break;case S.ACK:case S.BINARY_ACK:this.onack(e);break;case S.DISCONNECT:this.ondisconnect();break;case S.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:S.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.emitReserved("connect"),this._drainQueue(!0)}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:S.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 Ke(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}Ke.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?n+t:n-t}return Math.min(n,this.max)|0};Ke.prototype.reset=function(){this.attempts=0};Ke.prototype.setMin=function(n){this.ms=n};Ke.prototype.setMax=function(n){this.max=n};Ke.prototype.setJitter=function(n){this.jitter=n};class Ft extends W{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,dt(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 Ke({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||Hr;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 Or(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const i=ge(t,"open",function(){s.onopen(),e&&e()}),c=b=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",b),e?e(b):this.maybeReconnectOnOpen()},p=ge(t,"error",c);if(this._timeout!==!1){const b=this._timeout,E=this.setTimeoutFn(()=>{i(),c(new Error("timeout")),t.close()},b);this.opts.autoUnref&&E.unref(),this.subs.push(()=>{this.clearTimeoutFn(E)})}return this.subs.push(i),this.subs.push(p),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(ge(e,"ping",this.onping.bind(this)),ge(e,"data",this.ondata.bind(this)),ge(e,"error",this.onerror.bind(this)),ge(e,"close",this.onclose.bind(this)),ge(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){ut(()=>{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 Ks(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 Ge={};function ht(n,e){typeof n=="object"&&(e=n,n=void 0),e=e||{};const t=Ir(n,e.path||"/socket.io"),s=t.source,i=t.id,c=t.path,p=Ge[i]&&c in Ge[i].nsps,b=e.forceNew||e["force new connection"]||e.multiplex===!1||p;let E;return b?E=new Ft(s,e):(Ge[i]||(Ge[i]=new Ft(s,e)),E=Ge[i]),t.query&&!e.query&&(e.query=t.queryKey),E.socket(t.path,e)}Object.assign(ht,{Manager:Ft,Socket:Ks,io:ht,connect:ht});function Yr(){return{Authorization:`Bearer ${zt.getToken()}`}}async function jr(){const n=await fetch(`${Bs}/active-runs`,{headers:Yr()});if(!n.ok)return[];const{runs:e}=await n.json();return e??[]}const zr="Run all tests?",Gr="Run all tests",Jr="No tag or filter is set. This will run",Xr="every test",Qr="in the suite, which may take a while.",Zr="View Report",ei="Test Run",ti="Clear test run",si="None",ni="No active test runs",ri="Workers",ii="Browser",oi="Runners",ai="Notify",ci="No automated cases in this run",li="Running",hi="Run",ui="Manual run",di="No tests currently running",fi="Live",pi=n=>`${n} automated`,vi=n=>n?"Discord notification on":"Discord notification off",_i=n=>n?"Slack notification on":"Slack notification off",gi=n=>`${n} runners`,yi=n=>`${Ls(n)} run`,mi=n=>`started by ${n}`,bi=n=>n?"Collapse panel":"Expand panel";function wi(n,e,t){return n.running?"Running":n.status==="pass"?"Passed":n.status==="fail"?"Failed":t?"Scheduled":e?"Running":"Ready"}function Ei(n,e){var t;return n.selectedRunners.length===1&&n.selectedRunners[0]===Ae?Cs:n.selectedRunners.length===1?((t=e.find(s=>s.id===n.selectedRunners[0]))==null?void 0:t.name)??"1 node":`${n.selectedRunners.length} nodes`}var Ri=R(' <strong class="svelte-h71cn6"></strong> ',1),ki=R('<span class="run-tag svelte-h71cn6"> </span>'),xi=R('<a class="view-report-btn svelte-h71cn6"> <svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-h71cn6"><line x1="5" y1="12" x2="19" y2="12" class="svelte-h71cn6"></line><polyline points="12 5 19 12 12 19" class="svelte-h71cn6"></polyline></svg></a>'),Si=R('<span class="run-chip-spinner svelte-h71cn6"></span>'),Ai=R('<span class="run-chip-count svelte-h71cn6"> </span>'),Ti=R('<div class="run-chip svelte-h71cn6"><svg width="9" height="10" viewBox="0 0 10 12" fill="currentColor" stroke="none" style="opacity:0.6;flex-shrink:0" class="svelte-h71cn6"><polygon points="0,0 10,6 0,12" class="svelte-h71cn6"></polygon></svg> <span class="run-chip-title svelte-h71cn6"> </span> <!> <button class="run-chip-clear svelte-h71cn6"><svg width="9" height="9" viewBox="0 0 14 14" fill="none" class="svelte-h71cn6"><path d="M1 1l12 12M13 1L1 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" class="svelte-h71cn6"></path></svg></button></div>'),Ni=R('<div class="input-wrap svelte-h71cn6"><svg class="input-icon svelte-h71cn6" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8" class="svelte-h71cn6"></circle><line x1="21" y1="21" x2="16.65" y2="16.65" class="svelte-h71cn6"></line></svg> <input type="text" class="tag-input svelte-h71cn6" placeholder="@tag or leave blank for all tests"></div>'),Bi=R('<button class="dropdown-item svelte-h71cn6"><span style="color:var(--text-muted)" class="svelte-h71cn6">✕</span> </button> <div class="dropdown-divider svelte-h71cn6"></div>',1),Ci=R('<div class="dropdown-empty svelte-h71cn6"></div>'),Li=R('<button class="dropdown-item svelte-h71cn6"> </button>'),Oi=R('<div class="dropdown-menu run-pick-menu svelte-h71cn6"><!> <!></div>'),Ii=R('<button class="dropdown-item svelte-h71cn6"> </button>'),Ui=R('<div class="dropdown-menu svelte-h71cn6"></div>'),Pi=R('<label class="runner-option svelte-h71cn6"><input type="checkbox" class="svelte-h71cn6"> <span class="runner-dot built-in svelte-h71cn6"></span> <span class="svelte-h71cn6"></span></label>'),$i=R('<label class="runner-option svelte-h71cn6"><input type="checkbox" class="svelte-h71cn6"> <span class="runner-dot remote svelte-h71cn6"></span> <span class="svelte-h71cn6"> </span></label>'),Di=R('<div class="dropdown-menu runners-menu svelte-h71cn6"><!> <!></div>'),qi=R('<div class="ctrl-divider svelte-h71cn6"></div> <div class="ctrl-group svelte-h71cn6"><span class="ctrl-label svelte-h71cn6"></span> <div class="dropdown-wrap svelte-h71cn6"><button class="dropdown-trigger svelte-h71cn6"><span class="svelte-h71cn6"> </span> <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" class="trigger-chevron svelte-h71cn6"><polyline points="6 9 12 15 18 9" class="svelte-h71cn6"></polyline></svg></button> <!></div></div>',1),Vi=R('<button type="button" class="notify-btn svelte-h71cn6"></button>'),Mi=R('<button type="button" class="notify-btn svelte-h71cn6"></button>'),Fi=R('<div class="ctrl-divider svelte-h71cn6"></div> <div class="ctrl-group svelte-h71cn6"><span class="ctrl-label svelte-h71cn6"></span> <div class="notify-toggles svelte-h71cn6"><!> <!></div></div>',1),Wi=R('<span class="run-spinner svelte-h71cn6"></span> ',1),Hi=mn('<svg width="9" height="10" viewBox="0 0 10 12" fill="currentColor" stroke="none" class="svelte-h71cn6"><polygon points="0,0 10,6 0,12" class="svelte-h71cn6"></polygon></svg> ',1),Ki=R('<span class="meta-dot svelte-h71cn6">·</span> ',1),Yi=R('<span class="run-card-meta svelte-h71cn6"> <span class="meta-dot svelte-h71cn6">·</span> <span class="meta-dot svelte-h71cn6">·</span> <!></span>'),ji=R('<a href="/reports/live" class="run-card active-run svelte-h71cn6"><span class="run-card-dot pulse-accent svelte-h71cn6"></span> <div class="run-card-info svelte-h71cn6"><span class="run-card-label svelte-h71cn6"> </span> <!></div> <!> <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" class="run-card-arrow svelte-h71cn6"><line x1="5" y1="12" x2="19" y2="12" class="svelte-h71cn6"></line><polyline points="12 5 19 12 12 19" class="svelte-h71cn6"></polyline></svg></a>'),zi=R('<span class="meta-dot svelte-h71cn6">·</span> ',1),Gi=R('<a class="run-card cron-run svelte-h71cn6"><span class="run-card-dot pulse-pass svelte-h71cn6"></span> <div class="run-card-info svelte-h71cn6"><span class="run-card-label svelte-h71cn6"> </span> <span class="run-card-meta svelte-h71cn6"> <!></span></div> <!> <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" class="run-card-arrow svelte-h71cn6"><line x1="5" y1="12" x2="19" y2="12" class="svelte-h71cn6"></line><polyline points="12 5 19 12 12 19" class="svelte-h71cn6"></polyline></svg></a>'),Ji=R('<div class="empty-runs svelte-h71cn6"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="empty-icon svelte-h71cn6"><circle cx="12" cy="12" r="10" class="svelte-h71cn6"></circle><line x1="10" y1="15" x2="10" y2="12" class="svelte-h71cn6"></line><line x1="10" y1="9" x2="10.01" y2="9" class="svelte-h71cn6"></line></svg> </div>'),Xi=R('<div class="body svelte-h71cn6"><!> <!> <!></div>'),Qi=R('<!> <div class="panel svelte-h71cn6"><div class="scan-line svelte-h71cn6"></div> <div class="bar svelte-h71cn6"><div class="bar-left svelte-h71cn6"><div class="bar-status svelte-h71cn6"><span class="status-dot svelte-h71cn6"></span> <span class="status-word svelte-h71cn6"> </span> <!></div> <!></div> <span class="flex-gap svelte-h71cn6"></span> <div class="bar-center svelte-h71cn6"><!> <div class="ctrl-group svelte-h71cn6"><span class="ctrl-label svelte-h71cn6"></span> <div class="dropdown-wrap svelte-h71cn6"><button class="dropdown-trigger svelte-h71cn6"><span class="svelte-h71cn6"> </span> <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" class="trigger-chevron svelte-h71cn6"><polyline points="6 9 12 15 18 9" class="svelte-h71cn6"></polyline></svg></button> <!></div></div> <div class="ctrl-divider svelte-h71cn6"></div> <div class="ctrl-group svelte-h71cn6"><span class="ctrl-label svelte-h71cn6"></span> <div class="stepper svelte-h71cn6"><button class="step-btn svelte-h71cn6">−</button> <span class="step-val svelte-h71cn6"> </span> <button class="step-btn svelte-h71cn6">+</button></div></div> <div class="ctrl-divider svelte-h71cn6"></div> <div class="ctrl-group svelte-h71cn6"><span class="ctrl-label svelte-h71cn6"></span> <div class="dropdown-wrap svelte-h71cn6"><button class="dropdown-trigger svelte-h71cn6"><span class="svelte-h71cn6"> </span> <svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" class="trigger-chevron svelte-h71cn6"><polyline points="6 9 12 15 18 9" class="svelte-h71cn6"></polyline></svg></button> <!></div></div> <!> <!> <div class="ctrl-divider svelte-h71cn6"></div> <button class="run-btn svelte-h71cn6"><!></button></div> <span class="flex-gap-sm svelte-h71cn6"></span> <button class="expand-btn svelte-h71cn6"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svelte-h71cn6"><polyline points="18 15 12 9 6 15" class="svelte-h71cn6"></polyline></svg></button></div> <!></div>',1);function Zi(n,e){Ht(e,!1);const[t,s]=jt(),i=()=>Re(Oe,"$runnerState",t),c=()=>Re(Se,"$runnerConfig",t),p=()=>Re(ze,"$backgroundRuns",t),b=()=>Re(On,"$runsVersion",t),E=()=>Re(Fe,"$panelExpanded",t),Y=()=>Re(Bt,"$builtInEnabled",t),f=P(),U=P(),q=P(),j=P(),te=P(),Te=P(),De=P(),ne=P(),ye=P(),me=P(),de=P();let ce=P([]),Ne=P([]),C=P(null),fe=P(!1),pe=P(!1),V=P(!1),L=P(!1),J=P(!1),re=P({discordWebhookUrl:"",slackWebhookUrl:"",notifyPublicUrl:""}),ie=P(!1),M=P(!1);function H(a){function u(o){a.contains(o.target)||a.dispatchEvent(new CustomEvent("clickoutside"))}return document.addEventListener("click",u,!0),{destroy(){document.removeEventListener("click",u,!0)}}}let z,Be,be,qe;function Ce(a,u,o){return{kind:a,label:u,output:"",running:!0,testCompleted:!1,latestReportId:null,status:"running",lanes:[],currentRun:{tag:o==null?void 0:o.tag,workers:o==null?void 0:o.workers,browser:o==null?void 0:o.browser,runTitle:u,startedBy:o==null?void 0:o.startedBy},latestScreenshot:null}}Kt(()=>{try{const o=localStorage.getItem("plum:runnerConfig");o&&Se.update(h=>({...h,...JSON.parse(o)}))}catch{}try{const o=localStorage.getItem("plum:panelExpanded");o!==null&&Fe.set(o==="true")}catch{}try{const o=localStorage.getItem("plum:builtInEnabled");o!==null&&Bt.set(o!=="false")}catch{}Bn().then(o=>{x(ce,o);const h=new Set([Ae,...o.map(l=>l.id)]);Se.update(l=>{const g=l.selectedRunners.filter(m=>h.has(m));return{...l,selectedRunners:g.length>0?g:[Ae]}})}).catch(()=>{}),Cn().then(o=>x(re,o)).catch(()=>{}),jr().then(o=>{o.length!==0&&(ze.update(h=>{const l={...h};for(const{runId:g,kind:m,label:w,meta:k}of o)l[g]||(l[g]=Ce(m,w,k));return l}),Fe.set(!0))}).catch(()=>{}),z=Se.subscribe(o=>{try{localStorage.setItem("plum:runnerConfig",JSON.stringify(o))}catch{}}),Be=Fe.subscribe(o=>{try{localStorage.setItem("plum:panelExpanded",String(o))}catch{}}),be=Bt.subscribe(o=>{try{localStorage.setItem("plum:builtInEnabled",String(o))}catch{}Se.update(h=>{if(!o&&h.selectedRunners.includes(Ae)){const l=h.selectedRunners.filter(m=>m!==Ae),g=l.length>0?l:r(ce)[0]?[r(ce)[0].id]:[];return{...h,selectedRunners:g}}return h})});const a=ht(Bs,{transports:["websocket"]});qe=a,Ln.set(a),a.on(G.LOG,o=>{Oe.update(h=>({...h,output:h.output+o+`
|
|
2
2
|
`}))}),a.on(G.DONE,o=>{const h=typeof o=="object"&&o!==null?o.code:o,l=typeof o=="object"&&o!==null?o.reportId:void 0,g=h===0||h===null,m=h===130;(l!=null?Promise.resolve(l):In().catch(()=>null)).then(k=>{Oe.update(T=>({...T,output:T.output+(m?"":g?`
|
|
3
3
|
✓ All tests passed
|
|
4
4
|
`:`
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g,t as h,s}from"../chunks/CMBQQ9RZ.js";import{i as d}from"../chunks/CKDtmZUQ.js";import{p as l,f as v,t as x,c as _,d as o,k as p,j as k}from"../chunks/BAACMRH5.js";import{s as $,p as i}from"../chunks/
|
|
1
|
+
import{a as g,t as h,s}from"../chunks/CMBQQ9RZ.js";import{i as d}from"../chunks/CKDtmZUQ.js";import{p as l,f as v,t as x,c as _,d as o,k as p,j as k}from"../chunks/BAACMRH5.js";import{s as $,p as i}from"../chunks/Dhf4xQKo.js";const b={get error(){return i.error},get status(){return i.status}};$.updated.check;const m=b;var j=h("<h1> </h1> <p> </p>",1);function z(c,n){l(n,!1),d();var r=j(),t=v(r),f=o(t,!0);p(t);var e=k(t,2),u=o(e,!0);p(e),x(()=>{var a;s(f,m.status),s(u,(a=m.error)==null?void 0:a.message)}),g(c,r),_()}export{z as component};
|